Skip to content

saranya-venkatraman/multi_llm_story_writing

Repository files navigation

Multi-Author Story Generation

This project generates a collaborative story using multiple language models (LLMs) in sequence. Each LLM generates a part of the story, building upon the previous parts.

Table of Contents

Introduction

This project aims to create collaborative stories by leveraging various LLMs in a sequential manner. Each LLM contributes to the story by adding a new part, based on the previous parts generated by other models. The story-generation process includes summarization and continuation prompts to ensure coherence and creativity.

Features

  • Multi-author story generation using different LLMs
  • Dynamic prompt generation for story continuation
  • Summarization of the story so far for better context
  • Batch processing of data for efficiency
  • Customizable parameters for different use cases

Installation

  1. Clone the repository:

    git clone https://github.com/.git  ## Not linked to github yet for anonymity
  2. Navigate to the project directory:

    cd repo-folder
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Set your HuggingFace token as an environment variable:

    export HF_TOKEN="ENTER YOUR HUGGINGFACE TOKEN HERE"

Usage

To run the story generation script, use the following example command:

python write_middle_parts.py --author_num 1 --start 0 --end 100 --n 10 --total_authors 5 --llm llama
  • author_num: The order of this LLM or part of the story being written.
  • start: Prompt start index (default is 0).
  • end: Prompt end index (default is -1, which means till the end).
  • n: Batch size.
  • total_authors: Total number of authors contributing to the story.
  • llm: The LLM being used to generate the story (e.g., llama, mistral,gemma, olmo, orca).

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

Contact

For any questions or issues, please contact:

  • Email: removed for anonymity

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published