paper-with-me

홈 › Papers

LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models

2023-10-09 · Huiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang, Lili Qiu

Large language models (LLMs) have been applied in various applications due to their astonishing capabilities. With advancements in technologies such as chain-of-thought (CoT) prompting and in-context learning (ICL), the prompts fed to LLMs are becoming increasingly lengthy, even exceeding tens of thousands of tokens. To accelerate model inference and reduce cost, this paper presents LLMLingua, a coarse-to-fine prompt compression method that involves a budget controller to maintain semantic integrity under high compression ratios, a token-level iterative compression algorithm to better model the interdependence between compressed contents, and an instruction tuning based method for distribution alignment between language models. We conduct experiments and analysis over four datasets from different scenarios, i.e., GSM8K, BBH, ShareGPT, and Arxiv-March23; showing that the proposed approach yields state-of-the-art performance and allows for up to 20x compression with little performance loss. Our code is available at https://aka.ms/LLMLingua.

📄 PDF Abstract BibTeX arXiv:2310.05736

Code (1)

microsoft/LLMLingua 공식 구현 pytorch

Tasks

GSM8KIn-Context Learning

Similar Papers 제목 키워드 기반

LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression

2023-10-10 · Huiqiang Jiang, Qianhui Wu, Xufang Luo, Dongsheng Li 외

In long context scenarios, large language models (LLMs) face three main challenges: higher computational cost, performance reduction, and position bias. Research indicates that LLM performance hinges on the density and p…

Code CompletionFew-Shot LearningPosition

Prompt Compression in Diffusion Large Language Models: Evaluating LLMLingua-2 on LLaDA

2026-05-18 · Sterling Huang, Abigayle Brown, Jiyoo Noh, Jiakang Xu 외 arxiv

Prompt compression reduces inference cost and context length in large language models, but prior evaluations focus mainly on autoregressive architectures. This study examines whether LLMLingua-2 transfers effectively to …

Mathematical ReasoningSemantic Similarity

Cross-Lingual Token Arbitrage: Optimizing Code Agent Context Windows via Local LLM Preprocessing

2026-06-02 · Mehmet Utku Colak arxiv

AI-assisted coding agents are bottlenecked by input-token cost. Two pathologies of raw human input drive much of this overhead: tokenization inefficiency for non-English text and structural entropy in conversational prom…

EFPC: Towards Efficient and Flexible Prompt Compression

2025-03-11 · Yun-Hao Cao, Yangsong Wang, Shuzheng Hao, Zhenxing Li 외

The emergence of large language models (LLMs) like GPT-4 has revolutionized natural language processing (NLP), enabling diverse, complex tasks. However, extensive token counts lead to high computational and financial bur…

Prompt Compression in the Wild: Measuring Latency, Rate Adherence, and Quality for Faster LLM Inference

2026-04-03 · Cornelius Kummer, Lena Jurkschat, Michael Färber, Sahar Vahdati arxiv

With the wide adoption of language models for IR -- and specifically RAG systems -- the latency of the underlying LLM becomes a crucial bottleneck, since the long contexts of retrieved passages lead large prompts and the…

Question AnsweringCode Generation