Skip to content

Commit 94df0e6

Browse files
remi-orMcPatate
andauthored
Benchmark overhaul (#41408)
* Big refactor, still classes to move around and script to re-complexify * Move to streamer, isolate benches, propagate num tokens * Some refacto * Added compile mode to name * Re-order * Move to dt_tokens * Better format * Fix and disable use_cache by default * Fixed compile and SDPA backend default * Refactor results format * Added default compile mode * Always use cache * Fixed cache and added flex * Plan for missing modules * Experiments: no cg and shuffle * Disable compile for FA * Remove wall time, add sweep mode, get git commit * Review compliance, start * Apply suggestions from code review Co-authored-by: Luc Georges <McPatate@users.noreply.github.com> * Update benchmark_v2/framework/benchmark_runner.py Co-authored-by: Luc Georges <McPatate@users.noreply.github.com> * Disable workflow * Pretty print * Added some pretty names to have pretty logs * Review n2 compliance (end?) * Style and end of PR --------- Co-authored-by: Luc Georges <McPatate@users.noreply.github.com>
1 parent 9e4199e commit 94df0e6

File tree

13 files changed

+1007
-1864
lines changed

13 files changed

+1007
-1864
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: Self-hosted runner (benchmark)
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
types: [ opened, labeled, reopened, synchronize ]
4+
workflow_dispatch:
85

96
concurrency:
107
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

.github/workflows/benchmark_v2.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
name: Benchmark v2 Framework
22

33
on:
4-
workflow_call:
5-
inputs:
6-
runner:
7-
description: 'GH Actions runner group to use'
8-
required: true
9-
type: string
10-
container_image:
11-
description: 'Docker image to use'
12-
required: true
13-
type: string
14-
container_options:
15-
description: 'Container options to use'
16-
required: true
17-
type: string
18-
commit_sha:
19-
description: 'Commit SHA to benchmark'
20-
required: false
21-
type: string
22-
default: ''
23-
run_id:
24-
description: 'Custom run ID for organizing results (auto-generated if not provided)'
25-
required: false
26-
type: string
27-
default: ''
28-
benchmark_repo_id:
29-
description: 'HuggingFace Dataset to upload results to (e.g., "org/benchmark-results")'
30-
required: false
31-
type: string
32-
default: ''
4+
workflow_dispatch:
335

346
env:
357
HF_HOME: /mnt/cache
@@ -82,4 +54,4 @@ jobs:
8254
--token '${{ secrets.TRANSFORMERS_CI_RESULTS_UPLOAD_TOKEN }}' \
8355
--log-level INFO
8456
env:
85-
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
57+
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Benchmark v2 Scheduled Runner - A10 Single-GPU
22

33
on:
4-
schedule:
5-
# Run daily at 16:30 UTC
6-
- cron: "30 16 * * *"
7-
pull_request:
8-
types: [ opened, labeled, reopened, synchronize ]
4+
workflow_dispatch:
95

106
jobs:
117
benchmark-v2-default:
@@ -18,4 +14,4 @@ jobs:
1814
commit_sha: ${{ github.sha }}
1915
run_id: ${{ github.run_id }}
2016
benchmark_repo_id: hf-internal-testing/transformers-daily-benchmarks
21-
secrets: inherit
17+
secrets: inherit
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Benchmark v2 Scheduled Runner - MI325 Single-GPU
22

33
on:
4-
schedule:
5-
# Run daily at 16:30 UTC
6-
- cron: "30 16 * * *"
7-
pull_request:
8-
types: [ opened, labeled, reopened, synchronize ]
4+
workflow_dispatch:
95

106
jobs:
117
benchmark-v2-default:
@@ -18,4 +14,4 @@ jobs:
1814
commit_sha: ${{ github.sha }}
1915
run_id: ${{ github.run_id }}
2016
benchmark_repo_id: hf-internal-testing/transformers-daily-benchmarks
21-
secrets: inherit
17+
secrets: inherit

benchmark_v2/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
benchmark_results/
1+
benchmark_results/
2+
benchmark_results_profiles/

benchmark_v2/benches/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

benchmark_v2/benches/llama.py

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)