mirror of
https://github.com/karpathy/nanochat.git
synced 2026-04-01 21:25:21 +00:00
torch.compile requires Triton which is unavailable on aarch64 (NVIDIA Jetson, ARM servers). This makes compilation conditional: - nanochat/optim.py: Replace hardcoded @torch.compile decorators with _compile_decorator that becomes a no-op when Triton is not installed - scripts/base_train.py: Wrap torch.compile(model) in try/except - nanochat/common.py: Add Orin to peak FLOPS table (5.3 TFLOPS BF16) Tested end-to-end on NVIDIA Jetson Orin NX 8GB (Compute 8.7, CUDA 12.6, PyTorch 2.8.0) — pretrain and SFT both run successfully in eager mode. No changes to behavior on platforms where Triton is available. |
||
|---|---|---|
| .. | ||
| base_eval.py | ||
| base_train.py | ||
| chat_cli.py | ||
| chat_eval.py | ||
| chat_rl.py | ||
| chat_sft.py | ||
| chat_web.py | ||
| tok_eval.py | ||
| tok_train.py | ||