Framework · established

karpathy/nanochat

Minimal end-to-end LLM training harness covering tokenizer, pretraining, SFT, RL, evaluation, inference, and scaling/speedrun scripts.

LLM trainingML research
Installation GuideInstruction Manual

What it contains

Minimal end-to-end LLM training harness covering tokenizer, pretraining, SFT, RL, evaluation, inference, and scaling/speedrun scripts.

Typical uses

Train/study small-to-GPT-2-scale models with a compact PyTorch codebase and reproducible run recipes.

Why people choose it

Inference: chosen for end-to-end comprehensibility rather than a large configurable training framework.

License
MIT
Maintenance
active
Latest release
Unknown
Last meaningful update
Unknown
Maturity
established
Production readiness
development

Classification

Subject domains

LLM trainingML research

Task categories

LLM trainingML research

Project phases

researchimplementation

Secondary types

training harnessCLI

Select when

  • Need understandable end-to-end LLM training/research

Do not select when

  • Need production distributed-training platform
  • Inference-only need
Implementation complexity
medium
Setup effort
medium
Learning curve
high
Confidence
high

Routing heuristic 78.0%

Routing specificity
4/5
Setup simplicity
3/5
Operational maturity
3/5
Composability
4/5
Local control
5/5
Security boundary clarity
3/5
First-party routing documentation
5/5

Strengths

None documented.

Poor-fit scenarios

  • Need production distributed-training platform
  • Inference-only need

Limitations

None documented.

Core library
nanochat/

GPT/optimizer/data/tokenizer/eval/inference.

training core
Scripts command
scripts/

Train/eval/SFT/RL/chat/tokenizer/benchmarks.

trainingeval
Run recipes workflow
runs/

Speedrun/scaling/miniseries/CPU scripts.

experiments
Tasks dataset
tasks/

Evaluation task adapters.

eval tasks
Languages
Python
Frameworks
PyTorch
Runtimes
Python, uv
Operating systems
None documented
Installation methods
None documented
Interfaces
None documented
Required credentials
None documented
External services
None documented
Hardware
CPU/MPS for small demos, GPU/8xH100 reference workflows
Major dependencies
None documented

Compatibility notes

None documented.

One-sentence semantic summary

Minimal end-to-end LLM training harness covering tokenizer, pretraining, SFT, RL, evaluation, inference, and scaling/speedrun scripts.

Capability keywords

tokenizationpretrainingSFTRLevaluationinferencescaling

User intent phrases

  • Need understandable end-to-end LLM training/research

Negative match phrases

  • Need production distributed-training platform
  • Inference-only need

Differentiators

None documented.

Security considerations

None documented.

Privacy considerations

None documented.

Uncertainty

Unresolved items

None documented.

Inference notes

None documented.

Evidence

Repository usage guidance

installation summary
Unknown
basic usage summary
Train/study small-to-GPT-2-scale models with a compact PyTorch codebase and reproducible run recipes.
documented entry points
runs/speedrun.sh, python -m scripts.chat_cli
key configuration files
None documented
important directories
nanochat/, scripts/, runs/, tasks/
documentation paths
README.md
example paths
None documented

Relationships

downstream
high
Autoresearch uses a simplified nanochat-derived training setup.

Recommended combinations

LLM research loop high

Each repository covers a distinct layer; avoid combining tools that duplicate lifecycle ownership.

Order of operations

  • Understand/reproduce nanochat baseline
  • Set up autoresearch on suitable GPU
  • Define program.md policy
  • Run bounded experiments and review logs

Routing rules

rule_041: Need understandable end-to-end LLM training/research P959

Rationale

Minimal end-to-end LLM training harness covering tokenizer, pretraining, SFT, RL, evaluation, inference, and scaling/speedrun scripts.

Required conditions

None documented.

Preferred

karpathy/nanochat

Fallback

None