Saved in:
Bibliographic Details
Main Authors: Joo, Donghyeon, Hosseini, Helya, Hadidi, Ramyad, Asgari, Bahar
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.22913
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912689419190272
author Joo, Donghyeon
Hosseini, Helya
Hadidi, Ramyad
Asgari, Bahar
author_facet Joo, Donghyeon
Hosseini, Helya
Hadidi, Ramyad
Asgari, Bahar
contents We demonstrate that unstructured sparsity significantly improves KV cache compression for LLMs, enabling sparsity levels up to 70% without compromising accuracy or requiring fine-tuning. We conduct a systematic exploration of pruning strategies and find per-token magnitude-based pruning as highly effective for both Key and Value caches under unstructured sparsity, surpassing prior structured pruning schemes. The Key cache benefits from prominent outlier elements, while the Value cache surprisingly benefits from a simple magnitude-based pruning despite its uniform distribution. KV cache size is the major bottleneck in decode performance due to high memory overhead for large context lengths. To address this, we use a bitmap-based sparse format and a custom attention kernel capable of compressing and directly computing over compressed caches pruned to arbitrary sparsity patterns, significantly accelerating memory-bound operations in decode computations and thereby compensating for the overhead of runtime pruning and compression. Our custom attention kernel coupled with the bitmap-based format delivers substantial compression of KV cache upto 45% of dense inference and thereby enables longer context length and increased tokens/sec throughput of upto 2.23x compared to dense inference. Our pruning mechanism and sparse attention kernel is available at https://github.com/dhjoo98/mustafar.
format Preprint
id arxiv_https___arxiv_org_abs_2505_22913
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Mustafar: Promoting Unstructured Sparsity for KV Cache Pruning in LLM Inference
Joo, Donghyeon
Hosseini, Helya
Hadidi, Ramyad
Asgari, Bahar
Machine Learning
We demonstrate that unstructured sparsity significantly improves KV cache compression for LLMs, enabling sparsity levels up to 70% without compromising accuracy or requiring fine-tuning. We conduct a systematic exploration of pruning strategies and find per-token magnitude-based pruning as highly effective for both Key and Value caches under unstructured sparsity, surpassing prior structured pruning schemes. The Key cache benefits from prominent outlier elements, while the Value cache surprisingly benefits from a simple magnitude-based pruning despite its uniform distribution. KV cache size is the major bottleneck in decode performance due to high memory overhead for large context lengths. To address this, we use a bitmap-based sparse format and a custom attention kernel capable of compressing and directly computing over compressed caches pruned to arbitrary sparsity patterns, significantly accelerating memory-bound operations in decode computations and thereby compensating for the overhead of runtime pruning and compression. Our custom attention kernel coupled with the bitmap-based format delivers substantial compression of KV cache upto 45% of dense inference and thereby enables longer context length and increased tokens/sec throughput of upto 2.23x compared to dense inference. Our pruning mechanism and sparse attention kernel is available at https://github.com/dhjoo98/mustafar.
title Mustafar: Promoting Unstructured Sparsity for KV Cache Pruning in LLM Inference
topic Machine Learning
url https://arxiv.org/abs/2505.22913