Skip to content

Fixed a multiple-devices issue in SmolVLM model #38736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

remi-or
Copy link
Contributor

@remi-or remi-or commented Jun 10, 2025

This PR fixes a multiple-devices issue in SmolVLM model. It was originally fixed in the amd-hf-ci-branch but it would be nice to have it in main.

Without this PR, the test tests/models/smolvlm/test_modeling_smolvlm.py::SmolVLMForConditionalGenerationIntegrationTest::test_integration_test failed on MI3XX machines.

cc. @zucchini-nlp (I think)

* Fixed a multiple-devices issue in SmolVLMModel

* Changed the modular to reflect changes
@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
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.

Thanks! We could move device placements in inputs_merger so that it handles the dtype/device match before scattering. But I think it's fine as is, no big diff

@zucchini-nlp zucchini-nlp merged commit f1849ea into huggingface:main Jun 11, 2025
14 checks passed
lmarshall12 pushed a commit to lmarshall12/transformers that referenced this pull request Jun 11, 2025
Fixed a multiple-devices issue in SmolVLMModel (huggingface#38557)

* Fixed a multiple-devices issue in SmolVLMModel

* Changed the modular to reflect changes
YushunXiang pushed a commit to YushunXiang/transformers that referenced this pull request Jun 11, 2025
Fixed a multiple-devices issue in SmolVLMModel (huggingface#38557)

* Fixed a multiple-devices issue in SmolVLMModel

* Changed the modular to reflect changes
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