Skip to content

Commit

Permalink
[NEW Model] Add GAU-alpha model (PaddlePaddle#2088)
Browse files Browse the repository at this point in the history
* add gau_alpha model

* a.shape[-2] -> paddle.shape(a)[-2]

* update token type id

Co-authored-by: yingyibiao <yyb0576@163.com>
  • Loading branch information
JunnYu and yingyibiao authored May 25, 2022
1 parent a1df427 commit aebd26e
Show file tree
Hide file tree
Showing 6 changed files with 1,242 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paddlenlp/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
from .unimo.tokenizer import *
from .xlnet.modeling import *
from .xlnet.tokenizer import *
from .gau_alpha.modeling import *
from .gau_alpha.tokenizer import *
from .roformerv2.modeling import *
from .roformerv2.tokenizer import *
from .optimization import *
Expand Down
1 change: 1 addition & 0 deletions paddlenlp/transformers/auto/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
("T5", 't5'),
("Bert", "bert"),
("Bart", "bart"),
("GAUAlpha", "gau_alpha"),
])

MAPPING_TASKS = OrderedDict([
Expand Down
1 change: 1 addition & 0 deletions paddlenlp/transformers/auto/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
("T5Tokenizer", 't5'),
("BertTokenizer", "bert"),
("BartTokenizer", "bart"),
("GAUAlphaTokenizer", "gau_alpha"),
])

FASTER_TOKENIZER_MAPPING_NAMES = OrderedDict(
Expand Down
2 changes: 2 additions & 0 deletions paddlenlp/transformers/gau_alpha/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .modeling import *
from .tokenizer import *
Loading

0 comments on commit aebd26e

Please sign in to comment.