add task_type_id to BERT to support ERNIE-2.0 and ERNIE-3.0 models (#18686)

* add_ernie

* remove Tokenizer in ernie

* polish code

* format code style

* polish code

* fix style

* update doc

* make fix-copies

* change model name

* change model name

* fix dependency

* add more copied from

* rename ErnieLMHeadModel to ErnieForCausalLM
do not expose ErnieLayer
update doc

* fix

* make style

* polish code

* polish code

* fix

* fix

* fix

* fix

* fix

* final fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
HuYong
2022-09-09 19:36:46 +08:00
committed by GitHub
parent 895c528886
commit 22f7218560
19 changed files with 2882 additions and 0 deletions

View File

@@ -67,6 +67,7 @@ Ready-made configurations include the following architectures:
- DETR
- DistilBERT
- ELECTRA
- ERNIE
- FlauBERT
- GPT Neo
- GPT-J