# nanochat

- **ID:** 602
- **Kind:** code
- **URL:** https://github.com/RiddleHe/nanochat
- **Authors:** Muyu He, Yuchen Liu
- **Venue:** RiddleHe (GitHub)
- **Published:** 2026
- **Source:** github
- **Access:** free
- **License:** MIT
- **License family:** Permissive (auto-classified)
- **Tags:** nanochat, karpathy, architecture-ablation, rl, nanorl, dclm-core, small-lm
- **Topics:** small LM pretraining, RL ablations
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/602

## Summary

RiddleHe/nanochat forks karpathy/nanochat into two hackable frameworks: nanochat/ for pretraining architecture variants (boolean flags in gpt_base.py, model_registry.py, torchrun scripts/base_train.py, DCLM CORE eval via scripts/base_eval.py) and nanorl/ for RL objective-function ablations (ALGORITHMS in nanorl/loss.py, vLLM rollout worker synced to a torchrun trainer). Ablations.sh runs d12/d24 FLOP-budget batches and skips existing checkpoints. MIT. Cite: Muyu He, Yuchen Liu 2026 (nanochat-arch).

## Attributes

- **Purpose:** Fork of karpathy/nanochat for architecture ablations and RL objective ablations
- **Scale:** 58 stars; 5 forks at check. Ablation scripts for d12 and d24 FLOP budgets; DCLM CORE suite 21 ICL tasks in configs/core.yaml.
- **Time period:** GitHub created 2026-03-17; pushed 2026-08-14; updated 2026-08-05. Discord posted 2026-05-31. Upstream karpathy/nanochat 2025.

## From the source (fetched 2026-10-03)

- **Repository:** RiddleHe/nanochat (GitHub)
- **Created:** Mar 17, 2026 (GitHub)
- **Last push:** Oct 1, 2026 (GitHub)
- **Stars:** 59 (GitHub)
- **Forks:** 6 (GitHub)
- **Main language:** Python (GitHub)

## Research notes

- Primary: GitHub README + API (MIT, Python, 58 stars / 5 forks at check; fork of karpathy/nanochat). Discord posted papers/bank_of_values.pdf; that path and papers/ 404 at check. Cataloged the repo URL as the leftover GitHub item. Training/eval uses public DCLM CORE fixtures in-repo, not a new hosted corpus, so no datasets_local row.

## Similar entries

- [Reward design lessons from 7,780 MiMo RL environments (X thread)](https://papers.projxon.ai/entries/794) (thread, #794)
- [Beam (Reflection AI) — 501B open-weight MoE with the largest publicly documented RL run](https://papers.projxon.ai/entries/1267) (model, #1267)
- [flow-1 (Laminar) — RL-trained model for agent trace error detection](https://papers.projxon.ai/entries/1266) (model, #1266)
- [(auto)²-research: SoTA on Karpathy's NanoChat Benchmark](https://papers.projxon.ai/entries/718) (post, #718)
- [SFT, RL, and On-Policy Distillation Through a Distributional Lens](https://papers.projxon.ai/entries/1095) (post, #1095)
- [Extrapolative Weight Averaging Reveals Correctness-Efficiency Frontiers in Code RL](https://papers.projxon.ai/entries/778) (paper, #778)
