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
801f2ac8
Commit
801f2ac8
authored
Jan 09, 2020
by
Lysandre
Committed by
Lysandre Debut
Jan 10, 2020
Browse files
Add PRETRAINED_INIT_CONFIGURATION to DistilBERT tokenizer
parent
bfec203d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/transformers/tokenization_distilbert.py
src/transformers/tokenization_distilbert.py
+9
-0
No files found.
src/transformers/tokenization_distilbert.py
View file @
801f2ac8
...
...
@@ -41,6 +41,14 @@ PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES = {
}
PRETRAINED_INIT_CONFIGURATION
=
{
"distilbert-base-uncased"
:
{
"do_lower_case"
:
True
},
"distilbert-base-uncased-distilled-squad"
:
{
"do_lower_case"
:
True
},
"distilbert-base-german-cased"
:
{
"do_lower_case"
:
False
},
"distilbert-base-multilingual-cased"
:
{
"do_lower_case"
:
False
},
}
class
DistilBertTokenizer
(
BertTokenizer
):
r
"""
Constructs a DistilBertTokenizer.
...
...
@@ -59,3 +67,4 @@ class DistilBertTokenizer(BertTokenizer):
vocab_files_names
=
VOCAB_FILES_NAMES
pretrained_vocab_files_map
=
PRETRAINED_VOCAB_FILES_MAP
max_model_input_sizes
=
PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
pretrained_init_configuration
=
PRETRAINED_INIT_CONFIGURATION
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