Tamarin (HSQ): Reversible Hierarchical KV-Cache Compression for LLM Inference
Open accessThe DOI matches its Crossref record; 20 of the 20 references it cites were found in a registry or an index; 5 of the 9 sources its claims cite were checked for support.
Abstract
The key–value (KV) cache is the dominant GPU-memory consumer in long-context LLM inference. At 32K tokens, a Qwen3-8B model holds roughly 4.5 GiB of fp16 KV cache against about 5 GiB of int4 weights, and the cache grows linearly with context. Existing remedies either quantize every cache entry, which is safe but bounded, or evict/merge tokens permanently, which can destroy information that becomes relevant only after the future query is known. We present Tamarin (HSQ), a three-tier reversible compression scheme: a small learned reader routes tokens into a non-summarized 4-bit focal tier (L1), a 3-bit tier of learned group-summary vectors (L2), and a CPU-RAM archive of all compressed originals stored at 4-bit precision (L3). L2 vectors are routing keys, not content replacements: at decode time a per-head router scores L2 groups, fetches selected originals from L3, and attends to the restored tokens before the softmax. Compression is therefore an index, not a deletion. On the Qwen3 family (0.6B–14B, fp16/int8/int4 weights, 2K–32K contexts), Tamarin reduces the GPU-resident KV cache by 12–28× at a perplexity overhead of 0.1–0.4% on 4B–14B models, token-level agreement of 96–97% with the uncompressed baseline, and binary needle retrieval statistically equivalent to baseline under TOST at n = 500 per depth cell. At 32K, Qwen3-8B-int4 attains 500/500 retrieval parity with zero discordant pairs. Unlike eviction-family methods, the measured quality cost decreases with model size, and 4-bit weight quantization composes with Tamarin at no measurable cost on models of at least 4B parameters. We report a paired, per-cell statistical methodology with TOST equivalence for binary retrieval and one-sided non-inferiority margins for perplexity, plus replication runs, the measured applicability boundary, and failure modes including one quantization-fragile checkpoint and one model-family effect.
Overview
CoChat Summary
TL;DR
Tamarin (HSQ) is a three-tier reversible KV-cache compression scheme that treats compression as a query-time index rather than a deletion: a learned reader routes tokens into a 4-bit focal tier (L1), a 3-bit learned group-summary tier (L2) that serves as routing keys, and a CPU-RAM archive of 4-bit originals (L3) that a per-head router fetches back before the softmax. On Qwen3 models it reports 12–28× GPU KV reduction at 0.1–0.4% perplexity overhead on 4B–14B models, with retrieval statistically equivalent to baseline on healthy 4B/8B checkpoints.
Key findings
- Headline int4 series (n = 500/cell): 8B-int4 reaches 99.7% NIAH @2K (worst cell 99.0%), 99.9% @8K, PPL ratios 1.0038/1.0028/1.0037 (English/code/multilingual), greedy match 96.7%, KL 0.0066, KVx 22.8 at 8K. 4B-int4 shows PPL 1.0013/1.0018/0.9972 with multilingual measured below baseline (Holm-adjusted p = 0.0004).
- At 32K, Qwen3-8B-int4 attains 500/500 NIAH parity with zero discordant pairs and KVx 26.8× (4.5 GiB → 172 MiB); 14B-int4 at 32K is TOST-equivalent (94.6% vs. 95.4% baseline, p = 0.34, retention 98.5%).
- The key ablation: disabling the L3 return path (β = 0) collapses NIAH to 0/100 and inflates PPL by 2.59× [2.36, 2.86], showing L2 summaries are routing keys, not content.
- Quality improves with model size (KL falls ~13× from 0.6B to 8B, 0.085 → 0.0066; greedy match rises ~10 points), and 4-bit weight quantization composes freely at ≥ 4B. Failure modes are reported: a quantization-fragile 14B-int4 checkpoint (worst cell 80.4% at depth 0.9 @2K; retention 83.4% worst cell), noise compounding on 0.6B-int4 (multilingual 1.0986, the program's single non-inferiority failure vs. the 1.10 margin), and a Mistral-7B-v0.3 family effect (NIAH 88.4% at 2K, bottom −20 points at depth 0.5).
Methods
- Design: three synchronized stores — L1 (4-bit non-summarized focal tokens: sinks, optional recent window, reader-flagged tokens), L2 (groups of N ∈ {8,16} compressed to 2 summary (k̂,v̂) pairs at 3 bits, doubling as routing keys), L3 (all compressed originals in CPU RAM at byte-aligned 4-bit precision). Decode runs a per-head two-pass routing attention (default budget β = 0.5, re-routing every r = 4 steps) that fetches selected groups from L3 and attends over [L1 ∪ L2 ∪ fetched originals] with a per-head additive mask.
- Data/sample: Qwen3-0.6B/4B/8B/14B in fp16, bitsandbytes int8, and int4-nf4; Mistral-7B-v0.3 for failure analysis. Reader and compressor fitted per model for 200 steps on WikiText-2 (minutes on an A100); base weights never fine-tuned. Benchmarks: NIAH, RULER-style multi-key retrieval, perplexity (WikiText-2, codeparrot-clean-valid, multilingual C4), token-level agreement/KL, and phase-separated memory/speed benchmarks.
- Analysis: paired per-cell design with n = 500 per NIAH depth, multi-key slot, and perplexity domain (n = 100 per depth at 32K); exact McNemar tests, bootstrap CIs, TOST equivalence for binary retrieval (±5 pp on 90% CIs), one-sided non-inferiority for perplexity (90% upper bound < 1.10×), Holm correction, retention metric, and two independent replication runs.
Limitations
- Stated: statistical validation is limited to Qwen3 0.6B–14B (non-Qwen families experimental; Mistral-7B shows the family effect); decode throughput is 40–73% of baseline up to 8K and 17–18% at 32K; 0.6B-class models pay 4–6% PPL in fp16 and 6–10% in int4; fragile nf4 checkpoints can be amplified; contexts beyond 32K are extrapolation; native-path decode is batch-1 (continuous batching is future work); L3 consumes 0.6–2.6 GiB at 8K–32K and needs prefetch bandwidth; each model needs a short fit and zero-shot adapter transfer is untested.
- Evident from the text: the paper does not claim latency wins or head-to-head numerical comparisons against re-implemented eviction baselines (Table 1 is qualitative), and the authors declare a competing interest as officers of Siamang Labs LLC, which develops Tamarin.
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
3 Valid · 5 Not valid · 1 Not checked · 127 Own results and interpretations
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“binary needle retrieval statistically equivalent to baseline under TOST at n = 500 per depth cell”
plainn = 500- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“For d = 128 , mixed N = 8 / 16 grouping, and the default reader operating point, the GPU-resident cache is about 23 × smaller than fp16 at 8K.”
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“at a perplexity overhead of 0 . 1 -0 . 4% on 4B-14B models”
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“4-bit weight quantization composes with Tamarin at no measurable cost on models of at least 4B parameters.”
- Also stated in: § 1.4 Contributions · p. 4 · plain
“weight quantization composes freely at ≥ 4B”
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Also stated in: § 1.4 Contributions · p. 4 · plain
A result the paper states — it cites no source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“prefill overhead amortizes at 32K”
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
55 more claims
Create a free account to see all 136 claims and every source verdict.
- Probably not a substantial claim. 29
- It may state two separate claims as one. 62
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
Each contradiction between two passages listed here was confirmed by an independent check.
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ Abstract · p. 2
“at a perplexity overhead of 0 . 1 -0 . 4% on 4B-14B models”
§ 6.2 fp16 batteries · p. 11
“PPL ratios are 1.0038/1.0052/1.0050”
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ 6.4 Scaling law · p. 11
“Every quality axis improves with model size, with the 14B KL matching the 8B within noise.”
§ 6.1 Headline: the uniform int4 series · p. 10
“| NIAH @2K | 98.5% (worst 96.8) | 98.8% (97.6) | 99.7% (99.0) | 92.2%* |”
Citations
Cites
The publisher hasn’t deposited this paper’s reference list.
Research works printed but not linked: 1
- Zhang, Y., Du, Y., Luo, G., Zhong, Y., Zhang, Z., Liu, S., and Ji, R. (2024). CaM: Cache merging for memory-efficient LLMs inference. Proceedings of the 41st International Conference on Machine Learning .
Metadata
- Authors
- Bazakov, A., & Kiselev, K.
- Affiliations
- Siamang Labs
- Venue
- Research Square
- Published
- 2026-07-10
- OpenAlex
- W7167931604
- Cited by
- 0
- References
- 0
- Type
- posted content
- Language
- en
- Open access
- green
- doi.org
- Locations
- Research Square (acceptedVersion, cc-by)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Keywords
- KV cache compression, long-context LLM inference, lossless compression, 4-bit quantization, GPU memory reduction, perplexity, Qwen3
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
The claim verdicts this report counts are experimental: their accuracy is not yet measured.
A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).
A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Tamarin (HSQ): Reversible Hierarchical KV-Cache Compression for LLM Inference. https://app.cochat.ai/papers/10.21203/rs.3.rs-10297225/v1
- The paper
- Bazakov, A., & Kiselev, K. (2026). Tamarin (HSQ): Reversible Hierarchical KV-Cache Compression for LLM Inference. Research Square. https://doi.org/10.21203/rs.3.rs-10297225/v1
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.