Skip to content

Fix Whisper export to support autoregressive decoding#34

Merged
carinapeng merged 2 commits into
apple:mainfrom
carinapeng:carina/whisper-export-dynamic-ids
Jun 13, 2026
Merged

Fix Whisper export to support autoregressive decoding#34
carinapeng merged 2 commits into
apple:mainfrom
carinapeng:carina/whisper-export-dynamic-ids

Conversation

@carinapeng

@carinapeng carinapeng commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

The existing export traced decoder_input_ids at length 1 with no dynamic shapes, producing a model specialised to a single token. At inference time this means each decode step has no context — giving empty transcript

This fix adds dynamic_shapes for decoder_input_ids and traces with the 4-token forced prefix so torch.export generalises the sequence dimension to allow full autoregressive decoding.

Comment thread models/whisper/export.py
@carinapeng carinapeng merged commit a43371e into apple:main Jun 13, 2026
3 checks passed
stikves pushed a commit to stikves/coreai-models that referenced this pull request Jun 13, 2026
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