The Pulse
Simon Edwardsson Trains a 360M Model to Simulate a Terminal
Simon Edwardsson built WorldTUI, a 360-million-parameter model that predicts terminal screen changes instead of running a real shell. Quantized to 208 MB, it runs locally in a browser and can mimic tools including vim, tmux and Python, thou

AI.info Team · Written with AI · fact-checked ·
At 208 MB, WorldTUI runs in a browser tab and imitates a terminal without executing commands in a shell. Simon Edwardsson describes the project as a 360-million-parameter model trained to predict how the screen changes after each keypress. It can mimic file editing, command-line tools and games, but its apparent filesystem is a learned simulation, not a real store of files.
Edwardsson published the project on October 21, 2026. The model starts from Qwen2.5-Coder-0.5B, then sheds most of its original vocabulary embedding table and is quantized to four bits. The browser demo runs inference locally through WebGPU; Edwardsson recommends Chrome or Edge and says a modern phone may run it slowly.
WorldTUI predicts screen updates, not command results
A conventional language model adds tokens to the end of a text sequence. A terminal, by contrast, can redraw earlier rows, move its cursor or change modes in response to a single key. WorldTUI represents the display as a grid and predicts which rows to rewrite and where the cursor should end up.
Its 333-token vocabulary includes byte values, row identifiers and special operations. A COPY operation lets it reuse rows from the previous screen rather than regenerate them, reducing the cost of a scroll from roughly 96 tokens per row to three. The model also receives timed WAIT inputs, allowing it to predict changes in applications such as Snake even when no key is pressed.
Edwardsson trained it on synthetic sessions recorded from real programs running in Docker containers. The sessions mix randomized usernames, directories, terminal sizes and activities; 35% start partway through an application. The final dataset contains 336,000 episodes, or roughly 2 billion tokens, compared with about 18 trillion tokens used to train the base model.
Self-repair raised one benchmark score from 24 to 38
Ordinary typing came easily, but longer sessions exposed a problem: an early mistake, such as a misspelled filename, could distort everything that followed. Edwardsson adapted an approach called DAgger, training the model on states it reached itself and then teaching it to correct errors when the necessary information had appeared earlier in the session.
About a third of sampled sessions produced useful correction examples. Across three rounds, self-correction and additional data raised WorldTUI’s PresetBench score from 24 of 47 to 38 of 47 at four-bit precision. Training and later refinements took about 75 GPU-hours on an RTX 4090.
Speed required a separate change. Generating screen rows one after another made large redraws take as long as 12 seconds on the RTX 4090. Edwardsson instead predicts rows in parallel, then uses the same model to check their coordination; large-frame 95th-percentile latency fell from 6.7 seconds to 0.87 seconds.
WorldTUI beat prompted models on its tests, with limits
On ShellBench, a set of 106 commands across 24 handwritten bash sessions, WorldTUI got 80 exact outputs right. Prompted Qwen2.5-Coder-0.5B scored 52, and prompted Qwen3-0.6B scored 60. In the reported file-readback comparison, WorldTUI scored 9 of 13, versus 2 of 13 and 3 of 13, respectively.
Those comparisons are not identical tasks: the prompted models received three worked examples each and predict whole command outputs, while WorldTUI predicts screen updates after individual keypresses. Edwardsson also reports straightforward failures. For example, after appending a line with echo green >> colors, the simulated cat colors often fails to show it.
“For a 360M-parameter model running in a browser tab, it's far better than I expected,” Edwardsson writes. He says the demo can handle vim, tmux, Python and Snake, but loses track of nested directories and gives unreliable results on harder Python tasks. Edwardsson’s next proposed test is whether training on thousands of randomly generated applications could help a model predict an unfamiliar app from its controls and context.
The next test is an application the model has never seen
WorldTUI is a small demonstration of learned state, not a replacement for a terminal: it has no real shell, no internet access and no reliable filesystem. Its browser demo is available as a 208 MB download, while Edwardsson says he plans to publish the model weights later. Whether the approach can generalize beyond the programs represented in its training sessions remains the open test.