Skip to content

AutoTokenizer ignores config when model_type is None - #44127

Merged
itazap merged 2 commits into
mainfrom
auto_tok_fix
Feb 18, 2026
Merged

itazap merged 2 commits into
mainfrom
auto_tok_fix

Conversation

@itazap

@itazap itazap commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator

when the model_type isn't in TOKENIZER_MAPPING_NAMES (ex. "llama"), TOKENIZER_MAPPING_NAMES.get("llama", "") --> "". Then we compare "" != "LlamaTokenizer" (the tokenizer_class in tokenizer_config.json). Since that's true we early exit and fallback to TokenizerBackend

@itazap
itazap requested a review from ArthurZucker February 18, 2026 10:41
@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.

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

@itazap

itazap commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator Author

run-slow: auto

@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: aria, auto

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: ["models/auto"]
quantizations: []

@itazap
itazap merged commit 398780d into main Feb 18, 2026
26 of 27 checks passed
@itazap
itazap deleted the auto_tok_fix branch February 18, 2026 13:06
@github-actions

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 85226ae3 workflow commit (merge commit)
PR af9d764c branch commit (from PR)
main 3689287d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

Stanley00 pushed a commit to stanley-fork/openvino.genai that referenced this pull request Oct 1, 2026
…th transformers 5.5 (openvinotoolkit#4566)

<!-- Keep your pull requests (PRs) as atomic as possible. That increases
the likelihood that an individual PR won't be stuck because of adjacent
problems, merge conflicts, or code review.
Your merged PR is going to appear in the automatically generated release
notes on GitHub. So the clearer the title the better. -->
## Description
<!-- Please include a summary of the change. Also include relevant
motivation and context. -->

<!-- Jira ticket number (e.g., 123). Delete if there's no ticket. -->
[CVS-195654](https://jira.devtools.intel.com/browse/CVS-195654)

Transformers 5.5 have changed tokenizers for TinyLLama
(huggingface/transformers#44127). That caused a
slight change in logits, and the output transaction id changed from 1234
to 1234567 for Python and from 1234 to 123456789 for JS. So now python
integerer generation differs from JS's number generation. And we have a
couple tests that compare the exact output for them, and I think we
probably want exact output for Python/JS. Adding integer typing for JS
fixes the issue.

I've also relaxed the assert for the second issue, as with the new
tokenizer tinyllama started ouputtting different answer. Anyway, the
model seems too weak to solve the equations right (see the test and
answers), so I think a more general assert might be better here.

## Checklist:
- [x] This PR follows [GenAI Contributing
guidelines](https://github.com/openvinotoolkit/openvino.genai?tab=contributing-ov-file#contributing).
<!-- Always follow them. If there are deviations, explain what and why.
-->
- [x] <!-- (or N/A) --> Tests have been updated or added to cover the
new code. <!-- Specify exactly which tests were added or updated. If the
change isn't maintenance related, update the tests at
https://github.com/openvinotoolkit/openvino.genai/tree/master/tests or
explain in the description why the tests don't need an update. -->
- [x] <!-- (or N/A) --> This PR fully addresses the ticket. <!--- If
not, explain clearly what is covered and what is not. If follow-up pull
requests are needed, specify in the description. -->
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.

3 participants