roneneldan/TinyStories
Viewer β’ Updated β’ 2.14M β’ 243k β’ 1.35k
Hedwig Flagship (--300m) is the third and largest generation of Hedwig, built 100% from scratch in pure PyTorch (RoPE + RMSNorm + SwiGLU + SDPA + bf16, custom BPE tokenizer, Stage 2 SFT, Stage 3 Anchored DPO, and from-scratch 4-bit quantization).
286,663,680 (~286.7M knobs: 20 layers, 1024 width, 16 heads, block_size = 512)tokenizer.json, 4.13 chars/token)523.9 MB TinyStories (roneneldan/TinyStories)734.0 MB FineWeb-Edu (karpathy/fineweb-edu-100b-shuffle, 154,768 docs, ODC-By)71,906 mixed pairs (TinyStories-Instruct + 30,000 Apache-2.0 grammarly/coedit grammar/tone rewrites)52,798 π chosen vs π rejected pairs| Checkpoint | Precision | File Size | Val / Test Loss | Notes |
|---|---|---|---|---|
brain.pt |
bfloat16 |
574.7 MB | 2.998 |
Stage 1 pretrain (25,000 steps, 16k vocab, 512 context) |
brain_chat.pt |
bfloat16 |
574.7 MB | 1.341 |
Stage 2 SFT (2,500 steps) |
brain_chat_int4.pt |
int4 |
161.9 MB | 1.3601 |
From-scratch packed 4-bit quantization |
brain_dpo.pt |
bfloat16 |
574.7 MB | 1.200 |
Stage 3 DPO (98.3% preference win-rate!) |
brain_dpo_int4.pt |
int4 |
161.9 MB | 1.4249 |
From-scratch packed 4-bit quantization |
At 286.7M parameters trained on ~205M tokens (~0.7 tokens/knob vs the Chinchilla ~20 tokens/knob rule), this model is intentionally under-read for budget (~$1.70) to demonstrate real scaling tradeoffs on consumer hardware. Full side-by-side story comparisons against Hedwig 14M and 97.6M live in docs/STORY_SHOWDOWN.md.
Full pure-PyTorch training scripts, interactive Brain X-Ray UI (app.py), and learning logs live at https://github.com/ansarbuilds/hedwig.