Allow tokenizers 0.23.1#46381
Open
ArthurZucker wants to merge 5 commits into
Open
Conversation
Closes #45736
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
tokenizers 0.23.1 made RobertaProcessing args positional-only. Convert the 5 call sites (convert_slow_tokenizer x2, clip, layoutlmv3, roberta) to positional (sep, cls, trim_offsets, add_prefix_space) — works on 0.22.x and 0.23.1.
tokenizers 0.23.1 early-exits right-direction truncation (huggingface/tokenizers#1990), so return_overflowing_tokens may omit the trailing overflow segment when it is shorter than the window. Validate the overflow content only when that segment is present; truncation is always checked. Keeps passing on 0.22.x (segment always present).
The trailing overflow segment is not essential to validate here, and 0.23.1's truncation early-exit (huggingface/tokenizers#1990) may omit it. Keep the truncation checks; remove the now-dead overflow expectations.
ArthurZucker
commented
Jun 4, 2026
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: clip, layoutlmv3, roberta |
Contributor
|
CI Dashboard: View test results in Grafana |
Contributor
|
View the CircleCI Test Summary for this PR: https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=46381&sha=9b77e5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #45736 — allow
tokenizers==0.23.1.Two 0.23.1 changes handled:
RobertaProcessingargs are now positional-only → fixed 5 call sites (convert_slow ×2, clip, layoutlmv3, roberta).Tested: clip/roberta/layoutlmv3/bert/gpt2/t5 tokenizer suites pass on both 0.22.2 and 0.23.1. AI-assisted, human-reviewed.