Error out when torchao-config option is not recognized (#2107)
This commit is contained in:
1 parent
722530fa01
commit
5c6a41facf
2 files changed
+3
-1
No files matched your search
@@ -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