mirror of
https://github.com/karpathy/nanochat.git
synced 2026-03-12 04:05:30 +00:00
Optimizer & schedule changes: - Increase unembedding LR 0.004 -> 0.008, weight decay 0.2 -> 0.28 - Per-group Adam betas and weight decay (instead of shared global betas) - Muon beta2 0.95 -> 0.9, momentum warmup target 0.95 -> 0.97 over 400 steps - Warmup: ratio-based -> absolute steps (default 40) - Warmdown ratio 0.5 -> 0.65, final LR fraction 0.0 -> 0.05 - Weight decay schedule: linear -> cosine decay - Polar express norm factor 1.02 -> 1.01 Architecture & init changes: - VE gate: channels 32 -> 12, scale range 2x -> 3x, init small positive - Add post-QK-norm scaling (q,k *= 1.15) for sharper attention - Embedding init std 1.0 -> 0.8, MLP c_fc init 0.5x smaller - RoPE base theta 10K -> 100K - Short attention window: seq_len/2 -> ~seq_len/3 (ceil to 128 tile) - Logit softcap 20 -> 15 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| checkpoint_manager.py | ||
| common.py | ||
| core_eval.py | ||
| dataloader.py | ||
| dataset.py | ||
| engine.py | ||
| execution.py | ||
| flash_attention.py | ||
| fp8.py | ||
| gpt.py | ||
| logo.svg | ||
| loss_eval.py | ||
| optim.py | ||
| report.py | ||
| tokenizer.py | ||
| ui.html | ||