--- title: echo-1 diffusion vs autoregressive on Lua emoji: 🌀 colorFrom: indigo colorTo: green sdk: docker app_port: 7860 pinned: false --- # echo-1 Two small language models trained from scratch on pure Lua. One is a block diffusion model, the other is an autoregressive baseline. The demo hides a block of a real program and asks both models to write it back. Every answer is run through the real Lua interpreter against held-out input/output tests. The badge shows whether the program actually executes and gives the right output, so the result is checked, not estimated. How to read it: - The diffusion model fills the whole block at once, then revises it over a few steps. You can replay the steps with the slider. - The autoregressive model writes the block one token at a time, left to right. - Green means the token matches the original, red means it differs, the grey box means it is still hidden. What this is. It is the closure of the first stage of a research project: testing whether diffusion refinement uses inference compute better than the autoregressive chain on structured code. At this tiny scale the refinement clearly works (more steps help) while the autoregressive model is more accurate. Diffusion is faster here and revises in parallel. The goal of the demo is to show the method and let you check it by execution, not to write useful code. The data engine, the verifier, the training code and the weights are all in the repository, so the numbers can be reproduced. ## Deploy This is a Docker Space. The image builds the Lua verifier so the execution badge works online, then serves the Gradio app on CPU. The model inference is tiny and runs fine without a GPU.