Cmpnd Ships dspy-wsp, a Prototype That Lets an AI model Rewrite Model Weights
Cmpnd has put out dspy-wsp, a prototype optimizer that brings weight-space programming to DSPy, the framework used to build programs around language models. The tool allows a frontier language model to read the weights of a small model and edit them directly, instead of adjusting prompts or retraining the model.
How the optimizer edits model weights
In weight-space programming, a frontier LLM reads another model's weights and changes them without going through a training process. Per the report, Cmpnd's optimizer, called WeightSpace, runs inside a sandbox where the frontier model proposes a change, tests it and then keeps or discards it. The method uses no gradients, no training loop and no fine-tuning dataset. Cmpnd puts the cost of each run at roughly $5 to $10 in model calls.
The package installs with pip and requires DSPy 3.5. A single 25-pass run modified only one layer or attention head.
Results on open decision models
Cmpnd evaluated the approach on open decision models ranging from 0.6B to 9B parameters, carrying out all of its experiments on one Mac. WeightSpace on its own raised scores on the Typed Decisions benchmark by 1.9 to 16.1 points. Combined with ReAnchor, the gains reached 6.5 to 20.0 points.
The results were uneven. The 9B Clef-Flash model improved by only 1.9 points with WeightSpace alone, and under the stricter rule from the original paper, d1-omni-600M gained just 2.8 points. Each run lasted 78 to 167 minutes, and the method was weakest on the larger models.
Roots in MIT research
The technique originates in an MIT study titled Sparks of Weight-Space Programming. In that work, a frontier model, identified by the research team as GPT-6-Astra, inspects weight tensors, infers what each part computes and alters them to meet a goal stated in plain English. The researchers present weight-space programming as an emerging capability rather than a settled method. Their experiments excluded gradients, though the concept itself does not depend on their absence.
Developers typically reach for one of three levers. Prompt optimization, such as DSPy's MIPROv2 or GEPA, refines instructions and examples. Fine-tuning, such as DSPy's BootstrapFinetune, adjusts weights through gradient descent and calls for training data, a training loop and usually a GPU. Weight-space programming instead has a language model reason over the weights directly.
Early evidence and limits
In the research, the frontier model identified the right game, among Breakout, Pong, Pac-Man and Freeway, for four PPO policy networks working from their weights alone. The source report stresses that the approach is still very experimental.
Open questions
- How does the method perform on models larger than 9B parameters?
- Will the reported gains hold up outside Cmpnd's own tests?