Hacker News
Training an LLM in Swift: From Gflop/s to Tflop/s Matrix Multiplication — 241 Points on HN
A deep technical blog post from Cocoa with Love walks through optimizing handwritten matrix multiplication in Swift for GPT-2 training, benchmarked against Andrej Karpathy's llm.c reference implementation, progressing from Gflop/s to Tflop/s without external libraries. The post hit 241 points and 12 comments on HN, with most code in pure Swift and a Metal GPU implementation shown for comparison. For Apple platform developers, this demonstrates Swift's viability as a serious ML training language with competitive performance.
↳ Follow the thread