@@ -69,47 +69,35 @@ def _to_torch_dtype(dtype_str: str) -> torch.dtype:
6969)
7070@click .option (
7171 "--compress-statistics" ,
72- required = False ,
73- type = bool ,
7472 is_flag = True ,
75- default = False ,
7673 help = "Flag for double-quantization" ,
7774)
7875@click .option (
7976 "--enable-bnb" ,
80- required = False ,
81- type = bool ,
8277 is_flag = True ,
8378 default = envs .CONCH_BENCH_ENABLE_ALL_REF ,
8479 help = "Flag to enable BNB reference impl" ,
8580)
8681@click .option (
87- "-i" ,
8882 "--num-iterations" ,
8983 required = False ,
9084 type = int ,
9185 default = 100 ,
9286 help = "Number of iterations" ,
9387)
9488@click .option (
95- "-w" ,
9689 "--num-warmup-iterations" ,
9790 required = False ,
9891 type = int ,
9992 default = 10 ,
10093 help = "Number of warmup iterations" ,
10194)
10295@click .option (
103- "-v" ,
10496 "--verbose" ,
105- required = False ,
106- type = bool ,
10797 is_flag = True ,
108- default = False ,
10998 help = "Flag for printing verbose output" ,
11099)
111100@click .option (
112- "-g" ,
113101 "--gpu" ,
114102 required = False ,
115103 type = str ,
@@ -118,10 +106,7 @@ def _to_torch_dtype(dtype_str: str) -> torch.dtype:
118106)
119107@click .option (
120108 "--csv" ,
121- required = False ,
122- type = bool ,
123109 is_flag = True ,
124- default = False ,
125110 help = "Flag for printing results in CSV format" ,
126111)
127112def main ( # noqa: PLR0913
@@ -202,7 +187,9 @@ def main( # noqa: PLR0913
202187 error_msg = "bitsandbytes must be installed and enabled via CONCH_ENABLE_BNB=1"
203188 raise NotImplementedError (error_msg )
204189
205- from bitsandbytes .functional import dequantize_4bit as bnb_dequantize_4bit # type: ignore[import-untyped]
190+ from bitsandbytes .functional import ( # type: ignore[import-not-found, import-untyped, unused-ignore] # isort:skip
191+ dequantize_4bit as bnb_dequantize_4bit ,
192+ )
206193 from bitsandbytes .functional import quantize_4bit as bnb_quantize_4bit
207194
208195 bnb_quantized , bnb_state = bnb_quantize_4bit (
0 commit comments