Remove tail margin algorithms from all ASR pipelines#15605
Open
Remove tail margin algorithms from all ASR pipelines#15605
Conversation
added 2 commits
April 13, 2026 15:30
Signed-off-by: naymaraq <dkaramyan@nvidia.com>
Signed-off-by: naymaraq <dkaramyan@nvidia.com>
Signed-off-by: naymaraq <naymaraq@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the “tail margin / tail padding” logic from NeMo’s streaming ASR inference path, simplifying how right-padding is handled for final chunks across buffered pipelines and related buffering/streaming utilities.
Changes:
- Removed
tail_padding_in_samplesfromContinuousBatchedRequestStreamerand updated right-padding length computation accordingly. - Removed the extra tail-padding subtraction in both Buffered CTC and Buffered RNNT pipelines when computing
right_paddings. - Removed
right_padding_ratiofromBatchedCacheFeatureBuffererand switched to deriving right-padding in feature frames fromfeature_lens.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
nemo/collections/asr/inference/streaming/framing/multi_stream.py |
Drops tail_padding_in_samples and computes right padding purely from frame.size - frame.valid_size. |
nemo/collections/asr/inference/streaming/buffering/cache_feature_bufferer.py |
Removes right_padding_ratio; computes right-padding in feature frames using features.shape[2] - feature_lens. |
nemo/collections/asr/inference/pipelines/buffered_rnnt_pipeline.py |
Removes tail padding heuristic and stops passing tail padding into the request streamer. |
nemo/collections/asr/inference/pipelines/buffered_ctc_pipeline.py |
Removes tail padding heuristic and stops passing tail padding into the request streamer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Important
The
Update branchbutton must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Collection: [ASR]
Changelog
Usage
# Add a code snippet demonstrating how to use thisGitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information