Ulam-2-Small

Ulam-2-Small (v1.0.0) is a 3,085,938,688-parameter (Qwen2ForCausalLM, bfloat16) mathematical and quantitative STEM reasoning model developed by ulam.ai. Released checkpoint W43 (W43_S2_simplex_uv_w12) was constructed via weight-space programming without additional gradient-based updates (0 backpropagation, adapter, or optimizer steps), combining proof-oriented ulamai/Ulam-1-Small (v1.0.0, $U$) with its ancestor WeiboAI/VibeThinker-3B ($V$) through structured component replacement, spectral modification, forward-pass second-moment routing, and depth-dependent three-vertex interpolation.

Built with Qwen. Upstream architectural and checkpoint lineage (Qwen2.5-3B, Qwen2.5-Coder-3B, WeiboAI/VibeThinker-3B, and ulamai/Ulam-1-Small) and exact weight-space modifications are recorded in NOTICE and provenance.json. The full technical paper, Ulam-2-Small: Weight-Space Programming, is included in paper/ulam2_small_technical_report.pdf, paper/ulam2_small_technical_report.md, and paper/ulam2_small_technical_report.tex.

The release targets exploratory mathematical problem solving, proof-style research reasoning, and multi-stage quantitative STEM derivations. It is not a formal proof-certification engine: candidate proofs, counterexamples, and categorical completion claims require independent expert or formal verification.


Model details

Field Value
Developer ulam.ai
Repository ulamai/Ulam-2-Small
Release v1.0.0
Architecture Qwen2ForCausalLM (36 blocks, residual width 2,048, 16Q / 2KV GQA, SwiGLU width 11,008, tied 151,936 vocab)
Parameters 3,085,938,688
Weight dtype BF16 (2 standalone .safetensors shards, round-to-nearest-even)
Architectural context length 131,072 tokens (evaluated at 65,536โ€“102,400 tokens)
Selected checkpoint W43 (W43_S2_simplex_uv_w12, depth-dependent three-vertex blend)
Gradient training steps 0 (torch.set_grad_enabled(False))
Changed BF16 coordinates vs Ulam-1-Small 106,241,413 / 3,085,938,688 (3.4428% across 274 / 434 tensors, $|\Delta_Q|_F = 0.423013$)
License MIT License

Weight-space programming construction

Qwen/Qwen2.5-3B
  -> Qwen/Qwen2.5-Coder-3B
  -> WeiboAI/VibeThinker-3B (V)
  -> ulamai/Ulam-1-Small (U, v1.0.0)
  -> [L01-06 spectral clipping + L04-27 coupled SwiGLU/Q-O second-moment routing + L04-24 GQA KV + L27-35 completion adjustments] -> Intermediate S = W12
  -> [Depth-dependent three-vertex blend {U, V, S} + BF16 cast] -> ulamai/Ulam-2-Small (W43, v1.0.0)

Let $U$ denote ulamai/Ulam-1-Small (v1.0.0), $V$ denote WeiboAI/VibeThinker-3B (77bd2cced09193c8b9a59a32bd8577bbd1f3e01c), and $S = W_{12}$ denote the stored structured intermediate (88,116,709 changed BF16 coordinates, 2.8554%, $|\Delta_Q|F \approx 0.676$). Writing $S = U + M \odot (V - U) + R$โ€”where $M$ is the binary routing mask for coupled SwiGLU triples and attention query/output head pairs ranked by domain-conditioned forward activation second moments, and $R$ holds early-layer singular-value clipping ($\sigma{1..3} \to 1.5\sigma_4$ in L01โ€“L06), shared-key/value scaling ($\rho_g = 0.55,k_g/8$ in L04โ€“L24), late loop/termination adjustments (L27โ€“L35), and intermediate rounding residualsโ€”Ulam-2-Small (W43) applies the depth-dependent pre-rounding blend:

  1. Trunk blocks (L00โ€“L27): $$0.50,U + 0.15,V + 0.35,S = U + (0.15 + 0.35,M)\odot(V - U) + 0.35,R$$ Where $R = 0$, unselected coordinates receive donor coefficient 0.15 and routed coordinates receive 0.50, before round-to-nearest-even BF16 storage.
  2. Tail blocks (L28โ€“L35): $$0.85,U + 0.15,S = U + 0.15,M\odot(V - U) + 0.15,R$$ Omitting direct $V$ weight in the final eight blocks keeps late-layer representations closer to $U$ while attenuating $S$'s structured displacement.
  3. Embeddings and final normalization: Input embeddings, the tied language-model head, and the final RMS normalization remain identically at $U$.

See paper/ulam2_small_technical_report.pdf for exact BF16 directional rounding thresholds (characterizing why 96.5572% of parameters remain unchanged in W43 and why doubling uniform interpolation from 0.15 in W24 to 0.30 in W25 increases Frobenius displacement by 1.99985x while expanding support by only 12.23%), stochastic-rounding variance bounds, and controlled comparisons against local activation-repair families and a matched-norm random rank-eight control.


Quick start with Transformers

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "ulamai/Ulam-2-Small"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {
        "role": "user",
        "content": "Prove that for every positive integer n, gcd(n! + 1, (n + 1)! + 1) = 1.",
    }
]
inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

