Repository navigation
Fix NaN in Parakeet eager attention with padded batches - #49070
Merged
Merged
Conversation
A fully padded query attends to nothing, so `-inf` softmaxes to NaN. Use the dtype minimum instead.
6 tasks
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: parakeet |
ArthurZucker
enabled auto-merge
September 24, 2026 06:10
Contributor
CI recapDashboard: View test results in Grafana |
|
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. |
vasqu
approved these changes
Sep 24, 2026
vasqu
left a comment
Collaborator
There was a problem hiding this comment.
Let's check with run slow just to be sure but yea definitely better than using -inf directly
ShaiShmuel
added a commit
to superlinked/sie
that referenced
this pull request
Oct 7, 2026
…ot the bundle Restore the transformers5 bundle's transformers floor to >=5.14,<6 so the other models on the bundle keep their range, and check the version in ParakeetTDTAdapter.load() instead. transformers 5.14 through 5.17 mask padded encoder frames with -inf. Under eager attention a fully padded query softmaxes to NaN, and the next layer spreads it to every frame of that row, so the shorter rows of a padded batch decode to junk (huggingface/transformers#49070, released in 5.18). The adapter's default SDPA attention stayed finite on the CPU backends checked, but PyTorch picks the backend per device, so load() refuses transformers older than 5.18 before loading any weights. The bundle test now checks that the bundle's range admits the adapter's minimum instead of matching the range string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ShaiShmuel
added a commit
to superlinked/sie
that referenced
this pull request
Oct 7, 2026
…6b-v3) (#608) Serve nvidia/parakeet-tdt-0.6b-v3 on the transformers5 bundle through the same audio extract path and output contract as Whisper. - Decode with a batched greedy TDT loop instead of generate(), whose TDT path has no per-frame symbol limit and can repeat a token until the output buffer fills. - Re-decode rows that come back empty (up to 30 s) on their own with 0.25 s of silence appended, then on both sides; the batched pass is never padded. - Group rows by length so a forward pass never holds more than 12 minutes of padded audio. - Word and segment timestamps from the token durations. - Accept a language option only inside the model's 25 languages (it has no effect; the model identifies the language itself), reject a prompt and a non-zero temperature. The transformers5 bundle adds librosa, which the feature extractor requires, and keeps its transformers range at >=5.14,<6. The adapter refuses transformers older than 5.18 at load: 5.14 through 5.17 mask padded encoder frames with -inf, which turns a padded row into NaN under eager attention (huggingface/transformers#49070). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fully padded query attends to nothing, so
-infsoftmaxes to NaN. Use the dtype minimum instead.