Skip to content

Commit eb5ed2d

Browse files
[CI] Bump torch, transformers and dev containers to latest (#1554)
- Transformers upper bound bumped from `<5.8` to `<5.10` - Enable torch 2.12 CICD testing - Bump TRT-LLM container to `1.3.0rc16` (transformers 5.5) - Use pytorch and tensorrt 26.04 containers in CICD <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated CI test container images and targeted Torch version across workflows; adjusted release CI job to use the newer torch config. * Broadened Transformers constraint in project metadata and test/dev pins. * Removed strict transformers pins from example requirements and lifted a compression dependency cap. * Raised the import-time Transformers version threshold for compatibility warnings. * **Tests** * Refactored a GPU test to collect and report validation errors and updated numeric expected baselines. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/Model-Optimizer/pull/1554?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
1 parent 4b270f0 commit eb5ed2d

9 files changed

Lines changed: 20 additions & 28 deletions

File tree

.github/workflows/example_tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
workflow_dispatch:
1010
# On-demand
1111

12-
1312
concurrency:
1413
# Cancel previous runs if new commit is pushed to the same PR
1514
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }}
@@ -43,7 +42,7 @@ jobs:
4342
uses: ./.github/workflows/_example_tests_runner.yml
4443
secrets: inherit
4544
with:
46-
docker_image: "nvcr.io/nvidia/pytorch:${{ matrix.docker_image || '26.03' }}-py3"
45+
docker_image: "nvcr.io/nvidia/pytorch:${{ matrix.docker_image || '26.04' }}-py3"
4746
example: ${{ matrix.example }}
4847
timeout_minutes: 30
4948
pip_install_extras: "[hf,dev-test]"
@@ -60,7 +59,7 @@ jobs:
6059
uses: ./.github/workflows/_example_tests_runner.yml
6160
secrets: inherit
6261
with:
63-
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12"
62+
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc16"
6463
example: ${{ matrix.example }}
6564
pip_install_extras: "[hf,dev-test]"
6665
runner: linux-amd64-gpu-rtxpro6000-latest-1
@@ -74,7 +73,7 @@ jobs:
7473
uses: ./.github/workflows/_example_tests_runner.yml
7574
secrets: inherit
7675
with:
77-
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12"
76+
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc16"
7877
example: ${{ matrix.example }}
7978
pip_install_extras: "[hf,dev-test]"
8079
runner: linux-amd64-gpu-rtxpro6000-latest-2
@@ -103,7 +102,7 @@ jobs:
103102
uses: ./.github/workflows/_example_tests_runner.yml
104103
secrets: inherit
105104
with:
106-
docker_image: "nvcr.io/nvidia/tensorrt:26.02-py3"
105+
docker_image: "nvcr.io/nvidia/tensorrt:26.04-py3"
107106
example: ${{ matrix.example }}
108107
pip_install_extras: "[onnx,hf,dev-test]"
109108
runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}

.github/workflows/gpu_tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
workflow_dispatch:
1010
# On-demand
1111

12-
1312
concurrency:
1413
# Cancel previous runs if new commit is pushed to the same PR
1514
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }}
@@ -40,13 +39,13 @@ jobs:
4039
include:
4140
- example: gpu
4241
timeout: 75
43-
container_image: pytorch:26.03-py3
42+
container_image: pytorch:26.04-py3
4443
- example: gpu_megatron
4544
timeout: 45
4645
container_image: nemo:26.04
4746
- example: gpu_trtllm
4847
timeout: 30
49-
container_image: tensorrt-llm/release:1.3.0rc12
48+
container_image: tensorrt-llm/release:1.3.0rc16
5049
runs-on: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}
5150
timeout-minutes: ${{ matrix.timeout }}
5251
container:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v6
1515
- uses: ./.github/actions/ubuntu-setup
1616
- name: Run basic unit tests
17-
run: pip install nox uv && nox -s "unit-3.12(torch_211, tf_latest)"
17+
run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)"
1818
- name: Build Wheel
1919
run: |
2020
nox -s build_wheel

.github/workflows/unit_tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ on:
1818
workflow_dispatch:
1919
# On-demand
2020

