Skip to content

Allow tokenizers 0.23.1 - #46381

Open
ArthurZucker wants to merge 11 commits into
mainfrom
bump-tokenizers-0.23.1
Open

Allow tokenizers 0.23.1#46381
ArthurZucker wants to merge 11 commits into
mainfrom
bump-tokenizers-0.23.1

Conversation

@ArthurZucker

@ArthurZucker ArthurZucker commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

CI

Closes #45736 — allow tokenizers==0.23.1.

Two 0.23.1 changes handled:

Tested: clip/roberta/layoutlmv3/bert/gpt2/t5 tokenizer suites pass on both 0.22.2 and 0.23.1. AI-assisted, human-reviewed.

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.
Comment thread setup.py Outdated
@ArthurZucker
ArthurZucker marked this pull request as ready for review June 4, 2026 13:07
tokenizers.processors.BertProcessing.__new__ does not accept 'sep' and
'cls' keyword arguments, raising TypeError on tokenizer init. Pass the
(token, id) tuples positionally instead.
Run with tokenizers 0.23.1 (new type stubs). Fixes:
- add missing '| None' to params defaulting to None (truncation, udop
  text/text_target) across layoutlmv2/v3, layoutxlm, luke, markuplm,
  mluke, roc_bert, pop2piano, udop (invalid-parameter-default)
- pop2piano: offset_sec annotated int but defaults to 0.0 -> float
- bertweet: import html.entities (submodule not pulled in by 'import html')
- tapas: tuple[float, Ellipsis] -> tuple[float, ...] (invalid-type-form)
@ArthurZucker
ArthurZucker force-pushed the bump-tokenizers-0.23.1 branch from d951dc9 to 6c8ef7a Compare June 9, 2026 13:27
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

View the CircleCI Test Summary for this PR:

https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=46381&sha=6c8ef7

@ArthurZucker

Copy link
Copy Markdown
Collaborator Author

Oups doing this now

@GaetanLepage

Copy link
Copy Markdown
Contributor

Oups doing this now

Did you push it to master? I just pulled the just-released 5.13.0 tag and it still complains about tokenizers.
Maybe I missed something.

Thanks a lot!

@ArthurZucker

Copy link
Copy Markdown
Collaborator Author

nope sorry

@ArthurZucker

Copy link
Copy Markdown
Collaborator Author

I was a bit busy with designing tokenizers v1

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: bertweet, clip, herbert, layoutlmv2, layoutlmv3, layoutxlm, luke, markuplm, mluke, mpnet, pop2piano, roberta, roc_bert, tapas, udop

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 29575704636:1
Result: success | Jobs: 15 | Tests: 138,566 | Failures: 0 | Duration: 13h 34m

@ArthurZucker
ArthurZucker enabled auto-merge July 17, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please update tokenizers version check

3 participants