Manuscript Offprint

arXiv:2610.13708

Adaptive DHiSparse: Speculative Decoding over a Load-Adaptive KV Hierarchy

Naji Alazhar, Wassel Alazhar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Long-context serving runs out of KV memory before the hardware reaches its useful throughput. HiSparse stores history in host memory and fetches only the selected entries, but it uses one cache budget at every load and does not handle draft-model speculative decoding such as DSpark and DFlash2. We present Adaptive DHiSparse, which supports speculative decoding over hierarchical sparse KV and adapts residency to load. It protects the required working set, retains additional history while GPU memory is spare, and recovers the rest through exact fused retrieval. DSpark and DFlash2 keep their proposal and acceptance rules: queries share missing-row retrieval, draft KV uses a window-bounded ring, and verification staging is reused across layer groups. At 100K context and concurrency 128, GLM-5.3 with DFlash2 delivers 793 output tokens/s per decode GPU, 1.45× HiSparse and 1.27× non-speculative adaptive serving. Held to the same latency bounds as HiSparse, it sustains up to 4× the concurrency and 2.3 to 3.7× the output, depending on the per-token bound. On DeepSeek-V4.1-Flash at 500K context and concurrency 512, Adaptive DHiSparse with DSpark delivers 1.85× the output of resident serving with DSpark. In a load step, optional residency reduces host fetches from 14.2% to 1.4% of selected rows at low load and releases memory under pressure.

1. Introduction

Long-context agents and assistants retain large histories while producing relatively short continuations; a coding request may carry material for several later decisions, leaving the cost of its KV state in place between decoding steps. Sparse attention reduces the entries read by each query, but conventional serving still reserves the complete history in GPU high-bandwidth memory (HBM). As context length and the number of sessions increase, this storage can prevent further admission before the hardware reaches its useful throughput (DeepSeek-AI, 2025, 2026; Xie et al., 2026). Reducing the computation of a query therefore makes the placement of its history increasingly important.

Hierarchical KV caching addresses this mismatch by retaining history in host memory and recovering only the entries selected by the model. HiSparse combines a bounded GPU cache, fused miss resolution, and prefetch for shared selections (Xie et al., 2026). A recently used row can remain in the cache and serve subsequent queries, exploiting locality while bounding each request's device footprint. Its fixed budget imposes a deployment-level trade-off: a small working set permits more sessions but can incur avoidable host reads while HBM is available; a larger reservation reduces retrieval but consumes admission capacity under pressure. A deployment with changing load encounters both sides of this trade-off. Section 4.3.4 measures it.

HiSparse also has no path for draft-model speculative decoding: it maintains no draft KV, resolves one query per request, and provides no multi-query verification staging. This matters because draft models can amortize target-model computation across several output tokens. DSpark selects request-dependent verification prefixes using confidence and engine cost, while DFlash2 verifies a configured block generated through its conditional selector (Cheng et al., 2026; Inco AI, 2026). Their benefits depend on both the return from verification and the memory available to sustain concurrent requests. A hierarchy that supports only single-query decoding leaves this acceleration path unavailable.

Verification expands the immediate KV working set because several queries can select the same historical row while retaining separate causal boundaries and producing tentative state that may later be rejected. Resolving each query independently can repeat host reads; retaining every selection independently can require substantially more staging than the hot cache. Draft KV introduces another persistent allocation, and keeping it in a full-history layout can consume the capacity released by target offloading. The KV layer must therefore manage shared historical reads, temporary verification state, and the prefix retained after acceptance as parts of the same execution path.

We introduce Adaptive DHiSparse, which brings DSpark and DFlash2 to hierarchical sparse KV serving and adapts history residency to the memory available at each load. We call the same system without a

Figure

Figure 1 | GLM-5.3 at 32K input and 8K output cap, using the input and output lengths of the HiSparse evaluation. (a) Generation throughput against offered concurrency, (b) mean TTFT on a logarithmic axis and (c) mean TPOT against generation throughput.

drafter Adaptive HiSparse. We protect a fixed working set for exact recovery, retain additional immutable history while HBM is spare, and reclaim that history when other requests need its pages. The fixed hot-cache structure remains small as optional residency grows, allowing the resolver to exploit additional hits without scanning the full resident history. Under pressure, backup and reclamation make those pages available for admission while selected entries remain recoverable from host memory. This couples the allocation decision to the execution that uses it.

We follow the reuse structure of each model: compatible layers in DeepSeek-V4.1-Flash consume a shared global KV source, whereas GLM-5.3 shares sparse indices while retaining distinct layer payloads (DeepSeek-AI, 2026; Z.ai, 2026). Shared positions can consequently announce several future copies without making their bytes interchangeable. We exploit both forms of reuse and bound the additional speculative storage by its lifetime: the drafter keeps its existing visible window in a ring, while target layers reuse staging after their consumers complete. Together, these choices let verification operate over the hierarchy while preserving proposal generation, sparse selections, and acceptance.

We evaluate GLM-5.3 and DeepSeek-V4.1-Flash using matched cache settings, reporting output together with first-token and per-token latency. The experiments cover fixed offered loads, a same-build load step, separate resolver measurements, and a sweep of the hot-cache budget with kernel profiles. They distinguish the capacity of an allocation from the activity that serving actually sustains, and show where more active requests improve aggregate output while slowing individual requests. Comparisons emphasize relative performance under the shared setup; absolute rates are in Table 2 and the figures. Our contributions are:

• Speculative serving on hierarchical KV. At 100K context and offered concurrency 128 (C128), GLM-5.3 with DFlash2 delivers 793 tokens/s per decode GPU, 1.45× HiSparse and 1.27× non-speculative adaptive serving, with mean time to first token (TTFT) 2.1× lower than HiSparse; held to the same latency bounds as HiSparse, it sustains up to 4× the concurrency and 2.3 to 3.7× the output, depending on the bound on time per output token (TPOT).

• Residency that follows load. Optional history reduces host-fetched selections from 14.2% to 1.4% at low load in the on/off experiment, yields its memory under pressure, and repopulates as requests drain.

• Bounded speculative state. A windowed draft ring and reusable verification staging add 0.060 GiB of required GPU state per GLM session while supporting the full configured verification block.

Figure 1 gives an early view at 32K input and an 8K output cap, matching the input/output lengths of the HiSparse evaluation. There, Adaptive DHiSparse delivers 1.7 to 1.9× the output of HiSparse from C8 to C64 and 1.45× at C128, where its mean TTFT is 2.3× lower. Resident serving with DFlash2 is 5 to 9% ahead up to C32, while every history still fits, and stops scaling at C64. Our main GLM experiments use 100K context, and the DeepSeek experiments use 500K context.

References (23)