arXiv · 2610.16144
Hashrope: A Persistent Data Structure for Mechanisms of LLM Context Management
Abstract
Serving stacks for large language models manage context through four recurring mechanisms: incremental edits to a growing context, branching and snapshotting for tree search, identification of reusable prefixes for KV-cache reuse, and encoding of repeated segments. Each mechanism is served today by a different specialist structure. We show that all four reduce to a single persistent weight-balanced rope whose every node carries a polynomial hash of its subtree over a Mersenne prime, so that the structure supports logarithmic edits and logarithmic verified content-identity queries at the same time. We validate each mechanism with pre-registered, replicated experiments, then compare against a deployed specialist per mechanism: the Ropey editing library, a faithful PagedAttention copy-on-write block table, and the vendored SGLang radix matcher. On workloads that interleave edits with identity queries, Hashrope is net-superior to Ropey by a factor that grows without bound (369.7x at one million characters). Against the radix matcher on a live vLLM stack serving Qwen2.5-7B-Instruct-1M on four A100 GPUs, Hashrope identifies a one-million-token shared prefix exactly and 1.20x faster, at a context length the dense engine cannot even prefill.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Muntaser Syed, Ameerah Alsulami, Marius Silaghi. 2026-10-12. Hashrope: A Persistent Data Structure for Mechanisms of LLM Context Management. https://arxiv.org/abs/2610.16144
Cite the original work for its findings. Save a collection to share your selection of sources.