[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>
This commit is contained in:
Keval Morabia
2026-05-29 10:37:00 -07:00
committed by GitHub
parent 4b270f0ea6
commit eb5ed2df68
9 changed files with 20 additions and 28 deletions
+4 -5
View File
@@ -9,7 +9,6 @@ on:
workflow_dispatch:
# On-demand
concurrency:
# Cancel previous runs if new commit is pushed to the same PR
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }}
@@ -43,7 +42,7 @@ jobs:
uses: ./.github/workflows/_example_tests_runner.yml
secrets: inherit
with:
docker_image: "nvcr.io/nvidia/pytorch:${{ matrix.docker_image || '26.03' }}-py3"
docker_image: "nvcr.io/nvidia/pytorch:${{ matrix.docker_image || '26.04' }}-py3"
example: ${{ matrix.example }}
timeout_minutes: 30
pip_install_extras: "[hf,dev-test]"
@@ -60,7 +59,7 @@ jobs:
uses: ./.github/workflows/_example_tests_runner.yml
secrets: inherit
with:
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12"
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc16"
example: ${{ matrix.example }}
pip_install_extras: "[hf,dev-test]"
runner: linux-amd64-gpu-rtxpro6000-latest-1
@@ -74,7 +73,7 @@ jobs:
uses: ./.github/workflows/_example_tests_runner.yml
secrets: inherit
with:
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12"
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc16"
example: ${{ matrix.example }}
pip_install_extras: "[hf,dev-test]"
runner: linux-amd64-gpu-rtxpro6000-latest-2
@@ -103,7 +102,7 @@ jobs:
uses: ./.github/workflows/_example_tests_runner.yml
secrets: inherit
with:
docker_image: "nvcr.io/nvidia/tensorrt:26.02-py3"
docker_image: "nvcr.io/nvidia/tensorrt:26.04-py3"
example: ${{ matrix.example }}
pip_install_extras: "[onnx,hf,dev-test]"
runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}
+2 -3
View File
@@ -9,7 +9,6 @@ on:
workflow_dispatch:
# On-demand
concurrency:
# Cancel previous runs if new commit is pushed to the same PR
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }}
@@ -40,13 +39,13 @@ jobs:
include:
- example: gpu
timeout: 75
container_image: pytorch:26.03-py3
container_image: pytorch:26.04-py3
- example: gpu_megatron
timeout: 45
container_image: nemo:26.04
- example: gpu_trtllm
timeout: 30
container_image: tensorrt-llm/release:1.3.0rc12
container_image: tensorrt-llm/release:1.3.0rc16
runs-on: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}
timeout-minutes: ${{ matrix.timeout }}
container:
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v6
- uses: ./.github/actions/ubuntu-setup
- name: Run basic unit tests
run: pip install nox uv && nox -s "unit-3.12(torch_211, tf_latest)"
run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)"
- name: Build Wheel
run: |
nox -s build_wheel
+8 -8
View File
@@ -18,7 +18,6 @@ on:
workflow_dispatch:
# On-demand
concurrency:
# Cancel previous runs if new commit is pushed
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -67,7 +66,7 @@ jobs:
env:
COVERAGE_PROCESS_START: ${{ github.workspace }}/pyproject.toml
COVERAGE_FILE: ${{ github.workspace }}/.coverage
run: pip install nox uv && nox -s "unit-3.12(torch_211, tf_latest)"
run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
@@ -86,7 +85,7 @@ jobs:
with:
python-version: "3.12"
- name: Run unit tests (without coverage)
run: pip install nox uv && nox -s "unit-3.12(torch_211, tf_latest)"
run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)"
multi-version:
if: needs.check-file-changes.outputs.any_changed == 'true'
needs: [linux, check-file-changes]
@@ -96,14 +95,15 @@ jobs:
fail-fast: false
matrix:
include:
- {nox_session: "unit-3.10(torch_211, tf_latest)", python_version: "3.10"}
- {nox_session: "unit-3.11(torch_211, tf_latest)", python_version: "3.11"}
- {nox_session: "unit-3.13(torch_211, tf_latest)", python_version: "3.13"}
- {nox_session: "unit-3.14(torch_211, tf_latest)", python_version: "3.14"}
- {nox_session: "unit-3.10(torch_212, tf_latest)", python_version: "3.10"}
- {nox_session: "unit-3.11(torch_212, tf_latest)", python_version: "3.11"}
- {nox_session: "unit-3.13(torch_212, tf_latest)", python_version: "3.13"}
- {nox_session: "unit-3.14(torch_212, tf_latest)", python_version: "3.14"}
- {nox_session: "unit-3.12(torch_28, tf_latest)", python_version: "3.12"}
- {nox_session: "unit-3.12(torch_29, tf_latest)", python_version: "3.12"}
- {nox_session: "unit-3.12(torch_210, tf_latest)", python_version: "3.12"}
- {nox_session: "unit-3.12(torch_211, tf_min)", python_version: "3.12"}
- {nox_session: "unit-3.12(torch_211, tf_latest)", python_version: "3.12"}
- {nox_session: "unit-3.12(torch_212, tf_min)", python_version: "3.12"}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/ubuntu-setup
+1 -2
View File
@@ -1,6 +1,5 @@
compressed-tensors<0.15.0
compressed-tensors
fire
flash-attn>=2.6.0
transformers<5.0
transformers_stream_generator
zstandard
-1
View File
@@ -1 +0,0 @@
transformers<5.0
+1 -6
View File
@@ -46,16 +46,11 @@ try:
if _Version(_transformers_version) < _Version("4.56") or _Version(
_transformers_version
) >= _Version("5.8"):
) >= _Version("5.10"):
_warnings.warn(
f"transformers {_transformers_version} is not tested with current version of modelopt and may cause issues."
" Please install recommended version with `pip install -U nvidia-modelopt[hf]` if working with HF models.",
)
elif _Version(_transformers_version) >= _Version("5.0"):
_warnings.warn(
"transformers>=5.0 support is experimental. Unified Hugging Face checkpoint export for quantized "
"checkpoints may not work for some models yet.",
)
except ImportError:
pass
+2 -1
View File
@@ -38,10 +38,11 @@ TORCH_VERSIONS = {
"torch_29": "torchvision~=0.24.0",
"torch_210": "torchvision~=0.25.0",
"torch_211": "torchvision~=0.26.0",
"torch_212": "torchvision~=0.27.0",
}
TRANSFORMERS_VERSIONS = {
"tf_latest": "transformers~=5.7.0",
"tf_latest": "transformers~=5.9.0",
"tf_min": "transformers~=4.56.0",
}
+1 -1
View File
@@ -82,7 +82,7 @@ hf = [
"peft>=0.17.0",
"sentencepiece>=0.2.1", # Also implicitly used in test_unified_export_megatron, test_vllm_fakequant_megatron_export
"tiktoken",
"transformers>=4.56,<5.8", # Should match modelopt/torch/__init__.py and noxfile.py
"transformers>=4.56,<5.10", # Should match modelopt/torch/__init__.py and noxfile.py
"wonderwords",
]