microsoft / LLMLingua

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.
https://llmlingua.com/
MIT License
4.42k stars 241 forks source link

[design] Interface Design #52

Open mydmdm opened 7 months ago

mydmdm commented 7 months ago

Purpose

Engine Interface

# Example of engine interface

Core Interface

ation in a coarse level, allocating the budget and dynamic compression ratio.

Wrapper Interface