Skip to content

Commit

Permalink
Add falcon to officially supported LoRA & IA3 modules (#722)
Browse files Browse the repository at this point in the history
* add falcon to officially supported modules

* add lora

* add also `RefinedWeb`
  • Loading branch information
younesbelkada authored Jul 19, 2023
1 parent 1b8b17d commit 3040782
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/peft/utils/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ def transpose(weight, fan_in_fan_out):
"chatglm": ["query_key_value"],
"gpt_bigcode": ["c_attn"],
"mpt": ["Wqkv"],
"RefinedWebModel": ["query_key_value"],
"RefinedWeb": ["query_key_value"],
"falcon": ["query_key_value"],
}

TRANSFORMERS_MODELS_TO_IA3_TARGET_MODULES_MAPPING = {
Expand All @@ -299,6 +302,9 @@ def transpose(weight, fan_in_fan_out):
"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"],
}

TRANSFORMERS_MODELS_TO_IA3_FEEDFORWARD_MODULES_MAPPING = {
Expand All @@ -317,6 +323,9 @@ def transpose(weight, fan_in_fan_out):
"bert": ["output.dense"],
"deberta-v2": ["output.dense"],
"deberta": ["output.dense"],
"RefinedWeb": ["query_key_value"],
"RefinedWebModel": ["query_key_value"],
"falcon": ["query_key_value"],
}

COMMON_LAYERS_PATTERN = ["layers", "h", "block", "blocks", "layer"]
Expand Down

0 comments on commit 3040782

Please sign in to comment.