Llm.c Ported to Mojo with Metal Kernels: 1.72x Faster than PyTorch MPS
The Mojo port of llm.c with Metal kernels achieves 1.72x faster performance than PyTorch MPS.
The porting of Andrej Karpathy's llm.c to Mojo has yielded significant performance improvements, matching or exceeding the CUDA path on NVIDIA GB10. On Apple M4 Max, it runs 1.71 times faster than PyTorch MPS bf16. This project introduces support for low-precision training with FP8 and NVFP4, offering engineers a more efficient solution.