Skip to content

Fix zamba2 rotary embedding call when use_mem_rope is False#44551

Open
echarlaix wants to merge 2 commits intohuggingface:mainfrom
echarlaix:zamba2-rotary-emb
Open

Fix zamba2 rotary embedding call when use_mem_rope is False#44551
echarlaix wants to merge 2 commits intohuggingface:mainfrom
echarlaix:zamba2-rotary-emb

Conversation

@echarlaix
Copy link
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
Contributor

github-actions bot commented Mar 9, 2026

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

run-slow: zamba2

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

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.

2 participants