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
777faa8a
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "7f3b41a306abe855851c4d14f72e118b0f68d5a2"
Commit
777faa8a
authored
Oct 22, 2019
by
Lysandre
Browse files
Fix #1597
parent
b8c9ea00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
transformers/tokenization_ctrl.py
transformers/tokenization_ctrl.py
+1
-5
No files found.
transformers/tokenization_ctrl.py
View file @
777faa8a
...
@@ -63,11 +63,7 @@ def get_pairs(word):
...
@@ -63,11 +63,7 @@ def get_pairs(word):
class
CTRLTokenizer
(
PreTrainedTokenizer
):
class
CTRLTokenizer
(
PreTrainedTokenizer
):
"""
"""
CTRL BPE tokenizer. Peculiarities:
CTRL BPE tokenizer. Peculiarities:
- Byte-level Byte-Pair-Encoding
- Byte-Pair-Encoding
- Requires a space to start the input string => the encoding methods should be called with the
``add_prefix_space`` flag set to ``True``.
Otherwise, this tokenizer ``encode`` and ``decode`` method will not conserve
the absence of a space at the beginning of a string: `tokenizer.decode(tokenizer.encode("Hello")) = " Hello"`
"""
"""
vocab_files_names
=
VOCAB_FILES_NAMES
vocab_files_names
=
VOCAB_FILES_NAMES
pretrained_vocab_files_map
=
PRETRAINED_VOCAB_FILES_MAP
pretrained_vocab_files_map
=
PRETRAINED_VOCAB_FILES_MAP
...
...
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