add streaming beam decoding (malsd) to NeMo inference buffered rnnt - #15827
Open
lilithgrigoryan wants to merge 10 commits into
Open
lilithgrigoryan wants to merge 10 commits into
lilithgrigoryan wants to merge 10 commits into
Conversation
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
…/streaming-beam-search-niva-buffered-rnnt
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
…/streaming-beam-search-niva-buffered-rnnt
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
Contributor
|
[🤖]: Hi @lilithgrigoryan 👋, We wanted to let you know that a CICD pipeline for this PR just finished successfully. So it might be time to merge this PR or get some approvals. |
naymaraq
requested changes
Aug 31, 2026
naymaraq
left a comment
Collaborator
There was a problem hiding this comment.
I’ve added several small comments. Please take a look.
Also, if possible, please add the following ablation results to the PR:
- Greedy inference before vs. after your changes
- Greedy vs. beam search vs. beam search with LM fusion using your branch
- Beam search consistency when changing the EoU threshold, including disabling it
| """Register per-stream biasing models and return decode-time model ids.""" | ||
| if self.decoding_computer is None or not self.decoding_computer.per_stream_biasing_enabled: | ||
| if any(state.has_biasing_request() for state in states): | ||
| logging.warning( |
Collaborator
There was a problem hiding this comment.
Question:
should we rise an error here?
| curr_state.timestamp_offset += self.tokens_per_frame_float | ||
| ready_state_ids.update(ready_states) | ||
|
|
||
| if self.beam_decoder_computer is not None: |
Collaborator
There was a problem hiding this comment.
Can we join two loops into one?
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from __future__ import annotations |
Collaborator
There was a problem hiding this comment.
I think we don’t need annotations here as long as the StreamingState and Hypothesis imports work correctly.
| """Refresh publish tokens; on EOU fold utterance into ``cumulative_*`` and clear ``partial_*``.""" | ||
| cum_tokens, cum_ts, cum_conf = self._get_tokens() | ||
| if cum_tokens: | ||
| start = max(0, min(int(self._cumulative_tokens_len), len(cum_tokens))) |
Collaborator
There was a problem hiding this comment.
Is the int() necessary here?
7 tasks
This branch was previously deployed
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 ?
Adds MALSD batched beam search decoding to the buffered RNNT streaming inference pipeline, including per-token confidence support.
Collection: ASR
Changelog
asr.decoding.strategy=malsd_batch. Greedy decoding is unchanged.[0, 1].asr.decoding.beamsection to the buffered RNNT config, with n-gram LM and phrase boosting disabled by default.Usage
asr.decoding.strategy=malsd_batch. Theasr.decoding.beam.*options mirror the offline MALSD decoding config. Settingasr.decoding.beam.preserve_frame_confidence=trueadds per-token confidence to the output.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:
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