[AutoModel] Split AutoModelWithLMHead into clm, mlm, encoder-decoder (#4933)

* first commit

* add new auto models

* better naming

* fix bert automodel

* fix automodel for pretraining

* add models to init

* fix name typo

* fix typo

* better naming

* future warning instead of depreciation warning
This commit is contained in:
Patrick von Platen
2020-06-12 10:01:49 +02:00
committed by GitHub
parent 5620033115
commit 86578bb04c
6 changed files with 528 additions and 7 deletions

View File

@@ -27,6 +27,7 @@ if is_torch_available():
from transformers import (
BertConfig,
BertModel,
BertLMHeadModel,
BertForMaskedLM,
BertForNextSentencePrediction,
BertForPreTraining,
@@ -35,7 +36,7 @@ if is_torch_available():
BertForTokenClassification,
BertForMultipleChoice,
)
from transformers.modeling_bert import BERT_PRETRAINED_MODEL_ARCHIVE_LIST, BertLMHeadModel
from transformers.modeling_bert import BERT_PRETRAINED_MODEL_ARCHIVE_LIST
class BertModelTester: