betaFeedback

WorksComputer Science

ReaDy: Recurrent States as Dynamic Context for Speculative Drafting in Hybrid Linear Attention Large Language Models

Abstract

Speculative decoding accelerates autoregressive generation by drafting multiple tokens per step, yet feature-based drafters rely on target hidden features whose contextual emphasis may not align with the needs of subsequent draft positions. Hybrid linear attention (HLA) models maintain compact recurrent states that accumulate historical associations, offering an efficient source of complementary context for speculative drafting. We introduce ReaDy, the first speculative decoding method, to the best of our knowledge, to leverage HLA recurrent states for position-specific context retrieval during drafting. ReaDy equips each draft position with a learned query to retrieve supplementary context directly from the target's committed recurrent states. A lightweight state reader integrates this context into draft representations through residual updates, while low-rank state reads and fused operators keep additional computation and I/O overhead low. Building on DSpark's parallel backbone and sequential prediction head, ReaDy employs a lightweight two-stage adaptation strategy, with reader capacity, state sources, and residual placement examined through ablation studies. Across seven benchmarks spanning mathematics, code generation, and dialogue, ReaDy achieves an average 3.16×3.16\times decoding speedup over autoregressive decoding with Qwen3.8-27B on a single NVIDIA B200 GPU. It outperforms DSpark on every benchmark, improving throughput by 7.97% and acceptance length by 8.50% on average. Our code is available at https://github.com/StartLuxLabs/ReaDy.

Introduction

Hybrid linear attention (HLA) offers a practical route to efficient long-context language modeling.

By combining recurrent layers with full or sparse attention, HLA reduces the cost of maintaining context while retaining fine-grained retrieval capabilities [22, 15]. Autoregressive generation nevertheless remains sequential. Speculative decoding addresses this bottleneck: a lightweight drafter proposes several tokens for the target to verify together, reducing the number of target invocations needed to generate a sequence [12].

Recent advances reduce the sequential cost of drafting itself. DFlash predicts token blocks in parallel from target hidden features [2]; DSpark combines a parallel backbone with a lightweight sequential head to capture dependencies within each block [4]. Training that exposes drafters to their own predictions or accounts for verification further improves draft–target agreement [13, 7]. For semi-autoregressive drafting, however, the backbone must prepare representations for several future positions at once. Its predictions therefore depend on whether the supplied context supports the needs of the entire block.

Target hidden features provide a selective view of the prefix. Learned under next-token prediction, they reflect context selected by the target’s queries at observed positions [14]. Later draft positions can require relationships that those readouts do not emphasize. The drafter can attend over the supplied features, but this does not give it direct access to the underlying target memory. KVShot enables fresh retrieval through the target’s KV cache [14]. That access, however, reads token-wise memory whose size grows with the prefix, increasing the I/O cost of supplying additional context.

HLA offers a different source: recurrent states that compactly accumulate historical associations in fixed-size matrices. Direct access to these states lets each draft position seek supplementary context with its learned query, without scanning a growing token-wise cache. The challenge is to make this information useful for block prediction while keeping computation and I/O cost low.

Figure 1. Decoding speedups of Qwen3.8-27B on a single NVIDIA B200 GPU at temperature zero. Each benchmark is normalized to autoregressive decoding. The Average panel reports the arithmetic mean of per-benchmark speedups. ReaDy improves throughput over DSpark across all seven benchmarks.

We introduce ReaDy, a state-conditioned speculative decoding method for HLA models. ReaDy augments DSpark’s parallel backbone with a reader that forms a query from each draft representation, reads selected target states, and injects the retrieved context through a residual update. It retains DSpark’s sequential prediction head and target verification, allowing only committed states to inform subsequent drafting rounds. We summarize our contributions as follows:

  • To the best of our knowledge, we are the first to propose leveraging HLA recurrent states as a complementary source of context for speculative drafting. Our theoretical analysis characterizes when new state queries can reveal information not determined by existing readouts, motivating position-specific retrieval from committed states.

  • We develop ReaDy, a recurrent-state-conditioned speculative decoding method that equips each draft position with a learned state query and integrates the retrieved context through lightweight residual updates. Low-rank state reads, fused operators, and a two-stage adaptation strategy enable efficient integration with a pretrained drafter.

  • Experiments across seven benchmarks with Qwen3.8-27B demonstrate that ReaDy improves decoding throughput and acceptance length over DSpark by 7.97% and 8.50% on average, respectively, achieving an average 3.16×3.16\times speedup over autoregressive decoding.

Theoretical Motivation

ReaDy builds on the distinction between a recurrent state and a query-specific readout of that state. We analyze this distinction at the attention-head level to motivate an additional route to prefix context. Full proofs and assumptions are given in Appendix § 7; Appendix § 10 reviews the underlying attention and speculative-decoding mechanisms.

Query-dependent context. Target queries are learned under next-token prediction, and their readouts reflect position-specific uses of context ([14]). Their contextual focus need not match the needs of later positions in a draft block. To isolate the selection, consider an idealized interface exposing readouts O=SQO = SQ of a fixed state S∈Rdv×dkS \in\mathbb{R}^{d_v \times d_k}, with known queries Q=[q1,…,qm]Q = [q_1,\ldots,q_m]. Let ΠQ=QQ†\Pi_Q = QQ^\dagger project onto their span, where Q†Q^\dagger is the Moore–Penrose pseudoinverse. A new query q∗q_* yields

Sq∗=(SQ)Q†q∗+S(I−ΠQ)q∗.(1)Sq_* = (SQ)Q^\dagger q_* + S(I-\Pi_Q)q_*. \tag*{(1)}

The first term is the response to the component of q∗q_* within the exposed query span and is determined by the existing readouts. The second captures the response along directions outside that span. For unrestricted SS, when this component of q∗q_* is nonzero, different states can agree on every exposed readout while producing different answers to q∗q_*. Conversely, if QQ has full row rank, its span covers the key space and no such ambiguity remains. The relevant issue is therefore which query directions the interface exposes, not the number of readouts alone. This idealized result concerns state-query readouts; it does not establish that the drafter’s complete multilayer features are insufficient.

