Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #144 from dongs0104/patch-1
Browse files Browse the repository at this point in the history
Add OPT Model mapping
  • Loading branch information
hyunwoongko authored Aug 25, 2022
2 parents a4cad0e + 3743a89 commit 0538469
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions oslo/transformers/mapping_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ class _TensorParallelMappingForHuggingFace(_ParallelMappingForHuggingFace):
Update("embed_dim", "num_attention_heads"),
Head("lm_head", "score", gather_output=True),
],
OPT=[
Column("q_proj", "k_proj", "v_proj", "fc1"),
Row("out_proj", "fc2"),
Update("embed_dim", "num_heads"),
Head("lm_head", "score"),
],
"Electra": [
Column("query", "key", "value", "intermediate.dense"),
Column(
Expand Down

0 comments on commit 0538469

Please sign in to comment.