Skip to content
Draft
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions modelopt/torch/export/convert_hf_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ def convert_hf_quant_config_format(input_config: dict[str, Any]) -> dict[str, An
if quant_algo_value:
new_config["quant_algo"] = quant_algo_value

group_size = original_quantization_details.get("group_size")
if group_size is not None:
# ModelOpt consumers use this top-level value to size block scales.
new_config["group_size"] = group_size

kv_cache_quant_algo = original_quantization_details.get("kv_cache_quant_algo")
if kv_cache_quant_algo:
if kv_cache_quant_algo == "FP8":
Expand Down
Loading
Loading