Revisiting the committed state. Gated DeltaNet updates its state as Si=Si−1Ai+BiS_i = S_{i-1}A_i + B_i, where AiA_i transforms existing associations and BiB_i writes new ones, with raw attention readout oi=Siqio_i = S_iq_i [22]. Along a fixed target-model continuation, define Pj=At+1⋯At+jP_j = A_{t+1} \cdots A_{t+j} and let WjW_j collect subsequent writes. Unrolling the recurrence gives

St+j=StPj+Wj,ot+j=St(Pjqt+j)+Wjqt+j.(2)\begin{aligned} S_{t+j} &= S_tP_j + W_j, \\ o_{t+j} &= S_t(P_jq_{t+j}) + W_jq_{t+j}. \tag*{(2)} \end{aligned}

The first term is the contribution of the committed prefix; the second collects the effects of future writes. The accumulated transitions change how prefix information contributes, but this contribution remains expressible as a new query to StS_t. The effective query depends on the continuation and is not available during drafting; the identity motivates learning useful query directions from draft representations. Reading StS_t alone does not recover the second term, which depends on future writes.

These observations motivate ReaDy’s context-access design. A learned reader maps each draft representation to a query of the same committed state, allowing the retrieved context to vary across the block without advancing the target state. Residual integration retains the backbone’s role in modeling the continuation and combining that context with hidden features. The fixed-size state supplies this information without a token-wise memory scan. § 3 places these reads within ReaDy’s semi-autoregressive drafting and verification process.

Method

ReaDy is a DSpark-based, state-conditioned speculative decoding method for HLA models. It combines block prediction with position-conditioned reads from the target’s committed recurrent states (Figure 2). We use DSpark’s parallel backbone and sequential prediction head [4], and introduce a state-reading path in the final draft layer. § 4.1 describes initialization and training.

ReaDy’s state-conditioned drafting and verification process

Figure 2. ReaDy’s state-conditioned drafting and verification process. (a) The drafter combines target hidden features with position-specific reads from committed recurrent states. Verification determines the accepted prefix and the states available in the next round. (b) Query projection maps each draft representation through a rank-8 bottleneck to the 128-dimensional key space. The value map compresses the state values to rank eight. Position-specific readouts are fused with state-scale information and injected through a residual connection.

State-Conditioned Block Drafting

State interface. At a committed prefix of length tt, the target provides its hidden features and recurrent states from selected linear-attention layers. We write the state of head aa in layer ℓ\ell as Stℓ,a∈Rdv×dkS_t^{\ell,a} \in\mathbb{R}^{d_v \times d_k}, using the value-by-key convention of § 2. These matrices summarize prefix associations without retaining a separate entry for every token. All draft positions access the same committed states; the information retrieved from them depends on the representation at each position.

Position-conditioned reading. We place the reader in the final draft layer, after post-attention normalization and before the MLP. At this point, the draft representation has already incorporated context through the backbone’s existing attention path. Let hj∈Rdh_j \in\mathbb{R}^{d} denote this representation at draft position jj, and let Sˉ\bar{S} be an RMS-normalized state. Suppressing layer and head indices, we express the read as

zj=WqRMSNorm⁡(hj),qj=U⊤zj,T=V⊤Sˉ,uj=Tqjdk.(3)\begin{aligned} z_j &= W_q \operatorname{RMSNorm}(h_j), \\ q_j &= U^{\top}z_j,\qquad T = V^{\top}\bar{S}, \\ u_j &= \frac{Tq_j}{\sqrt{d_k}}. \tag*{(3)} \end{aligned}

Here Wq∈Rr×dW_q \in\mathbb{R}^{r \times d} and U∈Rr×dkU \in\mathbb{R}^{r \times d_k} first form a rank-rr query bottleneck, then expand it to the full key space. The query qj∈Rdkq_j \in\mathbb{R}^{d_k} is thus restricted to a learned subspace. Independently, V∈Rdv×rV \in\mathbb{R}^{d_v \times r} compresses the state’s value dimension, producing T∈Rr×dkT \in\mathbb{R}^{r \times d_k} and an rr-dimensional readout uju_j. In our final configuration, dk=dv=128d_k = d_v = 128 and r=8r = 8: the reader forms an 8×1288 \times128 projected state while retaining the 128-dimensional key axis. Both constraints apply to the reader; the target continues to maintain its original 128×128128 \times128 recurrent states.

Fusion and residual injection. We collect the readouts from the selected layers and heads and concatenate them with their corresponding log-RMS state scales to form fjf_j. Normalization controls the scale of the state entries, while the appended log-RMS features retain information about their original magnitudes. A bottleneck MLP maps the fused features back to the draft width:

Δhj=WupSiLU⁡(WdownRMSNorm⁡(fj)),hj′=hj+Δhj.(4)\begin{aligned} \Delta h_j &= W_{\mathrm{up}} \operatorname{SiLU}(W_{\mathrm{down}} \operatorname{RMSNorm}(f_j)), \\ h'_j &= h_j + \Delta h_j. \tag*{(4)} \end{aligned}

The draft MLP processes hj′h'_j to produce the features used for base logits. DSpark’s sequential prediction head combines these logits with transition biases conditioned on the preceding token to generate the block. The residual combines retrieved prefix context with the backbone’s features, leaving continuation modeling to the drafter. Section 4.4 evaluates reader capacity, source layers, and injection placement.