21-
2221
concurrency:
2322
# Cancel previous runs if new commit is pushed
2423
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -67,7 +66,7 @@ jobs:
6766
env:
6867
COVERAGE_PROCESS_START: ${{ github.workspace }}/pyproject.toml
6968
COVERAGE_FILE: ${{ github.workspace }}/.coverage
70-
run: pip install nox uv && nox -s "unit-3.12(torch_211, tf_latest)"
69+
run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)"
7170
- name: Upload coverage reports to Codecov
7271
uses: codecov/codecov-action@v5
7372
with:
@@ -86,7 +85,7 @@ jobs:
8685
with:
8786
python-version: "3.12"
8887
- name: Run unit tests (without coverage)
89-
run: pip install nox uv && nox -s "unit-3.12(torch_211, tf_latest)"
88+
run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)"
9089
multi-version:
9190
if: needs.check-file-changes.outputs.any_changed == 'true'
9291
needs: [linux, check-file-changes]
@@ -96,14 +95,15 @@ jobs:
9695
fail-fast: false
9796
matrix:
9897
include:
99-
- {nox_session: "unit-3.10(torch_211, tf_latest)", python_version: "3.10"}
100-
- {nox_session: "unit-3.11(torch_211, tf_latest)", python_version: "3.11"}
101-
- {nox_session: "unit-3.13(torch_211, tf_latest)", python_version: "3.13"}
102-
- {nox_session: "unit-3.14(torch_211, tf_latest)", python_version: "3.14"}
98+
- {nox_session: "unit-3.10(torch_212, tf_latest)", python_version: "3.10"}
99+
- {nox_session: "unit-3.11(torch_212, tf_latest)", python_version: "3.11"}
100+
- {nox_session: "unit-3.13(torch_212, tf_latest)", python_version: "3.13"}
101+
- {nox_session: "unit-3.14(torch_212, tf_latest)", python_version: "3.14"}
103102
- {nox_session: "unit-3.12(torch_28, tf_latest)", python_version: "3.12"}
104103
- {nox_session: "unit-3.12(torch_29, tf_latest)", python_version: "3.12"}
105104
- {nox_session: "unit-3.12(torch_210, tf_latest)", python_version: "3.12"}
106-
- {nox_session: "unit-3.12(torch_211, tf_min)", python_version: "3.12"}
105+
- {nox_session: "unit-3.12(torch_211, tf_latest)", python_version: "3.12"}
106+
- {nox_session: "unit-3.12(torch_212, tf_min)", python_version: "3.12"}
107107
steps:
108108
- uses: actions/checkout@v6
109109
- uses: ./.github/actions/ubuntu-setup

examples/llm_ptq/requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
compressed-tensors<0.15.0
1+
compressed-tensors
22
fire
33
flash-attn>=2.6.0
4-
transformers<5.0
54
transformers_stream_generator
65
zstandard

examples/vlm_ptq/requirements.txt

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

modelopt/torch/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,11 @@
4646

4747
if _Version(_transformers_version) < _Version("4.56") or _Version(
4848
_transformers_version
49-
) >= _Version("5.8"):
49+
) >= _Version("5.10"):
5050
_warnings.warn(
5151
f"transformers {_transformers_version} is not tested with current version of modelopt and may cause issues."
5252
" Please install recommended version with `pip install -U nvidia-modelopt[hf]` if working with HF models.",
5353
)
54-
elif _Version(_transformers_version) >= _Version("5.0"):
55-
_warnings.warn(
56-
"transformers>=5.0 support is experimental. Unified Hugging Face checkpoint export for quantized "
57-
"checkpoints may not work for some models yet.",
58-
)
5954
except ImportError:
6055
pass
6156

noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@
3838
"torch_29": "torchvision~=0.24.0",
3939
"torch_210": "torchvision~=0.25.0",
4040
"torch_211": "torchvision~=0.26.0",
41+
"torch_212": "torchvision~=0.27.0",
4142
}
4243

4344
TRANSFORMERS_VERSIONS = {
44-
"tf_latest": "transformers~=5.7.0",
45+
"tf_latest": "transformers~=5.9.0",
4546
"tf_min": "transformers~=4.56.0",
4647
}
4748

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ hf = [
8282
"peft>=0.17.0",
8383
"sentencepiece>=0.2.1", # Also implicitly used in test_unified_export_megatron, test_vllm_fakequant_megatron_export
8484
"tiktoken",
85-
"transformers>=4.56,<5.8", # Should match modelopt/torch/__init__.py and noxfile.py
85+
"transformers>=4.56,<5.10", # Should match modelopt/torch/__init__.py and noxfile.py
8686
"wonderwords",
8787
]
8888

0 commit comments

Comments
 (0)