Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cascade feature #110

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Char15Xu
Copy link
Collaborator

@Char15Xu Char15Xu commented Dec 2, 2024

What this PR does / why we need it:

This PR introduces the cascade functionality to Libem, enabling the system to dynamically adjust model usage based on confidence scores. This aims to optimize cost and throughput while maintaining the accuracy of GPT-4o.

Key changes include:

  • vectorize, prematch, and match under Libem/cascade.
    • Add reset functionality to clear the client before prematch and match stages.
  • Under Libem/examples/cascade:
    • util.py: Contains benchmark and plot functions to measure cost and accuracy.
    • online.py: Provides a working example of the cascade functionality.
    • bench.py: Performs benchmarking and generates graphs to visualize cost and accuracy.

Which issue(s) this PR addresses (if any):

Addresses # NA

Special notes for your reviewer:

I am only adding the reset as part of the cascade since it is the most reasonable place I can think of for now. Would love to improve on this later if there is a better place to do reset.

Does this PR introduce a user-facing change?

NONE

@Char15Xu Char15Xu changed the title Adding cascade feature feat: cascade feature Dec 2, 2024
@zenodflow zenodflow added the feat label Dec 3, 2024
@zenodflow
Copy link
Contributor

Nice. Will review this coming week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants