Skip to content

Commit

Permalink
Add IA3 Modules for Phi (#1407)
Browse files Browse the repository at this point in the history
* Add IA3 Modules for Phi

* Address comments
  • Loading branch information
arnavgarg1 authored Jan 30, 2024
1 parent 75e4ef3 commit 68b90a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/peft/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def starcoder_model_postprocess_past_key_value(past_key_values):
"RefinedWebModel": ["query_key_value", "dense_4h_to_h"],
"RefinedWeb": ["query_key_value", "dense_4h_to_h"],
"falcon": ["query_key_value", "dense_4h_to_h"],
"phi": ["q_proj", "v_proj", "fc2"],
}

TRANSFORMERS_MODELS_TO_IA3_FEEDFORWARD_MODULES_MAPPING = {
Expand All @@ -121,6 +122,7 @@ def starcoder_model_postprocess_past_key_value(past_key_values):
"RefinedWeb": ["dense_4h_to_h"],
"RefinedWebModel": ["dense_4h_to_h"],
"falcon": ["dense_4h_to_h"],
"phi": ["fc2"],
}

TRANSFORMERS_MODELS_TO_ADALORA_TARGET_MODULES_MAPPING = {
Expand Down

0 comments on commit 68b90a1

Please sign in to comment.