🧠 Mini-LLM — 80M Parameter Transformer (Pretrained From Scratch)
5
13 commits
1 linked in READMEs
updated Dec 8, 2025
Mini-LLM is an 80M parameter decoder-only transformer trained fully from scratch using a custom tokenizer, custom architecture, and custom training loop.
It is designed as an educational + research-friendly minimal LLM that demonstrates how modern LLM components are built end-to-end.
| Component | Value |
|---|---|
| Type | Decoder-only transformer |
| Parameters | ~80M |
| Layers | 16 |
| Embedding dim | 384 |
| Attention heads | 6 |
| KV Heads | 6 |
| MLP Hidden Dim | 1536 (SwiGLU) |
| Max sequence length | 2048 |
| Norm | RMSNorm |
| Positional Encoding | RoPE |
| Tokenizer | SentencePiece BPE (32k vocab, byte fallback) |
checkpoints/ → Pretrained model state_dict + optimizersafetensors/ → Final consolidated .safetensors filelogs/ → Training logs in JSONLplots/ → Train/val loss curvestokenizer.json → HF-compatible tokenizerspm.model → SentencePiece modelfrom transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Ashx098/Mini-LLM", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("Ashx098/Mini-LLM")
prompt = "Hello, how are you?"
inputs = tok(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tok.decode(outputs[0], skip_special_tokens=True))
Final loss reached: ~3.25
Prompt: "Hello, how are you" Output: "Hello, how are you?"
Prompt: "Python is a programming language that" Output: "Python is a programming language that allows the history..."
MIT License — free for research, modification, and further training.
Developed by Avinash Mynampati
Built from scratch using PyTorch + custom training pipeline.
You can:
For questions or collaborations:
🧠 Mini-LLM — 80M Parameter Transformer (Pretrained From Scratch)
5
13 commits
1 linked in READMEs
updated Dec 8, 2025
Mini-LLM is an 80M parameter decoder-only transformer trained fully from scratch using a custom tokenizer, custom architecture, and custom training loop.
It is designed as an educational + research-friendly minimal LLM that demonstrates how modern LLM components are built end-to-end.
| Component | Value |
|---|---|
| Type | Decoder-only transformer |
| Parameters | ~80M |
| Layers | 16 |
| Embedding dim | 384 |
| Attention heads | 6 |
| KV Heads | 6 |
| MLP Hidden Dim | 1536 (SwiGLU) |
| Max sequence length | 2048 |
| Norm | RMSNorm |
| Positional Encoding | RoPE |
| Tokenizer | SentencePiece BPE (32k vocab, byte fallback) |
checkpoints/ → Pretrained model state_dict + optimizersafetensors/ → Final consolidated .safetensors filelogs/ → Training logs in JSONLplots/ → Train/val loss curvestokenizer.json → HF-compatible tokenizerspm.model → SentencePiece modelfrom transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Ashx098/Mini-LLM", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("Ashx098/Mini-LLM")
prompt = "Hello, how are you?"
inputs = tok(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tok.decode(outputs[0], skip_special_tokens=True))
Final loss reached: ~3.25
Prompt: "Hello, how are you" Output: "Hello, how are you?"
Prompt: "Python is a programming language that" Output: "Python is a programming language that allows the history..."
MIT License — free for research, modification, and further training.
Developed by Avinash Mynampati
Built from scratch using PyTorch + custom training pipeline.
You can:
For questions or collaborations: