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: Add automatic nightly benchmarks #2591

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

Conversation

Hugoch
Copy link
Member

@Hugoch Hugoch commented Sep 30, 2024

What does this PR do?

This PR adds automated load tests in CI using custom benchmarkedtool.

Tests are performed using a Constant arrival rate load test: It simulates a constant rate of user requests arrival, independent of the system’s response rate, during 120 seconds.

The test is run for using a sample of ShareGPT.

Test compute the following metrics:

  • Inter token latency: Time to generate a new output token for each user querying the system. It translates as the “speed” perceived by the end-user. We aim for at least 300 words per minute (average reading speed), so ITL<150ms
  • Time to First Token: Time the user has to wait before seeing the first token of its answer. Lower waiting time are essential for real-time interactions, less so for offline workloads.
  • End-to-end latency: The overall time the system took to generate the full response to the user.
  • Throughput: The number of tokens per second the system can generate across all requests
    Successful requests: The number of requests the system was able to honor in the benchmark timeframe
  • Error rate: The percentage of requests that ended up in error, as the system could not process them in time or failed to process them.

At the end of the test, it produces a dashboard with the results and plots.

Results are added to https://huggingface.co/spaces/huggingface/tgi-benchmarks

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Hugoch Hugoch self-assigned this Sep 30, 2024
@Hugoch Hugoch force-pushed the feat/ci-benchmarks branch 25 times, most recently from 22db246 to beb1cf1 Compare October 1, 2024 13:41
@Hugoch Hugoch marked this pull request as ready for review October 9, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant