Show HN: I trained a 125M model to autocomplete piano on-device (opens in a new tab)simedw.com
598 pointsI trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15).
The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device.
The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

Comments (117) 65 threads
Earlier commentsWould be fun to get a midi clock going and play some chords on my piano and have my synth start jamming along with the bass and my keyboard doing some performance. Or any combination of the above.
One feature request:
Instead of playing the AI-generated audio solely through the iPhone's speakers, add an option to send the audio as midi notes to a device (probably the same one you received the mini notes from).
Yes, I think I’ve gotten it to roughly a GPT-2 level: good enough to share, but with a lot of room left to improve. I think adding some kind of bar/measure token might help with rhythm, and perhaps some form of longer-term planning for the overall composition.
All comments shown.
Couldn't load more comments. Check your connection and try again.