Practical overview
When it fits
Use Rocketkv when you want to evaluate or study two-stage KV-cache compression during long-context LLM decoding, rather than obtain a hosted inference endpoint.
Who it is for
- Researchers evaluating long-context LLM inference methods.
- Engineers investigating KV-cache memory and decoding performance trade-offs.
Documented uses
- Run RocketKV on supported long-context benchmark and model combinations.
- Compare compressed decoding with full-KV or Exact-TopK evaluation modes.
- Examine how token budgets relate to reported inference performance and memory use.
Requirements & limits
The project is identified as open source and its public repository is active. Model downloads for the documented accuracy experiments require configuring a Hugging Face access token.
- The method is training-free and targets the decode phase.
- Its two stages combine coarse cache-token eviction with fine-grained hybrid sparse attention.
- The README reports results on an NVIDIA A100; performance on other hardware or workloads is not specified.
- The repository setup requires FlashAttention 2.6.3 and experiment-specific model and dataset preparation.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run a documented LongBench comparison
Use the repository's LongBench scripts to compare RocketKV with the full-KV baseline or Exact-TopK for a supported model.
Before you start
- Python environment with dependencies installed using the repository requirements file.
- FlashAttention 2.6.3.
- A supported model and LongBench data; the README gives a download script for LongBench.
- Hugging Face access token configured as described in the repository for model downloads.
Steps
Install dependencies with the command below.
pip install -r requirements.txtInstall FlashAttention with the command below.
pip install flash-attn==2.6.3Prepare LongBench data with the command below and prepare the model as described in the README.
python scripts/dataset_prep/download_longbench.pyRun the relevant
scripts/longbench/model script withrocket, a results directory and a token budget; substitutebaselineortopkfor the documented comparison methods.
Expected outcome
The repository's LongBench evaluation script is set to produce results for the selected method and token budget.
Guide limitations
- The documented scripts cover Llama 3.1 8B Instruct, Mistral 7B Instruct v0.2 and LongChat 7B v1.5 32k.
- The README does not describe a hosted service or API for this workflow.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- NVlabs/RocketKV · Official homepage title · retained in its source language

