Skip to content

Commit

Permalink
removed num_bits method from Enum
Browse files Browse the repository at this point in the history
  • Loading branch information
ljaljushkin committed Oct 26, 2023
1 parent ae541f7 commit 2bf63bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions nncf/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,3 @@ class CompressWeightsMode(Enum):
INT4_SYM = "int4_sym"
INT4_ASYM = "int4_asym"
NF4 = "nf4"

@property
def num_bits(self) -> int:
"""
:return: number of bits that is used for storing a single quantized value in the given mode.
"""
return 8 if self == CompressWeightsMode.INT8 else 4
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def num_bits(self):
"""
:return: number of bits that is used for storing a single quantized value in the given mode.
"""
return self.mode.num_bits
return 8 if self.mode == CompressWeightsMode.INT8 else 4


@dataclass
Expand Down

0 comments on commit 2bf63bb

Please sign in to comment.