This project aims to fine-tune a language model on Shark Tank pitch transcripts to generate new, creative business pitches.
data-generation/: Contains scripts for collecting YouTube video URLs, transcribing them, and preparing the data for fine-tuning.fine-tuning/: Contains scripts for fine-tuning a language model (TinyLlama) using PEFT (LoRA) and merging the LoRA adapters with the base model.transcripts/: Stores the transcribed text from YouTube videos.lora-llama/: Contains the checkpoints from the fine-tuning process.merged_model/: Stores the final merged language model.
-
Clone the repository:
git clone https://github.com/your-username/SharkTankAI.git cd SharkTankAI -
Create a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
First, collect video URLs, transcribe them, and generate the JSON dataset:
python data-generation/collect_videos.py
python data-generation/transcribe_videos.py
python data-generation/generate_json.pyThis will:
- Search YouTube for 'Shark Tank' videos and save URLs to
video_urls.txt. - Transcribe the videos and save transcripts to the
transcripts/directory. - Combine all transcripts into
shark_tank_pitches.json.
Once the data is prepared, you can fine-tune the TinyLlama model:
python fine-tuning/fine_tune.pyThis script will save the fine-tuned LoRA adapters in the lora-llama/ directory.
After fine-tuning, merge the LoRA adapters with the base model to create a standalone model:
python fine-tuning/merge_lora.pyThe merged model will be saved in the merged_model/ directory.
The project uses TinyLlama/TinyLlama-1.1B-Chat-v1.0 as the base model for fine-tuning. The model has been trained on Shark Tank transcripts to enable it to act as a 'negator model', providing critical analysis of business pitches. The fine-tuned model is then converted to GGUF format and can be merged with Ollama for local inference.
- Implement a script to generate new pitches using the merged model.
- Explore different base models and fine-tuning parameters.
- Add more robust error handling and logging.