Workflow file for this run
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: Self-hosted runner (benchmark) | |
on: | |
schedule: | |
- cron: "17 2 * * *" | |
push: | |
branches: | |
- run_benchmark | |
- benchmark_on_github | |
env: | |
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} | |
HF_HOME: /mnt/cache | |
TRANSFORMERS_IS_CI: yes | |
TF_FORCE_GPU_ALLOW_GROWTH: true | |
jobs: | |
benchmark: | |
name: Benchmark | |
runs-on: [single-gpu, nvidia-gpu, a10, ci] | |
container: | |
image: huggingface/transformers-all-latest-gpu | |
options: --gpus all --privileged --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ | |
steps: | |
- name: Update clone | |
working-directory: /transformers | |
run: | | |
git fetch && git checkout ${{ github.sha }} | |
- name: Reinstall transformers in edit mode (remove the one installed during docker image build) | |
working-directory: /transformers | |
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e . | |
- name: Benchmark | |
working-directory: /transformers | |
run: | | |
echo "Hello Benchmark" | |
python3 -m pip install optimum-benchmark>=0.2.0 | |
HF_TOKEN=${{ secrets.HF_HUB_READ_TOKEN }} python3 benchmark/benchmark.py --config-dir benchmark/config --config-name generation --commit=${{ github.sha }} backend.model=google/gemma-2b backend.cache_implementation=null,static backend.torch_compile=false,true --multirun |