Skip to content

Commit 286ccef

Browse files
doc mismatch fixed (huggingface#13345)
1 parent 41c5594 commit 286ccef

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/source/preprocessing.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,16 @@ three arguments you need to know for this are :obj:`padding`, :obj:`truncation`
243243

244244
- :obj:`truncation` controls the truncation. It can be a boolean or a string which should be:
245245

246-
- :obj:`True` or :obj:`'only_first'` truncate to a maximum length specified by the :obj:`max_length` argument or
246+
- :obj:`True` or :obj:`'longest_first'` truncate to a maximum length specified by the :obj:`max_length` argument or
247247
the maximum length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will
248-
only truncate the first sentence of a pair if a pair of sequence (or a batch of pairs of sequences) is provided.
248+
truncate token by token, removing a token from the longest sequence in the pair until the proper length is
249+
reached.
249250
- :obj:`'only_second'` truncate to a maximum length specified by the :obj:`max_length` argument or the maximum
250251
length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will only truncate
251252
the second sentence of a pair if a pair of sequence (or a batch of pairs of sequences) is provided.
252-
- :obj:`'longest_first'` truncate to a maximum length specified by the :obj:`max_length` argument or the maximum
253-
length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will truncate token
254-
by token, removing a token from the longest sequence in the pair until the proper length is reached.
253+
- :obj:`'only_first'` truncate to a maximum length specified by the :obj:`max_length` argument or the maximum
254+
length accepted by the model if no :obj:`max_length` is provided (``max_length=None``). This will only truncate
255+
the first sentence of a pair if a pair of sequence (or a batch of pairs of sequences) is provided.
255256
- :obj:`False` or :obj:`'do_not_truncate'` to not truncate the sequences. As we have seen before, this is the
256257
default behavior.
257258

0 commit comments

Comments
 (0)