A custom-trained language model built from scratch — fine-tuned on personal data using DistilGPT-2 and Hugging Face Transformers.
Produces unique, non-hardcoded responses every single time.
This project is a generative AI chatbot trained entirely from scratch on custom data. Rather than prompting an existing API, the model weights are yours — shaped by your own training pipeline and data. Every response is generated fresh through supervised fine-tuning of DistilGPT-2, meaning no two answers are ever the same.
| 🧠 Custom-trained model | Fine-tuned DistilGPT-2 on your own personal dataset |
| 💬 Unique responses | Generative output — never returns hardcoded answers |
| 📝 Full training pipeline | Complete train.py script included end-to-end |
| 🚀 Interactive chat loop | Terminal-based conversation interface out of the box |
| 🔧 Modular design | Clean separation between training and inference scripts |
Python 3.11 · PyTorch · Hugging Face Transformers · DistilGPT-2 · SentencePiece
1. Clone the repository
git clone https://github.com/PatrickAsaad1/Generative-AI.git
cd Generative-AI2. Install dependencies
pip install -r requirements.txtTrain the model on your data:
python scripts/train.pyStart chatting with your AI:
python scripts/run.pyType your questions and the model responds in real time.
Typeexitto quit the chat loop.
Your Data ──► Fine-tune DistilGPT-2 ──► Saved Model Weights
│
▼
run.py ──► Generated Response
The training script loads your custom dataset, fine-tunes the DistilGPT-2 base model via supervised learning, and saves the resulting weights locally. The run script loads those weights and feeds your input through the model to generate contextual, probabilistic responses — no lookup tables, no hardcoded replies.
Released under the MIT License — free to use, modify, and distribute.