Skip to content

🚨 Leftover processors - #47924

Merged
zucchini-nlp merged 15 commits into
huggingface:mainfrom
zucchini-nlp:forgotte-processorts
Aug 18, 2026
Merged

🚨 Leftover processors#47924
zucchini-nlp merged 15 commits into
huggingface:mainfrom
zucchini-nlp:forgotte-processorts

Conversation

@zucchini-nlp

@zucchini-nlp zucchini-nlp commented Aug 12, 2026

Copy link
Copy Markdown
Member

CI

What does this PR do?

As per title + fix emu's BOS token addition. Fuyu is hard, so I am checking how to do it with minimal changes

relate to vllm: vllm-project/vllm#51827

Note: this is breaking because we don't return an unused image_patch_indices anymore from FuyuProcessor. The model has not been using them for a while thus the input has been dropped from processors as well

@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

Copy link
Copy Markdown
Member Author

run-slow: ernie4_5_vl_moe, fuyu, qwen2_audio

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

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

models: ["models/ernie4_5_vl_moe", "models/fuyu", "models/qwen2_audio"]
quantizations: []

@github-actions

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 333d3f77 workflow commit (merge commit)
PR f27700fb branch commit (from PR)
main d1123114 base commit (on main)

Model CI Report

3 new failed tests from this PR 😭

  • qwen2_audio:
    tests/models/qwen2_audio/test_modeling_qwen2_audio.py::Qwen2AudioForConditionalGenerationIntegrationTest::test_small_model_integration_test_batch (✅ ⟹ ❌)
    tests/models/qwen2_audio/test_modeling_qwen2_audio.py::Qwen2AudioForConditionalGenerationIntegrationTest::test_small_model_integration_test_multiurn (✅ ⟹ ❌)
    tests/models/qwen2_audio/test_modeling_qwen2_audio.py::Qwen2AudioForConditionalGenerationIntegrationTest::test_small_model_integration_test_single (✅ ⟹ ❌)

Comment on lines -238 to -239
image_patches_indices (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
Tensor of indices of the image patches in the input_ids tensor.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

unused by model I dunno since when, so deleted here so it is just consumed by kwargs. Also deleted from processor outputs

Comment on lines +387 to +403
# IMPORTANT: here comes the custom part with tokenization, do not change it!
if not images_replacements:
text_inputs = self.tokenizer(text, **merged_kwargs["text_kwargs"])
else:
# encode the text and the placeholders separately, then always pad on the left
batch_input_ids, batch_attention_mask = [], []
for sample in text:
split_sample = re.split(r"(?<=<s>)", sample, maxsplit=1)
prompt_inputs = self.tokenizer(split_sample[-1], **merged_kwargs["text_kwargs"])

if len(split_sample) == 2:
# strip off the underscore which is always prepended before special image tokens
# we are guaranteed that the output are torch tensors
placeholder_inputs = self.tokenizer(split_sample[0], **merged_kwargs["text_kwargs"])
batch_input_ids.append(
torch.cat(
[placeholder_inputs["input_ids"][..., 1:], prompt_inputs["input_ids"]], dim=-1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

very ugly but there is no way around with the saved tokenizer's quirks. We can't suppress the prefix underscore always, it should be kept in text-only samples and dropped only when added before image tokens

@zucchini-nlp

Copy link
Copy Markdown
Member Author

run-slow: emu3, ernie4_5_vl_moe, fuyu, qwen2_audio

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

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

models: ["models/emu3", "models/ernie4_5_vl_moe", "models/fuyu", "models/qwen2_audio"]
quantizations: []

@github-actions

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 8019092f workflow commit (merge commit)
PR 3cef83f8 branch commit (from PR)
main 918dbf13 base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@zucchini-nlp zucchini-nlp changed the title Leftover processors 🚨 Leftover processors Aug 17, 2026

@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.

potentially a new rule for the mlinter? 👀

@zucchini-nlp

Copy link
Copy Markdown
Member Author

Maybe... We might have a few reaaaly old ones that I don't want to even touch, they will have to go on allow list 😆

@zucchini-nlp
zucchini-nlp enabled auto-merge August 18, 2026 08:26
@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: emu3, ernie4_5_vl_moe, fuyu, qwen2_audio

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 32032124568:1
Result: failure | Jobs: 16 | Tests: 182,018 | Failures: 1 | Duration: 9h 40m

@zucchini-nlp
zucchini-nlp added this pull request to the merge queue Aug 18, 2026
Merged via the queue into huggingface:main with commit 5068901 Aug 18, 2026
211 of 213 checks passed
@zucchini-nlp
zucchini-nlp deleted the forgotte-processorts branch August 18, 2026 09:33
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