Skip to content

[AMD CI] Fix test failures across important models #44632

Merged
Abdennacer-Badaoui merged 8 commits intohuggingface:mainfrom
Abdennacer-Badaoui:qwens
Mar 17, 2026
Merged

[AMD CI] Fix test failures across important models #44632
Abdennacer-Badaoui merged 8 commits intohuggingface:mainfrom
Abdennacer-Badaoui:qwens

Conversation

@Abdennacer-Badaoui
Copy link
Copy Markdown
Member

Summary

  • Update test expectations for affected models
  • Add some needed dependencies
  • Fix TypeError: GenerationMixin.prepare_inputs_for_generation() got multiple values for argument 'next_sequence_length' in Qwen2.5-Omni talker by passing positional args as keyword args in super() call

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


prompt = "<|im_start|>system\nAnswer the questions.<|im_end|><|im_start|>user\n<image>\nWhat is shown in this image?<|im_end|><|im_start|>assistant\n"
EXPECTED_OUTPUT = ['<|im_start|>', 'sy', 'st', 'em', '\n', 'An', 'sw', 'er', ' ', 'the', ' ', 'qu', 'est', 'ions', '.', '<|im_end|>', '<|im_start|>', 'us', 'er', '\n', '<image>', '\n', 'What', ' ', 'is', ' ', 'sh', 'own', ' ', 'in', ' ', 'th', 'is', ' ', 'im', 'age', '?', '<|im_end|>', '<|im_start|>', 'ass', 'ist', 'ant', '\n'] # fmt: skip
EXPECTED_OUTPUT = ['<|im_start|>', 'system', '\n', 'Answer', 'the', '▁questions', '.', '<|im_end|>', '<|im_start|>', 'user', '\n', '<image>', '\n', 'What', 'is', '▁shown', 'in', '▁this', '▁image', '?', '<|im_end|>', '<|im_start|>', 'ass', 'istant', '\n'] # fmt: skip
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.

We need to use Expectation class here.

(I don't know if this updated values are good across different hardware however : A10, AMD etc.)

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.

def test_speculative_generation(self):
EXPECTED_TEXT_COMPLETION = (
"My favourite condiment is 100% natural and organic, and I love to use it to make my own sauces."
"My favourite condiment is 100% natural, organic, gluten-free, vegan, and vegetarian. I have been making"
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.

same

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.

Comment on lines +2530 to +2532
past_key_values=past_key_values,
attention_mask=attention_mask,
inputs_embeds=inputs_embeds,
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.

could you share more info about what was wrong when passing as pos. arguments?

I am fine for the change, but just prefer some details 🙏

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.

The parent GenerationMixin.prepare_inputs_for_generation added next_sequence_length as the 2nd positional arg (right after input_ids). So when the talker passed past_key_values positionally in that slot, it got bound to next_sequence_length instead. Then next_sequence_length also came in through **kwargs from the caller → duplicate value → TypeError.

@github-actions
Copy link
Copy Markdown
Contributor

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

run-slow: llava, qwen2, qwen2_5_omni, qwen2_5_vl

Copy link
Copy Markdown
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

Thanks!

@Abdennacer-Badaoui Abdennacer-Badaoui added this pull request to the merge queue Mar 17, 2026
Merged via the queue into huggingface:main with commit af93d38 Mar 17, 2026
22 checks passed
@Abdennacer-Badaoui Abdennacer-Badaoui deleted the qwens branch March 17, 2026 14:58
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