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 testBase modelTuned modelFixed by FableRetrained with better data
Mean call accuracy68%85%82%83%
Declines when no tool fits79%1%85%83%
Good answers (of 240)8104375

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

STILL INTACT

It still knows when a tool fits

The trained model still tells fitting from non-fitting requests (0.96 separation).

ADDED BY TRAINING

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.

FABLE'S FIX

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.

At the first token of the reply: how strongly does the model prefer starting a tool call? ← writes an answer calls a tool → Tuned router measured Fixed by Fable estimated Fable's counter-push, about −10 no tool fits a tool fits Still separated: the tuned model still tells the two apart (0.96). Where each change sits in the model 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Qwen3.5-2B 24 layers The LoRA's push toward a tool call is built here, in layers 0–12, while the prompt is read. Fable's fix is here, in the last layer: 2 of its 6,144 MLP output columns, about 4,000 of 2.2 billion weights.

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.

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.