#16 · Primary category: Prompt Engineering Tools

LLMLingua

[EMNLP'23, ACL'24] To speed up LLMs' inference and enhance LLM's perceive of key information, compress the prompt and KV-Cache, which achieves up to 20x compression with minimal performance loss.

Project last updated:04/08/26

GitHub Stars

6.6K

Forks

419

Contributors

17

License

MIT

Why we included this project

LLMLingua attacks a cost problem most LLM apps eventually hit: long documents and large retrieved contexts that make every API call slower and pricier. It compresses the prompt before the model sees it, cutting redundant tokens while trying to keep the facts that matter, with compression ratios reported up to 20x at minimal quality loss. You don't run it as a separate service; it drops into an existing pipeline through ready-made integrations for LangChain, LlamaIndex, and Prompt flow, and it can also compress the KV cache during inference. The project comes out of Microsoft Research with papers at EMNLP 2023 and ACL 2024, a good sign if you want to understand how the compression works before trusting it. For teams paying per token or fighting context-window limits, it's worth testing against your own workloads before reworking anything else in your stack.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category