Drafting, verification, and commitment. Each round uses target hidden features and recurrent states associated with the committed history. The parallel backbone forms the draft representations, the reader supplies position-specific context, and the sequential head produces the candidate block. Under our greedy decoding setting, the target accepts the longest candidate prefix matching its argmax predictions. The first mismatch ends acceptance: the remaining proposals are discarded, and a target-supplied correction is committed with the accepted prefix. If the whole block is accepted, the target supplies a bonus token, unless generation has terminated. Subsequent rounds read only states associated with committed tokens; states from rejected continuations are not retained. This process repeats until EOS or the output limit. ReaDy changes how proposals are conditioned while retaining the existing verification rule.

Efficient State Access

State-access footprint. For MM selected layer–head pairs, the reader’s source states contain MdvdkMd_vd_k elements, independent of prefix length tt. A token-wise KV memory with the same head count and key/value widths contains Mt(dk+dv)Mt(d_k + d_v) elements. This comparison concerns the context-source footprint; actual memory traffic also depends on execution and reuse. The state-side projection TT is independent of draft position, so it can be shared across the queries in a block. The projected states contain MrdkMrd_k elements, reducing the value width of each subsequent read from dvd_v to rr. Low rank reduces this read cost without eliminating the full-state access needed for preparation. This analysis concerns only the added context channel; the target and drafter retain their existing attention caches and computation.

Avoiding redundant data movement. A fixed-size context source can still incur substantial overhead if gathering and preparation materialize intermediate tensors. We optimize this path as illustrated in Figure 3. A fused gather kernel writes selected committed states directly into a preallocated execution buffer, eliminating an intermediate tensor and an additional copy. We fuse pointwise state preparation and readout feature packing to avoid separate passes over intermediate results. Native RMSNorm kernels further avoid redundant casts. These changes reduce the execution cost of the reader without changing which committed states it accesses.

State adapter execution: before and after optimization

Figure 3. State-reader execution before and after optimization. Direct gathering and fused state preparation and feature packing reduce intermediate tensor materialization and redundant data movement. Green blocks indicate optimized operations.

As shown in Figure 4, these optimizations reduce state-gather latency from 16.388 to 4.622 μ\mus (71.8%) and state-reader latency from 65.519 to 47.094 μ\mus (28.1%). These measurements quantify operator-level savings; end-to-end decoding gains are reported in § 4.2.

Operator latency before and after optimization

Figure 4. Operator latency before and after optimization. State gathering and state reading achieve latency reductions of 71.8% and 28.1%, respectively.

Experiments

We evaluate ReaDy’s decoding performance and examine how its state-reading architecture balances draft acceptance against execution cost.

Training and Evaluation Setup

Initialization and two-stage training. We use Qwen3.8-27B as the target and initialize ReaDy’s drafting backbone and prediction head from a pretrained DSpark model [4] released by RadixArk.3 We adapt the drafter on Open-PerfectBlend.4 In the first stage, we freeze the drafter and train only the state reader on 20k samples. In the second stage, we jointly train the reader and the drafter’s LoRA parameters [9] on 50k samples. The target model remains frozen throughout. Both stages use

L=LCE+0.1LL1,(5)\mathcal{L} = \mathcal{L}_{\mathrm{CE}} + 0.1\mathcal{L}_{L1}, \tag*{(5)}

combining cross-entropy with an L1 loss between draft and target probability distributions, without a confidence loss. This objective and adaptation recipe differ from DSpark’s original training. Comparisons with the pretrained DSpark baseline therefore reflect both adaptation and state access; Table 2 additionally compares ReaDy with fine-tuning without state access. Appendix § 8 describes the data mixture, loss aggregation, and optimizer settings.

MethodTPSτ\tauΔ\Delta TPS (%)
DSpark280.424.17390.00
DSpark + FT286.504.27322.17
ReaDy302.784.52857.97

Table 2. Fine-tuning control. FT denotes fine-tuning without state access; gains are relative to DSpark.

Inference settings. We compare ReaDy with autoregressive (AR) decoding and the pretrained DSpark drafter. Each model instance runs on one NVIDIA B200 GPU with SGLang [24], using BF16 without quantization and a request concurrency of one. Evaluation requests are distributed across GPUs, with each input compared across methods on the same GPU. All methods use greedy decoding (temperature zero), with thinking enabled, a maximum of 1,024 output tokens, and a context limit of 16,384 tokens. Generation stops upon EOS. Both DSpark and ReaDy use a draft block size of seven. Unless otherwise specified, ReaDy reads target states from layers 30 and 62 with reader rank eight and injects the resulting residual once, after attention in the final draft layer.

Benchmarks and metrics. We evaluate seven benchmarks across three task categories. Mathematical reasoning is evaluated on GSM8K ([5]) and MATH500 ([8]). For code generation, we use sanitized MBPP ([1]), HumanEval ([3]), and LiveCodeBench ([10]). Dialogue and instruction following are evaluated using the first turn of MT-Bench ([23]) and a fixed Alpaca subset ([17]). We report server-side decoding throughput in tokens per second (TPS), excluding prefill. Acceptance length is the total number of output tokens divided by the total number of verification rounds, including tokens supplied by the target model; it therefore measures the average progress per verification. For the overall throughput comparison, we first average TPS across benchmarks and then compute speedups from these averages.

Main Results

Table 1 shows that ReaDy improves both throughput and acceptance length on every benchmark. Its mean decoding throughput reaches 302.78 tokens/s, compared with 95.86 for AR decoding and 280.42 for DSpark, yielding a 3.16× speedup over AR and a further 7.97% gain over DSpark. The improvement extends across task types: throughput gains over DSpark range from 6.43% to 8.66% on mathematics and code generation, and reach 9.45% on MT-Bench and 9.83% on Alpaca. The corresponding overall acceptance-length gain is 8.50%. Thus, the additional progress per verification is sufficient to offset the cost of state retrieval in the evaluated setting. The slightly smaller throughput gain also highlights the need to control reader overhead, which motivates the design comparisons below. Appendix § 9 illustrates how an early mismatch affects block acceptance in an individual generation.

TaskBenchmarkAR TPSDSpark TPSDSpark ×ARτ\tauReaDy (ours) TPSReaDy (ours) ×ARτ\tauvs. DSpark
Qwen3.8-27BTemperature = 0Draft block size = 7
MathGSM8K96.40362.253.76×5.28393.604.08×5.77+8.66%
MATH-50095.99331.903.46×4.93353.233.68×5.27+6.43%
CodeHumanEval95.60287.953.01×4.34310.293.25×4.70+7.76%
MBPP96.21296.003.08×4.34317.553.30×4.68+7.28%
LiveCodeBench94.33219.232.32×3.49234.282.48×3.75+6.86%
ChatMT-Bench96.11234.542.44×3.47256.712.67×3.81+9.45%
Alpaca96.38231.092.40×3.37253.792.63×3.73+9.83%
Average95.86280.422.93×4.17302.783.16×4.53+7.97%

Table 1. Decoding performance on a single NVIDIA B200 GPU. TPS excludes prefill; ×AR is the speedup over autoregressive decoding. The final column reports ReaDy’s TPS gain over DSpark. Acceptance length τ\tau is the number of generated tokens per verification step, including target-supplied tokens. The average row uses mean TPS and mean τ\tau; speedups are computed from mean TPS. Best results are bold.

Draft-Prefix Survival

Mean acceptance length summarizes overall progress but does not show how agreement changes across a draft block. We therefore examine all seven proposed positions using the final checkpoint. Figure 5 reports cumulative prefix survival for Math (GSM8K), Code (HumanEval), and Chat (MT-Bench). At position jj, this is the fraction of eligible drafting rounds in which all of the first jj proposed tokens are accepted, rather than the acceptance probability conditional on earlier positions surviving. ReaDy has higher prefix survival at every position in all three benchmarks. At the seventh position, survival increases from 45.98% to 58.17% on GSM8K, from 25.89% to 31.19% on HumanEval, and from 12.59% to 16.11% on MT-Bench. Thus, a larger fraction of ReaDy’s complete seven-token proposals survive verification. Appendix E describes the measurement protocol and its scope.

Figure 5. Draft-prefix survival in mathematics, code, and dialogue. At position jj, the rate is the fraction of fully observable blocks in which all first jj proposals are accepted, pooled within each benchmark. ReaDy improves survival at every position. The curves show cumulative survival, not acceptance conditional on earlier positions.

Ablation Studies

Fine-tuning without state access. To assess the benefit beyond additional training, Table 2 includes a fine-tuned DSpark variant without the state adapter. Fine-tuning alone raises throughput from 280.42 to 286.50 tokens/s and acceptance length from 4.1739 to 4.2732, confirming that adaptation contributes to the improvement over the original checkpoint. ReaDy further reaches 302.78 tokens/s and an acceptance length of 4.5285: gains of 5.68% and 5.97%, respectively, over this no-state variant. This comparison supports an additional benefit from state-conditioned adaptation. The 7.97% throughput gain over pretrained DSpark therefore reflects both continued adaptation and state access.

Table 3–Table 6 compare reader capacity, state source layers, residual injection layers, and injection position. Each architectural experiment varies one component of ReaDy and reports mean decoding throughput (TPS), acceptance length (τ\tau), and their relative gains (Δ\Delta TPS and Δτ\Delta\tau, in percent) over the pretrained DSpark baseline. Bold values identify the best result in each table.

Reader rankTPSτ\tauΔ\Delta TPSΔτ\Delta\tau
DSpark280.424.17390.000.00
8302.784.52857.978.50
16302.364.52987.828.53
32302.214.53237.778.59
128 (full)302.314.54047.818.78

Table 3. Reader rank. Full rank uses 128-dimensional key and value spaces.

Injection siteTPSτ\tauΔ\Delta TPSΔτ\Delta\tau
DSpark280.424.17390.000.00
Pre-attention301.944.49937.687.80
Post-attention302.784.52857.978.50

Table 6. Injection position in the final draft layer.

Reader capacity. Table 3 compares ranks 8, 16, 32, and 128 in both key and value spaces. Increasing rank from eight to 128 raises mean acceptance length from 4.5285 to 4.5404, but reduces the throughput gain over DSpark from 7.97% to 7.81%. Rank eight retains most of the acceptance benefit and gives the highest measured throughput, supporting a compact supplementary readout.

State source layers. State usefulness varies substantially by source layer (Table 4). Layer 62 alone yields a 7.48% acceptance gain, compared with 2.45% and 2.85% for layers 2 and 30. Combining layers 30 and 62 raises acceptance and throughput gains to 8.50% and 7.97%; adding layer 2 reduces them to 6.89% and 6.22%. The two-layer combination therefore provides the best measured trade-off, suggesting complementary context without the cost of an additional state source.

Target layer IDsTPSτ\tauΔ\Delta TPSΔτ\Delta\tau
DSpark280.424.17390.000.00
(2)286.114.27632.032.45
(30)287.174.29292.412.85
(62)300.214.48627.067.48
(30, 62)302.784.52857.978.50
(2, 30, 62)297.864.46146.226.89

Table 4. State source layers (target layer IDs).

Number of injections. Table 5 compares injecting context only in the final draft layer (layer 4), in layers 0, 2, and 4, and in all five layers. Mean acceptance lengths are 4.5285, 4.5288, and 4.5284, respectively, whereas throughput falls from 302.78 to 299.93 and 297.35 tokens/s as more readers are added. Additional readers reduce measured throughput without materially increasing the number of tokens generated per verification. A single injection in the final layer provides the best throughput in this comparison.

Draft layer IDsTPSτ\tauΔ\Delta TPSΔτ\Delta\tau
DSpark280.424.17390.000.00
(4)302.784.52857.978.50
(0, 2, 4)299.934.52886.968.50
(0, 1, 2, 3, 4)297.354.52846.048.49

Table 5. Injection layers (zero-indexed draft layer IDs).

