microsoft / microsoft/LLMLingua

[design] Interface Design

Open
#52 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.