Skip to content

Use hf-perftest cli for benchmarking#13226

Closed
freddyaboulton wants to merge 1 commit intomainfrom
use-hf-perftest
Closed

Use hf-perftest cli for benchmarking#13226
freddyaboulton wants to merge 1 commit intomainfrom
use-hf-perftest

Conversation

@freddyaboulton
Copy link
Copy Markdown
Collaborator

@freddyaboulton freddyaboulton commented Apr 8, 2026

Description

Moves the benchmarking code to a stand-alone CLI library. Ships with a skill so that you can have your agent launch perf tests.

Example transcript:

 ▐▛███▜▌   Claude Code v2.1.96
▝▜█████▛▘  Opus 4.6 (1M context) · Claude Max
  ▘▘ ▝▝    ~/sources/benchmark-gpu-demos

❯ /clear                                                                        
  ⎿  (no content)

! pwd                                                                           
  ⎿  /Users/freddyboulton/sources/benchmark-gpu-demos

❯ Can you please benchmark the image_to_image demo on cpu-upgrade on the 100    
  concurrent user tier with mixed-traffic? Set the concurrency limit to 10 and  
  do 10 rounds of requests per user                                             

⏺ Skill(hf-perftest)
  ⎿  Successfully loaded skill · 1 tool allowed

⏺ Bash(pip show hf-perftest 2>/dev/null | head -2)
  ⎿  (No output)

⏺ Bash(hf-perftest run-remote run \
          --apps image_to_image \…)
  ⎿  [main] Resolving to commit SHA...
     [main]   -> 45c4ecd25fc8
     [main] Looking up wheel...
     … +10 lines (ctrl+o to expand)

⏺ The benchmark job has been submitted. Here are the details:

  - Job ID: 69d6bb904adb81dd2de75b86
  - URL: https://huggingface.co/jobs/gradio/69d6bb904adb81dd2de75b86
  - Results will be at:
  hf://buckets/gradio/backend-benchmarks/bench_20260408_163319/main/

  Configuration:
  - App: image_to_image
  - Hardware: cpu-upgrade
  - Tier: 100 concurrent users
  - Requests per user: 10
  - Concurrency limit: 10
  - Mixed traffic: enabled

  You can monitor the job with:
  hf jobs logs 69d6bb904adb81dd2de75b86

AI Disclosure

We encourage the use of AI tooling in creating PRs, but the any non-trivial use of AI needs be disclosed. E.g. if you used Claude to write a first draft, you should mention that. Trivial tab-completion doesn't need to be disclosed. You should self-review all PRs, especially if they were generated with AI.

  • I used AI to... [fill here]
  • I did not use AI

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Testing and Formatting Your Code

  1. PRs will only be merged if tests pass on CI. We recommend at least running the backend tests locally, please set up your Gradio environment locally and run the backed tests: bash scripts/run_backend_tests.sh

  2. Please run these bash scripts to automatically format your code: bash scripts/format_backend.sh, and (if you made any changes to non-Python files) bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Copy Markdown
Collaborator

gradio-pr-bot commented Apr 8, 2026

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://huggingface.co/buckets/gradio/pypi-previews/resolve/d44a3deec32d76e7f4713342a3a4ff3a8a3d7415/gradio-6.11.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@d44a3deec32d76e7f4713342a3a4ff3a8a3d7415#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/d44a3deec32d76e7f4713342a3a4ff3a8a3d7415/gradio-client-2.1.0.tgz

@gradio-pr-bot
Copy link
Copy Markdown
Collaborator

gradio-pr-bot commented Apr 8, 2026

🦄 change detected

This Pull Request includes changes to the following packages.

__No changes detected. __


  • Use hf-perftest cli for benchmarking

✅ Changeset approved by @freddyaboulton

  • Maintainers can remove approval by unchecking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

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.

2 participants