Dory-Beam-4B

NVIDIA's looped Dory1.0-4B, distilled from Reflection's Beam-1.0-501B-A23B, with Beam's reasoning-effort setting. Pass reasoning_effort = low, medium or high, just as you would to Beam. Depending on the setting, it thinks 1.9–4Γ— less than the base model.

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 and lets you choose how hard it thinks. This model learned both:

  • Beam's style, from 52,660 verified medium-effort traces.
  • The effort setting, from 57,764 more examples at low, medium and high effort.

The fine-tune is then blended back into the base weights. Built for Reflection's Build with Beam challenge.

  • Need base-level accuracy? Dory-Beam-4B-Accurate ties base Dory on every benchmark with 1.8Γ— fewer tokens. It has no effort setting.
  • Version 2 (2026-10-26) adds the effort setting. The first release is the v1 tag of this repo.

Real time on an Apple M4 Max (llama.cpp, Q5_K_M, 2 loops): base Dory and Dory-Beam-4B at low, default and high effort, on the same MATH-500 problem. All four answer correctly. Base Dory writes 2,599 tokens in 53 s, and Dory-Beam writes 626, 849 and 886 tokens in 13, 18 and 19 s. The problem was picked before recording: it has the median base-to-default token ratio in the full eval. One run each, seed 0. Raw timings are in assets/race_*.json.

Choosing the effort

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,
    extra_body={"chat_template_kwargs": {"reasoning_effort": "low"}},  # "low", "medium", "high", or leave unset
)
Setting Tokens vs base Dory Accuracy Use it for
low 4.0Γ— fewer Holds on easier problems (MATH-500 96.0, AMC 98.1, held-out 80.7), loses 11–23 points on AIME Quick answers to routine problems
medium 2.4Γ— fewer Ties the default (AMC βˆ’3.1 is borderline) A slightly cheaper default
unset (default) 2.2Γ— fewer Ties base Dory except two borderline 1-point losses (MATH-500, AMC) General use
high 1.9Γ— fewer Within noise of the default; AIME 2025 +2.1, AMC βˆ’3.8 Hard competition math

The template adds {reasoning effort: <level>} to the end of your message, following Dory's own convention for its efficient mode. Any client that passes chat template arguments can use it, including vLLM, SGLang, transformers and llama.cpp's server.

The setting reliably controls length: on every benchmark, low < medium < default < high. Accuracy separates only at low. Beam's own high writes only about 1.3Γ— more than medium on these problems, so the distilled high is a small step. For the best accuracy, use 2 loops with the default or high, or Dory-Beam-4B-Accurate.

Results

Accuracy vs mean output tokens for base Dory, Dory-Beam-4B at each reasoning effort, and Dory-Beam-4B-Accurate

Accuracy (%) Β· mean output tokens per answer, at 2 loops:

Model GPQA-Diamond MATH-500 AIME 2024 AIME 2025 AMC 2023 Held-out
Dory1.0-4B (base) 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, low 68.7 Β· 2.6k 96.0 Β· 1.0k 80.0 Β· 4.1k 69.6 Β· 4.7k 98.1 Β· 1.7k 80.7 Β· 2.0k
Dory-Beam-4B, medium 70.2 Β· 5.5k 97.6 Β· 1.3k 91.2 Β· 5.9k 82.5 Β· 8.0k 96.2 Β· 2.0k 84.3 Β· 3.4k
Dory-Beam-4B, default 74.0 Β· 5.9k 97.0 Β· 1.5k 88.3 Β· 6.5k 86.7 Β· 8.7k 99.4 Β· 2.3k 82.7 Β· 3.9k
Dory-Beam-4B, high 74.7 Β· 7.4k 97.6 Β· 1.5k 87.9 Β· 7.9k 88.8 Β· 9.6k 95.6 Β· 2.6k 82.3 Β· 4.2k
Dory-Beam-4B-Accurate 74.7 Β· 7.4k 97.6 Β· 1.9k 92.1 Β· 7.9k 89.2 Β· 9.6k 98.8 Β· 2.8k 80.0 Β· 4.8k

Each difference below is in points against base Dory, with a 95% paired bootstrap CI over problems:

  • Default:
    • GPQA +1.5, AIME 2024 βˆ’2.9, AIME 2025 βˆ’5.4 (βˆ’11.7 to +0.4) and held-out +3.7 are ties.
    • MATH-500 (βˆ’1.4) and AMC (βˆ’0.6) are borderline losses, with intervals ending at 0.
  • high: a tie everywhere except AMC 2023 (βˆ’4.4, βˆ’8.8 to βˆ’1.2).
  • Dory-Beam-4B-Accurate: a tie on everything at 2 loops (AMC βˆ’1.2 is borderline) and at 4 loops.

