Accelerating Prefilling via Decoding-time Contribution Sparsity

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: He, Zhiyuan, Zhang, Yike, Zhang, Chengruidong, Jiang, Huiqiang, Yang, Yuqing, Qiu, Lili
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914493831839744
author He, Zhiyuan
Zhang, Yike
Zhang, Chengruidong
Jiang, Huiqiang
Yang, Yuqing
Qiu, Lili
author_facet He, Zhiyuan
Zhang, Yike
Zhang, Chengruidong
Jiang, Huiqiang
Yang, Yuqing
Qiu, Lili
contents Large Language Models (LLMs) incur quadratic attention complexity with input length, creating a major time bottleneck in the prefilling stage. Existing acceleration methods largely exploit attention score sparsity by estimating blocks with high attention scores and applying dynamic sparse attention. In this work, we identify another untapped form of sparsity in the prefilling stage, namely decoding-time contribution sparsity, where many attention blocks exhibit nontrivial attention scores during prefilling yet contribute negligibly to subsequent decoding, as indicated by gradient-based analysis. Building on this observation, we propose TriangleMix, a training-free static attention pattern that uses dense attention in a subset of layers and switches to Triangle attention in the others. Extensive experiments show that TriangleMix preserves nearly lossless performance relative to dense attention while substantially reducing attention overhead in Triangle layers. For 128K inputs, Triangle attention achieves a 15.3x speedup in attention computation, significantly exceeding the acceleration of typical dynamic sparse methods (1.9x to 3.4x). Furthermore, TriangleMix can be seamlessly combined with dynamic sparsity approaches, delivering an additional 6% to 19% reduction in TTFT over using dynamic sparsity alone. Our code is released at https://aka.ms/TriangleMix.
format Preprint
id arxiv_https___arxiv_org_abs_2507_21526
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Accelerating Prefilling via Decoding-time Contribution Sparsity
He, Zhiyuan
Zhang, Yike
Zhang, Chengruidong
Jiang, Huiqiang
Yang, Yuqing
Qiu, Lili
Computation and Language
Large Language Models (LLMs) incur quadratic attention complexity with input length, creating a major time bottleneck in the prefilling stage. Existing acceleration methods largely exploit attention score sparsity by estimating blocks with high attention scores and applying dynamic sparse attention. In this work, we identify another untapped form of sparsity in the prefilling stage, namely decoding-time contribution sparsity, where many attention blocks exhibit nontrivial attention scores during prefilling yet contribute negligibly to subsequent decoding, as indicated by gradient-based analysis. Building on this observation, we propose TriangleMix, a training-free static attention pattern that uses dense attention in a subset of layers and switches to Triangle attention in the others. Extensive experiments show that TriangleMix preserves nearly lossless performance relative to dense attention while substantially reducing attention overhead in Triangle layers. For 128K inputs, Triangle attention achieves a 15.3x speedup in attention computation, significantly exceeding the acceleration of typical dynamic sparse methods (1.9x to 3.4x). Furthermore, TriangleMix can be seamlessly combined with dynamic sparsity approaches, delivering an additional 6% to 19% reduction in TTFT over using dynamic sparsity alone. Our code is released at https://aka.ms/TriangleMix.
title Accelerating Prefilling via Decoding-time Contribution Sparsity
topic Computation and Language
url https://arxiv.org/abs/2507.21526