Skip to content

[mllama] fix loading and inference #38223

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
May 20, 2025

Conversation

zucchini-nlp
Copy link
Member

What does this PR do?

Fixes #38220, it's a shame we couldn't see it earlier in CI. Probably because mllama isn't available in EU 🥲

We should not repeat keys before calling attn, otherwise it is repeated twice. And remove base_model_prefix so the model can load old state dicts by manual remapping

@zucchini-nlp zucchini-nlp requested a review from ArthurZucker May 20, 2025 09:56
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM indeed eager attn forward does this again

@ArthurZucker
Copy link
Collaborator

Let's make sure the cache object has a correct shape to support GQA

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

@zucchini-nlp zucchini-nlp merged commit 2edb0e4 into huggingface:main May 20, 2025
14 checks passed
faaany pushed a commit to faaany/transformers that referenced this pull request May 21, 2025
xvyv99 pushed a commit to xvyv99/transformers that referenced this pull request May 21, 2025
redmoe-moutain pushed a commit to redmoe-moutain/transformers that referenced this pull request Jun 10, 2025
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.

mllama model loading failed after refactor
3 participants