nanochat / scripts

Commit History

  1. clean up fragile code

    Andrej Karpathy
    92d63d4
  2. add inference benchmarking

    Andrej Karpathy
    eb16d01
  3. fix deprecated commit on torchao

    Andrej Karpathy
    f527f76
  4. nuke huggingface and its giant dependency footprint from orbit. datasets still todo

    Andrej Karpathy
    4186540
  5. delete spurious 'cute' bloat that doesn't matter to a serious research stack

    Andrej Karpathy
    950a1dc
  6. remove a ton of UI bloat, we need to make nanochat small and sexy and minimal and forkable. code is ~free now, if you want UI get your favorite LLM to add it. nukes ~1000 LOC from orbit nice

    Andrej Karpathy
    da32e1d
  7. Improve error handling for batch size alignment

    Andrej
    Unverified signature
    6facdee
  8. Merge pull request #540 from svlandeg/fix/kernel⁠

    Andrej
    Unverified signature
    2fc63c9
  9. Small doc fixes for consistency

    Andrej
    Unverified signature
    dbe6e2a
  10. fix token_bytes calculation to use raw token bytes instead of round-tripping through str, which corrupts tokens that are not valid standalone UTF-8 (e.g. bytes >= 0x80 became 3-byte U+FFFD). 193/32768 tokens were affected, so bpb of new runs will read ~0.05% higher than old runs. Thank you @ellenjxu #693⁠

    Andrej Karpathy +1: Claude Fable 5
    2ce972a

  1. rename fwe to climbmix

    svlandeg
    fbb50ad
  2. Merge branch 'master' into feat/small_fixes

    svlandeg
    07e2103
  3. delete the whole report thing i think it was a bad idea it just bloats the code. doing this subtracts 540 LOC

    Andrej Karpathy
    f10bd75

  1. add required -i to example chat_eval scripts

    svlandeg
    bc78a71

  1. print CORE score in chat_eval

    svlandeg
    c2082b3

  1. Merge branch 'master' into fix-batch-size-assertion

    9f9ef95

  1. Merge pull request #634 from 2bitbit/fix-docs-and-comments⁠

    Andrej
    Unverified signature
    a4ed966
  2. Merge pull request #639 from mathieu-lacage/master⁠

    Andrej
    Unverified signature
    7b70f6b
  3. fix: use meta device in disable_fp8 to avoid VRAM spike (#616)⁠

    RoomWithOutRoof +1: RoomWithOutRoof
    Unverified signature
    47e983e

  1. bump D:N ratio to 12 per recent scaling laws re-run

    Andrej Karpathy
    1cd94d7

  1. Merge branch 'master' into fix-batch-size-assertion

    daba23c

  1. Autoresearch round 2: smear, backout, and hyperparameter tuning⁠

    Andrej Karpathy +1: Claude Opus 4.6 (1M context)
    a825e63

  1. MMLU main split is named auxiliary_train, not train

    Mathieu Lacage
    a641b6c

  1. fix: correct minor typos in help text, README, and comments

    2bitbit
    2bb93b2

  1. Merge branch 'master' into fix/kernel

    svlandeg
    a14c399

  1. Merge branch 'master' into fix-batch-size-assertion

    0e5403e

  1. All of these improvements were developed by Claude running autonomously over ~2 days using autoresearch. I didn't touch anything - incredible. All tuning was done on d12 but generalized easily to larger models (e.g. d24 in particular). This means we will also get a new "Time to GPT-2" Leaderboard entry, which I will push separately.⁠

    Andrej Karpathy
    6ed7d1d

  1. Extend informative assertion message to chat_sft.py for consistency

    f2899a1

  1. Merge branch 'master' into fix-batch-size-assertion

    28894e1

  1. delete autocast, an unnecessary thorn in my side, manage dtypes directly

    Andrej Karpathy
    1076f97
  2. Ensure that inputs and targets are contiguous (#569)⁠

    Sofie Van Landeghem
    Unverified signature
    752abc8
  3. big, breaking change but large upside: swap previous FineWeb-EDU dataset to NVIDIA ClimbMix dataset. Requires people to download the data shards. The upside is that training GPT-2 capablity model now only takes ~2 hours, down from 2.76 hours, so this is a huge win data-wise

    Andrej Karpathy
    324e69c

  1. Merge branch 'master' into fix-batch-size-assertion

    6e9ef8f
  2. Restore completion-only loss masking in SFT dataloader (#582)⁠

    Anish
    Unverified signature
    83dccc2

  1. Simplify batch size assertion message

    998b8f8
  2. Merge remote-tracking branch 'upstream/master' into fix-batch-size-assertion

    d489a1f

  1. Merge branch 'master' into fix/kernel

    svlandeg
    a54691b

  1. fix minor bug in fp8 application to skip tiny matmuls

    Andrej Karpathy
    bac5a35

  1. tune the data mixture a bit, load optimizer by default when SFT. These were confirmed to be best settings from sweeps of sft

    Andrej Karpathy
    1415fb7
  2. a number of upgrades to SFT script to bring it up to date w.r.t. pretraining and tuning some of its kwargs based on sweeps

    Andrej Karpathy
    77f8fb8
  3. Add informative error message to batch size assertion

    240a60f

  1. Replace cryptic assertion with descriptive ValueError for batch size alignment

    0f3b6a4

  1. a number of upgrades to SFT script to bring it up to date w.r.t. pretraining and tuning some of its kwargs based on sweeps

    Andrej Karpathy
    788dade

  1. clarify that this is bf16 mfu we're talking about

    Andrej Karpathy
    2f09686
  2. delete torchao dependency, create our own exact API-matched version of Float8Linear, document it very well. for some poorly understood reason, the performance is not only ~identical but actually runs 3% faster. despite of it being significantly simpler and much less code. i don't fully understand why/how atm

    Andrej Karpathy
    e569b59

  1. better comments/flow on all the hyperparameter transfer stuff, and change the WD scaling from my empirical 1/d^2 to a bit more principled version based on Tepoch. All of that theory is based on AdamW and could be suboptimal for Muon

    Andrej Karpathy
    aeff095

  1. nit: don't mutate args, create new var for total_batch_size

    Andrej Karpathy
    2c062aa
  2. auto-calculate optimal batch size. the original setting of 0.5M was only optimal for d12, but d26 prefers 1M and so on

    Andrej Karpathy
    f41dd3c

  1. add fp8 training with torchao

    Andrej Karpathy
    6079f78
  2. small touchups to the eval script, re-order items etc, cosmetic

    Andrej Karpathy
    8ebc14b