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
8b388827
"test/git@developer.sourcefind.cn:change/sglang.git" did not exist on "08ab2a1655224a671fd8d356387aa83f3179129a"
Commit
8b388827
authored
Dec 05, 2019
by
thomwolf
Browse files
fix #1920
parent
d425a4d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
transformers/tokenization_ctrl.py
transformers/tokenization_ctrl.py
+2
-2
No files found.
transformers/tokenization_ctrl.py
View file @
8b388827
...
@@ -192,9 +192,9 @@ class CTRLTokenizer(PreTrainedTokenizer):
...
@@ -192,9 +192,9 @@ class CTRLTokenizer(PreTrainedTokenizer):
"""
"""
split_tokens
=
[]
split_tokens
=
[]
text
=
text
.
split
(
' '
)
words
=
re
.
findall
(
r
'\S+\n?'
,
text
)
for
token
in
text
:
for
token
in
words
:
split_tokens
.
extend
([
t
for
t
in
self
.
bpe
(
token
).
split
(
' '
)])
split_tokens
.
extend
([
t
for
t
in
self
.
bpe
(
token
).
split
(
' '
)])
return
split_tokens
return
split_tokens
...
...
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