The author trained a 125M-parameter transformer model to autocomplete piano performances in real-time, achieving 108 notes per second on an iPhone. The model was trained on a dataset of MIDI files and used a custom note representation to improve performance. The author also implemented Direct Preference Optimization (DPO) to fine-tune the model's output. The resulting app, RollTab, is available for free and allows users to play piano and have the AI generate continuations.