Refactor llm perf backend handling #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update LLM Perf Benchmarks - CUDA PyTorch | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- labeled | |
- unlabeled | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
env: | |
IMAGE: ghcr.io/huggingface/optimum-benchmark:latest-cuda | |
jobs: | |
run_benchmarks: | |
if: ${{ | |
(github.event_name == 'push') || | |
(github.event_name == 'workflow_dispatch') || | |
contains( github.event.pull_request.labels.*.name, 'leaderboard')}} | |
strategy: | |
fail-fast: false | |
matrix: | |
subset: [unquantized, bnb, awq, gptq] | |
machine: | |
[ | |
{ name: 1xA10, runs-on: { group: "aws-g5-4xlarge-plus" } }, | |
{ name: 1xT4, runs-on: { group: "aws-g4dn-2xlarge" } }, | |
] | |
runs-on: ${{ matrix.machine.runs-on }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run benchmarks | |
uses: addnab/docker-run-action@v3 | |
env: | |
SUBSET: ${{ matrix.subset }} | |
MACHINE: ${{ matrix.machine.name }} | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
with: | |
image: ${{ env.IMAGE }} | |
options: | | |
--rm | |
--gpus all | |
--shm-size 64G | |
--env SUBSET | |
--env MACHINE | |
--env HF_TOKEN | |
--env MKL_THREADING_LAYER=GNU | |
--env HF_HUB_ENABLE_HF_TRANSFER=1 | |
--volume ${{ github.workspace }}:/workspace | |
--workdir /workspace | |
run: | | |
pip install packaging && pip install flash-attn einops scipy auto-gptq optimum bitsandbytes autoawq codecarbon | |
pip install -U transformers huggingface_hub[hf_transfer] | |
pip install -e . | |
python llm_perf/benchmark_runners/update_llm_perf_cuda_pytorch.py |