diff --git a/src/llmcompressor/modifiers/awq/base.py b/src/llmcompressor/modifiers/awq/base.py index 49698fe09..72a7240e3 100644 --- a/src/llmcompressor/modifiers/awq/base.py +++ b/src/llmcompressor/modifiers/awq/base.py @@ -139,8 +139,10 @@ class AWQModifier(Modifier, QuantizationMixin): default_factory=dict ) + # NOTE: different name chosen to avoid collision with + # QuantizationMixin.validate_model_after, which must be called first @model_validator(mode="after") - def validate_model_after(model: "AWQModifier") -> "AWQModifier": + def validate_awq_after(model: "AWQModifier") -> "AWQModifier": """ Confirm only one configuration for group_size, symmetric, and num_bits, as AWQ algorithm depends on it diff --git a/tests/e2e/vLLM/configs/w4a16_grouped_quant_asym_awq.yaml b/tests/e2e/vLLM/configs/w4a16_grouped_quant_asym_awq.yaml index d833c5aa2..6ae656b1d 100644 --- a/tests/e2e/vLLM/configs/w4a16_grouped_quant_asym_awq.yaml +++ b/tests/e2e/vLLM/configs/w4a16_grouped_quant_asym_awq.yaml @@ -1,8 +1,8 @@ cadence: "nightly" test_type: "regression" model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 -recipe: tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_group_quant_asym_awq.yaml -dataset_id: "mit-han-lab/pile-val-backup" -dataset_split: validation +recipe: tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_asym.yaml +dataset_id: HuggingFaceH4/ultrachat_200k +dataset_split: train_sft scheme: W4A16_weight_asym_awq save_dir: TinyLlama-1.1B-Chat-v1.0-w4a16-asym-awq \ No newline at end of file diff --git a/tests/e2e/vLLM/configs/w4a16_grouped_quant_sym_awq.yaml b/tests/e2e/vLLM/configs/w4a16_grouped_quant_sym_awq.yaml index d0bb47b6e..220649a18 100644 --- a/tests/e2e/vLLM/configs/w4a16_grouped_quant_sym_awq.yaml +++ b/tests/e2e/vLLM/configs/w4a16_grouped_quant_sym_awq.yaml @@ -2,7 +2,7 @@ cadence: "nightly" test_type: "regression" model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 recipe: tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_sym.yaml -dataset_id: "mit-han-lab/pile-val-backup" -dataset_split: validation +dataset_id: HuggingFaceH4/ultrachat_200k +dataset_split: train_sft scheme: W4A16_weight_sym_awq save_dir: TinyLlama-1.1B-Chat-v1.0-w4a16-sym-awq diff --git a/tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_group_quant_asym_awq.yaml b/tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_asym.yaml similarity index 100% rename from tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_group_quant_asym_awq.yaml rename to tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_asym.yaml diff --git a/tests/testing_utils.py b/tests/testing_utils.py index b42470893..4ce6a5de6 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -285,18 +285,6 @@ def process(sample): "images": sample["image"], } - elif ds_name == "pile-val-backup": - - def preprocess(example): - return { - "input_ids": processor.encode(example["text"].strip())[:max_seq_length] - } - - ds = ds.map(preprocess, remove_columns=ds.column_names) - # Note: potentially swap filtering to pad for AWQ - ds = ds.filter(lambda example: len(example["input_ids"]) >= max_seq_length) - return ds - else: raise NotImplementedError(f"Cannot preprocess dataset {ds.info.dataset_name}")