Porting microgpt to Futhark, Part II

This is Part II of porting Andrej Karpathy's microgpt to the data-parallel language Futhark . Part I covered the forward pass. Now: training and inference. This part of the port is more involved than Part I, and doesn't map as cleanly 1-to-1, so I won't blog every line of code like I did in Part I, just excerpts. The full code (so far) is on GitHub . Examples of things left out of this post…