Skip to content

fix(backends): handle SpecialTokensMixin import for transformers v5#338

Open
Leetfs wants to merge 1 commit into
huggingface:mainfrom
Leetfs:fixtransformers
Open

fix(backends): handle SpecialTokensMixin import for transformers v5#338
Leetfs wants to merge 1 commit into
huggingface:mainfrom
Leetfs:fixtransformers

Conversation

@Leetfs

@Leetfs Leetfs commented May 25, 2026

Copy link
Copy Markdown

Use nested try-except blocks to import SpecialTokensMixin, falling back to tokenization_utils_base for >=4.45.0, and aliasing it to PreTrainedTokenizerBase for v5.0.0+ compatibility.

Use nested try-except blocks to import SpecialTokensMixin, falling back
to tokenization_utils_base for >=4.45.0, and aliasing it to
PreTrainedTokenizerBase for v5.0.0+ compatibility.

Signed-off-by: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
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.

1 participant