Claude, please fix my model
Replicating weight-space programming, then using it to repair a broken tool router
Builds on “LLMs can natively read & write neural network weights” — Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab (MIT CSAIL). Our write-up: Claude, please fix my model - draft (PDF).
Demo: Improving a tool router
Three versions of Qwen3.5-2B, running live on a cloud GPU (the first run can take two minutes to wake it up). Pick a prompt and press Go.
Results
Fine-tuning on 58,000 xLAM examples improved tool calling, but the router began calling a tool on 99% of requests where none fits. Fable's edit restored “no tool” without retraining.
| BFCL test | Base model | Tuned model | Fixed by Fable | Retrained with better data |
|---|---|---|---|---|
| Mean call accuracy | 68% | 85% | 82% | 83% |
| Declines when no tool fits | 79% | 1% | 85% | 83% |
| Good answers (of 240) | 81 | 0 | 43 | 75 |
BFCL v4 test set, sealed: Fable never saw it. “Good answers”: a blind judge (Claude Sonnet 5.5) rated each text reply to a request no tool fits; good = helpfulness 4 or 5 out of 5. “Retrained”: a second LoRA with 3,000 added “no tool fits” examples, trained with gradients. The fix shown here is one of ten Fable sessions; all ten found the same cause.
What Fable found: a small fix for widespread damage
It still knows when a tool fits
The trained model still tells fitting from non-fitting requests (0.96 separation).
A push toward a tool call
A near-constant push of about 10 logits toward a tool call on every request. The fine-tune changed 58% of the model's weights, and the push is spread across them.
A counter-push at the decision point
Cancel the push in the last layer, where it becomes a decision, plus a small nudge toward starting a plain answer. Two columns, about 4,000 weights out of 2.2 billion. Fable compensated rather than removed the damage.
Tuned row: the measured mean ± spread on Fable's practice prompts. Fixed row: those numbers moved by the edit's designed effect, so an estimate. Dots show the spread, not individual prompts.
What to watch for
What nobody trained for: answer quality
The tuned model didn't just hide its ability to answer, it largely lost it: forced to reply in text, it gave only 11 good answers out of 240, mostly refusals of questions it knows. Fable's edit brings that to 43, but a fix at the last layer can't restore what the fine-tune removed upstream. Some answers loop.
A smaller cost: on real users' single-call requests the fixed router skipped the call 12.8% of the time (Base 66% · Tuned 70% · Fixed 65%). Fable's practice data had no requests like these, so it couldn't see the loss.
- The model learns exactly what it is trained on.Every one of the 58,000 xLAM examples ends in a tool call, so the router learned to always call. Retraining with “no tool fits” examples is still the better fix (75 good answers). The same goes for the agent's data: when our practice set put real-user text only on the “no tool” side, Fable's edit learned the writing style and lost 19 points of call accuracy.
- Measure what you didn't train for.Answer quality was the most important measurement, and we added it late. Most of the failures here (refusals, loops, the style shortcut) were never anticipated.
- Replicate the original first, then change one thing at a time.We matched MIT's math result within about 3 points before changing anything. Each later step (base model, LoRA, new driver, new task, repeats) had a gate to pass.
- Write predictions down, and keep the test set out of the agent's reach.We expected a bigger budget to help. Across nine runs it made no measurable difference; writing the prediction first is what made that visible.
How to reproduce
Simple: point your coding agent at the MIT CSAIL paper and ask it to reproduce the math improvement experiment.
Here is the QR code for my repository:
github.com/bradhinkel/weight-space-tuning
This demo page is at tool-router.bradhinkel.com
Next steps:
- Smaller models, more runs: the same method on a ResNet-50 image classifier (Waterbirds) beat the published fix by about 0.7 points.
- Bigger, better-matched practice sets, especially for judging answers.
- Edits further upstream, where the fine-tune changed how the model responds, to restore answer quality.