nanochat/scripts
Kaiyue Wen fe2a80badd Replace torchao with minimal custom FP8 implementation
Added _Float8MatmulND to fp8.py:
- Handles N-D input tensors efficiently
- Does reshaping internally (opaque to torch.compile)
- Prevents external reshape overhead that was causing MFU regression
- ~75 lines of clean, documented code

Benefits:
- No torchao dependency (removed from pyproject.toml)
- Same performance as torchao for reparam_linear
- Consistent with fp8.py's minimal philosophy (~350 total lines)
- All FP8 logic in one self-contained module

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-12 17:05:06 -08:00
..
base_eval.py small touchups to the eval script, re-order items etc, cosmetic 2026-02-03 21:03:42 +00:00
base_train.py Replace torchao with minimal custom FP8 implementation 2026-02-12 17:05:06 -08:00
chat_cli.py remove leftover mid references (#491) 2026-02-02 08:33:46 -08:00
chat_eval.py remove leftover mid references (#491) 2026-02-02 08:33:46 -08:00
chat_rl.py remove leftover mid references (#491) 2026-02-02 08:33:46 -08:00
chat_sft.py fix bug in chat_sft, the attention window must be preserved sigh 2026-02-01 20:58:44 +00:00
chat_web.py remove leftover mid references (#491) 2026-02-02 08:33:46 -08:00
tok_eval.py initial commit 2025-10-13 06:49:24 -07:00
tok_train.py quick fix to not OOM main speedrun script 2026-01-26 22:31:42 +00:00