mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-28 04:39:09 +08:00
parent
f7344c971c
commit
78d47494df
@ -150,12 +150,18 @@ class ModelArchConfigConvertorBase:
|
||||
producer_name = quant_cfg.get("producer", {}).get("name")
|
||||
if producer_name == "modelopt":
|
||||
quant_algo = quant_cfg.get("quantization", {}).get("quant_algo")
|
||||
if quant_algo == "FP8":
|
||||
quant_cfg["quant_method"] = "modelopt"
|
||||
elif quant_algo == "NVFP4":
|
||||
quant_cfg["quant_method"] = "modelopt_fp4"
|
||||
elif quant_algo is not None:
|
||||
raise ValueError(f"Unknown ModelOpt quant algo: {quant_algo}")
|
||||
if quant_algo is not None:
|
||||
quant_algo_upper = str(quant_algo).upper()
|
||||
if quant_algo_upper in {
|
||||
"FP8",
|
||||
"FP8_PER_CHANNEL_PER_TOKEN",
|
||||
"FP8_PB_WO",
|
||||
}:
|
||||
quant_cfg["quant_method"] = "modelopt"
|
||||
elif quant_algo_upper == "NVFP4":
|
||||
quant_cfg["quant_method"] = "modelopt_fp4"
|
||||
else:
|
||||
raise ValueError(f"Unknown ModelOpt quant algo: {quant_algo}")
|
||||
|
||||
if quant_cfg is not None:
|
||||
# Use the community standard 'quant_method'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user