Show HN: I Trained a 125M Model to Autocomplete Piano On-Device
The brief
A 125-million-parameter decoder-only transformer was trained to autocomplete piano melodies in real time, reaching 108 note predictions per second on an iPhone 15.
Key points
- The key design choice was a unified note token format encoding pitch, timing, duration, and velocity together, so the model advances by complete notes rather than individual attributes.
- Post-training with Direct Preference Optimization using Gemini-based pairwise evaluation boosted preference scores from 24.5% to 69%, and the model powers the RollTab iOS app.
Sources
- HNsimedw.com