paper-with-me

Papers

LazyLLM: Dynamic Token Pruning for Efficient Long Context LLM Inference

2024-07-19 · Qichen Fu, Minsik Cho, Thomas Merth, Sachin Mehta, Mohammad Rastegari, Mahyar Najibi

The inference of transformer-based large language models consists of two sequential stages: 1) a prefilling stage to compute the KV cache of prompts and generate the first token, and 2) a decoding stage to generate subsequent tokens. For long prompts, the KV cache must be computed for all tokens during the prefilling stage, which can significantly increase the time needed to generate the first token. Consequently, the prefilling stage may become a bottleneck in the generation process. An open question remains whether all prompt tokens are essential for generating the first token. To answer this, we introduce a novel method, LazyLLM, that selectively computes the KV for tokens important for the next token prediction in both the prefilling and decoding stages. Contrary to static pruning approaches that prune the prompt at once, LazyLLM allows language models to dynamically select different subsets of tokens from the context in different generation steps, even though they might be pruned in previous steps. Extensive experiments on standard datasets across various tasks demonstrate that LazyLLM is a generic method that can be seamlessly integrated with existing language models to significantly accelerate the generation without fine-tuning. For instance, in the multi-document question-answering task, LazyLLM accelerates the prefilling stage of the LLama 2 7B model by 2.34x while maintaining accuracy.

📄 PDF Abstract BibTeX arXiv:2407.14057

Code (0)

등록된 구현이 없습니다.

Tasks

Question Answering

Methods 이 논문이 사용한 방법론

LLaMA LLaMA is a collection of foundation language models ranging from 7B to 65B parameters. It is based on the transformer architecture with various improvements that were…
Pruning 설명 없음

Similar Papers 제목 키워드 기반

TrimTokenator-LC: Towards Adaptive Visual Token Pruning for Large Multimodal Models with Long Contexts

2025-12-28 · Hao Zhang, Mengsi Lyu, Bo Huang, Yulong Ao 외 arxiv

Large Multimodal Models (LMMs) have proven effective on various tasks. They typically encode visual inputs into Original Model sequences of tokens, which are then concatenated with textual tokens and jointly processed by…

SlimInfer: Accelerating Long-Context LLM Inference via Dynamic Token Pruning

2025-08-08 · Lingkun Long, Rubing Yang, Yushi Huang, Desheng Hui 외 arxiv

Long-context inference for Large Language Models (LLMs) is heavily limited by high computational demands. While several existing methods optimize attention computation, they still process the full set of hidden states at…

FastVID: Dynamic Density Pruning for Fast Video Large Language Models

2025-03-14 · Leqi Shen, Guoqiang Gong, Tao He, Yifeng Zhang 외

Video Large Language Models have shown impressive capabilities in video comprehension, yet their practical deployment is hindered by substantial inference costs caused by redundant video tokens. Existing pruning techniqu…

Saliency-driven Dynamic Token Pruning for Large Language Models

2025-04-06 · Yao Tao, Yehui Tang, Yun Wang, Mingjian Zhu 외

Despite the recent success of large language models (LLMs), LLMs are particularly challenging in long-sequence inference scenarios due to the quadratic computational complexity of the attention mechanism. Inspired by the…

SpeechPrune: Context-aware Token Pruning for Speech Information Retrieval

2024-12-16 · Yueqian Lin, Yuzhe Fu, Jingyang Zhang, Yudong Liu 외

We introduce Speech Information Retrieval (SIR), a new long-context task for Speech Large Language Models (Speech LLMs), and present SPIRAL, a 1,012-sample benchmark testing models' ability to extract critical details fr…

FormInformation RetrievalRetrievaltext similarity