Skip to content

Fix issue for changing transformer version - #24828

Merged
metascroy merged 2 commits into
mainfrom
fixissue-transformer-version
Nov 10, 2026
Merged

metascroy merged 2 commits into
mainfrom
fixissue-transformer-version

Conversation

@Jiseong-oh

Copy link
Copy Markdown
Collaborator

Summary

whisper: RuntimeError: Constant L__self___cache_self_attention_cache_layers_0_cumulative_length is mutated in the forward method.

the metal job installs the optimum-executorch pin first (transformers 5.0.0rc1), then install_executorch.sh pulls requirements-examples.txt, which now upgrades transformers to 5.11.0. cuda e2e installs them in the other order, so it still ends on 5.0.0rc1 and stays green. likely fix: in metal.yml install optimum-executorch after install_executorch.sh like cuda.yml does, or bump the optimum-executorch pin to one that works with 5.11

test-model-metal-e2e installed the optimum-executorch pin, which needs
transformers 5.0.0rc1, before install_executorch.sh. Since
requirements-examples.txt moved to transformers 5.11.0, install_executorch.sh
upgrades transformers afterwards, and the optimum-cli exports of Whisper and
Voxtral fail: StaticLayer now mutates cumulative_length during export, and
Voxtral's get_audio_features returns a BaseModelOutputWithPooling instead of a
tensor.

Signed-off-by: Jiseong Oh <jiseong.oh@samsung.com>
With transformers 5.11.0, StaticLayer.update ignores cache_position and writes
K/V at arange(n) + cumulative_length, then advances cumulative_length in place.

Register cumulative_length as a non-persistent buffer of each wrapper and set
it from cache_position at the start of forward, so the cache row follows the
cache_position input again. With this change both exported decoders match
eager on transformers 5.11.0.

Signed-off-by: Jiseong Oh <jiseong.oh@samsung.com>
@Jiseong-oh
Jiseong-oh requested a review from psiddh as a code owner November 10, 2026 07:34
@pytorch-bot

pytorch-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24828

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a657dde with merge base e34f8cf (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@metascroy
metascroy merged commit 94e7ca0 into main Nov 10, 2026
252 of 255 checks passed
@metascroy
metascroy deleted the fixissue-transformer-version branch November 10, 2026 22:53

This branch was previously deployed

1 inactive deployment
cadence — a657dde0 Deployed Nov 10, 2026 by Jiseong-oh via hifi-op-test / hifi4 #37547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants