From-scratch PyTorch comparison: 42M Dense vs 117M-A67M MoE vs 20M Looped transformer
BitPoper29 · reddit · 2026-12-06
A Reddit user built Spell-Talker, comparing three transformer architectures implemented from scratch in pure PyTorch with no high-level training wrappers, all sharing a fixed backbone (512 context, 8 heads, 512 dim, RMSNorm, SwiGLU, weight-tied 32k vocab):
- Dense (CustomGPT, 41.8M): standard 8-layer decoder baseline.
- Sparse MoE (CustomMoEGPT, 117.3M total / 67M active): Top-2 gating across 4 SwiGLU experts per layer with auxiliary load-balancing loss.
- Looped Recurrent (LoopedCustomGPT, 20.3M): a single weight-tied block unrolled 8 times during training via truncated BPTT (bpttsteps=8), scalable up to 32 steps at inference.
All were trained on TinyStories on a single consumer RTX 3050, with a side-by-side benchmark UI (shown in the image) racing two models on real recorded runs. Code and HF checkpoints are open-sourced; the author invites discussion of MoE router stability and truncated BPTT in looped blocks.
More from Models
- MiniCPM5-15B-A2.5B scores 123/126 at CMO 2026, hitting gold-medal threshold on-device — Med1_Ai · 2026-12-06
- Reddit user reports MiniMax H3 is very slow — Negative-Spend483 · 2026-12-06
- MiniMax M4 arrives on Sunra with 1M-token context, multimodal input, flash pricing — Aiden_Tech_Ai · 2026-12-06
- Picking a Claude model is now a product decision: Haiku for volume, Sonnet as default, Opus for quality — goyalshaliniuk · 2026-12-06
- ChatGPT Plus user gets just 8 minutes of work per 5-hour limit, calls it 'completely useless' — easily-excited · 2026-12-06
- Fish Audio launches S3 Pro and transcribe-stream-2 voice models for call agents — Aiden_Tech_Ai · 2026-12-06