Skip to content

Conversation

@Abdennacer-Badaoui
Copy link
Member

This PR fixes several failures on AMD for Qwen2, Qwen2.5-Omni, and Qwen2.5-VL.

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

Copy link
Collaborator

@remi-or remi-or left a comment

Choose a reason for hiding this comment

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

A comment (repeated twice) to address + I will run the slow tests


else:
batch_size, seq_length, _ = inputs_embeds.shape
batch_size, seq_length = input_ids.shape
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think input_ids are optional, as is input_embeds -- is there an argument that is not that we could infer those dimensions with? Otherwise I think one of the two inputs_needs to not beNone, so we can get the dims from whichever is notNone`

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, let's do that. We'll try to get the dimensions from input_embeds. If they are None (as was the case for some failing tests), we will then try to infer them from input_ids.


else:
batch_size, seq_length, _ = inputs_embeds.shape
batch_size, seq_length = input_ids.shape
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

out = model(input_ids).logits.float().cpu()
# Expected mean on dim = -1
EXPECTED_MEAN = torch.tensor([[-1.9537, -1.6193, -1.4123, -1.4673, -1.8511, -1.9309, -1.9826, -2.1776]])
EXPECTED_MEAN = torch.tensor([[-2.2121, -1.6335, -1.4816, -1.5035, -1.9110, -1.8979, -1.9682, -2.1980]])
Copy link
Collaborator

Choose a reason for hiding this comment

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

I will run the slow test to see if this does not break things on CUDA, otherwise you should add Expectations

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. I remember checking the Nvidia CI, they were the same expectation outputs. But let's see for these exepected means.

@remi-or
Copy link
Collaborator

remi-or commented Dec 17, 2025

run-slow: qwen2, qwen2_5_omni, qwen2_5_vl

@github-actions
Copy link
Contributor

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

models: ["models/qwen2", "models/qwen2_5_omni", "models/qwen2_5_vl"]
quantizations: []

@github-actions
Copy link
Contributor

CI Results

Workflow Run ⚙️

✅ No failing test specific to this PR 🎉 !

@github-actions
Copy link
Contributor

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

run-slow: qwen2, qwen2_5_omni, qwen2_5_vl

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