Skip to content

fix(quant): export modelopt_state.pth after quantization - #256

Merged
pengcuo merged 9 commits into
NVIDIA:mainfrom
mutichung:mutic/fix-modelopt-state
Sep 17, 2026
Merged

pengcuo merged 9 commits into
NVIDIA:mainfrom
mutichung:mutic/fix-modelopt-state

Conversation

@mutichung

Copy link
Copy Markdown
Contributor

Problem

The original quantization pipeline did not create the corresponding modelopt_state.pth that is presented in the released FP8 checkpoints. The file is required for HuggingFace transformers/diffusers to load the and run inference on the quantized checkpoints.

Changes

  • Export the missing modelopt_state.pth files for transformers and diffusers.
  • Fix updated functions imported by legacy mode.
  • Add mixed precision W8A16 policy configuration.

Blocks NVIDIA/cosmos#298

@mutichung
mutichung force-pushed the mutic/fix-modelopt-state branch from edf1381 to 870c510 Compare September 16, 2026 12:46
mutichung and others added 7 commits September 16, 2026 16:12
Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
@mutichung
mutichung force-pushed the mutic/fix-modelopt-state branch from 870c510 to 90ef256 Compare September 16, 2026 14:12
@wkutak
wkutak force-pushed the mutic/fix-modelopt-state branch 2 times, most recently from ea22c7d to 90ef256 Compare September 16, 2026 15:28
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
@mutichung
mutichung marked this pull request as ready for review September 17, 2026 13:42
@pengcuo
pengcuo enabled auto-merge (squash) September 17, 2026 15:14
@pengcuo
pengcuo merged commit cd531f7 into NVIDIA:main Sep 17, 2026
16 of 18 checks passed
qizhe pushed a commit to SimplexSim/cosmos-framework that referenced this pull request Oct 8, 2026
## Problem

The original quantization pipeline did not create the corresponding
`modelopt_state.pth` that is presented in the released FP8 checkpoints.
The file is required for HuggingFace `transformers`/`diffusers` to load
the and run inference on the quantized checkpoints.

## Changes

* Export the missing `modelopt_state.pth` files for `transformers` and
`diffusers`.
* Fix updated functions imported by legacy mode.
* Add mixed precision W8A16 policy configuration.

Blocks NVIDIA/cosmos#298

---------

Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
Co-authored-by: Wojciech Kutak <wkutak@nvidia.com>
@mutichung
mutichung deleted the mutic/fix-modelopt-state branch October 15, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants