ZSMerge Project π
September 24, 2025 Β· View on GitHub

A high-performance key-value merging utility with modular design and automated testing.
Features β¨
- βZSMerge Core Module: Efficient key-value cache merging algorithms
- βExtensible Testing: Comprehensive unittest coverage
- βScript Automation: Bash scripts for experiment replication
- βMIT Licensed: Open and permissive usage
Installation βοΈ
Prerequisites
- Python 3.8+
- Bash shell (Linux/macOS/WSL)
Install dependencies
pip install -r requirements.txt
Run π οΈ
Create the Environment Variables File
Create a .env file in the root directory of the project. Example content:
ACCESS_TOKEN=your_huggingface_key_here
Running Tests
python -m unittest tests.test_mistral_att
python -m unittest tests.test_llama_att
python -m unittest tests.test_llama3_att
python -m unittest tests.test_falcon_att
python -m unittest tests.test_qwen2_att
Validate throughput
bash scripts/e_throughput.sh
Validate rouge
bash scripts/e_rouge.sh
License π
This project is licensed under the MIT License - see the LICENSE file for details.
Citation citeπ‘
If you found this repository helpful in your work, please cite our paper:
@article{liu2025zeromerge,
title={ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMs},
author={Liu, Xin and Liu, Pei and Tang, Guoming},
journal={arXiv preprint arXiv:2503.10714},
year={2025}
}