Injection position. Within the final draft layer (Table 6), injecting after attention improves mean acceptance length from 4.4993 to 4.5285 and throughput from 301.94 to 302.78 tokens/s relative to injecting before attention. The advantage is modest but favors the placement used in ReaDy. At this position, the query is formed after the draft representation has incorporated attention context, and the retrieved information can subsequently be processed by the MLP.

Related Work

Target context reuse for speculative drafting. Drafters can reuse target hidden features or query target memory directly. GliDe (Du et al. [6]) and LongSpec (Yang et al. [21]) access the target’s KV cache through cross-attention. KVShot (Liu et al. [14]) compares hidden-feature and KV-cache reuse, highlighting the trade-off between richer context and retrieval cost. Although cache sharing avoids duplicate storage, reading token-wise history incurs memory traffic that grows with the number of attended tokens. ReaDy instead queries fixed-size recurrent states, using low-rank reads and fused operators to limit the additional I/O cost.

Speculative decoding for recurrent and hybrid models. Recurrent targets require dependency-aware verification and recovery of accepted states. Wang et al. [18] address these challenges for Mamba and hybrid models; STree (Wu et al. [20]) extends tree verification to hybrid state-space models. SpecLA (Wang et al. [19]) combines topology-aware verification and factor-based state recovery with EAGLE-style drafting from recurrent target features. ReaDy focuses on position-conditioned reads of committed states for block drafting. We analyze this context interface and study reader capacity, state sources, and residual placement within a DSpark-based implementation.

study reader capacity, state sources, and residual placement within a DSpark-based implementation.

Conclusion

We presented ReaDy, a DSpark-based, state-conditioned speculative decoding method for HLA models. Its reader retrieves position-specific context from committed recurrent states and integrates it with draft representations through residual updates. Low-rank reads and fused operators control the additional I/O overhead. ReaDy achieves an average 3.16× speedup over autoregressive decoding and a 7.97% throughput improvement over DSpark across seven benchmarks on Qwen3.8-27B using a single NVIDIA B200 GPU. These results demonstrate the value of recurrent-state retrieval for improving draft agreement and decoding efficiency within DSpark’s semi-autoregressive architecture.

Future work will explore training the complete drafter from scratch and learning to allocate state access and readout capacity across draft positions.

Analysis of Recurrent-State Readouts

This appendix establishes the two statements used in Section 2. We use value-by-key states and omit layer and head indices.

Information Available from Existing Queries

Let SS be a real dv×dkd_v \times d_k matrix, QQ a known real dk×md_k \times m query matrix, and O=SQO = SQ. Set ΠQ=QQ⊤\Pi_Q = QQ^\top, the orthogonal projector onto the column space of QQ.

Proposition 1. For an arbitrary query q∗q_* and unrestricted SS, the readout Sq∗Sq_* is uniquely determined by (O,Q)(O,Q) if and only if q∗q_* belongs to the column space of QQ.

Proof. Splitting q∗q_* into its components within and orthogonal to the query span gives

Sq∗=SΠQq∗+S(I−ΠQ)q∗=OQ⊤q∗+S(I−ΠQ)q∗.(6)Sq_* = S\Pi_Qq_* + S(I-\Pi_Q)q_* = OQ^\top q_* + S(I-\Pi_Q)q_*. \tag*{(6)}

If q∗q_* lies in the span, the second term vanishes, establishing sufficiency. Otherwise, let w=(I−ΠQ)q∗≠0w = (I-\Pi_Q)q_* \ne0. Then w⊤Q=0w^\top Q = 0 and w⊤q∗=∥w∥22>0w^\top q_* = \lVert w\rVert_2^2 > 0. For any nonzero dvd_v-dimensional vector uu, construct S′=S+uw⊤S' = S + uw^\top. These two states satisfy

S′Q=SQ,S'Q = SQ,
S′q∗−Sq∗=u∥w∥22≠0.(7)S'q_* - Sq_* = u\lVert w\rVert_2^2 \ne0. \tag*{(7)}

They agree on all exposed readouts but differ on the new one, proving necessity.

The proposition concerns multiple queries to the same fixed state. Actual target features are formed at different positions and layers and include residual connections and nonlinear transformations. It therefore does not establish that the complete feature interface necessarily loses information relevant to drafting. Even when that interface determines the state, direct state access can change the computation required of a finite-capacity drafter. Whether this access improves prediction is an empirical question.

Prefix Contributions to Future Readouts

For Gated DeltaNet (Yang et al., [22]), the update coefficients are

Ai=αi(I−βikiki⊤),Bi=βiviki⊤,(8)A_i = \alpha_i(I-\beta_i k_i k_i^\top), \\ B_i = \beta_i v_i k_i^\top, \tag*{(8)}

so that Si=Si−1Ai+BiS_i = S_{i-1}A_i + B_i. Fix a realized target-model continuation and its associated coefficients and queries. Define ordered products and accumulated writes by

Pj=At+1⋯At+j,P_j = A_{t+1}\cdots A_{t+j},
Wj=∑a=1jBt+a(At+a+1⋯At+j),(9)W_j = \sum_{a=1}^{j} B_{t+a}(A_{t+a+1}\cdots A_{t+j}), \tag*{(9)}

where an empty product is the identity matrix.

Proposition 2. For every j≥1j \ge1, St+j=StPj+WjS_{t+j} = S_tP_j + W_j. Consequently, the raw attention readout satisfies Equation (2).

Proof. The claim holds for j=1j=1 by the update rule. Assuming it holds for jj, one further update gives

St+j+1=(StPj+Wj)At+j+1+Bt+j+1=StPj+1+Wj+1,(10)S_{t+j+1} = (S_tP_j + W_j)A_{t+j+1} + B_{t+j+1} = S_tP_{j+1} + W_{j+1}, \tag*{(10)}

which proves the state identity by induction. Right-multiplication by qt+jq_{t+j} yields the readout decomposition.

