microsoft / microsoft/LLMLingua
[design] Interface Design
Open
@SiyunZhao is already working on this.
Since Jan 12, 2024.
design
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 428
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 1
Description
Purpose
Engine Interface
# Example of engine interface
get_ppl: Includes Perplexity (PPL) and Contrastive PPL calculation, supports KV-cache.get_relevance_rank: Returns the relevance ranking between context and question.
Core Interface
coarse_level_compression_in_document: Compresses the document/demon
ation in a coarse level, allocating the budget and dynamic compression ratio.
coarse_level_compression_in_sentence: Performs coarse-level compression of sentences.iterative_token_level_compression: Compresses the prompt at the token level.subsequence_recover: Recovers based on the subsequence relationship.
Wrapper Interface
compress_prompt: Returns the compressed prompt.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.