Depth-Invariant Speculative Decoding for Looped Dense Language Models: Roofline Amortization, Latent Hesitation Collapse, and Wall-Clock Inversion up to 208 Effective Layers

Recurrent middle-layer looping scales the effective computational depth of a language model at test time without enlarging its parameter footprint, yet sequential autoregressive decoding (M=1) pays a linear per-token latency penalty as the loop count T grows. We investigate the hardware-algorithm synergy between Looped Dense architectures and depth-invariant external speculative tree verification on a single consumer GPU (NVIDIA RTX 5090, 32 GB). Unlike recent self-speculative decoders tailored to compact (1.4B-3.5B) all-depth-trained LoopLMs—whose shallow-loop leverage diminishes in post-hoc middle-layer looped models where prelude and coda layers constitute 75% of a base pass—we pair an unchanged, unlooped 1-pass helper drafter with parallel M-node tree verification over a T-pass recurrent 27B Dense hybrid backbone (Qwen3.8-27B, 2.38-4.50 bpw trellis quantization). First, we establish a closed-form Looped-Dense Speculative Gain Law, S(T) = tau(T) / (eta(M, T) + t_draft / t_AR(T)), that matches silicon measurements across T = 1..10 (64-208 effective layers) within 1.05% mean relative error. Because every candidate node in a Dense model reuses the exact same weight matrices across all M tree positions and all T loops—avoiding the 2-3x expert-scattering bandwidth inflation observed in Mixture-of-Experts (MoE) speculation—target verification overhead stays compact (eta(8, T) = 1.06-1.12, eta(16, T) = 1.21-1.37), while the constant 1-pass drafter cost (t_draft ≈ 0.84 ms) amortizes as O(1 / L_eff(T)). Second, direct teacher-forced logit measurements confirm latent hesitation collapse: activating recurrence immediately raises top-1/top-2 logit margin by +15.9% (10.05 -> 11.65) and cuts thinking-token Shannon entropy by -19.2% (0.1489 -> 0.1203 nats) on fixed traces (up to -37.3% on own traces, correlating at r = -0.922 with accepted tokens per pass tau(T) across T = 2..10). Consequently, speculative speedup holds 5.35x-6.37x up to 208 effective layers (464.6-534.9 64-layer-equivalent tok/s) with 110/110 (100%) exact greedy parity under our CUDA-Graph-safe, tree-exact <think>-gated LoopCD-Hidden state machine, and climbs with both weight bit-width (4.55x -> 6.06x from 2.38 to 4.50 bpw) and loop depth (+9.4% at 2.38 bpw, +18.8% at 2.90 bpw, peak 6.37x at T=6 on 3.50 bpw). Third, through a Three-Factor Wall-Clock Identity, we decompose how speculative gain and thinking-length compression yield wall-clock inversion on full 30-problem AIME 2025 (T=2 finishes 7.2% faster than T=1; T=3 lifts Pass@1 +10.0 pt from 66.7% to 76.7%, beating the unlooped 4.50 bpw model by +6.7 pt with 3.35 GB less weight memory while matching T=1 wall time on commonly solved problems via -33.3% thinking compression) and cut multi-turn 3D WebGL agentic coding turns from 20 to 7 (T=2 faster than T=1). Finally, we honestly quantify linear per-loop KV-cache growth as the primary architectural drawback and show how 3:1 GDN-Attention hybridization (4x reduction) paired with 8-bit KV (measured: 256K at T=2, 88K at T=10) and orthogonal 4-bit rotated KV compression keeps memory overhead strictly bounded.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-02
DOI
https://doi.org/10.5281/zenodo.24731792
Primary Topic
Natural Language Processing Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Depth-Invariant Speculative Decoding for Looped Dense Language Models: Roofline Amortization, Latent Hesitation Collapse, and Wall-Clock Inversion up to 208 Effective Layers

Akito Hirai
Zenodo (CERN European Organization for Nuclear Research)
Natural Language Processing Techniques
preprint

Depth-Invariant Speculative Decoding for Looped Dense Language Models: Roofline Amortization, Latent Hesitation Collapse, and Wall-Clock Inversion up to 208 Effective Layers

Akito Hirai
preprint en

Abstract

Recurrent middle-layer looping scales the effective computational depth of a language model at test time without enlarging its parameter footprint, yet sequential autoregressive decoding (M=1) pays a linear per-token latency penalty as the loop count T grows. We investigate the hardware-algorithm synergy between Looped Dense architectures and depth-invariant external speculative tree verification on a single consumer GPU (NVIDIA RTX 5090, 32 GB). Unlike recent self-speculative decoders tailored to compact (1.4B-3.5B) all-depth-trained LoopLMs—whose shallow-loop leverage diminishes in post-hoc middle-layer looped models where prelude and coda layers constitute 75% of a base pass—we pair an unchanged, unlooped 1-pass helper drafter with parallel M-node tree verification over a T-pass recurrent 27B Dense hybrid backbone (Qwen3.8-27B, 2.38-4.50 bpw trellis quantization). First, we establish a closed-form Looped-Dense Speculative Gain Law, S(T) = tau(T) / (eta(M, T) + t_draft / t_AR(T)), that matches silicon measurements across T = 1..10 (64-208 effective layers) within 1.05% mean relative error. Because every candidate node in a Dense model reuses the exact same weight matrices across all M tree positions and all T loops—avoiding the 2-3x expert-scattering bandwidth inflation observed in Mixture-of-Experts (MoE) speculation—target verification overhead stays compact (eta(8, T) = 1.06-1.12, eta(16, T) = 1.21-1.37), while the constant 1-pass drafter cost (t_draft ≈ 0.84 ms) amortizes as O(1 / L_eff(T)). Second, direct teacher-forced logit measurements confirm latent hesitation collapse: activating recurrence immediately raises top-1/top-2 logit margin by +15.9% (10.05 -> 11.65) and cuts thinking-token Shannon entropy by -19.2% (0.1489 -> 0.1203 nats) on fixed traces (up to -37.3% on own traces, correlating at r = -0.922 with accepted tokens per pass tau(T) across T = 2..10). Consequently, speculative speedup holds 5.35x-6.37x up to 208 effective layers (464.6-534.9 64-layer-equivalent tok/s) with 110/110 (100%) exact greedy parity under our CUDA-Graph-safe, tree-exact <think>-gated LoopCD-Hidden state machine, and climbs with both weight bit-width (4.55x -> 6.06x from 2.38 to 4.50 bpw) and loop depth (+9.4% at 2.38 bpw, +18.8% at 2.90 bpw, peak 6.37x at T=6 on 3.50 bpw). Third, through a Three-Factor Wall-Clock Identity, we decompose how speculative gain and thinking-length compression yield wall-clock inversion on full 30-problem AIME 2025 (T=2 finishes 7.2% faster than T=1; T=3 lifts Pass@1 +10.0 pt from 66.7% to 76.7%, beating the unlooped 4.50 bpw model by +6.7 pt with 3.35 GB less weight memory while matching T=1 wall time on commonly solved problems via -33.3% thinking compression) and cut multi-turn 3D WebGL agentic coding turns from 20 to 7 (T=2 faster than T=1). Finally, we honestly quantify linear per-loop KV-cache growth as the primary architectural drawback and show how 3:1 GDN-Attention hybridization (4x reduction) paired with 8-bit KV (measured: 256K at T=2, 88K at T=10) and orthogonal 4-bit rotated KV compression keeps memory overhead strictly bounded.

Zenodo (CERN European Organization for Nuclear Research)
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon