Skip to content

Commit

Permalink
Make INT8 activation PRESET_SCHEMES explicit (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoin authored Sep 24, 2024
1 parent 83b2e7a commit 799be8d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/compressed_tensors/quantization/quant_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def is_preset_scheme(name: str) -> bool:
UNQUANTIZED = dict()

# 8 bit integer weights and 8 bit activations quantization
W8A8 = dict(
INT8_W8A8 = dict(
weights=QuantizationArgs(
num_bits=8,
type=QuantizationType.INT,
Expand Down Expand Up @@ -149,7 +149,7 @@ def is_preset_scheme(name: str) -> bool:
)

# 4 bit integer weights and 8 bit activations quantization
W4A8 = dict(
INT8_W4A8 = dict(
weights=QuantizationArgs(
num_bits=4,
type=QuantizationType.INT,
Expand Down Expand Up @@ -210,8 +210,9 @@ def is_preset_scheme(name: str) -> bool:
"W8A16": W8A16,
"W4A16": W4A16,
# Integer weight and activation schemes
"W8A8": W8A8,
"W4A8": W4A8,
"W8A8": INT8_W8A8,
"INT8": INT8_W8A8, # alias for W8A8
"W4A8": INT8_W4A8,
# Float weight and activation schemes
"FP8": FP8,
"FP8_DYNAMIC": FP8_DYNAMIC,
Expand Down

0 comments on commit 799be8d

Please sign in to comment.