File size: 2,039 Bytes
2f07126 dbe67ce d160894 dbe67ce 2f07126 dbe67ce 2f07126 dbe67ce 2f07126 d160894 dbe67ce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ---
library_name: kvpress
license: cc-by-nc-4.0
pipeline_tag: text-generation
tags:
- kv-cache-compression
- long-context
- lora
---
# RestoreKV Checkpoints
Trained restore-token embeddings + LoRA adapters for
**RestoreKV** ([paper](https://arxiv.org/abs/2608.01247) | [project page](https://paper.pnu-cvsp.com/RestoreKV/)), a budget-matched,
single-pass plug-in that recovers full-cache behavior under aggressive
query-agnostic KV cache eviction (built on
[KVzip](https://github.com/snu-mllab/KVzip)).
Each checkpoint stores only the 8 restore-token embeddings and the rank-8 LoRA
adapters (~0.4% of the backbone; ~41 MB). The base model weights are **not**
included — load them from their original repositories.
| File | Backbone | Base scorer |
|---|---|---|
| `llama3.1-8b_restorekv.pt` | meta-llama/Llama-3.1-8B-Instruct | KVzip |
| `llama3.1-8b_restorekv_plus.pt` | meta-llama/Llama-3.1-8B-Instruct | KVzip+ |
| `qwen3-8b_restorekv.pt` | Qwen/Qwen3-8B | KVzip |
| `qwen3-8b_restorekv_plus.pt` | Qwen/Qwen3-8B | KVzip+ |
## Usage (KVPress)
```python
from kvpress import RestoreKVPress
press = RestoreKVPress(
compression_ratio=0.9375, # 16x
checkpoint_path="llama3.1-8b_restorekv.pt", # downloaded from this repo
budget_matched=True,
)
```
Evaluate with the official KVPress protocol (RULER-4096, Llama-3.1-8B):
```bash
python evaluate.py --dataset ruler --data_dir 4096 \
--model meta-llama/Llama-3.1-8B-Instruct \
--press_name RestoreKV --compression_ratio 0.875 \
--restore_checkpoint llama3.1-8b_restorekv.pt
```
For the `*_plus.pt` checkpoints, use the KVzip+ variant
(`--press_name RestoreKV_plus`).
## License
Released under **CC BY-NC 4.0** (research / non-commercial use only). These
checkpoints are distilled using a training mixture that contains
[LongAlpaca](https://huggingface.co/datasets/Yukang/LongAlpaca-12k)-derived
self-study data, so they inherit its most restrictive component license
(CC BY-NC 4.0). |