Unverified Commit 5c6a41fa authored by Jerry Zhang's avatar Jerry Zhang Committed by GitHub
Browse files

Error out when torchao-config option is not recognized (#2107)

parent 722530fa
...@@ -62,6 +62,8 @@ def torchao_quantize_param_data(param: torch.Tensor, torchao_config: str): ...@@ -62,6 +62,8 @@ def torchao_quantize_param_data(param: torch.Tensor, torchao_config: str):
granularity=GRANULARITY_MAP[granularity] granularity=GRANULARITY_MAP[granularity]
), ),
) )
else:
raise ValueError(f"Unexpected config: {torchao_config}")
return dummy_linear.weight return dummy_linear.weight
......
...@@ -661,7 +661,7 @@ class ServerArgs: ...@@ -661,7 +661,7 @@ class ServerArgs:
"--torchao-config", "--torchao-config",
type=str, type=str,
default=ServerArgs.torchao_config, default=ServerArgs.torchao_config,
help="Optimize the model with torchao. Experimental feature. Current choices are: int8dq, int8wo, int4wo-<group_size>, fp8wo", help="Optimize the model with torchao. Experimental feature. Current choices are: int8dq, int8wo, int4wo-<group_size>, fp8wo, fp8dq-per_tensor, fp8dq-per_row",
) )
parser.add_argument( parser.add_argument(
"--enable-nan-detection", "--enable-nan-detection",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment