Skip to content

Allow mm_token_type be non-padded lists #44563

Merged
zucchini-nlp merged 13 commits intohuggingface:mainfrom
zucchini-nlp:mm-token-types-non-padded
Mar 25, 2026
Merged

Allow mm_token_type be non-padded lists #44563
zucchini-nlp merged 13 commits intohuggingface:mainfrom
zucchini-nlp:mm-token-types-non-padded

Conversation

@zucchini-nlp
Copy link
Copy Markdown
Member

What does this PR do?

Split out mm_token_type_id creation to a separate utility and just call it in VLMs. Also make sure that mm_token_type_id can be created even when padding=False and the inputs are of different length. As long as the return_type is not an array, it should work

Fixes #44545 and fixes #44514

@zucchini-nlp zucchini-nlp requested a review from yonigozlan March 10, 2026 10:13
@zucchini-nlp zucchini-nlp changed the title squash commit Allow mm_token_type be non-padded lists Mar 10, 2026
@zucchini-nlp zucchini-nlp removed the request for review from yonigozlan March 10, 2026 10:57
@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.

@zucchini-nlp zucchini-nlp requested a review from yonigozlan March 10, 2026 15:43
Copy link
Copy Markdown
Member

@yonigozlan yonigozlan left a comment

Choose a reason for hiding this comment

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

Just some small comments mostly on llava, but overall LGTM!

Comment thread src/transformers/models/llava/processing_llava.py Outdated
Comment thread src/transformers/models/llava/processing_llava.py Outdated
Comment thread src/transformers/processing_utils.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

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

run-slow: aria, aya_vision, chameleon, cohere2_vision, colmodernvbert, emu3, florence2, fuyu, gemma3, glm46v, glm4v, glm_image, idefics3, internvl, lighton_ocr, llava

@zucchini-nlp zucchini-nlp added this pull request to the merge queue Mar 25, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 25, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Mar 25, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Mar 25, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Mar 25, 2026
Merged via the queue into huggingface:main with commit c532659 Mar 25, 2026
28 checks passed
@zucchini-nlp zucchini-nlp deleted the mm-token-types-non-padded branch March 25, 2026 11:33
zucchini-nlp added a commit to zucchini-nlp/transformers that referenced this pull request Mar 27, 2026
* squash commit

* several forks mixed up, revert

* oops

* glms

* commit lost when rebasing, revert

* typing hints

* more failures

* fix repo

* comments and revert unrelated

* fix style

* fix repo
NielsRogge pushed a commit to NielsRogge/transformers that referenced this pull request Mar 30, 2026
* squash commit

* several forks mixed up, revert

* oops

* glms

* commit lost when rebasing, revert

* typing hints

* more failures

* fix repo

* comments and revert unrelated

* fix style

* fix repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants