@atjsh/llmlingua-2
@atjsh/llmlingua-2 is a JavaScript and TypeScript implementation of LLMLingua-2, a prompt compression method originally developed in Python by Microsoft. Ported by atjsh, it compresses context prompts using BERT-sized models and is designed to run in web browsers and Node.js environments, with optional WebGPU hardware acceleration. It depends on the @huggingface/transformers and js-tiktoken libraries.
npm / PyPI packages
Open source ↗