Add TDT loss kernel#46048
Draft
ebezzam wants to merge 82 commits into
Draft
Conversation
Implement Token-and-Duration Transducer (TDT) decoding for Parakeet models, extending the existing CTC-only support. This adds ParakeetForTDT with greedy TDT decoding in generate(), per-token timestamp generation, and full integration with AutoModelForTDT, processors, and ASR pipeline.
- Use -100 label padding for training (HF convention) - Fix timestamp recording in inner blank-seeking loop - Add max_symbols_per_step guard matching NeMo - Clean up decoding loop - Add TDT training example to docs - Use setUpClass for TDT integration tests
… nvidia checkpoint, style checks.
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: parakeet |
ebezzam
commented
May 19, 2026
| "finegrained-fp8": {"repo_id": "kernels-community/finegrained-fp8", "version": 1}, | ||
| "deep-gemm": {"repo_id": "kernels-community/deep-gemm", "version": 1}, | ||
| "sonic-moe": {"repo_id": "kernels-community/sonic-moe", "revision": "ep-support"}, | ||
| "tdt-loss": {"repo_id": "eustlb/tdt-loss", "revision": "v1"}, |
Contributor
Author
There was a problem hiding this comment.
ebezzam
commented
May 19, 2026
Comment on lines
+736
to
738
| Verify that ParakeetForTDT loss matches NeMo's TDT loss (sigma=0) for both | ||
| the CUDA kernel and the pure PyTorch implementation. | ||
| reproducer: https://gist.github.com/883ea42bf7d8ce2af42f3055627476a7 |
Contributor
Author
There was a problem hiding this comment.
Should we also test for sigma != 0?
|
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. |
4 tasks
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.
What does this PR do?
Add a kernel for faster TDT loss computation (and thus faster training).
Corresponding PR in
kernels-community: huggingface/kernels-community#882cc @eustlb