{"adoption": {"forks": 418, "observed_at": "2026-08-28T04:09:45.697865+00:00", "stars": 6609}, "canonical_url": "https://ross.abutalabs.com/products/llmlingua", "card": {"archived": false, "artifact_type": "library", "description": "[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. ", "domain": ["large-language-models", "artificial-intelligence"], "enriched": true, "function": ["llm-inference", "rag", "nlp", "machine-learning"], "health_score": 72, "homepage": "https://llmlingua.com/", "language": "Python", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["microsoft/LLMLingua"], "name": "microsoft/LLMLingua", "platform": ["python"], "pushed_at": "2026-04-08T18:59:13+00:00", "repo": "microsoft/LLMLingua", "stars": 6609, "tags": ["prompt-compression", "kv-cache", "inference-acceleration", "token-reduction", "cost-optimization", "natural-language-processing", "retrieval-augmented-generation"], "topics": [], "urls": [], "use_cases": ["compress prompts before sending to an LLM to cut token costs", "speed up LLM inference by shrinking long context windows", "reduce RAG context size without losing answer quality", "compress long documents for query-aware question answering", "lower KV cache memory usage for long-context models", "make prompts fit within a smaller context limit"], "what_it_is": "LLMLingua is a Microsoft library for prompt compression that removes non-essential tokens from prompts and KV caches to speed up LLM inference, achieving up to 20x compression with minimal performance loss. It includes variants like LongLLMLingua for query-aware long-context compression and LLMLingua-2 for faster task-agnostic compression, and integrates with LangChain, LlamaIndex, and Prompt flow.", "when_to_avoid": ["your prompts are already short and cheap", "your task is highly sensitive to dropped tokens, such as precise code generation", "you need compression without any small auxiliary model or extra compute", "you work outside the Python ecosystem"], "when_to_choose": ["you pay per token and want to cut prompt costs", "your RAG pipeline stuffs too much retrieved context into prompts", "long-context inference latency is a bottleneck", "you use LangChain or LlamaIndex and want drop-in compression"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/llmlingua", "repo": "microsoft/LLMLingua", "role": "main", "score": 53}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:09:45.697865+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-29T17:43:31.029996+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "19f01f05192d30b72b4fa28e899f6abfd270bc3f161ba948e2eb809b7cc23a08", "fetched_at": "2026-08-28T04:09:45.697865+00:00", "kind": "readme", "missing": false, "url": "https://github.com/microsoft/LLMLingua"}, {"content_hash": "5ad6a049c9bf1f052622bf16f921b110647191454b9d17c0574a43bd04377840", "fetched_at": "2026-08-29T08:39:45.937669+00:00", "kind": "homepage", "missing": false, "url": "https://llmlingua.com/"}, {"content_hash": "f044ec05f3db5db49d96e5fc16fcabd178d7f801286e48c8701348cb5591f551", "fetched_at": "2026-08-29T08:39:45.947852+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/llmlingua/json"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 76, "longevity": 82, "rhythm": 8}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 1153, "days_push": 147, "days_rel": null, "gap_med": null, "n_releases_24m": 0}, "score": 53, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}