💻 llm.c Port to Mojo with Metal and CUDA Kernels
A developer has introduced llm.mojo — a port of Andrej Karpathy's llm.c project written in Mojo. The implementation includes handwritten CUDA and Metal kernels for GPT-2 training. On Apple Silicon (M4 Max), the solution runs 1.71x faster than PyTorch MPS in bf16 mode, while on NVIDIA GB10, it achieves parity with the original llm.c (CUDA) in bf16 speed and outperforms it by 7% in fp32 (TF32).
🌍 It demonstrates Mojo's potential as a high-performance language for deep learning, capable of effectively competing with C++ and Python/PyTorch by working directly with GPU kernels without interpreter overhead.
👤 It enables efficient language model training on consumer hardware (e.g., a Mac with an M4 chip) with performance approaching specialized server solutions.
Source 1: https://github.com/ulmentflam/llm.mojo
