Repository navigation
[OMNIML-3853] Re-key the GLM-5.3-Flash recipe to its BF16 source checkpoint - #2644
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. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe recipe metadata, PTQ documentation, and unit test now identify the GLM-5.3-Flash-BF16 recipe. The quantization configuration remains unchanged. ChangesGLM-5.3-Flash-BF16 recipe references
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The recipe references are consistently updated, with no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2644 +/- ##
==========================================
+ Coverage 69.20% 78.45% +9.25%
==========================================
Files 620 620
Lines 69618 69618
==========================================
+ Hits 48178 54619 +6441
+ Misses 21440 14999 -6441
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:
|
cjluo-nv
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
LGTM: the BF16 recipe re-key is consistent, with a justified test-path update that requires human sign-off.
Needs action:
- Confirm the edit to
tests/unit/recipe/test_glm_5_3_recipe.py; it follows the renamed recipe while preserving all quantizer-placement assertions.
### What does this PR do? Type of change: Bug fix The `unit-3.12(torch_214, tf_min)` job fails on every PR right now. Examples are #2644 and the `ep_comms` branch. The failing check is the required `unit-pr-required-check`. Root cause: `datasets` 5.1.0 came out on 2026-10-05 and requires `huggingface_hub>=1.31`. The `tf_min` env installs `.[all,dev-test]` first, which pulls `datasets` 5.1.0. It then installs `transformers~=4.57.0`, which downgrades `huggingface_hub` below 1.0. Every test that imports `datasets` then fails with: ``` ImportError: cannot import name 'BucketNotFoundError' from 'huggingface_hub.errors' ``` This PR adds `datasets<5.1` to the `tf_min` pins, next to the existing `diffusers<0.40` pin that exists for the same hub<1.0 reason. `datasets` 5.0.x still supports `huggingface_hub>=0.25`. ### Testing - `uv pip compile` of the `tf_min` pins (`transformers~=4.57.0`, `diffusers<0.40`, `datasets<5.1`) resolves to `datasets==5.0.1` and `huggingface-hub==0.36.2`. - In a clean venv, `datasets` 5.1.0 with hub 0.36.2 gives the same `BucketNotFoundError` as CI. `datasets` 5.0.1 with hub 0.36.2 imports fine, including `load_dataset`. - Pre-commit passes. I did not run the full `nox -s unit` session locally; CI on this PR covers it. ### Before your PR is "*Ready for review*" - Is this change backward compatible?: ✅ (only the CI test env changes) - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: N/A - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A - Did you get Claude approval on this PR?: N/A ### Additional Information The `trtllm (gpt-oss)` example test fails for a related reason that this PR does not fix. Its dependency install upgrades the container to `datasets` 5.1.0 and `huggingface_hub` 1.33.0, and `trackio` then fails when `trl` writes a model card: `cannot import name 'CommitOperationAdd' from 'huggingface_hub.hf_api'`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated the Transformers test environment to use a compatible range of the datasets package. The test setup also accounts for the Hub version requirements associated with the selected Transformers version, helping keep automated test runs consistent. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Shengliang Xu <[email protected]>
models/<org>/<model_id>/ is keyed by the checkpoint a recipe is *run against*, but this entry named zai-org/GLM-5.3-Flash, which is itself an FP8 release -- its config.json carries quantization_config.quant_method: fp8. The recipe produces NVFP4 by post-training quantization, so it has to start from the BF16 weights at zai-org/GLM-5.3-Flash-BF16. Pointing it at the FP8 repo told a user to quantize an already-quantized checkpoint. The folder, the recipe's own header and description, the ptq.md entry and the test's recipe path all move to GLM-5.3-Flash-BF16. Prose that refers to the model family rather than a path is left alone, as is the released checkpoint's name (nvidia/GLM-5.3-Flash-NVFP4), which does not change. Note the released checkpoint's card metadata lists base_model as zai-org/GLM-5.3-Flash. That names the family, not the weights the PTQ run consumed; the -BF16 repo is the only one of the two a PTQ recipe can start from. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Shengliang Xu <[email protected]>
7344046 to
ada2cc0
Compare
|
### What does this PR do? Type of change: Bug fix The `unit-3.12(torch_214, tf_min)` job fails on every PR right now. Examples are #2644 and the `ep_comms` branch. The failing check is the required `unit-pr-required-check`. Root cause: `datasets` 5.1.0 came out on 2026-10-05 and requires `huggingface_hub>=1.31`. The `tf_min` env installs `.[all,dev-test]` first, which pulls `datasets` 5.1.0. It then installs `transformers~=4.57.0`, which downgrades `huggingface_hub` below 1.0. Every test that imports `datasets` then fails with: ``` ImportError: cannot import name 'BucketNotFoundError' from 'huggingface_hub.errors' ``` This PR adds `datasets<5.1` to the `tf_min` pins, next to the existing `diffusers<0.40` pin that exists for the same hub<1.0 reason. `datasets` 5.0.x still supports `huggingface_hub>=0.25`. ### Testing - `uv pip compile` of the `tf_min` pins (`transformers~=4.57.0`, `diffusers<0.40`, `datasets<5.1`) resolves to `datasets==5.0.1` and `huggingface-hub==0.36.2`. - In a clean venv, `datasets` 5.1.0 with hub 0.36.2 gives the same `BucketNotFoundError` as CI. `datasets` 5.0.1 with hub 0.36.2 imports fine, including `load_dataset`. - Pre-commit passes. I did not run the full `nox -s unit` session locally; CI on this PR covers it. ### Before your PR is "*Ready for review*" - Is this change backward compatible?: ✅ (only the CI test env changes) - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: N/A - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A - Did you get Claude approval on this PR?: N/A ### Additional Information The `trtllm (gpt-oss)` example test fails for a related reason that this PR does not fix. Its dependency install upgrades the container to `datasets` 5.1.0 and `huggingface_hub` 1.33.0, and `trackio` then fails when `trl` writes a model card: `cannot import name 'CommitOperationAdd' from 'huggingface_hub.hf_api'`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated the Transformers test environment to use a compatible range of the datasets package. The test setup also accounts for the Hub version requirements associated with the selected Transformers version, helping keep automated test runs consistent. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Shengliang Xu <[email protected]> Signed-off-by: Keval Morabia <[email protected]>
What does this PR do?
Type of change: Bug fix (recipe keyed to the wrong source checkpoint)
This is a bug, not a renaming preference.
modelopt_recipes/models/<org>/<model_id>/is keyed by the checkpoint a recipe is run against, and the quantization work behindnvidia/GLM-5.3-Flash-NVFP4was always done againstzai-org/GLM-5.3-Flash-BF16. The entry namedzai-org/GLM-5.3-Flashinstead — a repo that was never used here, and that could not have been, because it is already an FP8 release:The recipe produces NVFP4 by post-training quantization, so it has to start from BF16 weights. As keyed, it pointed users at an already-quantized checkpoint, which the recipe cannot be run against. The entry moves to
zai-org/GLM-5.3-Flash-BF16, the model it was always for.Moved with
git mv(recorded as a 95% rename), along with the three places that referenced the old path: the recipe's header comment andmetadata.description, theptq.mdentry, and the recipe path intests/unit/recipe/test_glm_5_3_recipe.py. Prose inptq.mdthat refers to the model family rather than a path is left alone, and the released checkpoint keeps its own name —nvidia/GLM-5.3-Flash-NVFP4is unchanged.On the Hub metadata. The released checkpoint's card currently lists
base_modelaszai-org/GLM-5.3-Flash. That reference is wrong too and is being corrected on the Hub — it is not evidence against this change. The quantization work was always done againstzai-org/GLM-5.3-Flash-BF16;zai-org/GLM-5.3-Flashwas never used as a source, and could not have been, since it is already FP8.Usage
python examples/hf_ptq/hf_ptq.py \ --pyt_ckpt_path zai-org/GLM-5.3-Flash-BF16 \ --recipe models/zai-org/GLM-5.3-Flash-BF16/ptq/nvfp4_experts_dense_mlp-kv_fp8_cast \ --export_path <output>Testing
tests/unit/recipe/— 434 passed.test_glm_5_3_recipe.pyfollows the new path; verified separately that the new path loads (11quant_cfgentries) and the old one now raisesValueError.models/zai-org/GLM-5.3-Flash/anywhere in the tree, including launcher YAMLs.pre-commitpasses on all three changed files.transformer_engine.soin the dev venv; they reproduce identically on unmodifiedmain.Before your PR is "Ready for review"
--recipe models/zai-org/GLM-5.3-Flash/ptq/nvfp4_experts_dense_mlp-kv_fp8_caststops resolving and becomes.../GLM-5.3-Flash-BF16/.... That is the fix: the old path named a checkpoint the recipe cannot be run against, so anyone following it was being pointed at the wrong model.CONTRIBUTING.md: ✅ — no new dependencies, no source changes.Additional Information
Split out of #2643 (checkpoint aliases for nine published NVFP4 releases) so this path change is reviewable on its own. The two PRs are independent and can merge in either order.
🤖 Generated with Claude Code
Summary by CodeRabbit