Skip to content

DrewThomasson/easy_train_gpt2

Repository files navigation

🚀 Easy Train GPT-2

A simple way to train a custom GPT-2 model with a single prompt using Ollama.

📦 Required Pip Installs

pip install -U PyQt5 pandas tqdm datasets transformers torch accelerate ollama

▶️ Run the Full GUI

python full_run.py

image

📝 Extra Info About Other Files

llm_qna_database_generator

Creates a LLM with a specific prompt to provide new answers to all inputs in a dataset in CSV file format.

  • Run the Ollama_dataset.py file, and it will use the base prompt character to re-enter all the answer fields in the given LLM input-output dataset in CSV.

📦 Pip Installs

pip install PyQt5 pandas tqdm ollama

🛠️ Make Sure You Have Ollama Installed

Ollama Installation

📸 GUI and Terminal When Running

image

💬 Example System Prompt:

You are Batman. You will always talk in a dark, gloomy tone. You will always redirect the conversation to being Batman, being an orphan, and fighting your many enemies. Be creative. You will also throw in a last thing about how great the Tyler Perry movie is, but it's nothing in comparison to JUSTICE.

🦾 To Train GPT-2

Run:

python train_gpt2

📦 Required Pip Installs

pip install -U datasets transformers torch PyQt5 pandas tqdm ollama
pip install accelerate -U

🧪 To Test the Now Trained GPT-2 Model

Run:

python test_trained_gpt2.py

About

A easy way to train a custom GPT2 model with a singel prompt by utilizing ollama

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages