Skip to content

Fix zamba2 rotary embedding call when use_mem_rope is False#44551

Merged
ydshieh merged 2 commits intohuggingface:mainfrom
echarlaix:zamba2-rotary-emb
Mar 10, 2026
Merged

Fix zamba2 rotary embedding call when use_mem_rope is False#44551
ydshieh merged 2 commits intohuggingface:mainfrom
echarlaix:zamba2-rotary-emb

Conversation

@echarlaix
Copy link
Copy Markdown
Collaborator

@echarlaix echarlaix commented Mar 9, 2026

self.rotary_emb is always called since #39847 while only being initialized when config.use_mem_rope is True

inference failing since v5 for models config.use_mem_rope=False

AttributeError: 'Zamba2Model' object has no attribute 'rotary_emb'

https://github.com/huggingface/transformers/blob/v4.57.6/src/transformers/models/zamba2/modeling_zamba2.py#L1312-L1316

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

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

run-slow: zamba2

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

Copy link
Copy Markdown
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.

Ah right, missed that part. Thanks for fixing

@zucchini-nlp zucchini-nlp added this pull request to the merge queue Mar 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 10, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Mar 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 10, 2026
@ydshieh ydshieh merged commit b7e4da0 into huggingface:main Mar 10, 2026
21 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