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
286ccefb
Unverified
Commit
286ccefb
authored
Aug 31, 2021
by
Apoorv Garg
Committed by
GitHub
Aug 31, 2021
Browse files
doc mismatch fixed (#13345)
parent
41c55941
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
docs/source/preprocessing.rst
docs/source/preprocessing.rst
+6
-5
No files found.
docs/source/preprocessing.rst
View file @
286ccefb
...
...
@@ -243,15 +243,16 @@ three arguments you need to know for this are :obj:`padding`, :obj:`truncation`
- :obj:`truncation` controls the truncation. It can be a boolean or a string which should be:
- :obj:`True` or :obj:`'on
ly
_first'` truncate to a maximum length specified by the :obj:`max_length` argument or
- :obj:`True` or :obj:`'
l
on
gest
_first'` truncate to a maximum length specified by the :obj:`max_length` argument or
the maximum length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will
only truncate the first sentence of a pair if a pair of sequence (or a batch of pairs of sequences) is provided.
truncate token by token, removing a token from the longest sequence in the pair until the proper length is
reached.
- :obj:`'only_second'` truncate to a maximum length specified by the :obj:`max_length` argument or the maximum
length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will only truncate
the second sentence of a pair if a pair of sequence (or a batch of pairs of sequences) is provided.
- :obj:`'
l
on
gest
_first'` truncate to a maximum length specified by the :obj:`max_length` argument or the maximum
length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will truncate
token
by token, removing a token from the longest sequence in the pair until the proper length is reach
ed.
- :obj:`'on
ly
_first'` truncate to a maximum length specified by the :obj:`max_length` argument or the maximum
length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will
only
truncate
the first sentence of a pair if a pair of sequence (or a batch of pairs of sequences) is provid
ed.
- :obj:`False` or :obj:`'do_not_truncate'` to not truncate the sequences. As we have seen before, this is the
default behavior.
...
...
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