Skip to content

Commit c4ef9a8

Browse files
authored
fix rtn bug (#966)
1 parent 5e33cbc commit c4ef9a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

auto_round/compressors/base.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,10 +1312,11 @@ def _quantize_rtn(self) -> tuple[torch.nn.Module, dict[str, Any]]:
13121312
self.model.to("cpu")
13131313

13141314
enable_imatrix = False
1315-
if has_gguf_k and not self.disable_opt_rtn:
1316-
enable_imatrix = True
1317-
if self.data_type == "int" and self.sym:
1318-
enable_imatrix = True
1315+
if not self.disable_opt_rtn:
1316+
if has_gguf_k:
1317+
enable_imatrix = True
1318+
elif self.data_type == "int" and self.sym:
1319+
enable_imatrix = True
13191320

13201321
if enable_imatrix:
13211322
self._quant_rtn_with_imatrix(all_to_quantized_module_names)

0 commit comments

Comments
 (0)