AI summary · arXiv: 2403.12968v1 · cs.CL

LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression

Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang, Menglin Xia, Xufang Luo, Jue Zhang, Qingwei Lin, Victor Rühle,
and 5 more authorsYuqing Yang, Chin-Yew Lin, H. Vicky Zhao, Lili Qiu, Dongmei Zhang
Original paper · DOI 10.18653/v1/2024.findings-acl.57 Submitted to arXiv on 19 Mar. 2024 Published in Findings of the Association for Computational Linguistics ACL 2024 (2024) License: not stated (all rights reserved)

How to read this summary? Illustrated guide

The essentials

  • Task-agnostic prompt compression for enhancing generalizability and efficiency
  • Novel data distillation procedure to extract knowledge from Language Models (LLMs) for prompt compression
  • Formulation of prompt compression as a token classification problem using a Transformer encoder
  • Lower latency and explicit learning of compression objective with smaller models like XLM-RoBERTa-large and mBERT
  • Extensive evaluation on various datasets showing significant performance improvements over strong baselines
  • Robust generalization capabilities across different Language Models (LLMs)
  • 3x-6x faster speed compared to existing methods, accelerating end-to-end latency by 1.6x-2.9x
  • Impressive compression ratios ranging from 2x-5x

Key points written by AI: they may contain errors, check them against the paper.

AI-generated keywords: Task-agnostic prompt compression Generalizability Efficiency Data distillation Transformer encoder

Read further

  • Comprehensive Summary
  • Layman's Summary
  • Blog article
  • Original abstract
This paper by Zhuoshi Pan et al. delves into the realm of task-agnostic prompt compression to enhance generalizability and efficiency. The focus lies on addressing the redundancy present in natural language through the compression of prompts. Existing methodologies typically involve removing tokens or lexical units based on their information entropy derived from a causal language model like LLaMa-7B. However, a key challenge arises as information entropy may not be the most optimal metric for prompt compression due to its reliance on unidirectional context and potential failure to capture all essential information required for effective compression. To combat these issues effectively, the authors propose a novel data distillation procedure aimed at extracting knowledge from a Language Model (LLM) to compress prompts without sacrificing crucial information. Additionally, they introduce an extractive text compression dataset to further enhance their approach. Prompt compression is formulated as a token classification problem to ensure the fidelity of the compressed prompt compared to the original one. A Transformer encoder serves as the foundational architecture utilized to capture all necessary information for prompt compression from full bidirectional context. The proposed methodology not only leads to lower latency but also explicitly learns the compression objective with smaller models such as XLM-RoBERTa-large and mBERT. Extensive evaluation conducted on both in-domain and out-of-domain datasets including MeetingBank, LongBench, ZeroScrolls, GSM8K, and BBH showcases significant performance improvements over strong baselines. The model demonstrates robust generalization capabilities across various Language Models (LLMs). Moreover, it proves to be 3x-6x faster than existing prompt compression methods while accelerating end-to-end latency by 1.6x-2.9x with impressive compression ratios ranging from 2x-5x. In conclusion, this research presents an innovative approach towards efficient and faithful task-agnostic prompt compression that not only enhances performance but also showcases remarkable speed improvements over existing methodologies.

Was this synthesis useful?

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Ask questions about this paper to our AI assistant

How to chat with this paper? Illustrated guide

Compare with the PDF

You can also chat with multiple papers at once here.

⚠The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Tools for this paper

Explain it differently 1 free rewrite left today
Save to a collection Group papers in collections to compare them, chat with them and export them. Continue with Google Create a free account Log in

Advanced tools Premium

For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium

Zotero Zotero guide
Citation alerts Citation alerts guide

Papers around this one