At 4 loops, base Dory scores 74.5 Β· 13.8k, 98.6 Β· 3.5k, 92.9 Β· 12.6k, 93.8 Β· 14.9k, 99.4 Β· 4.5k and 79.0 Β· 8.9k. Dory-Beam-4B-Accurate scores 75.0 Β· 7.1k, 98.0 Β· 1.7k, 93.8 Β· 7.5k, 92.1 Β· 9.3k, 99.4 Β· 2.7k and 81.7 Β· 4.5k. Dory-Beam-4B at high barely changes at 4 loops: it ties its own 2-loop scores on every benchmark except AIME 2024 (+4.2, borderline), and AIME 2025 is 87.1 against 88.8.

Instruction following holds up. On IFEval (541 prompts Γ— 2 samples, 2 loops, default setting) it scores 92.2% at prompt level and 94.7% at instruction level (strict), against 93.5% and 95.4% for base Dory. The gap is a tie: βˆ’1.3, 95% CI βˆ’3.0 to +0.4. It uses 2.0k tokens per answer against 5.5k.

Compared with v1 at 2 loops, the default setting writes about 5% more and ties v1 everywhere except AIME 2024 (βˆ’2.9, βˆ’5.4 to βˆ’0.4). Its AIME 2025 gap to base shrinks from βˆ’7.1 (significant) to βˆ’5.4 (not significant).

Setup. vLLM from PR #60149, per-loop KV cache, temperature 1.0, top-p 0.95, up to 64k output tokens, Dory's chat template with reasoning on. Under 1% of answers 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. 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. code/scripts/audit_eval.py recomputes the tables and confidence intervals from them, for example python audit_eval.py dory-beam-4b:2-effort-high dory1.0-4b:2.

A note on the limit. v1's first evaluation used a 32k-token limit, which cut off 7–18% of base Dory's AIME answers and understated it by 3–7 points. Those answers were resumed to 64k (code/scripts/spawn_continue.py), and every number here uses 64k.

Recommended: 2 loops. At 1 loop the shorter reasoning costs accuracy on the hardest problems, and 4 loops gave this model little in our tests.

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, and the shortest correct trace per prompt was kept. That gave 52,660 examples: 29k math and 23k science, median ~3k characters. They are 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, on 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. This took 2 h 10 min on 4Γ— B200.

  3. Effort levels. Self-hosted Beam (NVFP4, the same teacher as most of the medium data) answered 20k of the training prompts again at low, high and xhigh. Low traces ran 0.65Γ— the length of medium, high 1.33Γ— and xhigh only 1.08Γ— more than high. So high here is the longer correct answer of Beam's high and xhigh. Each level was tagged the way the chat template renders it:

    • 18.6k low and 19.1k high examples.
    • 20k medium examples, half tagged medium and half untagged, so the default stays medium-like.

    One more epoch from the step-2 checkpoint took 40 minutes on 8Γ— B200. Script: code/scripts/build_effort_dataset.py.

  4. Blend. The fine-tunes alone reason 2–3.5Γ— shorter but drop 7–10 points on AIME: they learn Beam's brevity without its reliability. Interpolating base and fine-tuned weights 50/50, then re-normalizing onto the hypersphere (code/scripts/merge_dory.py), recovers most of the accuracy and keeps the effort setting. Dory-Beam-4B-Accurate is 70% base and 30% of the step-2 fine-tune. At 30/70 the effort-tuned model's high and default became indistinguishable, so Accurate has no effort setting.

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). For this model, 4 loops gave little over 2.

Usage

The weights and config follow the base model, so the Dory quick start applies with the model id swapped. The chat template adds reasoning_effort and otherwise matches the base. 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

Then call it as in Choosing the effort. 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, with the effort setting) 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. An average MATH-500 answer takes about 30 seconds at the default effort and 20 at low. Every effort setting, and the Accurate variant, scored 10/10 on a 10-problem MATH-500 smoke test.

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

Limitations

  • low gives up 11–23 points on AIME. Keep it for routine problems.
  • high is only a small step up from the default, because Beam's own high reasons only about 1.3Γ— longer than medium on these problems. For base-level accuracy, use Dory-Beam-4B-Accurate or base Dory.
  • Distillation used only math and science multiple-choice data. 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.
  • templates/dory_beam_chat_template.jinja: the chat template with reasoning_effort.
  • scripts/:
    • Data: prompt pool, Beam generation, verification, build_dataset.py and build_effort_dataset.py.
    • Training and merging: train_dory.py (torchrun DDP), merge_dory.py, and check_dory.py, which checks the port against the released weights.
    • Evaluation and release: spawn_effort_evals.py, audit_eval.py, make_chart.py and build_space_data.py.
  • modal_app/: self-hosted Beam data generation (any effort level), training, and vLLM evaluation on Modal, including IFEval, reasoning_effort, and resuming cut-off answers to a longer limit.
  • 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
545
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
(5)
this model
Quantizations
1 model

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

Space using ProCreations/Dory-Beam-4B 1