ctxprune: context compression for AI agents
A small token classifier deletes the least useful words from tool outputs, logs, code and documents before an LLM reads them. It is a successor to Microsoft's LLMLingua-2, trained on agent text, and it never splits or re-spaces identifiers.
Try it on your own text
Runs entirely in your browser with the int8 ONNX model. The first run downloads about 180 MB from Hugging Face (cached after that); nothing you paste is sent anywhere.
What the LLM receives
Side by side with LLMLingua-2
Precomputed outputs of both models on the same inputs.
struck = deleted · red = identifier deleted or mangled (what the LLM no longer sees intact)
Real outputs of darioooooo0o/ctxprune-small (int8 ONNX) and microsoft/llmlingua-2-bert-base-multilingual-cased-meetingbank, computed offline with each library's own rate. LLMLingua-2 measures rate in its own tokens and often keeps more than asked. QA numbers: 378 held-out questions answered by an independent LLM, details on the model card. The in-browser demo runs the same int8 model in WebAssembly; its scores are as close to the exact fp32 model as the Python int8 build's are, but a few borderline words can differ from pip install ctxprune output.