Skip to content

Remove tail margin algorithms from all ASR pipelines#15605

Open
naymaraq wants to merge 5 commits intomainfrom
dkaramyan/last-frame-padding
Open

Remove tail margin algorithms from all ASR pipelines#15605
naymaraq wants to merge 5 commits intomainfrom
dkaramyan/last-frame-padding

Conversation

@naymaraq
Copy link
Copy Markdown
Collaborator

@naymaraq naymaraq commented Apr 14, 2026

Important

The Update branch button 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

  • Remove tail padding algorithms from both buffered and cache-aware streaming ASR pipelines

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

GitHub 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:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

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

  • Related to # (issue)

naymaraq added 2 commits April 13, 2026 15:30
Signed-off-by: naymaraq <dkaramyan@nvidia.com>
Signed-off-by: naymaraq <dkaramyan@nvidia.com>
@github-actions github-actions bot added the ASR label Apr 14, 2026
Signed-off-by: naymaraq <naymaraq@users.noreply.github.com>
@naymaraq naymaraq changed the title Dkaramyan/last frame padding Remove tail margin algorithms from all ASR pipelines Apr 14, 2026
@naymaraq naymaraq requested review from arushidNV and Copilot April 14, 2026 09:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_samples from ContinuousBatchedRequestStreamer and 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_ratio from BatchedCacheFeatureBufferer and switched to deriving right-padding in feature frames from feature_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.

@naymaraq naymaraq marked this pull request as ready for review April 14, 2026 09:19
@naymaraq naymaraq enabled auto-merge (squash) April 14, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants