Ulam-2-Small: building a reasoning model without a single gradient step
Today we are releasing Ulam-2-Small, a 3.09-billion-parameter reasoning model under the MIT license. We built it from two existing checkpoints, Ulam-1-Small and its ancestor VibeThinker-3B, using only closed-form edits to their weights. No gradient steps, adapters or optimizer state were involved.
We want to be direct about what this model is. On verifier-scored STEM and mathematics tasks we detected no difference in mean reward from Ulam-1-Small. On our research-mathematics benchmark it behaves differently: it finishes more problems, and it also fails more of them outright.
The accompanying paper spends most of its length on what did not work. That is where the lessons for anyone merging or editing models are, so this post follows the same order.
How it is built
Weight-space programming, a term from Takehi, Teoh, Zhang and Khattab, treats a network’s weights as a program that can be read and edited directly. Our version is narrow. Every model we made is a deterministic function of the two parents’ weights plus activation statistics from forward passes.
Ulam-1-Small descends from VibeThinker-3B, so the two share an architecture and a coordinate system. We built 43 edited checkpoints across nine families of operators. The released one, internally W43, blends three sets of weights differently by depth:
- Blocks 0–27: 50% Ulam-1-Small, 15% VibeThinker-3B, 35% W12.
- Blocks 28–35: 85% Ulam-1-Small, 15% W12.
- Embeddings and final normalization: Ulam-1-Small, unchanged.
W12 is an intermediate checkpoint of ours. It replaces selected MLP units and attention heads in Ulam-1-Small with VibeThinker’s, chosen by how much more they matter on STEM inputs than on mathematics. Blending W12 back in keeps that selection and softens it.
The result changes 3.44% of the parent’s parameters. The other 96.56% are bit-identical to Ulam-1-Small.
Lesson 1: the storage format decides which edits exist
Both parents are stored in bfloat16, which keeps about eight significant bits per weight. In the middle and late layers, 93–97% of their weights are identical, and most of the rest differ by one or two steps of that grid. An edit smaller than half a step is rounded away when the model is saved.
So linear interpolation between such models is a staircase, not a line. At a 15% blend, a weight moves only if the parents differ by at least four grid steps. Raising the blend from 15% to 30% almost exactly doubled the size of the edit, yet changed only 12% more parameters.
The same effect weakens elegant low-rank corrections. One dense correction we tested kept 38.5% of its intended effect after saving. Our advice is to count the grid steps between the parents first, then save, reload and measure every edit before spending inference on it.
Lesson 2: simple blends passed, and clever repairs did not beat a random control
We screened 24 new candidates on 600 verifier-scored tasks. Each had to beat four references, one of them a random perturbation of matched size. Ten local repair methods, adapted from RegMean, SVD-LLM, REPAIR and others, all scored below that random control. The margins were small and individually within noise, but none showed a benefit.
Only three candidates cleared every gate: two plain interpolations and the three-way blend we released.
Then the gains disappeared. The three survivors led Ulam-1-Small by 0.009 to 0.013 in mean reward on the screening set. On 600 fresh tasks, the parent scored highest. Selection alone predicts this: the best of 24 candidates with no real effect would be expected to lead by about 0.013 on a set this size.
Lesson 3: check when the model stops before judging what it concludes
These models reason for tens of thousands of tokens under a fixed budget. A rollout that runs out of budget before answering earns almost nothing.
One of our surgical checkpoints trailed its parent by 0.014 in mean reward. It also finished its reasoning less often, 69% of the time against 73%. When we forced both models to answer at the same point, the gap shrank by 84%.
An edit that shifts stopping behaviour by a few points can look like a change in ability. We now report the completion rate next to every reward.
What the released model does
On reward, we detect no difference from Ulam-1-Small. After fixing the release, we ran one comparison on 592 tasks that no candidate had touched. Ulam-2-Small scored 0.2058 against 0.2010, a difference of +0.0049 with a 95% interval of −0.0073 to +0.0172. That interval covers both a small loss and a small gain.
On research mathematics, outcomes move toward both extremes. ErdosBench has 226 research-level problems. Each model answered every problem once, and two AI-assisted audits graded the answers from 0 to 4.
| ErdosBench outcome (of 226 problems) | Ulam-1-Small | Ulam-2-Small |
|---|---|---|
| Accepted complete solutions | 2 | 4–5 |
| Answers scoring 2 or more | 8 | 10–18 |
| Zero-score answers | 115 | 125–127 |
| Answers with a fatal central error | 112 | 123 |
| Total points (of 904) | 124 | 120–129 |
Ranges give the two audits. The mean score is unchanged within noise: one audit puts the new model 5 points above its parent, the other 4 points below.
Two cautions apply. The audits are model-assisted, not human expert review. And the parent’s answers were graded in an earlier round, from shorter answer records. Treat the comparison as indicative until it is repeated on fresh problems.
Why we shipped it, and how to use it
Our pre-registered rule, based on reward alone, favoured a simpler candidate: the plain 15% interpolation. The two were statistically tied on reward. We chose the three-way blend because it scored higher on research mathematics in both audits and made fewer rejected claims of success than that alternative. This is a judgment call, and the paper records it as a departure from the original rule.
Choose Ulam-2-Small if you want a small model that commits to full solutions on hard mathematics more often, and you check its output. Stay with Ulam-1-Small if you prefer more cautious partial answers. Either way, verify any claimed proof.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
name = "ulamai/Ulam-2-Small"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(
name, torch_dtype=torch.bfloat16, device_map="auto"
)
messages = [{"role": "user", "content": "Prove that the sum of two odd integers is even."}]
inputs = tok.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
out = model.generate(
inputs, max_new_tokens=8192, do_sample=True, temperature=0.6, top_p=0.95
)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
We evaluate at temperature 0.6 and top-p 0.95. Give the model a generous token budget, because it reasons at length before it answers.
What comes next
Everything above concerns one 3B model and one pair of parents. For this pair, editing weights without gradients was a precise and cheap way to shift a model’s behaviour. It did not add measurable capability. That is a result about one pair, not a ceiling on the method.
The paper turns the lessons into experiments for larger dense models and for mixture-of-experts models, where routing adds a new way for an edit to go wrong. We have not run those experiments yet.
- Model: ulamai/Ulam-2-Small on Hugging Face, MIT license.
- Paper: in the
paper/folder of the model repository. - Benchmark: ulam.ai/erdosbench.
- Evaluation suites: the 600-task and 1,200-task verifier-scored suites used here are available from ulam.ai.
