mml-gpt
A character-level GPT written from scratch in PyTorch, quantized to INT8 and running on a microcontroller that plays what it generates through four buzzers.
A model can lower validation loss while never emitting a song that parses. So checkpoint selection samples the model mid-training, parses the output, and scores validity, repetition, and looping alongside loss. The model itself is small and mostly wrong. The harness is the part worth reading, and it is shown below.