Summary (Overview)

  • Dory1.0-4B is a 4-billion-parameter looped (latent-recurrent) language model with elastic depth, built on a normalized Transformer (nGPT) backbone. A single checkpoint serves different inference compute budgets by varying the loop count kk of its shared recurrent block.
  • The model was pretrained on 6 trillion tokens (first 4.5T in NVFP4), extended to a 256K-token context, and post-trained with SFT followed by RLVR using a difficulty-aware loop curriculum that routes harder prompts to deeper loops.
  • Increasing loop count improves accuracy, with the largest gains on coding, agentic, and long-context benchmarks. With 2+ loops, Dory1.0-4B outperforms larger models (Qwen3.5-9B, Gemma 4 12B, Gemma 4 26B-A4B) on average across 12 benchmarks.
  • Looping improves token efficiency: with four loops, the model generates 1.3–2.5× fewer tokens than with one loop on agentic benchmarks, as extra computation is spent in latent space rather than on longer outputs.
  • Last-loop KV caching keeps the KV-cache footprint equal to a non-looped model at any loop count. The model is open-sourced in BF16, MXFP8, NVFP4, and GGUF quantized checkpoints.

Introduction and Theoretical Foundation

Looped (latent-recurrent) language models offer a complementary compute-scaling axis to standard token-space scaling (Dehghani et al., 2019; Saunshi et al., 2025; Geiping et al., 2025; Zhu et al., 2025). By repeatedly applying a shared block of layers, a looped model spends more computation per token in latent space without adding parameters. This addresses a key limitation of test-time compute scaling: models generate longer reasoning traces, and latency, KV-cache footprint, and serving cost grow with every generated token.

Dory1.0-4B brings this idea to a fully post-trained model built for reasoning and agentic tasks. It is trained with a mixture of loop counts so that a single checkpoint can be served at any loop count kk, trading inference compute for accuracy per request with no retraining and no model swap.

The architecture is based on the normalized Transformer (nGPT) (Loshchilov et al., 2025), which retains the residual-update rule:

s0=x,ut=N(st−1+x),st=N(Fθ(ut)),t=1,…,k.s_{0} = x, \qquad u_{t} = N(s_{t-1} + x), \qquad s_{t} = N(F_{\theta}(u_{t})), \qquad t = 1, \ldots, k.

where xx is the input block's output, FθF_{\theta} is the shared recurrent block, NN is per-token L2 normalization, and kk is the loop count. The effective forward depth is 32+40k32 + 40k, ranging from 72 to 192 physical-layer applications.

Methodology

Architecture

Dory1.0-4B uses a normalized Transformer backbone with:

  • 72 physical layers partitioned into a 16-layer input block, a 40-layer shared recurrent block, and a 16-layer output block
  • 3:1 interleaving of sliding-window attention (SWA) and full-attention layers within each 8-layer pattern
  • SWA uses window W=1024W = 1024 tokens with RoPE base θS=104\theta_S = 10^4; full attention uses θF=107\theta_F = 10^7
  • Gated grouped-query attention with 16 query heads and 4 KV groups
  • Input-dependent sigmoid attention-output gates
  • Initial raw residual-rate, query–key scale, and logit-scale parameters at 0.0177

Pretraining

  1. NVFP4 stage: ~4.535T tokens using Megatron-LM and NVIDIA Transformer Engine's NVFP4 blockscaling, yielding ~20% end-to-end speedup over BF16. Two-phase curriculum: phase-1 at sequence length 8,192, then phase-2 at 32,768. Learning rate held at 3.2×10−43.2 \times 10^{-4} through 4.5T tokens, then minus-square-root decay toward 10−510^{-5} at 6T.

  2. BF16 loop continuation: ~1.465T additional tokens with loop count sampled uniformly from k∈{1,2,3,4}k \in \{1, 2, 3, 4\}. A rank-level override fraction of 0.1 forces a rotating subset of replicas to execute exactly one loop. Uses truncated backpropagation through loops (TBPTL) with depth one.

  3. Long-context extension: 300B tokens at sequence length 262,144, increasing full-attention RoPE base from 500,000 to 10,000,000, with constant learning rate 10−510^{-5}.

Post-Training

SFT: Nine epochs over packed 256K-token sequences with both thinking and non-thinking responses, retaining random loop sampling. Between epochs 1 and 9, SciCode improved from 13.11% to 18.14%, Terminal-Bench v2.1 from 4.2% to 13.5%, and GPQA Diamond from 43.13% to 54.95%.

RLVR: 200 steps of asynchronous GRPO across 23 environments. Uses a difficulty-aware loop curriculum with routing score:

si=αqi+(1−α)ui,ui∼Uniform(0,1).(1)s_{i} = \alpha q_{i} + (1 - \alpha) u_{i}, \qquad u_{i} \sim \mathrm{Uniform}(0, 1).\tag{1}

where qiq_i is the midpoint quantile of each prompt's profiled pass rate and α=0.3\alpha = 0.3. Prompts with lower routing scores fill deeper-loop slots first. The loop curriculum improves all six benchmarks at both one and four loops, with the largest gains on agentic tasks at four loops (e.g., Terminal-Bench v2.1 from 14.0% to 21.4%).

Quantization

Three weight-only formats evaluated: MXFP8 (PTQ only), NVFP4 and Q5_K_M (with quantization-aware distillation, QAD). QAD minimizes full-vocabulary forward KL divergence:

