Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modelopt/torch/export/unified_export_megatron.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ def save_pretrained(
"exclude_modules": ["lm_head"],
},
}
if "NVFP4" in quantization:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about we always save group_size if group_size is valid?

# for vllm, the group size is required
hf_quant_config["quantization"]["group_size"] = 16
with open(save_directory + "/hf_quant_config.json", "w") as f:
json.dump(hf_quant_config, f, indent=4)

Expand Down
Loading