Dory-Beam-4B

NVIDIA's looped Dory1.0-4B, distilled from Reflection's Beam-1.0-501B-A23B. It thinks less than half as long as the base model, at a small accuracy cost.

Dory1.0-4B is a latent-recurrent nGPT: a 40-layer middle block runs 1–4 times per token, so you buy accuracy with compute instead of parameters. Beam writes short, direct reasoning. This model teaches Dory Beam's style using 52,660 verified Beam traces, then blends the result back into the base weights so it keeps most of Dory's accuracy. Built for Reflection's Build with Beam challenge.

Real time on an Apple M4 Max (llama.cpp, Q5_K_M, 2 loops): base Dory and Dory-Beam-4B on the same MATH-500 problem. Both answer correctly; base Dory writes 2,315 tokens in 51 s, Dory-Beam 1,088 tokens in 25 s. The problem was picked before recording as the median-ratio problem from the full eval; one run each, seed 0. Raw timings are in assets/race_*.json.

Results

Accuracy vs mean output tokens for base Dory and Dory-Beam-4B at 1, 2 and 4 loops

Accuracy (%) · mean output tokens per answer, base Dory vs this model at the same loop count:

Model Loops GPQA-Diamond MATH-500 AIME 2024 AIME 2025 AMC 2023 Held-out
Dory1.0-4B 1 69.4 · 15.4k 97.4 · 4.3k 87.9 · 16.4k 85.0 · 18.7k 99.4 · 6.0k 78.0 · 10.6k
Dory-Beam-4B 1 66.9 · 6.4k 94.0 · 1.7k 83.3 · 8.0k 71.2 · 10.5k 98.8 · 3.1k 79.3 · 4.2k
Dory1.0-4B 2 72.5 · 14.3k 98.4 · 3.7k 91.2 · 13.5k 92.1 · 15.7k 100.0 · 4.8k 79.0 · 9.4k
Dory-Beam-4B 2 71.5 · 5.8k 97.2 · 1.5k 91.2 · 6.4k 85.0 · 7.9k 98.1 · 2.1k 82.3 · 3.4k
Dory1.0-4B 4 74.5 · 13.8k 98.6 · 3.5k 92.9 · 12.6k 93.8 · 14.9k 99.4 · 4.5k 79.0 · 8.9k
Dory-Beam-4B 4 72.7 · 5.6k 97.4 · 1.4k 93.8 · 6.3k 88.8 · 7.9k 98.1 · 2.3k 81.7 · 3.6k

At 2 and 4 loops, Dory-Beam-4B writes 1.9–2.7× fewer tokens than base Dory (about 2.3× fewer overall) and matches it within noise on GPQA, AIME 2024 and the held-out set. The hardest benchmark pays for the shorter reasoning: AIME 2025 is −7.1 points at 2 loops and −5.0 at 4 loops, both significant. MATH-500 (−1.2) and AMC 2023 at 2 loops (−1.9) are small losses at the edge of significance. At 1 loop it falls further behind on the hardest problems (AIME 2025 −14).

Corrected 2026-10-26. The first version of this card used a 32k-token output limit. That cut off 7–18% of base Dory's AIME answers (≤4% of this model's) and understated base Dory by 3–7 points on AIME, so the card wrongly reported ties on AIME 2025. Every answer that hit the limit has since been resumed to 64k, and the tables now use those results. This model's own scores barely moved.

For reference, Dory's built-in efficient mode (medium_effort, 2 loops) scores 68.4 · 6.3k, 96.0 · 2.0k, 80.8 · 7.9k, 82.5 · 8.8k, 100.0 · 2.9k and 80.7 · 4.0k. Dory-Beam-4B at 2 loops beats or ties it everywhere except AMC (−1.9), while also using fewer tokens.

Instruction following mostly holds up. On IFEval (541 prompts × 2 samples, 2 loops), it scores 91.9% at prompt level and 94.4% at instruction level (strict), against 93.5% and 95.4% for base Dory. That is a small loss: −1.7 points at prompt level, 95% CI −3.3 to −0.1. It uses 1.8k tokens per answer against 5.5k.

Setup. vLLM from PR #60149, per-loop KV cache, temperature 1.0, top-p 0.95, up to 64k output tokens, Dory's default chat template (reasoning on). Answers were generated with a 32k limit (16k for IFEval), and those that hit it were resumed from where they stopped up to 64k, which is equivalent to running with a 64k limit (code/scripts/spawn_continue.py). Under 1% still hit 64k. Samples per problem: GPQA ×2, AIME ×8, AMC ×4, others ×1. GPQA asks for the option letter. Held-out is 300 problems from the training distribution (DeepMath difficulty 5–9 and OpenScienceReasoning-2 MCQ) that were never trained on. Differences were checked with paired bootstrap confidence intervals over problems. AIME has 30 problems, so gaps under about 6 points are noise. Every graded answer behind these tables is published in the dataset's eval configs, and code/scripts/audit_eval.py recomputes the tables and confidence intervals from them.

Recommended: 2 loops by default, or 4 loops when accuracy matters most. At 1 loop the shorter reasoning costs accuracy on the hardest problems (AIME 2025 −14).

How it was made

  1. Data. Beam-1.0-501B-A23B at reasoning_effort=medium answered ~62k decontaminated DeepMath-103K and OpenScienceReasoning-2 prompts, through the Reflection API and self-hosted on SGLang. Answers were checked with math-verify or a letter match. Keeping the shortest correct trace per prompt gave 52,660 examples: 29k math, 23k science, median ~3k characters. Released as ProCreations/Beam-Reasoning-Traces.
  2. Fine-tune. Dory has no public training code, so code/dory/modeling.py is a PyTorch port written to match vLLM's implementation op for op. Training was full-parameter SFT for 2 epochs at lr 1e-5 with no weight decay, using packed 16k sequences with FlexAttention document masks. Weights were re-projected onto the unit hypersphere after every step, as nGPT requires. The loop count was sampled per step from {1, 2, 3, 4} with probabilities {.2, .4, .2, .2}, so the model works at any loop count. It ran in about 2 h 10 min on 4× B200.
  3. Blend. The fine-tune alone reasoned 2–3.5× shorter but dropped 7–10 points on AIME. It had learned Beam's brevity without Beam's reliability, and made careless slips on problems that looked easy. A 50/50 linear interpolation of base and fine-tuned weights, re-normalized onto the hypersphere (code/scripts/merge_dory.py), recovers most of the base accuracy while keeping most of the savings. No extra training was needed. A 70/30 blend saved another 10–15% of tokens but scored up to 3 points lower.

Things that did not help: picking a random correct trace instead of the shortest (no change at any loop count), and stopping training early (earlier checkpoints were worse).

Usage

The weights, config and chat template follow the base model, so the Dory quick start applies with the model id swapped. Until Dory support is in a vLLM release, install vLLM from the PR:

VLLM_USE_PRECOMPILED=1 pip install "git+https://github.com/vllm-project/vllm.git@refs/pull/60149/head"

vllm serve --model ProCreations/Dory-Beam-4B \
    --hf-overrides '{"n_recurrent_loops": 2, "recurrent_kv_cache_mode": "per_loop"}' \
    --max-model-len 65536 \
    --enable-prefix-caching \
    --reasoning-parser nemotron_v3
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
r = client.chat.completions.create(
    model="ProCreations/Dory-Beam-4B",
    messages=[{"role": "user", "content": "How many positive divisors does 2024 have? Put your final answer within \\boxed{}."}],
    temperature=1.0, top_p=0.95, max_tokens=32768,
)
print(r.choices[0].message.content)

Set n_recurrent_loops to 1–4 to trade compute for accuracy.

On a Mac: GGUF builds for llama.cpp (Q5_K_M and Q8_0) are in ProCreations/Dory-Beam-4B-GGUF, with run instructions. On an M4 Max the Q5_K_M decodes at about 45 tokens/s at 2 loops, so a typical MATH-500 answer takes about 30 seconds. It scored 20/20 on a MATH-500 smoke test.

See it: side-by-side answers from base Dory and Dory-Beam on randomly sampled evaluation problems.

Limitations

  • The hardest problems pay for the shorter reasoning: AIME 2025 is 5–7 points below base Dory at 2–4 loops. If you need peak accuracy on competition math and can afford about twice the tokens, use base Dory.
  • Distillation used only math and science multiple-choice data. IFEval drops slightly (−1.7 points). Coding, tool calling and long-context behaviour were not evaluated and may differ from the base model.
  • English only, like the training data.

Code

code/ contains everything needed to reproduce this model:

  • dory/: the trainable PyTorch port and the data rendering.
  • scripts/: prompt pool, Beam generation, verification, dataset build, train_dory.py (torchrun DDP), merge_dory.py, check_dory.py (checks the port against the released weights), make_chart.py and build_space_data.py.
  • modal_app/: self-hosted Beam data generation, training and vLLM evaluation on Modal, including IFEval and resuming cut-off answers to a longer limit (scripts/spawn_continue.py, scripts/merge_continued.py).
  • third_party/ifeval/: IFEval checkers from lm-evaluation-harness (Apache-2.0, with the harness's MIT license included).

License

OpenMDW-1.1, inherited from Dory1.0-4B; a copy is in LICENSE. Base model © NVIDIA. Training data generated with Beam-1.0-501B-A23B (Apache-2.0).

Downloads last month
32
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ProCreations/Dory-Beam-4B

Finetuned
(4)
this model
Quantizations
1 model

Dataset used to train ProCreations/Dory-Beam-4B

Space using ProCreations/Dory-Beam-4B 1