This is an algebraic decomposition along a fixed continuation. Future coefficients and queries depend on that continuation, so qjFR=Pjqt+jq_j^{\mathrm{FR}} = P_jq_{t+j} is not an input available to the drafter. Nor does the first term recover subsequent writes, Wjqt+jW_jq_{t+j}. ReADy instead learns position-conditioned queries through the drafting objective, with normalization and low-rank projections restricting the practical reader. The analysis motivates an additional route to committed-prefix context; it does not assert exact recovery of future readouts.

Training Details

Training data. Open-PerfectBlend is a public instruction mixture covering mathematics, code, conversation, and instruction following. Its eight source corpora are listed in Table 7, using counts reported by the dataset card. The card reports removing 88.1k examples during deduplication. These counts describe the public mixture, rather than the source proportions of our 20,000- and 50,000-sample adaptation sets.

Source corpusReported samples
MetaMathQA395,000
UltraInteract SFT288,579
UltraChat207,865
Orca-Math200,035
UltraFeedback187,405
Evol-CodeAlpaca111,272
AutoIF61,492
LMSYS Arena human preferences57,362

Table 7. Source-corpus counts reported by the Open-PerfectBlend dataset card, before mixture deduplication. These are not per-source counts for ReaDy’s training subsets.

Training mode. In its offline experiments, the original DSpark paper (Cheng et al., [4]) regenerates responses to Open-PerfectBlend prompts using each target model and adopts non-thinking mode for data generation and evaluation. Our two-stage adaptation instead targets thinking-mode generation, consistent with our evaluation setting. The non-thinking setting here refers to the original paper, not an assumption about the training data of the RadixArk checkpoint.

Loss aggregation. Each training anchor predicts seven tokens. We weight draft position jj by wj=exp⁡(−j/4)w_j = \exp(-j/4) for j=0,…,6j = 0,\ldots,6. Let Vi\mathcal{V}_i contain the valid anchor–position pairs (a,j)(a,j) in sequence ii. With ℓCEi,a,j\ell_{\mathrm{CE}}^{i,a,j} and ℓL1i,a,j\ell_{\mathrm{L1}}^{i,a,j} denoting the corresponding cross-entropy and probability-distribution L1 losses, the full-sweep sequence loss is

Li=∑(a,j)∈Viwj(ℓCEi,a,j+0.1ℓL1i,a,j)∑(a,j)∈Viwj.\mathcal{L}_i = \frac{\sum_{(a,j)\in\mathcal{V}_i} w_j\left(\ell_{\mathrm{CE}}^{i,a,j} + 0.1\ell_{\mathrm{L1}}^{i,a,j}\right)}{\sum_{(a,j)\in\mathcal{V}_i} w_j}.

We first normalize within each sequence, as above, then average the sequence losses across the four training GPUs. The confidence-loss weight is zero. We use no additional KL-divergence, feature-reconstruction, or reward loss.

Relation to DSpark training. We reuse a pretrained DSpark drafter, but do not reproduce its original training recipe. The published DSpark objective combines cross-entropy, probability-distribution L1, and confidence losses with weights 0.1, 0.9, and 1.0, respectively [4]. Our adaptation instead uses Equation (5), with the position weighting and aggregation described above. Thus, the original-checkpoint comparison measures the complete adaptation procedure, while the no-state fine-tuning comparison in Table 2 provides a separate reference for assessing the state adapter.

Optimization. Both stages use AdamW with FP32 master parameters and optimizer states. The peak learning rate is 1×10−41 \times10^{-4} in the reader-only stage and 5×10−55 \times10^{-5} in the joint-adaptation stage. Both stages use cosine decay after warmup. Table 8 lists the optimizer settings.

SettingValue
OptimizerAdamW
(β1,β2)(\beta_1,\beta_2)(0.9,0.999)(0.9, 0.999)
ϵ\epsilon10−810^{-8}
Peak learning rate (stage 1)1×10−41 \times10^{-4}
Peak learning rate (stage 2)5×10−55 \times10^{-5}
Weight decay0
Gradient clipping threshold1.0

Table 8. Optimizer settings for the two adaptation stages.

Qualitative Example

Figure 6 compares seven-token proposals from DSpark and ReaDy at the same summary prefix in an Alpaca story-summarization example. DSpark first differs from the target at the third position, proposing “harvested” where the target produces “produced.” This mismatch ends its accepted prefix after two proposed tokens, even though its remaining displayed tokens match the target continuation. ReaDy matches all seven target tokens. The example illustrates how agreement at an early draft position determines how much of the proposed block can be accepted.

Alpaca story-summarization example

Figure 6. An Alpaca story-summarization example. Green highlights accepted proposed tokens; red marks the first mismatch. DSpark matches two of the seven proposals before its first mismatch, while ReaDy matches all seven. These counts refer only to accepted draft proposals, excluding target-supplied tokens.

Background

Linear and Hybrid Linear Attention

During autoregressive decoding, full attention reads token-wise keys and values whose storage grows with the prefix. Kernel linear attention instead aggregates past key–value associations into a recurrent state [11]. For a positive feature map ϕ\phi, a causal attention head can be written as

St=St−1+vtϕ(kt)T,zt=zt−1+ϕ(kt),ot=Stϕ(qt)ztTϕ(qt).(11)\begin{aligned} S_t &= S_{t-1} + v_t\phi(k_t)^\mathsf{T},\\ z_t &= z_{t-1} + \phi(k_t),\\ o_t &= \frac{S_t\phi(q_t)}{z_t^\mathsf{T}\phi(q_t)}. \tag*{(11)} \end{aligned}

with zero initial states. Here qtq_t, ktk_t, and vtv_t are the current query, key, and value; ztz_t supplies the normalization. At fixed feature dimensions, the state size and the cost of one recurrent update and readout are independent of prefix length. The state stores aggregated associations, whereas the query selects a particular readout.

Subsequent designs improve how this limited memory is updated. Data-dependent gates control retention, while delta-rule updates revise the association addressed by the current key. Gated DeltaNet combines these mechanisms [22]. For one head with normalized keys, its update can be written as

