From 6459eac9f540854ce29f4db20f0dd56ee2c1a650 Mon Sep 17 00:00:00 2001 From: Sumanth R Hegde Date: Mon, 9 Oct 2023 10:15:17 -0700 Subject: [PATCH 1/2] fixed feedforward for falcon --- src/peft/utils/other.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/peft/utils/other.py b/src/peft/utils/other.py index 62aedce273..7162d5178e 100644 --- a/src/peft/utils/other.py +++ b/src/peft/utils/other.py @@ -471,9 +471,9 @@ def get_auto_gptq_quant_linear(gptq_quantization_config): "bert": ["output.dense"], "deberta-v2": ["output.dense"], "deberta": ["output.dense"], - "RefinedWeb": ["query_key_value"], - "RefinedWebModel": ["query_key_value"], - "falcon": ["query_key_value"], + "RefinedWeb": ["dense_4h_to_h"], + "RefinedWebModel": ["dense_4h_to_h"], + "falcon": ["dense_4h_to_h"], } COMMON_LAYERS_PATTERN = ["layers", "h", "block", "blocks", "layer"] From ecf0ae64f7016775d03fef1116e6d04758ad6874 Mon Sep 17 00:00:00 2001 From: Sumanth R Hegde Date: Tue, 10 Oct 2023 07:45:21 -0700 Subject: [PATCH 2/2] fixed target_modules for falcon --- src/peft/utils/other.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/peft/utils/other.py b/src/peft/utils/other.py index 7162d5178e..bfdf3577d8 100644 --- a/src/peft/utils/other.py +++ b/src/peft/utils/other.py @@ -450,9 +450,9 @@ def get_auto_gptq_quant_linear(gptq_quantization_config): "bert": ["key", "value", "output.dense"], "deberta-v2": ["key_proj", "value_proj", "output.dense"], "deberta": ["in_proj", "output.dense"], - "RefinedWebModel": ["query_key_value"], - "RefinedWeb": ["query_key_value"], - "falcon": ["query_key_value"], + "RefinedWebModel": ["query_key_value", "dense_4h_to_h"], + "RefinedWeb": ["query_key_value", "dense_4h_to_h"], + "falcon": ["query_key_value", "dense_4h_to_h"], } TRANSFORMERS_MODELS_TO_IA3_FEEDFORWARD_MODULES_MAPPING = {