WorldTUI: A 360M model that pretends to be a terminal

WorldTUI: I trained a 360M model to pretend to be a terminal

I fine-tuned a 360M-parameter Qwen2.5-Coder model to act as a terminal with no shell or filesystem behind it. Every keypress goes in, and the model predicts the screen changes. It can create files, run vim and tmux, play snake, and usually remembers what you wrote a few commands later. The biggest wins were teaching it to repair its own mistakes and decoding screen rows in parallel.

What I really wanted to know was whether it could maintain a consistent world, or just generate convincing terminal output.
  1. nico

    Very very cool! Impressed that it can be done with only fine tuning

    On a very similar theme, I recently built a “lossy git”, which stores your code by training a neural network, then it generates the code back to you on checkout

    * web demo: https://nicobrenner.github.io/lossy-git/demo.html

    * cli version: https://nicobrenner.github.io/lossy-git/

    The web demo runs entirely on the browser, both the version control and the neural network training/inference. You can commit and checkout both images or code - you can also paste/“upload” your own images, no server requests (everything clears from the page on reload)

  2. saagarjha

    > Is it useful? Not really.

    So interestingly enough Anthropic has been using models of this kind for their alignment evaluations: https://alignment.anthropic.com/2026/reward-seeker/#:~:text=...

  3. rowbin

    I've built something very similar but with off the shelf models: https://github.com/beleon/vibeSH

  4. andai

    >I used Qwen2.5-Coder-0.5B as the starting point. I needed a small model to get close to realtime performance. Being a coding model, it had also already seen plenty of CLI usage.

    Interesting. I wanted to ask, how that model compares with the fine-tuned version, but I just saw the author provided benchmarks. Interesting that fine-tuning improved the memory so significantly, wouldn't have expected that.

    Though, on second thought, I had an experience where I was able to, as a human, fine-tune my memory beyond what I previously thought was possible!

    Reminds me of one of my favorite jokes.

    Excuse me, can you tell me how to get to Carnegie Hall?

    —Practice, man... Practice...

  5. dpflan

    This reminds me of this post from ~3 years ago: https://news.ycombinator.com/item?id=33847479

    "Building A Virtual Machine inside ChatGPT"

    - https://www.engraved.blog/building-a-virtual-machine-inside/

    It's mentioned in the "Related Work" section too.

  6. ponyous

    One of the first very cool demos I've seen of ChatGPT was in a post where the author prompted AI "pretend to be a terminal". Then went on to execute commands like `cd .fbi`, `ls files`, `cat files/confidential.txt`. Very fun demo. Looking forward to exploring similar idea with this terminal

  7. _bobm

    I fry my brain everyday trying to keep pace, but honestly, stop it guys. Give the guy a break.

    This is the most magical time in my adult life. The 70s, 80s, and 90s, look like a painting compared to the current pace of things. I am literally tired at the end of each day. Dog tired.

    Great job OP. I mean. This is nuts.

  8. Meleagris

    This is more useful than you’d think. Consider using something like this to drive a high-interaction honeypot.

More from this day

2026-10-22