Hashrope: A Persistent Data Structure for Mechanisms of LLM Context Management

Muntaser Syed, Ameerah Alsulami, Marius Silaghi
10/12/2026
cs.DScs.CL

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{syed2026hashrope,
  title  = {Hashrope: A Persistent Data Structure for Mechanisms of LLM Context Management},
  author = {Muntaser Syed and Ameerah Alsulami and Marius Silaghi},
  year   = {2026},
  eprint = {2610.16144},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.16144v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.16144.svg)](https://codeofpaper.com/paper/2610.16144)

Discussion