IN THIS BREAKDOWN · 10 SECTIONS
You can read 22% of this breakdown.
The paper in one minute
Prompts keep getting longer: retrieved documents, meeting transcripts, many examples. Prompt compression removes words a model does not need, saving cost and latency. Earlier methods such as LLMLingua and Selective-Context ranked tokens by information entropy, computed by a small causal model like LLaMA-2-7B: surprising tokens stay, predictable ones go. Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang and colleagues at Tsinghua and Microsoft argue this is the wrong signal. Entropy is not the same as importance for an LLM, and a causal model sees only the words before each token.
LLMLingua-2 learns compression instead. First, data distillation: GPT-4 compresses MeetingBank transcripts under strict rules, remove unimportant words only; do not reorder, change, abbreviate or add words. Long transcripts are cut into chunks of up to 512 tokens first. Second, annotation: an algorithm aligns the compressed text with the original, with fuzzy matching and a bidirectional search to cope with GPT-4's slips, and labels every original word preserve or discard. Third, quality control: examples where GPT-4 introduced new words (high variation rate) or where the labels poorly reproduce GPT-4's compression (alignment gap) are filtered out.
The compressor is a token classifier on a bidirectional encoder, XLM-RoBERTa-large, or multilingual BERT for a smaller version. At run time it scores every word's probability of being kept, in one pass, and keeps the top fraction for the target ratio, in original order. It never generates text, so it cannot hallucinate, and it does not see the question, so one compressed version serves any downstream task.
With GPT-3.5-Turbo as the target model, LLMLingua-2 nearly matched the full prompt on MeetingBank questions at about 3x compression, beat entropy-based compressors on out-of-domain benchmarks (LongBench, ZeroSCROLLS, GSM8K, BBH), and transferred to Mistral-7B. It ran 3 to 6 times faster than earlier compressors, cut end-to-end latency 1.6 to 2.9 times, and used 2.1 GB of GPU memory against 16.6 GB for LLMLingua.
Research notes: the problem, approach and results
MeetingBank QA exact match with GPT-3.5, LLMLingua-2 at 3.1x compression against the full 3,003-token prompt
compressor time on MeetingBank on a V100, against 1.5-2.9 s for LLMLingua and about 15.5 s for Selective-Context
LongBench average at about 5x: LLMLingua-2 against the question-aware LongLLMLingua; the uncompressed prompt scored 44.0
Long prompts are slow and expensive, and earlier compressors dropped tokens by information entropy from a small causal model, which reads only leftward context and does not target what an LLM actually needs. Task-aware methods must recompress for every question.
Distill compression from GPT-4: have it shorten meeting transcripts by deleting words only, label each original word keep or discard, filter bad examples, and train a bidirectional encoder (XLM-RoBERTa-large) as a token classifier. Compress by keeping the highest-probability words.
On MeetingBank QA it kept 86.92 exact match against 87.75 for the full prompt at about 3x compression. Out of domain it beat entropy-based compressors but trailed question-aware LongLLMLingua. It compressed 3-6x faster and cut end-to-end latency 1.6-2.9x.
Why it matters to an FDE
Prompt compression is one of the few levers that cuts both cost and latency without changing the model, and customers with long-context workloads (meeting notes, call transcripts, long retrieved passages) ask for it.
Extractive compression is safe in one way. The output contains only words from the input, in order. There is no paraphrase to hallucinate, which matters for regulated content and for traceability.
It is fast enough for the hot path. Half a second on a V100 for a meeting transcript, with a model that fits in about 2 GB, is cheap compared with the LLM call it shortens.
Task-agnostic has a price. Without the question, the compressor keeps what is generally important. On LongBench, question-aware LongLLMLingua scored 48.0 against 39.1, and the uncompressed prompt 44.0. If you know the question at compression time, use it.
Test on the customer's content. The compressor was trained on meeting transcripts only. It generalized reasonably, but tasks needing exact strings, codes or counts suffered: on LongBench's synthetic tasks it scored 21.3 against 37.8 uncompressed.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 99 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The distillation pipeline, the classifier, the results by benchmark, and misreadings to avoid
Free account - 04How it works
Distillation, annotation, quality filtering, the classifier and the compression procedure
Premium - 05The numbers that matter
In-domain and out-of-domain results, speed, memory, and what the comparisons can carry
Premium - 06Try it yourself
Train a tiny keep-or-drop classifier from teacher labels and compare it with entropy-based dropping
Premium - 07Where it breaks
Limits of task-agnostic, extractive compression
Premium - 08Using it on a deployment
Adding prompt compression to a customer pipeline and measuring its effect
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