with torch.inference_mode():
    output = model.generate(
        **inputs,
        do_sample=True,
        temperature=0.6,
        top_p=0.95,
        max_new_tokens=16384,
    )

completion = output[0, inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(completion, skip_special_tokens=True))

Ulam-2-Small emits internal reasoning enclosed in <think>...</think> delimiters before its final answer. Downstream applications should parse <think>...</think> explicitly and provision sufficient max_new_tokens (32,768โ€“65,536 recommended for hard proof and quantitative STEM problems).

Serving with vLLM

vllm serve ulamai/Ulam-2-Small \
  --dtype bfloat16 \
  --max-model-len 65536 \
  --served-model-name ulamai/Ulam-2-Small

Example OpenAI-compatible request:

curl http://localhost:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "ulamai/Ulam-2-Small",
    "messages": [{"role": "user", "content": "Find all primes p such that p^2 + 2 is also prime, and prove no others exist."}],
    "temperature": 0.6,
    "top_p": 0.95,
    "max_tokens": 16384
  }'

Evaluation

1. Verifier-Scored Multi-Domain STEM & Math Reasoning (ulam.ai)

Candidate edits (W20โ€“W43) were screened on Dev-Screen-600 (600 tasks, 278 connected-component task families, seeds = [42, 1042], temperature = 0.6, top_p = 0.95, max_model_len = 65,536, max_tokens = 57,344) against four point-estimate gates: exceeding $U$ (0.2026), $W_{12}$ (0.2107), first restoration candidate W20 (0.2085), and a matched-norm random rank-eight perturbation (0.2104). Only two uniform parent blends (W24 at 0.15, W25 at 0.30) and the three-vertex blend W43 cleared all four gates; every tested local activation-repair setting scored below the random control's point estimate (0.2010โ€“0.2085).

The surviving blends were evaluated on family-disjoint Dev-Confirm-600 (600 tasks, 355 families). After selecting W43 as Ulam-2-Small under a research-mathematics-first release priority, we ran a single pre-registered post-selection comparison against $U$ on untouched Lockbox-592 (592 tasks, 446 families, 2,368 rollouts):

Split / Pool (64K context, seeds = [42, 1042]) Role Tasks (Families) Ulam-1-Small ($U$) Ulam-2-Small (W43) Paired W43 - U (95% Family CI) </think> Closure (U / W43)
Post-selection Lockbox-592 Fixed-release final test 592 (446) 0.2010 0.2058 +0.0049 [-0.0073, +0.0172] (111W / 375T / 106L) 76.9% / 77.2%
Dev-Confirm-600 Held-out from screen (used in selection) 600 (355) 0.2245 0.2221 -0.0024 [-0.0128, +0.0091] 78.0% / 77.8%
Confirm + Lockbox (descriptive pool) Reused observations 1,192 (801) 0.2128 0.2140 +0.0012 [-0.0069, +0.0098] 77.4% / 77.5%
All 1792 (includes Dev-Screen-600) Descriptive summary 1,792 (1,079) 0.2094 0.2132 +0.0038 [-0.0025, +0.0104] 77.7% / 78.3%

Comparison across all five Dev-Confirm-600 checkpoints:

Checkpoint Dev-Screen-600 Mean@2 Dev-Confirm-600 Mean@2 Confirm vs U (95% Family CI) Confirm Full-Credit Pass@2 Tasks (/600) Pooled Dev-1200 Pass@2
Ulam-1-Small ($U$, v1.0.0) 0.2026 0.2245 0.0000 (โ€”) 17 2.83%
W24 ($\operatorname{fl}(0.85U + 0.15V)$) 0.2153 0.2241 -0.0004 [-0.0123, +0.0109] 19 3.08%
Ulam-2-Small (W43, released) 0.2115 0.2221 -0.0024 [-0.0128, +0.0091] 18 2.75%
W12 (structured intermediate $S$) 0.2107 0.2178 -0.0067 [-0.0155, +0.0025] 20 2.83%
W25 ($\operatorname{fl}(0.70U + 0.30V)$) 0.2145 0.2132 -0.0113 [-0.0227, +0.0015] 22 3.42%
  • Interpretation & domain behavior: Under the original confirmation-score rule, W24 placed first among edits (W43 - W24 = -0.0020, 95% CI [-0.0157, +0.0127]), and neither reached the prespecified +0.015 pooled development target (+0.0033 for W43, +0.0061 for W24). On Lockbox-592, the post-selection comparison (+0.0049, [-0.0073, +0.0172]) detects no aggregate reward difference relative to $U$ and accommodates both modest harm and modest benefit. Within domains, W43 exceeded $U$ in confirmation Physics (0.4389 vs 0.4344) and Mathematics (0.1367 vs 0.1178) and had positive mathematics differences across screening (+0.0245), confirmation (+0.0189), and lockbox (+0.0121; exploratory 271-task pool: 0.1565 vs 0.1380, +0.0185, [+0.0030, +0.0348]), while trailing $U$ in the other five nonzero confirmation domains.

