Lune

ICML2025顶会

Fast Inference with Kronecker-Sparse Matrices

Antoine Gonon, Léon Zheng, Pascal Carrivain, Quoc-Tung Le

摘要

Kronecker-sparse (KS) matrices-whose supports are Kronecker products of identity and all-ones blocks-underpin the structure of Butterfly and Monarch matrices and offer the promise of more efficient models. However, existing GPU kernels for KS matrix multiplication suffer from high data movement costs, with up to 50 % of time spent on memory-bound tensor permutations. We propose a fused, output-stationary GPU kernel that eliminates these overheads, reducing global memory traffic threefold. Across 600 KS patterns, our kernel achieves in FP32 a median speedup of ×1.4 and lowers energy consumption by 15 %. A simple heuristic based on KS pattern parameters predicts when our method outperforms existing ones. We release all code 1 at github.com/PascalCarrivain/ksmm, including a PyTorch-compatible KSLinear layer, and demonstrate in FP32 end-to-end latency reductions of up to 22 % in ViT-S/16 and 16 % in GPT-2 medium.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Scaling Vision Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Models
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Monarch: Expressive Structured Matrices for Efficient and Accurate Training
  • Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Models 引用了 Scaling Vision Transformers
  • Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Models 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Monarch: Expressive Structured Matrices for Efficient and Accurate Training 引用了 Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Models
  • Monarch: Expressive Structured Matrices for Efficient and Accurate Training 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper10

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  2. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  3. Scaling Vision TransformersXiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, Lucas BeyerCVPR 2022 · 767 次引用
  4. Monarch: Expressive Structured Matrices for Efficient and Accurate TrainingTri Dao, Beidi Chen, Nimit Sharad Sohoni, Arjun D. Desai 等ICML 2022 · 125 次引用
  5. Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network ModelsBeidi Chen, Tri Dao, Kaizhao Liang, Jiaming Yang 等ICLR 2022 · 94 次引用

相关 Paper

  1. Compute Better Spent: Replacing Dense Layers with Structured MatricesShikai Qiu, Andres Potapczynski, Marc Anton Finzi, Micah Goldblum 等ICML 2024 · 26 次引用
  2. Monarch Mixer: A Simple Sub-Quadratic GEMM-Based ArchitectureDaniel Y. Fu, Simran Arora, Jessica Grogan, Isys Johnson 等NeurIPS 2023 · 80 次引用
  3. Accelerating Block Low-Rank Foundation Model Inference on Memory-Constrained GPUsPierre Abillama, Changwoo Lee, Juechu Dong, David T. Blaauw 等HPDC 2026
  4. Fast Kronecker Matrix-Matrix Multiplication on GPUsAbhinav Jangda, Mohit YadavPPoPP 2024 · 2 次引用
  5. Searching for Efficient Linear Layers over a Continuous Space of Structured MatricesAndres Potapczynski, Shikai Qiu, Marc Finzi, Christopher Ferri 等NeurIPS 2024 · 11 次引用
黄昏的海面,两侧是细线勾勒的悬崖