Skip to content

Commit

Permalink
Fix WeightOnlyLinear bits type when dtype="intx" (intel#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
changwangss authored May 30, 2024
1 parent 5dafe5f commit 19ff13e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_compressor/torch/algorithms/weight_only/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(
self.use_optimum_format = use_optimum_format
self.dtype = dtype
if self.dtype != "int" and "int" in self.dtype: # for nf4, fp4
bits = self.dtype.lstrip("int")
bits = int(self.dtype.lstrip("int"))
self.dtype = "int"
if "int" not in self.dtype: # for nf4, fp4
from neural_compressor.torch.algorithms.weight_only.utility import FLOAT_MAPPING, INT_MAPPING
Expand Down

0 comments on commit 19ff13e

Please sign in to comment.