Open mydmdm opened 7 months ago
# Example of engine interface
get_ppl
get_relevance_rank
coarse_level_compression_in_document
ation in a coarse level, allocating the budget and dynamic compression ratio.
coarse_level_compression_in_sentence
iterative_token_level_compression
subsequence_recover
compress_prompt
Purpose
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/demonation 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.