Skip to content

Commit

Permalink
Fix IA3 config for Falcon models (huggingface#1007)
Browse files Browse the repository at this point in the history
* fixed feedforward for falcon

* fixed target_modules for falcon
  • Loading branch information
SumanthRH authored Nov 9, 2023
1 parent d9094ce commit face67d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/peft/utils/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,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 = {
Expand All @@ -507,9 +507,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"]
Expand Down

0 comments on commit face67d

Please sign in to comment.