mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-12-06 04:57:17 +08:00
### What does this PR do? Type of change: documentation **Stack** (merge in order): [1/4] #3656 (merged) → [2/4] #3657 (merged) → [3/4] #3658 (merged) → **[4/4] #3659**. **Problem:** #3656, #3657 and #3658 moved most of `examples/hf_ptq`'s helper modules into the library, and left the stack's CHANGELOG entry for this last PR. Until it lands, scripts that imported those helpers from the example directory have no note of where they went. The Kimi-K3 NVFP4 converter's docstring also still names the MXFP4 cast's old path, `examples/hf_ptq/cast_mxfp4_to_nvfp4.py`. **Fix:** a CHANGELOG entry says what moved where, and the Kimi-K3 docstring names `modelopt.torch.quantization.utils.cast_mxfp4_to_nvfp4`. Recipe-driven AutoQuantize (`examples/hf_ptq/autoquant_utils.py`) stays in the example. It consumes recipes, and `modelopt.recipe` imports `modelopt.torch.quantization`, so it belongs above both packages: in the example now, and in the CLI later. Earlier versions of this PR moved it into `modelopt.recipe`, then into `modelopt.torch.quantization`; this version leaves it as it is on main. ### Testing Documentation only: one CHANGELOG line and one docstring line. Pre-commit passes, mypy included. On CPU, the example's AutoQuantize and `hf_ptq.py` tests (`test_autoquant_utils.py`, `test_hf_ptq_args.py` and `test_hf_ptq_vision_quantization.py`) pass, 124 tests, as on main. ### Before your PR is "*Ready for review*" Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md) and your commits are signed (`git commit -s -S`). Make sure you read and follow the [Security Best Practices](https://github.com/NVIDIA/Model-Optimizer/blob/main/SECURITY.md#security-coding-practices-for-contributors) (e.g. avoiding hardcoded `trust_remote_code=True`, `torch.load(..., weights_only=False)`, `pickle`, etc.). - Is this change backward compatible?: ✅ Documentation only. - 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 Documentation only. - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: ✅ One entry for the stack. - Did you get Claude approval on this PR?: Not for this version. Claude gave LGTM on the earlier versions, which moved AutoQuantize; this version keeps only their CHANGELOG entry, now without AutoQuantize, and the Kimi-K3 note. ### Additional Information Tracked by OMNIML-6666 (epic OMNIML-3619, nv-modelopt unified entry point), for ModelOpt 0.50.0. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated the release notes to clarify where to find model and tokenizer loading, calibration, generation preview, layerwise configuration, and MXFP4 conversion helpers. Scripts that use these helpers should import them from their updated library locations. * Clarified that run checks and the MLflow tool remain available in the examples, and that recipe-driven AutoQuantize remains in its existing location. * Updated the Kimi K3 quantization guide to point to the current MXFP4 conversion reference. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>