Skip to content

Commit 2dffddd

Browse files
squashed
Signed-off-by: Brian Dellabetta <[email protected]>
1 parent 09cca73 commit 2dffddd

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

src/llmcompressor/modifiers/awq/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ class AWQModifier(Modifier, QuantizationMixin):
139139
default_factory=dict
140140
)
141141

142+
# NOTE: different name chosen to avoid collision with
143+
# QuantizationMixin.validate_model_after, which must be called first
142144
@model_validator(mode="after")
143-
def validate_model_after(model: "AWQModifier") -> "AWQModifier":
145+
def validate_awq_after(model: "AWQModifier") -> "AWQModifier":
144146
"""
145147
Confirm only one configuration for group_size, symmetric, and num_bits,
146148
as AWQ algorithm depends on it

tests/e2e/vLLM/configs/w4a16_grouped_quant_asym_awq.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cadence: "nightly"
22
test_type: "regression"
33
model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
44
recipe: tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_group_quant_asym_awq.yaml
5-
dataset_id: "mit-han-lab/pile-val-backup"
6-
dataset_split: validation
5+
dataset_id: HuggingFaceH4/ultrachat_200k
6+
dataset_split: train_sft
77
scheme: W4A16_weight_asym_awq
88
save_dir: TinyLlama-1.1B-Chat-v1.0-w4a16-asym-awq

tests/e2e/vLLM/configs/w4a16_grouped_quant_sym_awq.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cadence: "nightly"
22
test_type: "regression"
33
model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
44
recipe: tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_sym.yaml
5-
dataset_id: "mit-han-lab/pile-val-backup"
6-
dataset_split: validation
5+
dataset_id: HuggingFaceH4/ultrachat_200k
6+
dataset_split: train_sft
77
scheme: W4A16_weight_sym_awq
88
save_dir: TinyLlama-1.1B-Chat-v1.0-w4a16-sym-awq

tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_sym.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ quant_stage:
1111
strategy: "group"
1212
group_size: 128
1313
targets: ["Linear"]
14+

tests/testing_utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -285,18 +285,6 @@ def process(sample):
285285
"images": sample["image"],
286286
}
287287

288-
elif ds_name == "pile-val-backup":
289-
290-
def preprocess(example):
291-
return {
292-
"input_ids": processor.encode(example["text"].strip())[:max_seq_length]
293-
}
294-
295-
ds = ds.map(preprocess, remove_columns=ds.column_names)
296-
# Note: potentially swap filtering to pad for AWQ
297-
ds = ds.filter(lambda example: len(example["input_ids"]) >= max_seq_length)
298-
return ds
299-
300288
else:
301289
raise NotImplementedError(f"Cannot preprocess dataset {ds.info.dataset_name}")
302290

0 commit comments

Comments
 (0)