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
5af8df5a
Unverified
Commit
5af8df5a
authored
Aug 25, 2021
by
Lysandre Debut
Committed by
GitHub
Aug 25, 2021
Browse files
Some `model_type`s cannot be in the mapping (#13259)
* Some tokenizers cannot be in the mapping * Style
parent
68b69072
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/transformers/tokenization_utils_base.py
src/transformers/tokenization_utils_base.py
+3
-1
No files found.
src/transformers/tokenization_utils_base.py
View file @
5af8df5a
...
...
@@ -1799,7 +1799,9 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
break
if
model_type
is
not
None
:
config_tokenizer_class
,
config_tokenizer_class_fast
=
TOKENIZER_MAPPING_NAMES
[
model_type
]
config_tokenizer_class
,
config_tokenizer_class_fast
=
TOKENIZER_MAPPING_NAMES
.
get
(
model_type
,
(
None
,
None
)
)
if
config_tokenizer_class
is
None
:
config_tokenizer_class
=
config_tokenizer_class_fast
...
...
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