Hugging Face Trending Papers

KVPath: Connecting Key-Value Representations Across Transformer Layers

KVPath introduces a new way to store key-value representations in transformers by linking KV pairs across layers into a path. The first layer holds a full-dimensional base KV, while later layers store only low-dimensional delta KVs that update the preceding KV, preserving layer-specific information without full KV storage. Two variants—KVPath-Residual and KVPath-Rolling—demonstrate up to 68% reduction in KV-cache size for GQA and 55% for MLA while maintaining or improving performance.

arXiv Machine Learning
Sep 24

Shared Global KV with Layer-Specific Local History

The paper investigates how to combine shared global key‑value (KV) caches with layer‑specific local history in decoder‑only Transformer language models. By separating historical content from the input source used to form it, the authors show that adding local history can reduce held‑out test perplexity by about 1.4% compared to a current‑token local branch, while also demonstrating benefits in capacity, entry‑count, and training‑compute controls. Experiments on a 126M‑parameter model with 2K context reveal that local history remains valuable even when adjacent layers share local inputs, and that a sufficient suffix schedule can reduce upper‑layer construction work without losing cache completeness.

By Xinglang Xian
arXiv Machine Learning
Aug 20

WhiteMatter: All-to-All Cross-Layer Connections via KV Mixing

WhiteMatter introduces a novel architecture for Transformers that connects every attention layer to representations from all layers of each past token, allowing connection weights to vary across consumer layers and adapt to the source token. The design uses a router to mix the $L$ layer states of each token into $k$ KV channels, which are cached for subsequent tokens; each consumer layer attends to one channel. Experiments show that WhiteMatter outperforms a vanilla Transformer with 50% more layers and maintains most of this advantage even when the KV-cache is compressed by 50%.

By Wenbo Zhang, Xiang Ren
arXiv Machine Learning
Sep 25

FlashLoop: Fast and Memory-Efficient Looped Transformers via Lazy Updates

FlashLoop is a training‑free inference framework for Looped Transformers that reduces cross‑loop redundancy by employing token‑sparse updates, sparse attention, and KV‑residual quantization. It exploits observations that, as loops progress, state changes concentrate on a small token subset, attention differences are dominated by a sparse key subset, and KV residuals become amenable to low‑bit quantization. The method achieves lossless accuracy with up to 1.64× speedup and 6× KV‑cache memory reduction across several Looped Transformer models.

By Wanqi Yang, Shiwei Liu
arXiv AI
Sep 18

Exploring a Layer-Wise Design Space for KV Cache Eviction

The paper investigates whether key‑value (KV) cache eviction strategies should vary across Transformer layers. By combining existing eviction methods in different layer configurations and profiling their performance, the authors find that heterogeneous, layer‑wise routing consistently outperforms homogeneous policies on LongBench tasks. Even with a fixed set of methods, the placement of each method strongly influences overall quality, and a single well‑chosen route surpasses all nine standalone baselines across multiple cache budgets.

By Chao Fei, Kaihua Liang, Hanzhi Hu, Hongcheng Guo, Jian Weng, Marco Canini, Panos Kalnis
arXiv Machine Learning
Oct 28

LSTM-Style Looped Transformers with Shared KV Caches

The paper introduces an LSTM-style transformer that shares a single key–value cache across its recurrent core, reducing parameters by 40.4% compared to an untied model while keeping forward FLOPs similar. It aligns parallel and continuation training passes with a consistency loss, eliminating 81–89% of the continuation‑loss penalty on FineWeb. Experiments across multiple widths and token budgets show that weight tying incurs the smallest loss cost at lower token budgets, highlighting its potential for data‑ and storage‑constrained settings.

By Andreas Kirsch
arXiv Computation and Language
Nov 4

DepthGraft: Structural Regularization through Hierarchical Cross-Layer KV Reconstruction

DepthGraft introduces a hierarchical KV‑sharing architecture that reconstructs deep‑layer key‑value pairs from stride‑aligned shallow‑middle source pairs, thereby providing efficient cross‑layer connectivity without extra computation or memory. This design creates direct gradient paths from deep layers to source KV projections, acting as an implicit structural regularizer that sharpens retrieval directions and enriches value content. Experiments on models ranging from 0.5B to 16B parameters show consistent downstream gains, including a 7.0% absolute improvement on MMLU‑Pro for a 16B MoE model.

By Xiaohan Qin, Xiangdong Zhang, Yu Wang, Huaijin Wu, Zhuo Xia, Yebin Yang, Junchi Yan
arXiv Machine Learning
Oct 23

BeNice! Closing Looping's Inference-Memory Gap via KV-Sharing

The paper introduces BeNice!, a two‑stage approach that enables KV‑shareability in looped neural architectures. First, stochastic depth during pretraining drives representations toward a common limit across recurrences; second, a post‑training broadcast of the final recurrence’s KV‑cache to earlier recurrences trains the model to produce compatible residuals while preserving quality. BeNice! achieves KV‑shareability without sacrificing validation perplexity and can be combined with other memory‑efficient techniques, yielding significant gains in cache hit rates, throughput, and latency in low‑memory, long‑context inference.

By Hayden Prairie, Jacob M. Ryan, Taylor Berg-Kirkpatrick, Daniel Y. Fu
arXiv AI
Jul 8

DepthWeave-KV: Token-Adaptive Cross-Layer Residual Factorization for Long-Context KV Cache Compression

arXiv:2607. 06523v1 Announce Type: new Abstract: Long-context language model inference is increasingly limited by the memory bandwidth and capacity required to store key-value caches, yet existing compression methods often apply uniform budgets across layers or tokens and degrade retrieval when lexical cues and semantic states require different preservation.

By Anna Cordoba, Adam Puente Tercero, Nerea Angulo Hijo, Mar Linares Tercero, Julia Barrientos, Ainhoa Miranda, Jesus Olivera