The 600-task Final Evaluation Benchmark and 1,200-task Weight-Editing Suite with deterministic Python verifiers are available at ulam.ai.

2. Research Mathematical Reasoning โ€” ErdosBench (ulam.ai/erdosbench)

Each checkpoint generated one cold response per problem across 226 proprietary research-level mathematics problems (seed = 42, temperature = 0.6, top_p = 0.95, max_model_len = 102,400, max_tokens = 100,000, without tools or reference answers), graded on a 0โ€“4 scale (0 = unusable or invalid central argument; 1 = limited valid content alongside material flaws; 2 = clean baseline progress; 3 = substantial rigorous partial progress; 4 = accepted resolution of the essential task or decisive central counterexample under the repair policy; max 904 total points). Finalists W24, W25, and W43 received two audit versions (A and B) on the same generated responses alongside retained historical anchor grades for $U$ and W12:

Checkpoint / audit Score 0 Score 1 Score >= 2 Score 4 Fatal central error Total Points (/904) Declarations (Accepted)
Ulam-1-Small ($U$), historical 115 103 8 2 112 124 20 (1*)
W12, historical 124 89 13 3 121 123 27 (3)
W24, Audit A 126 84 16 4 125 126 31 (4)
W25, Audit A 125 84 17 3 121 125 22 (3)
Ulam-2-Small (W43), Audit A 125 83 18 4 123 129 25 (4)
W24, Audit B 137 77 12 6 132 114 31 (6)
W25, Audit B 134 81 11 3 130 109 22 (3)
Ulam-2-Small (W43), Audit B 127 89 10 5 123 120 25 (5)

*Note: $U$'s second Score-4 response uses a partial-progress verdict rather than a solved/refuted declaration.

  • Outcome redistribution & release tradeoff: Relative to Ulam-1-Small ($U$), Ulam-2-Small (W43) increases accepted full resolutions (Score 4) from 2 to 4 (Audit A) or 5 (Audit B) and Score >= 2 responses from 8 to 18 (A) or 10 (B), while also increasing zero-score answers from 115 to 125 (A) / 127 (B) and fatal central errors from 112 to 123. Aggregate points are +5 above $U$ in A and -4 below $U$ in B (W43 - U Audit B item-bootstrap 95% CI [-0.1150, +0.0841]). Against W24, W43 leads by +3 points in A and +6 points in B (W43 - W24 Audit B 95% CI [-0.0841, +0.1372], remaining +1 to +19 points ahead across all 288 combinations of seven cross-reviewed borderline records) with fewer fatal central errors (123 vs 125 in A, 123 vs 132 in B) and fewer unaccepted completion declarations (21 vs 27 in A, 20 vs 25 in B, compared with $U$'s 19). We selected W43 for its accepted-resolution coverage and total-score edge over W24 under both audits while reporting both tails of this distribution. Individual problem statements, identifiers, and solution witnesses are proprietary to ulam.ai/erdosbench and withheld from public artifacts.

Machine-readable summaries and confidence intervals are provided in evaluation_results.json.


Intended uses and limitations

Intended uses

  • Exploratory mathematical problem solving and proof-sketch generation with human verification;
  • Multi-stage quantitative STEM derivation and verifier-scored reasoning research;
  • Precision-aware weight-space programming and model-merging research on open-weights checkpoints;
  • Local or cloud inference via Transformers and vLLM under the MIT License.

Limitations and out-of-scope uses

  • Not formally verified & higher tail failure count: Roughly 80%โ€“84% of self-declared solved/refuted declarations on research-level mathematics problems are not accepted under audit (21/25 in Audit A, 20/25 in Audit B), and W43 exhibits more fatal central errors (123 vs 112) than Ulam-1-Small alongside its higher accepted-resolution count (4โ€“5 vs 2). Never treat outputs as certified theorems without independent expert or formal verification.
  • Generation horizon sensitivity: Measured reward depends strongly on </think> termination and token budget (32Kโ€“64K+ recommended; truncating below 8,192 tokens cuts off reasoning before answers are finalized).
  • Single-turn cold base evaluation: Base evaluations do not invoke external Python interpreters, CAS engines, or Lean proof checkers.
  • High-stakes domains: Out of scope for clinical, safety-critical engineering, legal, or autonomous deployment. See RESPONSIBLE_USE.md.

Reproducibility and integrity

License

Ulam-2-Small, including its released BF16 model weights, is released under the MIT License. Upstream attribution and archived licenses are provided in NOTICE and UPSTREAM_LICENSES/.

Citation

@misc{ulam2026ulam2small,
  title        = {Ulam-2-Small: Weight-Space Programming},
  author       = {{ulam.ai}},
  year         = {2026},
  month        = nov,
  howpublished = {Hugging Face model release and technical report},
  url          = {https://huggingface.co/ulamai/Ulam-2-Small}
}

Contact

For model inquiries, ErdosBench evaluation, or licensing the Ulam Multi-Domain Verifiable STEM & Math RL Suite, visit ulam.ai.

Downloads last month
76
Safetensors
Model size
3B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ulamai/Ulam-2-Small

Merge model
this model
Quantizations
1 model

Evaluation results