Weight-space micromachines are small programs that an AI agent writes straight into the weights of a language model, then bolts onto a frozen model. A new research project shows they can lift small models like Qwen3-0.6B by double digits on several benchmarks. The researcher also calls them brain implants for LLMs.
What the implants are
Teaching a model a new skill normally means fine-tuning or reinforcement learning on data that exercises it, with the risk of breaking something else. The other route is wrapping the model in tools, sandboxes and parsers. Here, an agent writes a separate module into weight space that computes one thing. Examples include a calculator, state trackers, logic solvers, instruction-following rules compiled as exact programs, and a small trained module that works as eyes for images.
Each implant sits beside the model and reads the same tokens, or some of its hidden layers. It stays off until needed, so outputs are bit-for-bit identical to the original model until one fires. Remove it and the original model returns. Every implant is extra weights, sometimes with a few registers acting as small memory, and nothing programmatic runs around the model.
They aren’t LoRAs. A LoRA is a low-rank change spread across the model’s own weights and learned from data. An implant is a side module that leaves the weights untouched and computes something you can read and test. The calculator was exact on every arithmetic test the researcher ran. Unlike an external tool, an implant lives inside the forward pass, so the model can be trained together with it.
Implants can reach into the model’s thinking
Some implants don’t just add a tool. They compute an intermediate result and write it straight into the model’s intermediate states and activations, with no text intervention at all. The mistake detector and topic blocker work this way, as does a voter that decides which of the model’s attempts becomes the declared answer. That is what separates weight-space micromachines from a tool call bolted on outside the model.
How Claude Code built them
The idea goes back to a 2023 paper on looped transformers as programmable computers, where hand-picked weights let a transformer run programs. Hand-writing those circuits was slow, and the result was mostly a curiosity. Agents can now read and edit weights directly, so the researcher had Claude Code run a loop on small open models: run the model, read its failures, pick patterns a small machine could fix, write that machine into weights, attach it, and keep it if scores rise.
Benchmark results for weight-space micromachines
- A calculator implant takes 4 to 5 digit multiplication from near zero to 100%.
- A small vision implant lets Qwen2.5-0.5B do math on handwritten MNIST digits from about 100x fewer worked examples than fine-tuning alone.
- A mistake detector that forces a rethink lifts GSM8K from 52% to 56%, and a topic blocker for math requests catches about 99% of them.
- On Qwen3-0.6B-Base, attaching implants alone moves BIG-Bench Hard from 41% to 55% and IFEval from 13% to 35%.
- Gains stack: 14 implants take Qwen3-0.6B from 58% to 72% on IFEval, and 8 take an RL-trained Qwen3-0.6B from 68% to 83% on GSM8K.
Training with implants attached
On Qwen3-0.6B, reinforcement learning with implants switched on beats plain RL on all three benchmarks. GSM8K reaches 80% against 68%, BIG-Bench Hard 60% against 54%, and IFEval 48% against 46%. The model learns when to use an implant, when to switch off a broken one, and when to drop one for a better version. The same pattern held on Qwen3-1.7B.
Implants mostly transfer too. Ones built on Qwen3-0.6B carried over to Qwen3-1.7B, a little to 4B, and to families such as SmolLM2 and Granite, after refitting their input and output wiring.
Limits and what comes next
The researcher acknowledges that most pieces aren’t new. People have compiled programs into transformers, put calculators inside networks and trained models to use tools with RL. The contribution of weight-space micromachines is combining them as small add-ons, sometimes exact, that an agent produces and that can be trained alongside the model. Results come from small models, mainly Qwen3-0.6B and 1.7B. Once a model is trained with an implant attached, it leans on it, so removing one afterward no longer restores the original behavior. The code is public on GitHub.
Source: papail.io