Skip to content

[static cache] fix device map per layer in VLMs#38488

Merged
zucchini-nlp merged 2 commits into
huggingface:mainfrom
zucchini-nlp:multi-gpu-vlms
Jun 20, 2025
Merged

[static cache] fix device map per layer in VLMs#38488
zucchini-nlp merged 2 commits into
huggingface:mainfrom
zucchini-nlp:multi-gpu-vlms

Conversation

@zucchini-nlp

Copy link
Copy Markdown
Member

What does this PR do?

As per title, addresses the issue from #38426 (comment)

After the recent refactor, we don't return language model as decoder but only the base model, which contain vision/vq/audio etc encoders. Since generation relies on get_decoder() and since decoder is supposed to be only the LM backbone, this PR returns the correct module as decoder

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

@zucchini-nlp zucchini-nlp requested a review from gante May 30, 2025 08:21
@remi-or remi-or mentioned this pull request Jun 9, 2025

@gante gante left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you for fixing 🤗

@zucchini-nlp zucchini-nlp merged commit ff95974 into huggingface:main Jun 20, 2025
15 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.

3 participants