Repository navigation
build(deps): support Transformers 5.20 - #6490
kamran-nvidia wants to merge 6 commits into
Conversation
Widen the supported range to transformers>=5.15,<5.21 and lock 5.20.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>
Two gates from #6471 list exact Transformers releases and would break under the 5.20.0 lock: - Super VL: HF 5.20.0 still fails to load the audio-free processor natively (read-only legacy _downsample_factor, required audio feature extractor), so keep using the Bridge adapter on 5.20.0. Track the verified releases in _PROCESSOR_ADAPTER_RELEASES so the adapter tests run, rather than skip, on the locked version. - MiniMax M3: the vision RoPE output is bitwise identical to 5.19.0 in FP32/BF16/FP16, so 5.20.0 follows the native buffer-rounding contract in the unit test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>
Transformers 5.18.0 ships the same native nemotron_h_omni code as 5.19.0 (byte-identical module; nemotron_h only adds MoE router_logits outputs), and plain AutoProcessor fails there in the same way. Lower the native Super VL floor from 5.19.0 to 5.18.0 and add 5.18.0 to the processor adapter releases. Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>
Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>
|
/ok to test 76d7af6 |
|
Automatic Claude reviews have been retired. To request a pull-request review, post a comment containing: Add |
Transformers is now locked to 5.20.0, which ships transformers.models.muse_spark. Drop the find_spec skip guard so a missing module fails the L0 job instead of passing with every test skipped. Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>
|
/ok to test 449f7b4 |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
No verified findings in this light review. The dependency range and lockfile agree, the Super VL compatibility gates consistently include 5.18–5.20, and the updated tests retain audio-config preservation and processor round-trip checks.
Static review only; tests were not executed.
Suggested test cases
test_native_processor_load_save_reload— both trust settings on Transformers 5.18.0, 5.19.0, and 5.20.0.test_native_audio_config_is_not_discarded— all three release parameters.test_hf_vision_rope_dtype_conversion_matches_version_contract— BF16 and FP16.test_muse_spark_conversion_roundtrip—tp2,pp2, andep2.test_text_only_export_class_matches_full_model_logits— direct and exported auto-map reload logits.- No perf tests impacted.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex
…ormers 5.20 Transformers 5.20 no longer exposes partial_rotary_factor as a config attribute; it lives only in rope_parameters. This broke GLM-4.5V conversion with an AttributeError, and made the generic HF config mapping silently fall back to full rotary for partial-rotary models (GLM-4.5, GLM-4.7-Flash, Qwen3-Next, MiMo-V2-Flash, Bailing). The vendored Bailing attention also fell back to full rotary. Add partial_rotary_factor_from_hf, which reads the attribute or rope_parameters, and use it in the generic mapping, the GLM-4.5V bridge and the Bailing attention. Regression tests use real HF config classes instead of mocks. Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>
|
/ok to test e9e58a6 |
What
>=5.15,<5.21and lock Transformers 5.20.0. The lock was regenerated with uv 0.7.2 (theDockerfile.civersion), so it stays at lockfile revision 2._downsample_factorfield is read-only, and an audio feature extractor is required. Keep using the Bridge processor adapter on 5.20.0. The verified releases now live in_PROCESSOR_ADAPTER_RELEASES, so the adapter's real-load tests run on the locked version instead of skipping.test_hf_vision_rope_dtype_conversion_matches_version_contractfails on 5.20.0.nemotron_h_omnicode as 5.19.0 (the module is byte-identical), and plainAutoProcessorfails there in the same way. The native floor drops from 5.19.0 to 5.18.0, and the adapter covers 5.18.0 through 5.20.0. The only HFnemotron_hchange between 5.18.0 and 5.19.0 adds MoErouter_logitsoutputs, which Bridge does not read.partial_rotary_factorfromrope_parameterson Transformers 5.20.0, which no longer exposes it as a config attribute (details under the compatibility review). The newpartial_rotary_factor_from_hfhelper inmodels/conversion/transformers_compat.pysits next to the existingrope_theta_from_hf. It reads the attribute on older releases andrope_parameters["partial_rotary_factor"]on 5.20.0. The generic HF-to-Megatron config mapping and the GLM-4.5V bridge use it. The vendored Bailing MoE V2 attention gets the same fallback inline, because that file has to stay standalone.find_spec("transformers.models.muse_spark")skip guard from the Muse Spark Open conversion test. 5.20.0 ships the module, so a broken Muse Spark setup now fails CI instead of skipping silently.Lockfile delta
No other package moved. The locked tokenizers 0.23.3 and huggingface-hub 1.33.0 satisfy Transformers 5.20.0's requirements (
tokenizers>=0.23.1,<0.24.0,huggingface-hub>=1.31.0,<3.0).Compatibility review (5.19.0 to 5.20.0)
transformersimports insrc/,tests/,examples/andscripts/resolve on 5.20.0 wherever they resolve on 5.19.0. 5.20.0 additionally providestransformers.models.muse_spark.Cachemethods (get_max_cache_shape,max_cache_len,max_batch_size), the GLUE/SQuAD data helpers,DataCollatorForWholeWordMask/DataCollatorForSOP, and somemodeling_utils/masking_utilsinternals.partial_rotary_factor. 5.20.0 drops thepartial_rotary_factorattribute from nearly every HF config class that had one, and from Bridge's vendoredBailingMoeV2Config. The value now lives only inconfig.rope_parameters["partial_rotary_factor"].L1_Launch_models_glm_vlfailed on H100 and GB200 withAttributeError: 'Glm4vMoeTextConfig' object has no attribute 'partial_rotary_factor'.hasattr(hf_config, "partial_rotary_factor"), which is false on 5.20.0. As a result, GLM-4.5, GLM-4.7-Flash, Qwen3-Next, MiMo-V2-Flash and Bailing fell back to full rotary (rotary_percent=1.0), and so did the vendored Bailing attention.rope_scalingis unchanged, andrope_thetaalready lived only inrope_parameterson 5.19.0, whererope_theta_from_hfhandles it.Validation
These are CPU-only results on macOS, with GPU-only packages stubbed. Both runs used full
megatron.bridgeimports against the pinned MCore, the same code, and Transformers 5.19.0 and 5.20.0 respectively. Tests covered:tests/unit_tests/models/nemotron_omni,tests/unit_tests/models/minimax_m3,tests/unit_tests/models/muse_spark_open, andtests/unit_tests/utils/test_tokenizers_compat.py.The two environment-only failures are identical on both versions:
librosais not installed, and CUDA is unavailable. Before the gate fix, the MiniMax test failed on 5.20.0, and the Super VL adapter tests would have been skipped there.After the 5.18.0 change,
tests/unit_tests/models/nemotron_omniandtests/unit_tests/models/minimax_m3give identical results on 5.18.0, 5.19.0 and 5.20.0: 227 passed, 10 skipped, and the same two environment-only failures. This includes the adapter's real-load tests on each version.After merging
main, which brings in #6492 and the MCore bump from #6484, the same set gives 250 passed and 10 skipped on 5.20.0, with the same two environment-only failures.A standalone processor check used the synthetic Super VL processor files from
test_native_processor.py. PlainAutoProcessorfails identically on 5.18.0, 5.19.0 and 5.20.0. The adapter loads the processor, handles image and video inputs, and saves and reloads with bitwise-identical outputs on all three versions.For the
partial_rotary_factorfix, the new regression tests build real HF config classes instead of mocks:Qwen2Config, through the generic mapping;Glm4MoeConfig(GLM-4.5);Glm4vMoeTextConfig(GLM-4.5V);On 5.20.0 none of these configs has a
partial_rotary_factorattribute, so all four tests would fail against the old code. The suite below gives 202 passed and 10 skipped on each of 5.18.0, 5.19.0 and 5.20.0:tests/unit_tests/models/test_model_bridge.pytests/unit_tests/models/glmtests/unit_tests/models/glm_vltests/unit_tests/models/bailingtests/unit_tests/models/mimo_v2_flashtests/unit_tests/models/qwen/test_qwen3_next_bridge.pyuv lock --checkandpre-commit run --all-filespass.CI
The run on 449f7b4 (38829381289) had 134 passing jobs. Its only failures were
L1_Launch_models_glm_vlon H100 and GB200, caused by thepartial_rotary_factorchange above. e9e58a6 fixes it, and CI was re-triggered on that commit, superseding the earlier run before its last jobs finished.Muse Spark Open
5.20.0 ships
transformers.models.muse_spark. The text-only export fix for 5.20.0 landed separately in #6492, and this branch picks it up through the merge ofmain. With the skip guard removed, all four Muse Spark Open conversion tests run: the TP2, PP2 and EP2 round-trips and the text-only export logits check.In the run on 449f7b4,
L0_Launch_models_muse_spark_openreported 4 passed and 0 skipped on both H100 and GB200. Muse Spark Open has no L1 or L2 launchers. The 51 Muse Spark unit tests that CI collects also pass locally on 5.20.0, with none skipped.Test plan
full-test-suitelabel also runs L1)full-test-suiteapplied)Quarantined tests (this bump)
None. The GLM-VL L1 failure was a real 5.20.0 regression, so it is fixed in this PR rather than quarantined.