Welcome to the Pookie Chatbot Project, where magic happens! ✨
- Create a chatbot that feels like it’s stealing your heart with every response. 💖
- Serve as an example of how to take a model from hugging face and train it from scratch on a datase AKA. show the whole flow (create, train, run) 🧠
⚠️ All of this (running, training) should be achievable on a not so powerful laptop (eg. M1) with decent performance. This is a key requirement and must not be compromised! 🗑️💻- For this reason, the GPT-2 model is used, which has a manageable size and resource requirement compared to larger models like GPT-3 or GPT-4.
Follow this smooth, seductive workflow to get it working:
-
Setup
- Run
setup_pookie_chatbot.pyto create the custom tokenizer and initialize (lobotomize) a fresh GPT-2 model. 🛠️ - Only do this once unless you’re feeling adventurous and want to tweak the tokenizer or dataset. 😉
- Run
-
Training
- Run
train_pookie.pyto fine-tune the model. 🏋️♂️ - Repeat training 10 or more times (or increase the ephos) to achieve that sweet spot of a loss around 1.5. The more you train, the better it should get. 😘
- Run
-
Testing the Chatbot
- Once fine-tuned, run
run_pookie_chatbot.pyto test your chatbot in an interactive session. 🎭 - Watch as it dazzles you with coherent (not really), context-aware(not really) responses. 🌟
- Once fine-tuned, run
- If you have any suggestions for improvements or find any issues, please open a pull request. 💡
- On the other hand, if you had a fun time using this code, please ⭐ the repo and spread some love. 🫶
- Most code should be commented well and explained since how stuff works will be mostly forgotten after a few motnhs of not touching this 🚫🧠
- The overfitting is intentional because of the small dataset. 📜
Vuka951 GitHub Profile
Feel free to reach out with any questions, feedback, or love for Pookie! 💕