Error out when torchao-config option is not recognized (#2107)
This commit is contained in:
@@ -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:
|
|||||||
"--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",
|
||||||
|
|||||||
Reference in New Issue
Block a user