Skip to content

Commit a777241

Browse files
gemini code review updates
Signed-off-by: Brian Dellabetta <[email protected]>
1 parent 3662be1 commit a777241

File tree

1 file changed

+5
-10
lines changed
  • src/llmcompressor/modifiers/awq

1 file changed

+5
-10
lines changed

src/llmcompressor/modifiers/awq/base.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,12 @@ def validate_model_after(model: "AWQModifier") -> "AWQModifier":
184184

185185
model._group_size = next(iter(group_size_set))
186186

187-
num_bits_set = set(
188-
group.input_activations.num_bits
187+
num_bits_set = {
188+
act.num_bits
189189
for group in config.config_groups.values()
190-
if group.input_activations is not None
191-
).union(
192-
set(
193-
group.output_activations.num_bits
194-
for group in config.config_groups.values()
195-
if group.output_activations is not None
196-
)
197-
)
190+
for act in (group.input_activations, group.output_activations)
191+
if act is not None
192+
}
198193
if not (len(num_bits_set) == 0 or num_bits_set == {16}):
199194
warnings.warn(
200195
"A strategy including activation quantization was detected. "

0 commit comments

Comments
 (0)