[AMD CI] Fix test failures across important models #44632
[AMD CI] Fix test failures across important models #44632Abdennacer-Badaoui merged 8 commits intohuggingface:mainfrom
Conversation
|
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 |
There was a problem hiding this comment.
We need to use Expectation class here.
(I don't know if this updated values are good across different hardware however : A10, AMD etc.)
There was a problem hiding this comment.
They are good for A10 as well : https://github.com/huggingface/transformers/actions/runs/23034484105/job/66899818920
| 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" |
There was a problem hiding this comment.
Good for A10 as well :
https://github.com/huggingface/transformers/actions/runs/23034484105/job/66899814875
| past_key_values=past_key_values, | ||
| attention_mask=attention_mask, | ||
| inputs_embeds=inputs_embeds, |
There was a problem hiding this comment.
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 🙏
There was a problem hiding this comment.
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.
|
[For maintainers] Suggested jobs to run (before merge) run-slow: llava, qwen2, qwen2_5_omni, qwen2_5_vl |
Summary
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 insuper()call