模型与实验室 4.0 · 优秀 2026-08-20 · 文章

Training a 125M model to autocomplete piano on-device

一篇有工程细节的 14 次实验复盘:125M 参数 transformer 在 iPhone 15 上实时自动补全钢琴演奏(约 108 音符/秒,应用 RollTab)最大收益来自三处:合适的 MIDI token 表示激进的训练数据清洗DPO 后训练;文中拆解了词表大小权衡多轨锎盘保留策略与偏好调优

打开原文回到归档

Simon Edwardsson's 14-experiment retrospective on building piano autocomplete: connect a MIDI keyboard to a phone, play a few notes, let a 125M-parameter transformer continue the performance in real time (~108 notes/sec on iPhone 15; free app RollTab). Key engineering lessons: the naive NOTE_ON pitch*velocity tokenization explodes the vocabulary to 16,512 tokens, so representation choice dominates; aggressive cleaning of training MIDI (keeping piano-like material, removing/reducing other tracks) mattered more than scale; DPO post-training produced the clearest subjective jump in continuation quality. Includes audio samples (Pokemon Pallet Town, FF6 Terra's Theme, Fur Elise) and demo video.

Source: https://simedw.com/2026/08/20/midi-autocomplete/