See them on a map

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Same question
    Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and Transferability
    Tsz-Ting Chung, Leyang Cui, Le-Mao Liu et al. · 2024 · Conference on Empirical Methods in Natural Language Processing · cited 12 times · Not summarized yet

    Selection-p studies task-agnostic prompt compression, using self-supervised pretraining to improve faithfulness and transferability without external training data.

    Abstract

    Large Language Models (LLMs) have demonstrated impressive capabilities in a wide range of natural language processing tasks when leveraging in-context learning. To mitigate the additional computational and financial costs associated with in-context learning, several prompt compression methods have been proposed to compress the in-context learning prompts. Despite their success, these methods face challenges with transferability due to model-specific compression, or rely on external training data, such as GPT-4. In this paper, we investigate the ability of LLMs to develop a unified compression method that discretizes uninformative tokens, utilizing a self-supervised pre-training technique. By…

  2. Very close Another approach to the problem
    Compress, Then Prompt: Improving Accuracy-Efficiency Trade-off of LLM Inference with Transferable Prompt
    Zhaozhuo Xu, Zirui Liu, Beidi Chen et al. · 2023 · Computation and Language · preprint, not peer reviewed · cited 47 times · AI summary available

    Compress, Then Prompt targets transferable prompt compression to balance LLM inference accuracy and efficiency.

    Abstract

    Large Language Models (LLMs), armed with billions of parameters, exhibit exceptional performance across a wide range of Natural Language Processing (NLP) tasks. However, they present a significant computational challenge during inference, especially when deploying on common hardware such as single GPUs. As such, minimizing the latency of LLM inference by curtailing computational and memory requirements, though achieved through compression, becomes critically important. However, this process inevitably instigates a trade-off between efficiency and accuracy, as compressed LLMs typically experience a reduction in predictive precision. In this research, we introduce an innovative perspective: to…

  3. Very close Same question Cites this paper Uses this paper in depth
    Cmprsr: Abstractive Token-Level Question-Agnostic Prompt Compressor
    Ivan Zakazov, Alexander Sharipov, Berke Argin et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet

    Cmprsr evaluates and improves token-level, question-agnostic prompt compression, emphasizing preservation of important information and adherence to a compression rate.

    Abstract

    Motivated by the high costs of using black-box Large Language Models (LLMs), we introduce a novel prompt compression paradigm, under which we use smaller LLMs to compress inputs for the larger ones. We present the first comprehensive LLM-as-a-compressor benchmark spanning 25 open- and closed-source models, which reveals significant disparity in models'compression ability in terms of (i) preserving semantically important information (ii) following the user-provided compression rate (CR). We further improve the performance of gpt-4.1-mini, the best overall vanilla compressor, with Textgrad-based compression meta-prompt optimization. We also identify the most promising open-source vanilla LLM -…

  4. Very close Another approach to the problem Cited by this paper Used in depth by this paper A method it uses
    LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression
    Huiqiang Jiang, Qianhui Wu, Xufang Luo et al. · 2023 · Computation and Language · cited 658 times · AI summary available

    LongLLMLingua compresses prompts for long-context tasks by considering key-information density and position to improve efficiency and model performance.

    Abstract

    In long context scenarios, large language models (LLMs) face three main challenges: higher computational/financial cost, longer latency, and inferior performance. Some studies reveal that the performance of LLMs depends on both the density and the position of the key information (question relevant) in the input prompt. Inspired by these findings, we propose LongLLMLingua for prompt compression towards improving LLMs' perception of the key information to simultaneously address the three challenges. We conduct evaluation on a wide range of long context scenarios including single-/multi-document QA, few-shot learning, summarization, synthetic tasks, and code completion. The experimental results…

  5. Very close Builds on this paper Cites this paper
    Prompt Compression for Diffusion Large Language Models: An Empirical Evaluation of LLMLingua-2 and LLaDA
    Sterling Huang, Abigayle Brown, Jiyoo Noh et al. · 2026 · International Conference on Advances in Information Technology · cited 1 time · Not summarized yet

    Prompt Compression for Diffusion Large Language Models tests whether LLMLingua-2 preserves task performance when transferred to LLaDA.

    Abstract

    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 diffusion large language models (DLLMs), specifically LLaDA-8B-Instruct. We evaluate GSM8K, DUC2004, and ShareGPT using 250 prompts per dataset at an approximate 50% compression ratio, covering mathematical reasoning, prompt reconstruction, and summarization. Outputs from original, compressed, and reconstructed prompts are compared using exact-match accuracy, BLEU, ROUGE, and BERTScore. Results show that high semantic preservation does not necessarily ensure stable downstream…

  6. Very close Same method, another problem Cites this paper
    CompactPrompt: A Unified Pipeline for Prompt Data Compression in LLM Workflows
    J. Choi, Jia-Yang Zhao, Jeel Shah et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet

    CompactPrompt also removes low-information prompt tokens, while extending compression to attached files and numerical data in agentic workflows.

    Abstract

    Large Language Models (LLMs) deliver powerful reasoning and generation capabilities but incur substantial run-time costs when operating in agentic workflows that chain together lengthy prompts and process rich data streams. We introduce CompactPrompt, an end-to-end pipeline that merges hard prompt compression with lightweight file-level data compression. CompactPrompt first prunes low-information tokens from prompts using self-information scoring and dependency-based phrase grouping. In parallel, it applies n-gram abbreviation to recurrent textual patterns in attached documents and uniform quantization to numerical columns, yielding compact yet semantically faithful representations. Integrat…

  7. Very close Same question
    Learning to Compress Prompt in Natural Language Formats
    Yu-Neng Chuang, Tian-Wei Xing, Chia-yuan Chang et al. · 2024 · North American Chapter of the Association for Computational Linguistics · cited 66 times · Not summarized yet

    Learning to Compress Prompt in Natural Language Formats seeks transferable compression of lengthy prompts into natural-language forms.

    Abstract

    Large language models (LLMs) are great at processing multiple natural language processing tasks, but their abilities are constrained by inferior performance with long context, slow inference speed, and the high cost of computing the results. Deploying LLMs with precise and informative context helps users process large-scale datasets more effectively and cost-efficiently. Existing works rely on compressing long prompt contexts into soft prompts. However, soft prompt compression encounters limitations in transferability across different LLMs, especially API-based LLMs. To this end, this work aims to compress lengthy prompts in the form of natural language with LLM transferability. This poses t…

  8. Very close Review
    An Empirical Study on Prompt Compression for Large Language Models
    Zheng Zhang, Jin-Yi Li, Yi-Huai Lan et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 11 times · Not summarized yet

    An Empirical Study compares six prompt-compression methods across datasets and analyzes response quality, hallucinations, and omitted words.

    Abstract

    Prompt engineering enables Large Language Models (LLMs) to perform a variety of tasks. However, lengthy prompts significantly increase computational complexity and economic costs. To address this issue, we study six prompt compression methods for LLMs, aiming to reduce prompt length while maintaining LLM response quality. In this paper, we present a comprehensive analysis covering aspects such as generation performance, model hallucinations, efficacy in multimodal tasks, word omission analysis, and more. We evaluate these methods across 13 datasets, including news, scientific articles, commonsense QA, math QA, long-context QA, and VQA datasets. Our experiments reveal that prompt compression …

