Hacker News
A 125M Piano Autocomplete Model Runs 108 Notes Per Second on an iPhone 15, and DPO Nearly Tripled Its Preference Score
Simon Edwardsson's August 20 write-up hit 558 points and 113 comments. The decoder-only transformer (RMSNorm, rotary embeddings) uses a note-level tokenization, NOTE(pitch, delta_onset, duration, velocity), so one forward pass advances the music by a complete note instead of an event fragment. Trained on a few hundred thousand MIDI files totaling around 300 million note events, with 33M and 64M variants also tested. DPO moved the pairwise preference score from 24.55% to 69.05%, judged by Gemini 3.5 Flash. Exported to Core ML with INT8 quantization, it hits roughly 108 notes/second on an iPhone 15 with a 512-note context and no network. Aggressively cleaned classical data beat larger noisier sets.
↳ Follow the thread