# Zefan-Cai/R-KV

[Neurips 2025] R-KV: Redundancy-aware KV Cache Compression for Reasoning Models

Repository: https://github.com/Zefan-Cai/R-KV
Canonical: https://ross.abutalabs.com/products/r-kv
Homepage: https://zefan-cai.github.io/R-KV.page/
Language: Python
License Family: other
Topics: kvcache, llm, reasoning-models
Last push: 2026-07-20T04:54:05+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 93, release rhythm 35, longevity 32
- inputs: {"age_days": 461, "days_push": 44, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1209, forks 196 (observed 2026-08-28T04:03:59.779259+00:00)

## What it is
R-KV is a training-free, redundancy-aware KV cache compression method for reasoning LLMs, discarding repetitive tokens on-the-fly during decoding to retain ~full accuracy with only ~10% of the cache. It ships as a plug-and-play wrapper plus performance-hardened ports for vLLM and SGLang serving engines.

## Use cases
- compress kv cache during llm chain-of-thought inference
- reduce gpu memory for reasoning model serving
- increase llm serving throughput under memory constraints
- run long self-reflection reasoning without cache blowup
- speed up rl rollout inference for reasoning models
- benchmark kv cache compression on gsm8k

## When to choose
- serving reasoning models (CoT/self-reflection) whose long outputs bloat the KV cache
- you need near-lossless accuracy at 10-16% cache budget
- you use vLLM or SGLang and want a patch-based integration
- you want a training-free, plug-and-play compression wrapper

## When to avoid
- compressing long prompts rather than long generated traces
- you need a permissively licensed dependency (no license file)
- non-reasoning workloads with short outputs where cache pressure is low
- you need a turnkey product rather than a research codebase

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, caching, machine-learning, benchmarking
- domain: large-language-models, machine-learning, performance, gpu-computing
- platform: python
- tags: kv-cache-compression, reasoning-models, vllm, sglang, chain-of-thought, training-free, inference-optimization, research-paper, gpu, linux, docker

## Member repositories
- Zefan-Cai/R-KV (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.779259+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:18:34.091815+00:00, confidence not recorded.
  - readme: https://github.com/Zefan-Cai/R-KV (fetched 2026-08-28T04:03:59.779259+00:00, sha 5641c5e027eb)
  - homepage: https://zefan-cai.github.io/R-KV.page/ (fetched 2026-08-29T12:26:27.002857+00:00, sha 9f427c41aea9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