Prior work it builds on

  1. Very close Same question A method it uses
    Discrete Prompt Compression With Reinforcement Learning
    Hoyoun Jung, Kyung-Joong Kim · 2023 · IEEE Access · cited 58 times · Not summarized yet

    Discrete Prompt Compression With Reinforcement Learning learns to edit prompts directly to reduce length while retaining their usefulness across language models.

    Abstract

    Compressed prompts aid instruction-tuned language models (LMs) in overcoming context window limitations and reducing computational costs. Existing methods, which are primarily based on training embeddings, face various challenges associated with interpretability, the fixed number of embedding tokens, reusability across different LMs, and inapplicability when interacting with black-box APIs. This study proposes prompt compression with reinforcement learning (PCRL), which is a discrete prompt compression method that addresses these issues. The proposed PCRL method utilizes a computationally efficient policy network that edits prompts directly. The training approach employed in the proposed PCR…

  2. Close Another approach to the problem
    Learning to Compress Prompts with Gist Tokens
    Jesse Mu, Xiang Lisa Li, Noah D. Goodman · 2023 · Neural Information Processing Systems · cited 534 times · Not summarized yet

    Learning to Compress Prompts with Gist Tokens compresses prompts into reusable cached tokens, rather than extracting and classifying prompt tokens.

    Abstract

    Prompting is the primary way to utilize the multitask capabilities of language models (LMs), but prompts occupy valuable space in the input context window, and repeatedly encoding the same prompt is computationally inefficient. Finetuning and distillation methods allow for specialization of LMs without prompting, but require retraining the model for each task. To avoid this trade-off entirely, we present gisting, which trains an LM to compress prompts into smaller sets of"gist"tokens which can be cached and reused for compute efficiency. Gist models can be trained with no additional cost over standard instruction finetuning by simply modifying Transformer attention masks to encourage prompt …

  3. Close Broader context
    Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models
    D. Wingate, M. Shoeybi, Taylor Sorensen · 2022 · Conference on Empirical Methods in Natural Language Processing · cited 128 times · Not summarized yet

    Prompt Compression and Contrastive Conditioning studies compressed prompts as a means to retain conditioning information and control generation, including toxicity reduction.

    Abstract

    We explore the idea of compressing the prompts used to condition language models, and show that compressed prompts can retain a substantive amount of information about the original prompt. For severely compressed prompts, while fine-grained information is lost, abstract information and general sentiments can be retained with surprisingly few parameters, which can be useful in the context of decode-time algorithms for controllability and toxicity reduction. We explore contrastive conditioning to steer language model generation towards desirable text and away from undesirable text, and find that some complex prompts can be effectively compressed into a single token to guide generation. We also…

  4. Close Another approach to the problem
    Adapting Language Models to Compress Contexts
    A. Chevalier, Alexander Wettig, Anirudh Ajith et al. · 2023 · Conference on Empirical Methods in Natural Language Processing · cited 465 times · Not summarized yet

    Adapting Language Models to Compress Contexts represents long documents as learned summary vectors used as soft prompts.

    Abstract

    Transformer-based language models (LMs) are powerful and widely-applicable tools, but their usefulness is constrained by a finite context window and the expensive computational cost of processing long text documents. We propose to adapt pre-trained LMs into AutoCompressors. These models are capable of compressing long contexts into compact summary vectors, which are then accessible to the model as soft prompts. Summary vectors are trained with an unsupervised objective, whereby long documents are processed in segments and summary vectors from all previous segments are used in language modeling. We fine-tune OPT models on sequences of up to 30,720 tokens and show that AutoCompressors can util…

  5. Related Shared data, tool or method Used in depth by this paper A method it uses
    LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding
    Yushi Bai, Xin Lv, Jia-Jie Zhang et al. · 2023 · Annual Meeting of the Association for Computational Linguistics · cited 1,888 times · Not summarized yet

    LongBench provides a bilingual, multitask benchmark for long-context understanding, and LLMLingua-2 evaluates on LongBench.

    Abstract

    Although large language models (LLMs) demonstrate impressive performance for many language tasks, most of them can only handle texts a few thousand tokens long, limiting their applications on longer sequence inputs, such as books, reports, and codebases. Recent works have proposed methods to improve LLMs' long context capabilities by extending context windows and more sophisticated memory mechanisms. However, comprehensive benchmarks tailored for evaluating long context understanding are lacking. In this paper, we introduce LongBench, the first bilingual, multi-task benchmark for long context understanding, enabling a more rigorous evaluation of long context understanding. LongBench comprise…

