Porting microgpt to Futhark, Part I
Summary
This article documents porting Karpathy's microgpt forward pass to the data-parallel language Futhark, comparing Python and Futhark implementations and highlighting how parallel primitives can improve scalability. It defines the LLM parameter structures, core functions (linear, softmax, rmsnorm), and a GPT forward pass with a KV cache, setting up Part II on training and benchmarks. The author notes readability trade-offs and practical constraints of a functional, GPU-oriented approach.