Skip to content

Commit 08e1ee0

Browse files
ci: add multi-GPU transformers job mirroring legacy peft pattern
The legacy peft nightly-bnb.yml (deleted in peft#2858) ran the full transformers bnb suite on both its single- and multi-GPU jobs, so the multi-GPU-marked tests in transformers' test_4bit.py / test_mixed_int8.py actually executed on the 2-GPU runner. This commit restores that coverage. New job: test-transformers-multigpu - Runner: bandb-aws-g6-12xlarge-plus (same multi-GPU runner as peft) - CUDA_VISIBLE_DEVICES=0,1 (2 of the 4 L4s) - Filter: `-k "MultiGpu or multi_gpu"` — runs ONLY the multi-GPU-marked tests, avoiding duplication with the single-GPU transformers job. Report job's `needs:` updated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 06a9409 commit 08e1ee0

1 file changed

Lines changed: 57 additions & 1 deletion

File tree

.github/workflows/tests-integration-nightly.yml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,62 @@ jobs:
9898
path: reports/
9999
retention-days: 7
100100

101+
test-transformers-multigpu:
102+
name: Transformers bnb tests (multi GPU)
103+
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
104+
runs-on: bandb-aws-g6-12xlarge-plus-use1-public-80 # 4× L4 (2 used)
105+
steps:
106+
- name: Show GPU information
107+
run: nvidia-smi
108+
109+
- uses: actions/checkout@v4
110+
111+
- name: Setup Python
112+
uses: actions/setup-python@v5
113+
with:
114+
python-version: ${{ env.PYTHON_VERSION }}
115+
116+
- name: Install torch + bnb (from continuous-release)
117+
run: |
118+
pip install torch==${TORCH_VERSION} --index-url ${PYPI_INDEX}
119+
pip install "bitsandbytes[test] @ ${BNB_WHEEL_URL}"
120+
121+
- name: Install transformers and clone matching tag
122+
run: |
123+
pip install transformers accelerate
124+
TRANSFORMERS_VERSION=$(pip show transformers | awk '/^Version:/ {print $2}')
125+
echo "Installed transformers v${TRANSFORMERS_VERSION}"
126+
git clone --depth=1 --branch "v${TRANSFORMERS_VERSION}" \
127+
https://github.com/huggingface/transformers.git /tmp/transformers
128+
129+
- name: Show environment
130+
run: |
131+
pip list
132+
python -m torch.utils.collect_env
133+
134+
- name: Run transformers bnb tests (multi-GPU only)
135+
working-directory: /tmp/transformers
136+
env:
137+
RUN_SLOW: "1"
138+
CUDA_VISIBLE_DEVICES: "0,1"
139+
shell: bash -o pipefail {0}
140+
run: |
141+
mkdir -p ${GITHUB_WORKSPACE}/reports
142+
python -m pytest tests/quantization/bnb/ \
143+
-v \
144+
-k "MultiGpu or multi_gpu" \
145+
--junitxml=${GITHUB_WORKSPACE}/reports/transformers-multigpu.xml \
146+
-o junit_logging=all \
147+
2>&1 | tee ${GITHUB_WORKSPACE}/reports/transformers-multigpu.log
148+
149+
- name: Upload JUnit XML and log
150+
if: always()
151+
uses: actions/upload-artifact@v4
152+
with:
153+
name: reports-transformers-multigpu
154+
path: reports/
155+
retention-days: 7
156+
101157
test-accelerate:
102158
name: Accelerate bnb tests
103159
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
@@ -280,7 +336,7 @@ jobs:
280336

281337
report:
282338
name: Consolidated report
283-
needs: [test-transformers, test-accelerate, test-peft, test-peft-multigpu]
339+
needs: [test-transformers, test-transformers-multigpu, test-accelerate, test-peft, test-peft-multigpu]
284340
if: always() && github.repository == 'bitsandbytes-foundation/bitsandbytes'
285341
runs-on: ubuntu-22.04
286342
steps:

0 commit comments

Comments
 (0)