
On-Device Piano Model Autocompletes Music on iPhone
A 125M-parameter transformer generates about 108 piano notes per second on an iPhone 15, trained on 300 million note events with no cloud call.
On August 20, 2026, developer Simon Edwardsson published a detailed write-up of RollTab, an iOS app that autocompletes piano performances in real time using a transformer running entirely on the device. It is a small project by frontier-model standards, and that is exactly why it is worth reading. The engineering decisions are legible, the failure modes are described honestly, and the whole thing fits inside a phone's memory budget.
- Three model sizes were trained at roughly 33M, 64M, and 125M parameters, with the largest producing about 108 notes per second on an iPhone 15
- Training used roughly 300 million note events drawn from several hundred thousand cleaned MIDI files
- The PyTorch model was converted to Core ML with INT8 quantization and supports a context of up to 512 notes
- Direct Preference Optimization post-training made over 69% of continuations preferred over the base model in pairwise evaluation
How Small Can an On-Device Music Model Be?
Smaller than most people assume. The largest RollTab variant is 125M parameters, which puts it in roughly the same weight class as the original GPT-2 small models, and Edwardsson makes that comparison himself, describing the result as GPT-2 but for piano. Quantized to INT8 and compiled through Core ML, it sustains around 108 notes per second on an iPhone 15. Musical autocomplete has a forgiving latency budget compared with speech, but 108 notes per second is comfortably faster than a human pianist, which is what makes real-time continuation feel responsive rather than laggy.
The 512-note context is the other constraint worth noting. Notes are not tokens in the text sense, and a few hundred of them covers a musical phrase rather than a whole piece, so the model is structurally better at continuing an idea than at holding a composition together across minutes.
Why Data Cleaning Beat Data Volume
The most transferable lesson in the write-up has nothing to do with music. Edwardsson reports that cleaning and selecting the training data mattered more than simply adding more of it. The corpus started as several hundred thousand MIDI files and was filtered down into roughly 300 million note events, and the filtering is where the quality came from.
Anyone who has trained a small model on scraped data recognises this. When a model has only 125M parameters, it cannot afford to spend capacity memorising badly quantized transcriptions or mislabelled instrument tracks. This is the same pressure that drives careful curation in the small-model releases we have covered recently, including Liquid AI's 3B vision model that reads screens in 3GB of memory and the 2.6B agent model that runs tool calls in 2.5GB of RAM.
What Preference Training Added
The single most effective post-training step was Direct Preference Optimization. After DPO, more than 69% of the model's continuations were preferred over the base model in pairwise evaluation. That is a large swing for a technique usually associated with chat alignment, and it fits an intuition worth generalising: when a task has a strong sense of good and bad output but no single correct answer, preference data teaches the model things next-token prediction cannot.
Edwardsson is candid about what still does not work. The model loops occasionally, and short prompts are hard: eight-note prompts work only reasonably well, while 16 to 32 notes produce substantially more reliable continuations. That is a sensible limitation to state plainly rather than benchmark around.
What This Says About Edge AI in 2026
The interesting thing about RollTab is not that it beats a cloud model, because it does not try to. It is that a single developer can now assemble a domain-specific generative model, quantize it, ship it through Core ML, and have it run at musical tempo on a phone in a pocket. The tooling for on-device inference has quietly become good enough that the bottleneck is data curation and evaluation design, not deployment.
For more on models built to run locally rather than in a data centre, follow our artificial intelligence coverage.
Sources: Simon Edwardsson — August 20, 2026 (the project author's own account of his work); Hacker News discussion — August 20, 2026.
More AI Stories

Mojo 1.0 Compiler Goes Open Source Under Apache 2.0
Modular open-sourced the entire Mojo compiler and toolchain under Apache 2.0 at ModCon 2026, alongside 450,000 lines of GPU kernel code.

Cerebras CS-4 Packs Three Wafer-Scale Chips in a Rack
The Cerebras CS-4 puts three WSE-3 Turbo wafers in one rack for 750 PFLOPS, and Cerebras clocks 4,400 tokens per second per user on GPT-OSS-120B.

Ornith-1.5 Open Weights Score 86.1 on Terminal-Bench
Ornith-1.5 ships MIT-licensed weights from 9B to 397B, and the flagship posts 86.1 on Terminal-Bench 2.1 while a 35B MoE sibling runs far leaner.
