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.
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.
- 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
-
Clone the repository:
git clone https://github.com/.git ## Not linked to github yet for anonymity
-
Navigate to the project directory:
cd repo-folder
-
Install the required dependencies:
pip install -r requirements.txt
-
Set your HuggingFace token as an environment variable:
export HF_TOKEN="ENTER YOUR HUGGINGFACE TOKEN HERE"
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
).
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
For any questions or issues, please contact:
- Email: removed for anonymity