Papers that cite it

  1. Very close Same question Uses this paper in depth
    Prompt Compression in the Wild: Measuring Latency, Rate Adherence, and Quality for Faster LLM Inference
    Cornelius Kummer, Lena Jurkschat, Michael Färber et al. · 2026 · European Conference on Information Retrieval · cited 9 times · Not summarized yet

    Prompt Compression in the Wild measures prompt-compression latency, rate adherence, and output quality to assess effects on inference speed.

    Abstract

    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 therefore, compute increase. Prompt compression, which reduces the size of input prompts while aiming to preserve performance on downstream tasks, has established itself as a cost-effective and low-latency method for accelerating inference in large language models. However, its usefulness depends on whether the additional preprocessing time during generation is offset by faster decoding. We present the first systematic, large-scale study of this trade-off, with thousands of runs…

  2. Very close Another approach to the problem Uses this paper in depth
    PC-SubMax: Efficient Prompt Compression via Regularized Submodular Maximization
    Zi-Yi Zhang, Shuang Cui, Hao-Tian Zhang et al. · 2026 · cited 1 time · Not summarized yet

    PC-SubMax selects prompt content using regularized submodular maximization to account for inter-sentence redundancy and reduce inference overhead.

    Abstract

    While large language models (LLMs) are increasingly deployed in long-context scenarios, lengthy prompts can increase inference costs and latency and exacerbate the ``lost-in-the-middle''phenomenon. Selective prompt compression offers a model-agnostic approach to alleviating these issues. However, methods based on fixed token- or sentence-level importance scores may overlook how content contributions change with the selected subset, limiting their ability to account for inter-sentence redundancy. Compression procedures that rely on autoregressive LLM scoring can also introduce substantial overhead. We propose PC-SubMax, a theoretically grounded framework that formulates selective prompt compr…

  3. Very close Same question Uses this paper in depth
    Compression Method Matters: Benchmark-Dependent Output Dynamics in LLM Prompt Compression
    Warren Johnson · 2026 · arXiv.org · preprint, not peer reviewed · cited 4 times · Not summarized yet

    Compression Method Matters studies how prompt compression changes output length and total inference cost across benchmarks.

    Abstract

    Prompt compression is often evaluated by input-token reduction, but its real deployment impact depends on how compression changes output length and total inference cost. We present a controlled replication and extension study of benchmark-dependent output dynamics under aggressive compression, covering 5,400 API calls across three benchmarks and multiple providers. To explain conflicting prior observations, we formalize instruction survival probability (Psi), a structural metric that captures whether task-critical prompt segments remain after truncation. Results show a strong benchmark effect: under r=0.3, DeepSeek exhibits severe output expansion on MBPP (56x, Psi approx 0.15) but substanti…

  4. Very close Another approach to the problem
    SCOPE: A Generative Approach for LLM Prompt Compression
    Tinghui Zhang, Yifan Wang, Daisy Zhe Wang · 2025 · arXiv.org · preprint, not peer reviewed · cited 9 times · Not summarized yet

    SCOPE compresses prompts through chunk-level rewriting and summarization instead of token removal.

    Abstract

    A big issue in modern LLM applications is they tend to feed long context to LLM, which results in high inference cost and latency, and may exceed the context limit. Prompt compression addresses this issue by reducing the length of input context with minimum loss of generation quality, i.e, the goal of prompt compression is to shorten the LLM input while maintaining a high generation quality. To overcome these limitations, we propose SCOPE, a training-free generative prompt compression framework based on chunk-level rewriting. Unlike the existing token removal methods, our method centers at a chunking-and-summarization mechanism. Specifically, SCOPE splits a prompt into semantically coherent …

  5. Very close Same question
    FrugalPrompt: Reducing Contextual Overhead in Large Language Models via Token Attribution
    Syed Rifat Raiyan, M. F. Ishmam, Abdullah Al-Imran et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet

    FrugalPrompt removes low-utility prompt tokens to reduce inference overhead while preserving the prompt's semantic content.

    Abstract

    Human communication heavily relies on laconism and inferential pragmatics, allowing listeners to successfully reconstruct rich meaning from sparse, telegraphic speech. In contrast, large language models (LLMs) owe much of their stellar performance to expansive input contexts, yet such verbosity inflates monetary costs, carbon footprint, and inference-time latency. This overhead manifests from the redundant low-utility tokens present in typical prompts, as only a fraction of tokens typically carries the majority of the semantic weight. Inspired by the aforementioned cognitive psycholinguistic processes, we address this inefficiency by introducing FrugalPrompt, a novel prompt compression frame…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 3 November 2026.

The illustrated guide to the papers around a paper

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

⚠The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.