Reproduce “Breaking the Boundaries of Long-Context LLM Inference: Adaptive KV Management on a Single Commodity GPU” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

He Sun, Li Li, Mingjun Xiao, Chengzhong Xu

A system named LeoAM enables efficient long-context Large Language Model inference on single commodity GPUs by adaptively managing Key-Value cache across GPU, CPU, and disk. It achieves an average inference latency speedup of 3.46x, reaching up to 5.47x for larger batch sizes, while preserving LLM response quality with less than a 1% accuracy drop.

Key insights

  • KV cache importance is dynamic and query-dependent, necessitating adaptive rather than static management strategies for efficient resource utilization.
  • The presence of "attention deserts" (contiguous low-attention regions) within contexts can be leveraged for efficient, adaptive chunking and importance evaluation.
  • Minimizing disk I/O for importance evaluation is crucial, achievable by using lightweight data abstracts and effective pipelining across the GPU-CPU-Disk memory hierarchy.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.