MiniGPT is a minimal yet functional GPT-style text generation project built from scratch using PyTorch and deployed via a FastAPI inference API.
It demonstrates a full mini-LLM lifecycle β training, saving checkpoints, and serving text generation via an HTTP endpoint.
- π§© Custom GPT-style architecture implemented in PyTorch
- ποΈββοΈ Trained on tokenized text data (Byte Pair Encoding vocabulary)
- πΎ Checkpoint saving & loading for model reuse
- βοΈ FastAPI inference server exposing a
/generateendpoint - π₯ GPU acceleration (if available) using
torch.cuda - π¦ Clean project structure with tokenizer, model, and inference neatly organized
uvicorn app:app --reload --port 8080
curl -X POST "http://127.0.0.1:8080/generate"
-H "Content-Type: application/json"
-d '{
"prompt": "I am a boy from",
"max_new_tokens": 150
}'
