A 1.26M-param model turns terminal UIs (htop, vim, emacs) into real UI components

BuckChancey · reddit · 2026-10-08

A Reddit user trained a tiny 1.26M-param (5 MB) axial transformer that labels every terminal cell with one of 15 roles (border, menu item, selected row, etc.), then deterministic code converts regions into Google's A2UI declarative components — so clients render real UIs instead of emulating a terminal. Once a layout is seen it locks as a template, sending only JSON-pointer patches: 40% of 14k screens never touch the model (90% hit rate on less/dialog). Trained on public asciinema recordings with labels from Claude subagents plus a synthetic TUI generator, all on a free Colab T4. Honest numbers: mIoU 0.51 on held-out screens, htop/nano perform poorly, and the A2UI stream is 25× larger than raw VT. Demo replays 8 apps in sync; code and labels are open-sourced.

Original post →

More from coding & agent

coding & agent channel →