Repository navigation
Megatron-Bridge: GGML PTQ, QAD and fake-quant export for large MoE and VLM models #2873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2cc48aa
8cd749b
0e301f8
199f46d
7e1bff6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
|
|
||
| from modelopt.torch.utils.distributed import ParallelState | ||
|
|
||
| from ..ggml.common import PINNED_PAYLOAD_PREFIX | ||
| from ..nn import ( | ||
| GroupedQuantizer, | ||
| NVFP4StaticQuantizer, | ||
|
|
@@ -132,7 +133,10 @@ def modelopt_post_restore(self, prefix: str = ""): | |
|
|
||
| def _check_unsupported_states(quantizer: TensorQuantizer): | ||
| for k in quantizer.state_dict(): | ||
| if k not in ["_amax", "_pre_quant_scale", "_global_amax"]: | ||
| # GGML payloads pinned by GPTQ are loaded with the weights from the sharded checkpoint. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have an example which unsupported states we have here?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The states this restore hook handles are |
||
| if k not in ["_amax", "_pre_quant_scale", "_global_amax"] and not k.startswith( | ||
| PINNED_PAYLOAD_PREFIX | ||
| ): | ||
| warnings.warn( | ||
| f"Restore of {k} for {prefix} is not supported. The restore of this layer might be " | ||
| f"incorrect. Please implement a custom restore for {k}." | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.