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
3dea40b8
Unverified
Commit
3dea40b8
authored
May 25, 2020
by
Elman Mansimov
Committed by
GitHub
May 25, 2020
Browse files
fixing tokenization of extra_id symbols in T5Tokenizer. Related to issue 4021 (#4353)
parent
51397336
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/tokenization_utils.py
src/transformers/tokenization_utils.py
+1
-0
No files found.
src/transformers/tokenization_utils.py
View file @
3dea40b8
...
...
@@ -503,6 +503,7 @@ class SpecialTokensMixin:
if
key
in
self
.
SPECIAL_TOKENS_ATTRIBUTES
:
if
key
==
"additional_special_tokens"
:
assert
isinstance
(
value
,
(
list
,
tuple
))
and
all
(
isinstance
(
t
,
str
)
for
t
in
value
)
setattr
(
self
,
key
,
value
)
elif
isinstance
(
value
,
AddedTokenFast
):
setattr
(
self
,
key
,
str
(
value
))
elif
isinstance
(
value
,
str
):
...
...
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