S~t=αtSt−1,et=vt−S~tkt,St=S~t+βtetktT,ot=Stqt.(12)\begin{aligned} \widetilde{S}_t &= \alpha_t S_{t-1},\\ e_t &= v_t-\widetilde{S}_t k_t,\\ S_t &= \widetilde{S}_t+\beta_t e_t k_t^{\mathsf{T}},\\ o_t &= S_t q_t. \tag*{(12)} \end{aligned}

In the original parameterization, the input-dependent gates αt,βt∈(0,1)\alpha_t,\beta_t \in(0,1) control retention and write strength, respectively. The decay gate first attenuates the previous state. The delta term then corrects the difference between the incoming value vtv_t and the value retrieved by ktk_t from that decayed state. This supports both global forgetting and a targeted update to the current key–value association. Here oto_t denotes the raw attention readout, before the block’s output normalization and gating; the kernel-attention denominator in Equation D.1 is not used.

Expanding Equation D.2 gives

St=St−1At+Bt,At=αt(I−βtktktT),Bt=βtvtktT.(13)\begin{aligned} S_t &= S_{t-1}A_t+B_t,\\ A_t &= \alpha_t(I-\beta_t k_t k_t^{\mathsf{T}}),\\ B_t &= \beta_t v_t k_t^{\mathsf{T}}. \tag*{(13)} \end{aligned}

Thus, AtA_t transforms existing associations and BtB_t writes the new value. This is the state transition

used in § 2 to separate the contribution of the committed prefix from subsequent writes. Hybrid linear attention interleaves recurrent layers with full-attention layers, combining compact state-based context modeling with access to individual cached tokens [15]. The recurrent layers maintain fixed-size states, while full-attention layers retain growing KV caches. This layer organization also shapes activation dynamics: massive activations form spikes before full-attention layers and can persist as plateaus across intervening linear-attention layers [16]. ReaDy accesses the recurrent states as supplementary context for drafting, without changing the target’s hybrid architecture.

Speculative Decoding

In standard speculative decoding [12], an autoregressive drafter samples a block of bb candidates y1,…,yby_1,\ldots,y_b. Let qjq_j and pjp_j denote the draft and target distributions conditioned on the committed prefix and y<jy_{<j}. The target evaluates these prefixes in parallel. Candidates are checked from left to right, accepting yj∼qjy_j \sim q_j with probability

αj(yj)=min⁡(1,pj(yj)qj(yj)).(14)\alpha_j(y_j)=\min\left(1,\frac{p_j(y_j)}{q_j(y_j)}\right). \tag*{(14)}

At the first rejection, the remaining proposals are discarded and a replacement is sampled from

pjcorr(v)=[pj(v)−qj(v)]+∑u∈V[pj(u)−qj(u)]+.(15)p_j^{\mathrm{corr}}(v)=\frac{\left[p_j(v)-q_j(v)\right]_+}{\sum_{u\in\mathcal{V}}\left[p_j(u)-q_j(u)\right]_+}. \tag*{(15)}

where [x]+=max⁡(x,0)[x]_+ = \max(x,0). If all candidates are accepted, an additional token is sampled from pb+1p_{b+1}. This procedure preserves the target distribution. Our greedy evaluation accepts the longest prefix matching the target’s argmax predictions. The first mismatch ends the accepted prefix. Our reported τ\tau counts all committed tokens per verification, including target-supplied correction or bonus tokens, rather than only accepted proposals. Except when generation terminates, accepting aa proposals yields a+1a+1 committed tokens.

Target and Drafter Architectures

Hybrid target model. Qwen3.8-27B has a dense language backbone with 64 layers and hidden width 5,120.5 Its layer pattern repeats three Gated DeltaNet layers followed by one gated full-attention layer, yielding 48 recurrent layers and 16 full-attention layers. The former retain fixed-size matrix states, while the latter use token-wise KV caches. The published configuration specifies 128-dimensional recurrent keys and values, giving the 128×128128 \times128 per-head states accessed by ReaDy. Under zero-based indexing, the selected source layers 30 and 62 are both recurrent layers. ReaDy leaves this hybrid target architecture unchanged and adds a read-only interface to its committed recurrent states.

DSpark architecture. DSpark ([4]) combines a DFlash-based parallel backbone ([2]) with a lightweight sequential prediction head. The backbone processes a block in one forward pass to produce position-wise representations and base logits. A sequential head adds transition biases conditioned on earlier proposals: the paper’s Markov variant uses the preceding token through a low-rank transition map, while its RNN variant carries a within-block hidden state. DSpark also introduces confidence-based verification scheduling, separately from this drafting architecture. ReaDy supplies additional target-state context to the backbone through residual updates.

Checkpoint used in this work. The RadixArk Qwen3.8-27B-DSpark model card describes five full-attention draft layers with hidden width 5,120, 32 query heads, and eight KV heads. It receives auxiliary target features from layers 5, 19, 33, 47, and 61 and uses a rank-256 Markov head. These are properties of the released drafter that initializes ReaDy; the rank-eight setting in § 3.1 belongs to our state reader. The original hidden-feature path and the added recurrent-state path therefore expose different interfaces to target context.

Draft-Prefix Survival Protocol

Both methods decode identical prompts with greedy generation, concurrency one, a maximum of 1,024 new tokens, and natural EOS termination. Diagnostic tracing and uninstrumented runs produce identical output token sequences. We pool fully observable drafting rounds separately for each method and benchmark. For NN eligible rounds, let AiA_i denote the number of accepted proposals in round ii. For j=1,…,7j = 1,\ldots,7, the plotted estimator is

P^j=1N∑i=1N1{Ai≥j}.(16)\widehat{P}_j = \frac{1}{N}\sum_{i=1}^{N} \mathbf{1}\{A_i \ge j\}. \tag*{(16)}