LKD=1∑tmt∑tmt∑v∈VpT(v∣x≤t,k)log⁡pT(v∣x≤t,k)pS(v∣x≤t,k).(2)\mathcal{L}_{\mathrm{KD}} = \frac{1}{\sum_{t} m_{t}} \sum_{t} m_{t} \sum_{v \in \mathcal{V}} p_{T}(v \mid x_{\leq t}, k) \log \frac{p_{T}(v \mid x_{\leq t}, k)}{p_{S}(v \mid x_{\leq t}, k)}.\tag{2}

Empirical Validation / Results

Base Model Evaluations

Base model performance improves with loop count, saturating around 4 loops. Key results at k∈{1,2,4}k \in \{1, 2, 4\}:

TaskMetrick=1k=2k=4
MMLU (Str)5-shot EM68.2070.7771.19
MMLU-Pro5-shot CoT EM51.5255.0656.09
GSM8K8-shot CoT EM86.4389.9989.84
MATH-5004-shot greedy EM60.6065.0069.40
HumanEval0-shot pass@158.3359.7662.34
MBPP-Sanitized3-shot pass@157.0961.5060.89
ARC-Challenge25-shot acc_norm87.6389.0888.74
HellaSwag10-shot acc_norm78.5279.5379.76
WinoGrande5-shot acc74.1176.2477.43
RACE-H0-shot acc83.0685.2686.03

Main Results (Post-Trained)

TaskDory 1 loopDory 2 loopsDory 4 loopsQwen3.5 4BQwen3.5 9BGemma 4 12BGemma 4 26B-A4BQwen3.6 35B-A3B
SciCode27.334.9435.1125.8228.2137.8940.3237.24
SWE-Bench Verified50.359.561.854.761.047.357.4073.4†
Terminal-Bench v2.112.518.122.2152427.03543
τ³-Banking11.612.8914.695.037.228.6313.669.54
GDPval-AA v2 (Elo)815946967424546657.4751.6987
GPQA Diamond69.1972.4172.1677.7180.9373.3680.4385.35
HLE8.2510.8910.4311.3115.4313.6717.7919.18
IFBench74.2977.947953.835973.4477.8957.44
AA-LCR63717364.768.458.964.668.5
GDP.pdf3.46.26.02.84.64.003.604.40
AA-Omniscience (acc)10.0310.0810.0315.0218.0517.2021.1319.95
AA-Omniscience (non-halluc.)76.4279.7479.3820.1817.3921.8416.3665.25
Average35.1739.6740.6028.5332.2132.5936.7342.30

Token Efficiency

Going from k=1k=1 to k=4k=4 reduces output tokens per attempt by 1.3–2.5× on agentic benchmarks:

TaskTurns/attempt (k=1→4)Output tokens/attempt (k=1→4)Reduction
GDPval-AA v2116 → 49212k → 85k2.5×
Terminal-Bench v2.1134 → 82109k → 54k2.0×
SWE-Bench Verified88 → 7333.6k → 24.8k1.35×
τ³-Banking21.3 → 19.823.0k → 17.6k1.3×

The second loop gives the largest accuracy gain per unit of added compute, making k=2k=2 a good default.

Inference Optimizations

  • Last-loop KV caching: Keeps KV memory at one-loop footprint for any kk. Score changes of −2.12 to +0.42 points relative to per-loop caching at k=4k=4, with nearly unchanged output lengths.
  • Self-speculative decoding: Uses k=1k=1 drafting and k=4k=4 verification with γ=4\gamma=4 draft tokens, achieving 1.11–1.53× speedups in mean prefill-plus-decode request duration.
  • Quantization speedups: MXFP8 achieves up to 1.84× and NVFP4 up to 2.44× speedup over BF16.

Theoretical and Practical Implications

Theoretical significance: Dory1.0-4B demonstrates that latent-recurrent computation is a viable and complementary scaling axis to token-space test-time compute. The results show that a 4B model with deep looping can compete with models 9× its size on agentic and coding tasks, suggesting that recurrent depth can substitute for parameter count in certain domains.

Practical implications:

  • Elastic depth: A single checkpoint serves different compute budgets, enabling per-request trade-offs between latency and accuracy without model swapping.
  • Token efficiency: Looping reduces output token count on agentic tasks, partially offsetting higher per-token compute costs. This is particularly valuable for agentic workloads where output tokens dominate cost.
  • Memory efficiency: Last-loop KV caching decouples KV-cache footprint from loop count, making deep looping deployable with standard serving infrastructure.
  • Quantization: Multiple quantized formats (MXFP8, NVFP4, Q5_K_M) enable deployment across different hardware constraints with minimal accuracy loss.

Conclusion

Dory1.0-4B is the first open looped language model in the Nemotron Labs family, demonstrating that latent-recurrent architectures can be successfully pretrained, post-trained, and deployed at scale. Key findings:

  1. Looping improves accuracy on coding, agentic, and long-context benchmarks, with the largest gains on agentic tasks.
  2. A difficulty-aware loop curriculum in RLVR is crucial for unlocking gains at deeper loop counts.
  3. Looping improves token efficiency by reducing the number of actions and output tokens needed to complete agentic tasks.
  4. Last-loop KV caching and self-speculative decoding make deep looping practical for serving.
  5. Quantization (MXFP8, NVFP4, Q5_K_M) preserves most accuracy while providing up to 2.44× inference speedup.

The open-sourced checkpoints (BF16, MXFP8, NVFP4, GGUF) enable the research community to further explore latent-recurrent computation, elastic depth, and the trade-offs between parameter count and recurrent depth in language models.

Related papers