nanochat / tests /test_engine.py

Commit History

  1. Fix MockModel's device definition (#535)⁠

    Sofie Van Landeghem
    Unverified signature
    4800c62

  1. update the CPU/MPS script to give reasonable results. The model can at least answer that Paris is the capital of France and knows that the sky is blue, for about 40 minutes of training on my macbook. Also fixed a bug that existed due to KVCache bfloat16 dtype assumption

    karpathy
    f9a7e0f
  2. Add high value engine tests for core invariants (33 LoC) (#396)⁠

    barisozmen +2: Claude Opus 4.5, Sofie Van Landeghem
    Unverified signature
    bbc4413

  1. integrate Flash Attention 3. +9% tok_per_sec for d12 with ctx even as low as 2048 out of the box nice. also, ready to tune windows huge

    Andrej Karpathy
    2ff7d51

  1. fix: sample first token independently for each row in multi-sample generation⁠

    Andrej Karpathy +1: Claude Opus 4.5
    8f979a8

  1. also add a test that failed before the fix and passes now with the fix for kv cache resize

    Andrej Karpathy
    baf0b3f