Article may be outdated

This article is 15 days old. Some details may have changed since publication.

Hacker News·5 min read·medium

Show HN: I trained a 125M model to autocomplete piano on-device

S
simedw
Show HN: I trained a 125M model to autocomplete piano on-device
AI Summary

A developer shares their experience training a 125M-parameter transformer model to perform real-time piano accompaniment on an iPhone. The project highlights the importance of MIDI data representation and post-training optimization for on-device performance.

Why it matters

It demonstrates the growing feasibility of running sophisticated generative AI models locally on mobile hardware.

Dive DeeperCreate a free account to unlock

TL;DR: I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The biggest improvements came from finding the right MIDI representation, cleaning the training data aggressively, and adding DPO post-training.

Almost a year ago, I started tinkering with an idea: connect my MIDI piano to my phone, play something, and have AI autocomplete the song for me. Think GitHub Copilot, but for piano.

It turned out to be a deeper rabbit hole than I expected. Fourteen experiments later, it is finally at a point where I am happy enough with it to write about.

The app, RollTab, is available for free here if you have a MIDI keyboard and an iPhone/iPad. 1

Each audio starts with a short prompt, followed by the model's continuation.

Your browser does not support the audio tag.

Final Fantasy VI, Terra's Theme (16-note prompt)

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologyai

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in