paper-with-me

Papers

CritiPrefill: A Segment-wise Criticality-based Approach for Prefilling Acceleration in LLMs

2024-09-19 · Junlin Lv, Yuan Feng, Xike Xie, Xin Jia, Qirong Peng, Guiming Xie

Large language models have achieved notable success across various domains, yet efficient inference is still limited by the quadratic computation complexity of the attention mechanism. The inference consists of prefilling and decoding phases. Although several attempts have been made to accelerate decoding, the inefficiency of the prefilling phase, especially for long-context tasks, remains a challenge. In this paper, we observe a locality in query criticality during the prefilling phase of long-context processing: adjacent query tokens tend to focus on similar subsets of the past Key-Value (KV) cache. Based on this observation, we propose CritiPrefill, a criticality-based segment-wise prefilling method. This method partitions the input sequence's queries and KV cache into segments and blocks, utilizing a segment-wise algorithm to estimate the query criticality. By pruning non-critical computations between query segments and cache blocks in the self-attention mechanism, the prefilling process can be significantly accelerated. Extensive evaluations on multiple long-context datasets show up to 2.7x speedup on Llama3-8B and 3.0x speedup on Yi-9B for 128K context length on a single A100 GPU, with minimal quality degradation.

📄 PDF Abstract BibTeX arXiv:2409.12490

Code (1)

66ring/critiprefill 공식 구현 pytorch

Tasks

GPU

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
Pruning 설명 없음
Focus 설명 없음

Similar Papers 제목 키워드 기반

From Rigid to Dynamic: Entropy-Guided Adaptive Inference for Long-Context LLMs

2026-06-08 · Zhanchao Xu, Haoyang Li, Qingfa Xiao, Fei Teng 외 arxiv

Existing sparse attention and KV cache compression methods for long-context LLM inference typically apply fixed sparsity patterns or uniform budgets across all attention heads, overlooking the substantial variation in at…

Prefilling-dLLM: Predictive Prefilling for Long-Context Inference in Diffusion Language Models

2026-06-09 · Jing Xiong, Qi Han, Shansan Gong, Yunta Hsieh 외 arxiv

Diffusion large language models (dLLMs) re-encode the entire prefix at every denoising step, causing recomputation that scales quadratically with context length and becomes prohibitive for long-context scenarios. We prop…

Accelerating Prefilling via Decoding-time Contribution Sparsity

2025-07-29 · Zhiyuan He, Yike Zhang, Chengruidong Zhang, Huiqiang Jiang 외 arxiv

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 est…

Mix-Quant: Quantized Prefilling, Precise Decoding for Agentic LLMs

2026-05-19 · Haiquan Lu, Zigeng Chen, Gongfan Fang, Xinyin Ma 외 arxiv

LLM agents have recently emerged as a powerful paradigm for solving complex tasks through planning, tool use, memory retrieval, and multi-step interaction. However, these agentic workflows often introduce substantial inp…

BATON: Enhancing Batch-wise Inference Efficiency for Large Language Models via Dynamic Re-batching

2024-10-24 · Peizhuang Cong, Qizhi Chen, Haochen Zhao, Tong Yang

The advanced capabilities of Large Language Models (LLMs) have inspired the development of various interactive web services or applications, such as ChatGPT, which offer query inference services for users. Unlike traditi…