StreamKL: Fast and Memory-Efficient KL Divergence for Boosting Attention Distillation

19d ago · Global · primary source: export.arxiv.org

A new GPU primitive called StreamKL eliminates the quadratic memory cost of computing Kullback-Leibler divergence for attention distributions, enabling long-context model distillation on a single GPU, according to a paper posted to arXiv on June 18, 2026 [1]. Attention distillation — the process of training one attention distribution to match another by minimizing their KL divergence — is used in knowledge distillation, model compression, continual learning, and sparse-attention large language model training [1][2]. Large language models are machine learning models with many parameters, trained on vast amounts of text for natural language processing tasks [8]. Existing methods materialize both attention distributions before computing the KL reduction, incurring memory and input-output costs proportional to the product of query and key sequence lengths [1][2]. Those costs become prohibitive at long context lengths [1][2]. StreamKL derives an online formulation for the coupled two-distribution KL reduction, enabling a single one-pass forward kernel that streams query-key tiles through on-chip SRAM [1][2]. For the backward pass, StreamKL recomputes attention probabilities tile-by-tile, avoiding storage of quadratic intermediates [1][2]. The paper reports speedups of up to 43× and 14× over baseline methods in the forward and backward passes, respectively [1][2]. The extra high-bandwidth memory footprint of attention distillation is reduced from quadratic scaling to constant, allowing long-context distillation on a single GPU [1][2]. The paper appeared on arXiv, the open-access repository of electronic preprints that has served the physics, mathematics, and computer science communities since 1991 [6]. arXiv hosts papers that are moderated but not peer reviewed, and as of November 2024 receives roughly 24,000 submissions per month [6]. The StreamKL abstract page displays several arXivLabs integrations, including Bibliographic Explorer, Connected Papers, and Litmaps, which are experimental tools developed by community collaborators under a framework that arXiv formalized in 2020 [4][5]. arXivLabs projects operate under guidelines that require partners to share arXiv’s values of openness, community, excellence, and user data privacy [4]. The framework is currently on a hiatus for new proposals while the arXiv development team focuses on modernizing and migrating systems to the cloud [3].

infrastructureresearch-paper

Background sources we checked (7)
  • arxiv.org ↗ Attention distillation, which trains one attention distribution to match another by minimizing their Kullback-Leibler (KL) divergence, is widely used in knowledge distillation, model compression, continual learning, and sparse-attention LLM training. However, existing approaches …
  • info.arxiv.org ↗ arXiv Labs - arXiv info | arXiv e-print repository Skip to content # arXiv Labs Attention arXiv Users: arXiv Labs is pausing new proposals ## What are arXiv Labs? arXiv Labs are a way for the community to contribute new, useful features to arXiv. These integrations are avail…
  • blog.arxiv.org ↗ arXivLabs: a space for community innovation – arXiv blog arXiv has launched a new, formalized framework enabling innovative collaborations with individuals and organizations. “Members of our community want to contribute tools that enhance the arXiv experience, and we val…
  • info.arxiv.org ↗ arXivLabs: Showcase - arXiv info | arXiv e-print repository ... # arXivLabs: Showcase ... arXiv is surrounded by a community of researchers and developers working at the cutting edge of information science and technology. ... While the arXiv team is focused on our core mission—pr…
  • en.wikipedia.org ↗ arXiv (pronounced as "archive"—the X represents the Greek letter chi ⟨χ⟩) is an open-access repository of electronic preprints and postprints (known as e-prints) approved for posting after moderation, but not peer reviewed. It consists of scientific papers in the fields of mathem…
  • en.wikipedia.org ↗ 14 (fourteen) is the natural number following 13 and preceding 15.…
  • en.wikipedia.org ↗ A large language model (LLM) is a type of machine learning model designed for natural language processing tasks such as language generation. LLMs are language models with many parameters, and are trained with self-supervised learning on a vast amount of text.…

Sources

Spot something wrong? Report an issue