Terminal rounds with incomplete observations are censored, rather than counted as rejection events. The methods have different drafting boundaries, so their curves aggregate different rounds along identical output sequences.

References

  1. [1]Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. 2021. Program synthesis with large language models. Preprint, arXiv:2108.07732.arxiv.org/abs/2108.07732
  2. [2]Jian Chen, Yesheng Liang, and Zhijian Liu. 2026. DFlash: Block diffusion for flash speculative decoding. Preprint, arXiv:2602.06036.arxiv.org/abs/2602.06036
  3. [3]Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, et al. 2021. Evaluating large language models trained on code. Preprint, arXiv:2107.03374.arxiv.org/abs/2107.03374
  4. [4]Xin Cheng, Xingkai Yu, Chenze Shao, Jiashi Li, Yunfan Xiong, Yi Qian, Jiaqi Zhu, Shirong Ma, Xiaokang Zhang, Jiasheng Ye, Qinyu Chen, Chengqi Deng, Jiping Yu, Damai Dai, Zhengyuan Zhang, Yixuan Wei, Yixuan Tan, Wenkai Yang, Runxin Xu, and 14 others. 2026. DSpark: Confidence-scheduled speculative decoding with semi-autoregressive generation. Preprint, arXiv:2607.05147.arxiv.org/abs/2607.05147
  5. [5]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Réichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. Preprint, arXiv:2110.14168.arxiv.org/abs/2110.14168
  6. [6]Cunxiao Du, Jing Jiang, Xu Yuanchen, Jiawei Wu, Sicheng Yu, Yongqi Li, Shenggui Li, Kai Xu, Liqiang Nie, Zhaopeng Tu, and Yang You. 2024. GliDe with a CaPE: A low-hassle method to accelerate speculative decoding. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 11704–11720. PMLR.
  7. [7]Geonmo Gu, Byeongho Heo, HeeJae Jun, Yoohoon Kang, Sangmin Lee, Sangdoo Yun, and Dongyoon Han. 2026. Verification-aware training for speculative decoding. Preprint, arXiv:2608.30135.arxiv.org/abs/2608.30135
  8. [8]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the MATH dataset. In Advances in Neural Information Processing Systems.
  9. [9]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuntian Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. LoRA: Low-rank adaptation of large language models. Preprint, arXiv:2106.09685.arxiv.org/abs/2106.09685
  10. [10]Naman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. 2024. Live-CodeBench: Holistic and contamination free evaluation of large language models for code. Preprint, arXiv:2403.07974.arxiv.org/abs/2403.07974
  11. [11]Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. 2020. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 5156–5165. PMLR.arxiv.org/abs/2006.16236
  12. [12]Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 19274–19286. PMLR.arxiv.org/abs/2211.17192
  13. [13]Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2025. EAGLE-3: Scaling up inference acceleration of large language models via training-time test. Preprint, arXiv:2503.01840.arxiv.org/abs/2503.01840
  14. [14]Tianyu Liu, Yuhao Shen, Xinyi Hu, Baolin Zhang, Hengxin Zhang, Jun Dai, Jun Zhang, Shuang Ge, Lei Chen, Yue Li, and Mingcheng Wan. 2026. When hidden states drift: Can KV caches rescue long-range speculative decoding? Preprint, arXiv:2604.26412.arxiv.org/abs/2604.26412
  15. [15]Qwen Team. 2025. Qwen3-Next: Towards ultimate training & inference efficiency.
  16. [16]Zunhai Su, Bohan Sun, Xialie Zhuang, Shuibai Zhang, He Xiao, Hui Shen, Jing Xiong, Hengyuan Zhang, Zhongzhu Zhu, Tiantian Zhang, Ngai Wong, and Chuan-Wei Kuo. 2026. Massive activations in hybrid linear attention large language models: Pre-attention spikes and inter-spike plateaus. Preprint, arXiv:2608.12149.arxiv.org/abs/2608.12149
  17. [17]Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following LLaMA model. GitHub repository.
  18. [18]Junxiong Wang, Daniele Paliotta, Avner May, Alexander M. Rush, and Tri Dao. 2024. The Mamba in the Llama: Distilling and accelerating hybrid models. In Advances in Neural Information Processing Systems, volume 37.arxiv.org/abs/2408.15237
  19. [19]Zhibin Wang, Xuying Han, Zhaohua Yang, Fuliang Liu, Xue Li, Rong Gu, Sheng Zhong, and Chen Tian. 2026. SpecLA: Efficient speculative decoding for linear-attention models. Preprint, arXiv:2607.16673.arxiv.org/abs/2607.16673
  20. [20]Yangchao Wu, Zongyue Qin, Alex Wong, and Stefano Soatto. 2025. STree: Speculative tree decoding for hybrid state-space models. Preprint, arXiv:2505.14969.arxiv.org/abs/2505.14969
  21. [21]Penghui Yang, Cuncxiao Du, Fengzhou Zhang, Haonan Wang, Tianyu Pang, Chao Du, and Bo An. 2026. LongSpec: Long-context lossless speculative decoding with efficient drafting and verification. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1826–1844. Association for Computational Linguistics.
  22. [22]Songlin Yang, Jan Kautz, and Ali Hatamizadeh. 2025. Gated delta networks: Improving mamba2 with delta rule. In The Thirteenth International Conference on Learning Representations.arxiv.org/abs/2412.06464
  23. [23]Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhouran Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging LLM-as-a-judge with MT-Bench and chatbot arena. Preprint, arXiv:2306.05685.arxiv.org/abs/2306.05685
  24. [24]Lianmin Zheng, Liangsheng Yin, Ziqiang Xie, Chuyue Sun, Jeff Huang, Cody Hao Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E. Gonzalez, Clark Barrett, and Ying Sheng. 2024. SGLang: Efficient execution of structured language model programs. In Advances in Neural Information Processing Systems.arxiv.org/abs/2312.07104

Paper details

vlnc:W_pqqr2hpb
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents