[Model] Use standard ModelOpt config for Inkling NVFP4 (#48990)

Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
Michael Goin
2026-07-17 18:13:14 -07:00
committed by GitHub
parent fae543015c
commit 02c01f442b
7 changed files with 56 additions and 110 deletions
@@ -215,8 +215,13 @@ class ModelArchConfigConvertorBase:
else:
# Set quant_method for ModelOpt models.
producer_name = quant_cfg.get("producer", {}).get("name")
if producer_name == "modelopt":
quant_algo = quant_cfg.get("quantization", {}).get("quant_algo")
modelopt_quant_cfg = quant_cfg.get("quantization", {})
is_legacy_modelopt = (
isinstance(modelopt_quant_cfg, dict)
and "modelopt_quant_config" in modelopt_quant_cfg
)
if producer_name == "modelopt" or is_legacy_modelopt:
quant_algo = modelopt_quant_cfg.get("quant_algo")
if quant_algo is not None:
quant_algo_upper = str(quant_algo).upper()
if quant_algo_upper in {