Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
34a3c25a
Commit
34a3c25a
authored
Jan 22, 2020
by
Julien Chaumond
Browse files
Fix for XLMRobertaConfig inherits from RobertaConfig
hat/tip @stefan-it
parent
1a8e87be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/transformers/modeling_auto.py
src/transformers/modeling_auto.py
+4
-4
src/transformers/tokenization_auto.py
src/transformers/tokenization_auto.py
+1
-1
No files found.
src/transformers/modeling_auto.py
View file @
34a3c25a
...
@@ -130,8 +130,8 @@ MODEL_MAPPING = OrderedDict(
...
@@ -130,8 +130,8 @@ MODEL_MAPPING = OrderedDict(
(
DistilBertConfig
,
DistilBertModel
),
(
DistilBertConfig
,
DistilBertModel
),
(
AlbertConfig
,
AlbertModel
),
(
AlbertConfig
,
AlbertModel
),
(
CamembertConfig
,
CamembertModel
),
(
CamembertConfig
,
CamembertModel
),
(
RobertaConfig
,
RobertaModel
),
(
XLMRobertaConfig
,
XLMRobertaModel
),
(
XLMRobertaConfig
,
XLMRobertaModel
),
(
RobertaConfig
,
RobertaModel
),
(
BertConfig
,
BertModel
),
(
BertConfig
,
BertModel
),
(
OpenAIGPTConfig
,
OpenAIGPTModel
),
(
OpenAIGPTConfig
,
OpenAIGPTModel
),
(
GPT2Config
,
GPT2Model
),
(
GPT2Config
,
GPT2Model
),
...
@@ -148,8 +148,8 @@ MODEL_WITH_LM_HEAD_MAPPING = OrderedDict(
...
@@ -148,8 +148,8 @@ MODEL_WITH_LM_HEAD_MAPPING = OrderedDict(
(
DistilBertConfig
,
DistilBertForMaskedLM
),
(
DistilBertConfig
,
DistilBertForMaskedLM
),
(
AlbertConfig
,
AlbertForMaskedLM
),
(
AlbertConfig
,
AlbertForMaskedLM
),
(
CamembertConfig
,
CamembertForMaskedLM
),
(
CamembertConfig
,
CamembertForMaskedLM
),
(
RobertaConfig
,
RobertaForMaskedLM
),
(
XLMRobertaConfig
,
XLMRobertaForMaskedLM
),
(
XLMRobertaConfig
,
XLMRobertaForMaskedLM
),
(
RobertaConfig
,
RobertaForMaskedLM
),
(
BertConfig
,
BertForMaskedLM
),
(
BertConfig
,
BertForMaskedLM
),
(
OpenAIGPTConfig
,
OpenAIGPTLMHeadModel
),
(
OpenAIGPTConfig
,
OpenAIGPTLMHeadModel
),
(
GPT2Config
,
GPT2LMHeadModel
),
(
GPT2Config
,
GPT2LMHeadModel
),
...
@@ -165,8 +165,8 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
...
@@ -165,8 +165,8 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
(
DistilBertConfig
,
DistilBertForSequenceClassification
),
(
DistilBertConfig
,
DistilBertForSequenceClassification
),
(
AlbertConfig
,
AlbertForSequenceClassification
),
(
AlbertConfig
,
AlbertForSequenceClassification
),
(
CamembertConfig
,
CamembertForSequenceClassification
),
(
CamembertConfig
,
CamembertForSequenceClassification
),
(
RobertaConfig
,
RobertaForSequenceClassification
),
(
XLMRobertaConfig
,
XLMRobertaForSequenceClassification
),
(
XLMRobertaConfig
,
XLMRobertaForSequenceClassification
),
(
RobertaConfig
,
RobertaForSequenceClassification
),
(
BertConfig
,
BertForSequenceClassification
),
(
BertConfig
,
BertForSequenceClassification
),
(
XLNetConfig
,
XLNetForSequenceClassification
),
(
XLNetConfig
,
XLNetForSequenceClassification
),
(
XLMConfig
,
XLMForSequenceClassification
),
(
XLMConfig
,
XLMForSequenceClassification
),
...
@@ -187,8 +187,8 @@ MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING = OrderedDict(
...
@@ -187,8 +187,8 @@ MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING = OrderedDict(
[
[
(
DistilBertConfig
,
DistilBertForTokenClassification
),
(
DistilBertConfig
,
DistilBertForTokenClassification
),
(
CamembertConfig
,
CamembertForTokenClassification
),
(
CamembertConfig
,
CamembertForTokenClassification
),
(
RobertaConfig
,
RobertaForTokenClassification
),
(
XLMRobertaConfig
,
XLMRobertaForTokenClassification
),
(
XLMRobertaConfig
,
XLMRobertaForTokenClassification
),
(
RobertaConfig
,
RobertaForTokenClassification
),
(
BertConfig
,
BertForTokenClassification
),
(
BertConfig
,
BertForTokenClassification
),
(
XLNetConfig
,
XLNetForTokenClassification
),
(
XLNetConfig
,
XLNetForTokenClassification
),
]
]
...
...
src/transformers/tokenization_auto.py
View file @
34a3c25a
...
@@ -60,8 +60,8 @@ TOKENIZER_MAPPING = OrderedDict(
...
@@ -60,8 +60,8 @@ TOKENIZER_MAPPING = OrderedDict(
(
DistilBertConfig
,
DistilBertTokenizer
),
(
DistilBertConfig
,
DistilBertTokenizer
),
(
AlbertConfig
,
AlbertTokenizer
),
(
AlbertConfig
,
AlbertTokenizer
),
(
CamembertConfig
,
CamembertTokenizer
),
(
CamembertConfig
,
CamembertTokenizer
),
(
RobertaConfig
,
RobertaTokenizer
),
(
XLMRobertaConfig
,
XLMRobertaTokenizer
),
(
XLMRobertaConfig
,
XLMRobertaTokenizer
),
(
RobertaConfig
,
RobertaTokenizer
),
(
BertConfig
,
BertTokenizer
),
(
BertConfig
,
BertTokenizer
),
(
OpenAIGPTConfig
,
OpenAIGPTTokenizer
),
(
OpenAIGPTConfig
,
OpenAIGPTTokenizer
),
(
GPT2Config
,
GPT2Tokenizer
),
(
GPT2Config
,
GPT2Tokenizer
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment