Skip to content

Commit

Permalink
Add mt5 to the mapping of flex heads
Browse files Browse the repository at this point in the history
  • Loading branch information
William committed Jan 5, 2024
1 parent 19f4506 commit 39769cf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/adapters/head_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,35 @@
},
"layers": ["lm_head"],
},
# MT5
"MT5ForConditionalGeneration": {
"config": {
"head_type": "seq2seq_lm",
},
"layers": ["lm_head"],
},
"MT5ForQuestionAnswering": {
"config": {
"head_type": "question_answering",
"activation_function": None,
"layers": 1,
},
"layers": [None, "qa_outputs"],
},
"MT5ForSequenceClassification": {
"config": {
"head_type": "classification",
"layers": 2,
"activation_function": "tanh",
},
"layers": [
None,
"classification_head.dense",
None,
None,
"classification_head.out_proj",
],
},
# DistilBERT
"DistilBertForSequenceClassification": {
"config": {
Expand Down

0 comments on commit 39769cf

Please sign in to comment.