Repository navigation
[OMNIML-6060] [3/3] Refuse an expert-parallel load that would calibrate the experts wrong - #2741
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
7f91f94 to
963e78a
Compare
758dca6 to
5c154cc
Compare
|
|
/ok to test 5c154cc |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2741 +/- ##
==========================================
+ Coverage 72.18% 80.32% +8.14%
==========================================
Files 677 677
Lines 78443 78466 +23
==========================================
+ Hits 56621 63030 +6409
+ Misses 21822 15436 -6386
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5c154cc to
e1ef1d1
Compare
|
/ok to test e1ef1d1 |
e1ef1d1 to
fbdcd0c
Compare
c3ccb86 to
96159d7
Compare
fbdcd0c to
288db20
Compare
|
/ok to test 288db20 |
288db20 to
ac84840
Compare
96159d7 to
540716e
Compare
|
/ok to test ac84840 |
ac84840 to
95781ac
Compare
177c692 to
6e21d0a
Compare
|
/ok to test b42e86c |
|
/ok to test caf9b01 |
|
/ok to test 9f7e896 |
|
/ok to test 5b3b34b |
|
/ok to test be0727e |
|
/ok to test e497337 |
|
/ok to test a098c4b |
|
/ok to test 740ba93 |
|
/ok to test 6e098d5 |
|
/ok to test 0b56bf9 |
cjluo-nv
left a comment
There was a problem hiding this comment.
Bot review (bedrock-claude-opus-5-5) — DM the bot to share feedback.
LGTM: every earlier concern is resolved and the five post-load refusals are correct and tested. A human needs to sign off only because an existing test was edited, and the diff justifies that edit.
Needs action:
- Sign off on the edit to
test_a_load_failing_on_one_rank_fails_every_rankintests/unit/torch/utils/test_model_load_utils.py.num_expertsgoes from 4 to 8 because the stand-in model holds 4 experts per rank atep_size=2, and the new share check needs the whole count. The edit also adds asharerow and updates the docstring. No assertion is loosened. - Optional: add the clause you promised to the
_transposed_expertsdocstring inquantization/plugins/huggingface.py. For a non-gated container onlyis_transposedis read, so its own wrapper must assert the layout.
No action needed:
- ✔️ Resolved since the last review: the split into #3131, #3136 and this PR; the one-rank hang (the checks now run inside #3136's
_refused_togetherload block and have asharetest row); the module-top imports that bypassedimport_plugin(moved back into the functions and covered by a regression test); and reading a one-shot iterable twice (now atuple). - I read
load_and_prepare_epin full at this head.num_experts,ep_degree,planandDTensorare all in scope. The_transposed_expertsand_eager_only_expertsextractions keep behaviour unchanged at both call sites, since thewrapper is not Noneguard is kept. - The PR adds about 149 lines of core logic, well under the budget.
kevalmorabia97
left a comment
There was a problem hiding this comment.
LGTM. Prior review items are addressed; unit tests pass and mutating the new checks fails their tests. Optional: add the promised _transposed_experts docstring clause (non-gated containers read only is_transposed).
kevalmorabia97
left a comment
There was a problem hiding this comment.
One required doc fix; no code issues found.
Required
modelopt/torch/quantization/plugins/huggingface.py:1699: add the_transposed_expertsdocstring clause you promised in the earlier thread, that for a non-gated container onlyis_transposedis read.
|
/ok to test c0059c5 |
|
@kevalmorabia97 Added in c0059c5. The |
kevalmorabia97
left a comment
There was a problem hiding this comment.
LGTM. The _transposed_experts docstring clause is in; no other changes since my last review.
|
/ok to test 01b7fcf |
|
/ok to test df567f8 |
Quantization decides in two places which fused experts it cannot run on the grouped forward: experts stored transposed, which it leaves unquantized, and experts whose wrapper quantizes on the eager forward only, which keep the forced eager backend. Each rule is now one helper, _transposed_experts and _eager_only_experts, which register_fused_experts_on_the_fly and normalize_experts_impl_on_the_fly use, so the expert-parallel load can refuse exactly what quantization would get wrong. The eager-only rule is the registry lookup alone: the on-the-fly registration only adds the generic wrapper, which is not eager-only. No behaviour changes. Signed-off-by: Shengliang Xu <[email protected]>
Once the experts load, every rank checks what calibration relies on and refuses a load that would run without an error but compute or calibrate wrong: - a plan whose expert containers match no module of the loaded model; - containers calibration would not take for routed experts by name; - a count neither the config nor the experts' weights show divisible by ep_size; - a rank holding another share of the experts than ep_size gives it; - experts quantization cannot run on the transport's grouped forward: stored transposed, or under a wrapper of their own or an eager-only one. The checks run inside the load's _refused_together block, so a rank refusing alone fails every rank; the share check no longer needs its own all_reduce. The quantization rules and _is_routed_expert are imported at the top of the module. A two-rank test row has rank 1 alone hold half its share: every rank raises its refusal, which fails without the block. Signed-off-by: Shengliang Xu <[email protected]>
The HF quantization plugin loads under import_plugin's guard, so a transformers it cannot load is a warning and the other loaders keep working. Importing it at the top of model_load_utils made that a hard failure for load_pretrained, fsdp2_wrap and record_unplaced_source_keys, none of which need it. The plugin's two rules are imported inside _refuse_unquantizable_experts again, and _is_routed_expert next to the check that uses it, as fsdp2_wrap imports the quantization package where it needs it. A test imports the module with the plugin unavailable; it fails with the imports at the top. Signed-off-by: Shengliang Xu <[email protected]>
entry under it before anything loads, so this test's container-only plan no longer reached the refusal it checks. Its plan now shards the container's gate_up_proj through grouped_gemm, as a real plan does. Signed-off-by: Shengliang Xu <[email protected]>
…compares The unquantizable-experts refusal reads its experts twice, once per rule, so it takes them as a tuple: a one-shot iterable would let the second rule pass on nothing. The share check's comment says it compares counts, catching a wrong share rather than a same-size mesh, and its test row is named for the mesh of another size it builds. Signed-off-by: Shengliang Xu <[email protected]>
…ble experts It refuses them, and leaves the quant-wrapper registry alone, rather than keeping them out of ModelOpt's per-expert wrappers. Signed-off-by: Shengliang Xu <[email protected]>
record_unplaced_source_keys returns a sorted list, which a later check iterates; these tests' stand-ins returned None. Signed-off-by: Shengliang Xu <[email protected]>
_transposed_experts finds a transposed gated container by its shapes, but a non-gated one (up_proj, as Nemotron-H's) matches no _fused_experts_wrapper, so only its is_transposed flag is read and its own wrapper is responsible for the layout. The docstring now says so, as promised in review. Docstring only. Signed-off-by: Shengliang Xu <[email protected]>
With #2780 in main, load_and_prepare_ep looks up the model spec by hf_config.model_type before it loads. The stand-in configs of test_routed_experts_without_experts_in_their_names_are_refused and of test_an_expert_count_the_config_does_not_name_is_read_off_the_loaded_experts named none, so all 7 cases raised AttributeError instead of reaching the refusals they test. They now name _NO_SPEC, as main's other load test doubles do. Test only. Signed-off-by: Shengliang Xu <[email protected]>
With #3137 in main, load_and_prepare_ep passes tensor_files= to record_unplaced_source_keys. The stand-ins of test_routed_experts_without_experts_in_their_names_are_refused and of test_an_expert_count_the_config_does_not_name_is_read_off_the_loaded_experts took positional arguments only, so all 7 cases raised TypeError instead of reaching the refusals they test. They take keywords too now, as main's other stand-ins do. Test only. Signed-off-by: Shengliang Xu <[email protected]>
|
/ok to test 01f034c |
Note
[3/3], split on review (2026-10-30): this PR grew past the 500-line budget, so it is now three PRs, merged in order. #3131 [1/3] holds the loader's helpers, #3136 [2/3] the expert-parallel loader, and this PR, [3/3], the checks it runs once the experts load. #3131 and #3136 have merged. The review history of the whole loader stays here.
Base:
main, where #3136 and #2780 have merged (2026-11-03). The diff below is this PR's alone. #2780 merged before this PR after all, so this PR now carries the test fixes the two need together.Series layout
main([OMNIML-6060] [1/3] Add require_transformers, and build a VLM without its LM head #3131 [1/3], [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 [2/3] and [OMNIML-6060] Load an expert-parallel plan through load_pretrained, and apply the model spec when deciding and loading it #2780 have merged)What does this PR do?
Type of change: New feature
Once the experts load, every rank checks what calibration relies on. It refuses a load that would run without an error but compute or calibrate wrong:
No match: a plan whose expert containers match no module of the loaded model, which would seed no expert state;
Not named as experts: containers calibration would not take for routed experts by name (
model_calib._is_routed_expert). Their weight scales would be merged over ranks holding different experts;Count: a count neither the config nor the experts' weights show divisible by
ep_size. transformers keeps the whole count on the DTensors it shards the experts into, from 5.16;Share: a rank holding another share of the experts than
ep_sizegives it, so the all-to-all transport would send tokens to ranks without their experts. That happens to experts left whole on every rank, or sharded over another mesh (a mesh-builder patch that stopped applying); weights that show no share at all are refused too;Not quantizable on the transport: experts the grouped quantization cannot run on the transport's forward, under any of three conditions:
ModelOpt's generic fused-experts wrapper is no bar.
The checks run inside #3136's
_refused_togetherblock around the load, so a rank refusing alone fails every rank, and the share check needs no collective of its own.The transposed and eager-only rules are quantization's own. They become one helper each in the HF quantization plugin (
_transposed_experts,_eager_only_experts), whichregister_fused_experts_on_the_flyandnormalize_experts_impl_on_the_flynow use too, so the load and quantization cannot drift apart. The eager-only rule is the registry lookup alone (#3067): the on-the-fly registration adds only the generic wrapper.Usage
Automatic:
load_and_prepare_ep(#3136) runs these checks after every load.Testing
tests/unit/torch/utils/test_ep_loader.py(CPU):expertsin their names;ep_sizedivides, and one it does not;New:
test_a_load_failing_on_one_rank_fails_every_rankgains a row where rank 1 alone holds half its share. Every rank raises rank 1's refusal; with the load's guard made rank-local, the row fails.Mutation-checked when first written: each refusal fails without its check.
From before the split, on GPUs: [OMNIML-6061] Load the dense part sharded, and size the load warmup to each rank #2742's quantized expert-parallel training test, before this PR accepted the generic wrapper and with it:
History of the checks before the split:
_eager_only_expertswas factored out of the backend normalization.2026-10-30, the split:
all_reducewent away._eager_only_experts,_transposed_expertsand_is_routed_expertare imported at module top. There is no import cycle: importingmodel_load_utilsalready loads the quantization package, which never imports it back. Checked in both orders.tests/unit/torch/utils,test_fused_experts.pyand the Nemotron-H tests pass on transformers 5.18 (880 passed) and on 5.5.4 (854 passed, 26 version-gated skips).Review fix, 2026-10-30 (Claude): the quantization plugin's rules and
_is_routed_expertare imported inside the functions that use them again. Imported at the module top, a transformers the HF plugin cannot load mademodel_load_utilsunimportable, where the plugin's guarded import only warns.test_the_loaders_import_without_the_hf_quantization_pluginfails with the imports at the top. Pre-commit, mypy included, passes against main. The loader, fused-experts, Nemotron-H andtest_model_load_utils.pytests pass on CPU at this head, on transformers 5.18 and 5.5.4.Rebased 2026-10-30 onto [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136's review round, which now refuses before the load a plan whose routed-expert container has no
grouped_gemmentry under it. The unnamed-container test's plan now shards itsgate_up_projthroughgrouped_gemm, as a real plan does, so it reaches the refusal it checks. Pre-commit, mypy included, passes against main. This PR's tests, withtest_model_load_utils.py, pass on CPU on transformers 5.18 and 5.5.4.Rebased 2026-10-30 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 onto main 99c3834; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, and
tests/unit/torch/utilspasses on CPU at this head, on transformers 5.18 and 5.5.4.Review fixes, 2026-10-30, round 2: the refusal of a plan matching no module moved down to [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136, which needs it on its own. The unquantizable-experts refusal takes its experts as a tuple, so a one-shot iterable cannot skip its second rule;
test_routed_experts_with_a_quant_wrapper_of_their_own_are_refusedpasses one and fails without the fix. The share check's comment says it compares counts, and its test row is named for the mesh of another size it builds. The two refusal tests' unplaced-keys stand-ins return a list, as the function does. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18 and 5.5.4.Rebased 2026-10-30 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 onto the rebuilt
shengliangx/hfep-base-6a-ep-loader, which after [OMNIML-6060] [1/3] Add require_transformers, and build a VLM without its LM head #3131 merged holds [OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 (on [OMNIML-6054] [1/2] Move fsdp2_wrap out of distributed.py into fsdp2_utils #3140, which movesfsdp2_wrapintomodelopt/torch/utils/fsdp2_utils.py), [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 on main 62a5c48. This PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-30 onto [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 e251f6c (meenchen's review round). The bounded two-rank test's docstring now names [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136's new
no-gpurow beside this PR'ssharerow; this PR's own diff is otherwise unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-30 onto [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 1491b66 (its MXFP4 refusal and review fixes); this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, and
tests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-30 onto [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 ad9559d (meenchen's review, round 3). [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136's tests now build their model with the shared
model_with_decoder_at, so this PR's quant-wrapper and transposed-experts tests keep a small_Experts/_SharedExpertspair of their own, which the quantization registry and the refusal messages go by, and pass the experts directly rather than through a model. This PR's own diff is otherwise unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-30 onto main 059588b with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 eb6c382, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 3b814a6, [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 fbff3f3 and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 186efae. [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 now also refuses a rank not yet bound to its GPU. This PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4. The GPU tests have not run on this head.Rebased 2026-10-30 onto [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 56353ef, whose new commits change only tests and one comment; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, and
tests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-30 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 ab06860 onto main d464d30, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 8f9d877, [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 d452768 and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 9a87d15; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-31 onto [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 7747c5d, which moves
test_ep_loader.py's cases intotest_model_load_utils.pyand theexpert_parallel_meshones intotest_moe_a2a.py. This PR's test edits moved with those cases, unchanged, and its source diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilscollects and passes the same cases as before on CPU, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-10-31 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 930bb0f onto main e352cac, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 c78d2e5, [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 adb9757 and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 dea9b79; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-11-01 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 4dd38a3 onto main cf38ec3, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 c42cb61, [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 cb83366 and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 ff372fb; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-11-01 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 35f1ac0 onto main 51645db, where [OMNIML-6054] [1/2] Move fsdp2_wrap out of distributed.py into fsdp2_utils #3140 merged, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 1aee07f, [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 495f0be and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 6a06a54; this PR's own diff is unchanged. The tree is identical to the previous head, as [OMNIML-6054] [1/2] Move fsdp2_wrap out of distributed.py into fsdp2_utils #3140 merged as its own content. Pre-commit, mypy included, passes against main.Rebased 2026-11-02 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 39f55f2 onto main 2d4e8d0, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 e6e422d and [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 5829a85 ([OMNIML-6054] [2/2] Route load_pretrained by the distribution plan #2779 is now part of main); this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-11-02 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 c0041d0 onto main 4f08a12, on
shengliangx/hfep-base-6a-ep-loaderrebuilt there from [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 5829a85 ([OMNIML-6073] Quantize Nemotron-H's experts under grouped_mm, with their wrapper in its model folder #3067 is now part of main); this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-11-02 with [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 d87f5bd onto main 653ef61, where [OMNIML-6071] Calibrate a distributed model on per-rank data #2740 merged; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main, and
tests/unit/torch/utilspasses on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4.Rebased 2026-11-03 onto main a6cc167, where [OMNIML-6060] [2/3] Load an MoE expert-parallel: shard the experts at load time #3136 merged; this PR's own diff is unchanged. Pre-commit, mypy included, passes against main.
Review fix, 2026-11-03 (kevalmorabia97's review): the
_transposed_expertsdocstring says that a non-gated container (up_proj, as Nemotron-H's) matches no_fused_experts_wrapper, so only itsis_transposedis read, and its own wrapper is responsible for the layout (c0059c5). Docstring only. Pre-commit, mypy included, passes against main.Rebased 2026-11-03 onto main 7d44246, where [OMNIML-6060] Load an expert-parallel plan through load_pretrained, and apply the model spec when deciding and loading it #2780 merged. This PR's tests and [OMNIML-6060] Load an expert-parallel plan through load_pretrained, and apply the model spec when deciding and loading it #2780's in
test_model_load_utils.pyare kept side by side:_one_rank_fails_job's config doubles name_NO_SPECwith 8 experts, and the failure rows, cases and docstring oftest_a_load_failing_on_one_rank_fails_every_rankhold both PRs' (66bcd7d). The stand-in configs of this PR's two new tests name_NO_SPECtoo (01b7fcf), as main's load now reads the model spec bymodel_type; without it all 7 cases raisedAttributeError. This PR's source diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utils,tests/unit/torch/exportand the HF plugin tests pass on CPU at this head, on transformers 5.18, 5.9.0 and 5.5.4, apart from 7 diffusers-export cases that fail on main itself in these environments.Rebased 2026-11-03 onto main 5870698, where [OMNIML-6063] [2/2] Decompress compressed-tensors MoE experts as they load, expert-parallel loads included #3137 merged. [OMNIML-6063] [2/2] Decompress compressed-tensors MoE experts as they load, expert-parallel loads included #3137's tests and this PR's sit side by side in
test_model_load_utils.py. A test-only commit (df567f8) lets this PR's two new tests stand in forrecord_unplaced_source_keyswith keywords too, since the load now passestensor_files=; without it all 7 cases raisedTypeError. This PR's source diff is unchanged. Pre-commit, mypy included, passes against main, andtests/unit/torch/utils,tests/unit/torch/export,tests/unit/torch/modelsand the HF plugin tests pass on CPU at this head, on transformers 5.18 and 5.5.4, apart from 7 diffusers-export cases that fail on main itself in these environments.Before your PR is "Ready for review"
CONTRIBUTING.md: N/AAdditional Information
Part of expert-parallel PTQ for Hugging Face MoE models. Merge order: #3131 → #3136 → this PR. #2780, which routes
load_pretrainedto the loader, has merged.