Blog / Research

Vibe surgery: Nexus edited an AI's weights and doubled its math score

· By Yash Hambarde, Founder & CEO, Nexus

Nexus edited the weights of Qwen3.5-0.8B directly and more than doubled its math score: 6 of 30 MATH-500 problems before, 13 of 30 after. There was no training and no fine-tuning. It found the direction two layers write when the model gets stuck repeating itself, and changed 130,384 of its roughly 800 million weights to push against it. The whole run took 1 hour 40 minutes on a gaming laptop with a 4 GB GPU.

Bar chart: original Qwen3.5-0.8B solved 6 of 30 MATH problems, after Nexus's edit it solved 13 of 30.

You have heard of vibe coding. This is vibe surgery.

Normally, making a model better means training it: collect data, run it through the model thousands of times, nudge every weight a little. Vibe surgery skips all of that. You tell an AI agent what the model gets wrong, and it opens the model up, finds the part responsible, and edits those weights directly with plain tensor maths.

The idea comes from MIT CSAIL's Sparks of Weight-Space Programming, where an AI agent edited this same model. We wanted to know if Nexus could do it on an ordinary laptop.

The patient: a small model that talks itself in circles

Qwen3.5-0.8B thinks out loud before it answers. On hard math it often gets stuck, writing the same line ("Wait, let me re-check the total.") over and over until it runs out of room. In our test, 27 of 30 answers were cut off still thinking.

What Nexus did, step by step

  • Collected 47 of the model's own looping answers to practice problems (never the test problems).
  • Measured what the MLPs in layers 15 and 19 write when the model repeats itself versus when it writes something new. The difference is one direction per layer.
  • Picked the 64 neurons per layer that push hardest in that direction during loops.
  • Turned those neurons against the direction, tried three strengths on 48 practice problems, and kept the best.

The edit is one line of maths per layer: W[:, cols] -= 4 * outer(u, u @ W[:, cols]). 130,384 weights changed. Everything else in the model is untouched.

The result

30 MATH-500 problemsSolvedCut off still thinking
Original Qwen3.5-0.8B6 / 30 (20%)27
After Nexus's edit13 / 30 (43%)17
MIT CSAIL's published edit, for reference16 / 30 (53%)6

Problem by problem, the edit fixed 7 answers and broke none. This is not a 2-3 point tweak: same model, same test, 20% to 43%.

MIT's edit is still stronger, and their agent spent about 20 hours on it. Nexus got most of the way in 1 hour 40 minutes on a laptop.

What this means for companies

More and more companies run open-weight models on their own machines: for support tickets, contracts, invoices, medical notes or code. Those models rarely fail at random. They fail in the same few ways again and again: they loop, they ignore your format, they refuse safe requests, they get your domain's terms wrong.

Until now the fix was fine-tuning: build a labelled dataset, rent GPUs, wait days, and hope nothing else breaks. Weight editing is a different route. When a failure is specific and you can test for it, an agent can find where it lives inside the model and change only that part. Hours instead of weeks, no training data, and the model stays on your own hardware, so your data never leaves.

That is how a company can lift an open model significantly in its own domain: not by retraining it, but by fixing the exact behaviour that costs them. Our math result shows the size of jump that is possible when the failure is the bottleneck.

  • Best fit: one clear, repeatable failure you can measure on your own examples.
  • What you need: an open-weight model, a set of examples where it goes wrong, and a test that says right or wrong.
  • What to expect: a before-and-after score on your own examples, and an edit small enough to inspect and undo.

It is not magic, and it will not turn a small model into a large one. If you have a model that keeps failing at the same thing, talk to us and we will measure it with you.

How we tested it

  • Settings copied from MIT's evaluation code: vLLM, thinking on, temperature 0.6, top-p 0.95, top-k 20, presence penalty 1.5, answers up to 32,768 tokens.
  • Grading: the last boxed answer, checked with math-verify. An unfinished answer counts as wrong.
  • 30 problems from MATH-500, one sample each. That is a small sample, so treat the exact numbers as noisy. MIT used all 500 problems with 4 samples each.
  • Hardware: an RTX 3050 laptop GPU with 4 GB of memory.

Everything is public on GitHub: a small file that rebuilds the edited model byte-for-byte from the original weights, the test script, all 90 answers and Nexus's own notebook from the run. The model itself is on Hugging Face.

Frequently asked questions

Is this fine-tuning?

No. Nothing was trained. No gradients, no optimiser, no training data. Nexus computed one direction per layer from the model's own activations and edited 64 columns of two weight matrices directly.

Did Nexus copy MIT's edit?

No. It worked from MIT's blog post, which names the layers and the number of columns, found its own direction from the model's activations, and never used MIT's code or edited weights. MIT's edit scores higher on the same test (16 of 30).

Can I run the edited model myself?

Yes. Download it from Hugging Face, or rebuild it from the original Qwen3.5-0.8B in seconds with the script on GitHub. Use it with thinking on and long outputs: the gain comes from the model finishing its reasoning instead of looping.

Can this improve a model for my industry?

Often, when the model has a specific failure you can describe and test, such as looping, ignoring a required format or mishandling your terminology. It works best on open-weight models you run yourself. It does not add knowledge the model never had, so for brand-new facts you still need retrieval or training.

Try Nexus free

Hand an agent one real job under a budget you set. The free plan never expires. Start on the web or see pricing.