Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion auto_round/compressors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,9 @@ def _immediate_pack(self, name: str):
tokenizer=self.tokenizer,
)

@torch.inference_mode()
# Use no_grad instead of inference mode
# https://github.com/intel/auto-round/issues/1620
@torch.no_grad()
def _quantize_rtn(self) -> tuple[torch.nn.Module, dict[str, Any]]:
"""Quantize all modules in the model using RTN (Round-To-Nearest) strategy.

Expand Down
2 changes: 1 addition & 1 deletion auto_round/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def __getitem__(self, key):
if importlib.util.find_spec("deepspeed"): # check if deepspeed is installed
deepspeed_exists = True

SUPPORTED_DTYPES = ("int", "mx_fp", "fp", "nv_fp")
SUPPORTED_DTYPES = ("int", "mx_fp", "fp", "nv_fp", "mx_int")
SUPPORTED_FORMATS = SupportedFormats()
SUPPORTED_LAYER_TYPES = (torch.nn.Linear, transformers.pytorch_utils.Conv1D)
# Changed to str as it relies on triton or others lib to load this
Expand Down
Loading