Skip to content

Multiple fixes to FA tests in AMD#40498

Merged
remi-or merged 11 commits intohuggingface:mainfrom
remi-or:sweep-amd-ci-fa
Sep 1, 2025
Merged

Multiple fixes to FA tests in AMD#40498
remi-or merged 11 commits intohuggingface:mainfrom
remi-or:sweep-amd-ci-fa

Conversation

@remi-or
Copy link
Collaborator

@remi-or remi-or commented Aug 27, 2025

This PR fixes a tests across a few models in the following ways:

  • solves a multi-device issue in qwen2_5_omni
  • adds AMD expectations to gemma3, qwen2_5_omni and qwen2_5_vl
  • fixes an issue in the qwen2_5_omni and qwen2_5_vl FA tests: the test changes the hidden_size so it breaks compatibility with mrope. For this issue, I added a fix using try and except to ensure the change to mrope_section does not propagate to the rest of the tests. I am not sure this is the best way, so tagging @ydshieh
  • removed some mutables that were used a default arguments

This PR touches mostly test-related files, so I think it's ok to bundle everything, but please let me know if not. As the non test-related stuff this is mostly multimodal, cc. @zucchini-nlp

@remi-or remi-or requested a review from zucchini-nlp August 27, 2025 15:04
@HuggingFaceDocBuilderDev

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.

Comment on lines +124 to +126
# Default vision config is None to avoid a mutable default argument
if vision_config is None:
vision_config = {
"depth": 2,
Copy link
Member

Choose a reason for hiding this comment

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

should not be a problem as long as the QwenConfig takes the dict and creates a new VisionConfig from it, but agreed that mutable defaults is not a good idea in general

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah it's kind of a nit, I thought it was the problem initially and it was not, but since it's fixed might as well leave it!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's avoid any mutable type in the arguments 🙏 so keep as it is in this PR

@ydshieh
Copy link
Collaborator

ydshieh commented Aug 28, 2025

Although you are a AMD fans, don't forget to use run-slow (unless you feel strong it's not necessary in some cases)

@remi-or remi-or force-pushed the sweep-amd-ci-fa branch 2 times, most recently from ee12748 to 5f91da4 Compare September 1, 2025 09:43

EXPECTED_DECODED_TEXT = [
'system\nYou are a helpful assistant.\nuser\nWhat kind of dog is this?\nassistant\nThe dog in the picture appears to be a Labrador Retriever. Labradors are known for their friendly and energetic nature, which is evident in',
"system\nYou are a helpful assistant.\nuser\nWho are you?\nassistant\n�\n\n addCriterion\nI'm sorry, but I don't understand your question. Could you please provide more context or clarify what you're asking",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@zucchini-nlp the second answer seems wrong to me, it used to be I am Qwen, a large language model created by Alibaba Cloud. I am designed to answer a wide range of questions and provide information on various topics which makes more sense. I added a #FIXME because it seems out of scope for this PR

Copy link
Member

Choose a reason for hiding this comment

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

yeah, this is quite similar to the generation from non-FA2 model a few lines above, though I have no idea when it got from I am Qwen to addCriterion

Thanks, will need to go back in git history to see what changed

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2025

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

models: ['models/gemma3', 'models/qwen2_5_omni', 'models/qwen2_5_vl']
quantizations: [] ...

Copy link
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

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

approving in advance, so it can be merged as long as the slow tests show ✅

@remi-or
Copy link
Collaborator Author

remi-or commented Sep 1, 2025

run-slow: gemma3, qwen2_5_omni, qwen2_5_vl

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2025

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

models: ['models/gemma3', 'models/qwen2_5_omni', 'models/qwen2_5_vl']
quantizations: [] ...

@remi-or
Copy link
Collaborator Author

remi-or commented Sep 1, 2025

run-slow: gemma3, qwen2_5_omni, qwen2_5_vl

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2025

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

run-slow: gemma3, qwen2_5_omni, qwen2_5_vl

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2025

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

models: ['models/gemma3', 'models/qwen2_5_omni', 'models/qwen2_5_vl']
quantizations: [] ...

@remi-or
Copy link
Collaborator Author

remi-or commented Sep 1, 2025

There are slow tests failing for

@remi-or remi-or merged commit 514b3e8 into huggingface:main Sep 1, 2025
24 of 25 checks passed
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.

4 participants

Comments