A scalable generative AI framework built for researchers and developers working on Large Language Models, Multimodal, and Speech AI (Automatic Speech Recognition and Text-to-Speech)
Reason: Function is hard to read, tried to make it clearer.
Argument Removal
batch_initialize_states(): Removed the batch_states argument as it was unused.
batch_score_hypothesis(): Removed the batch_states argument as it was unused.
Removing redundant calculations
batch_score_hypothesis(): removed torch.stack calls since they are not needed. Returning python lists instead.
batch_score_hypothesis(): removed lm_tokens return value as it was not used.
Changes in [nemo/collections/asr/modules/rnnt_abstract.py]
reflected comments and argument list changes in derived classes here
Changes in [nemo/collections/asr/parts/submodules/rnnt_beam_decoding.py]
replaced batch_select_state() calls with index access as now everything is a python list
recombine_hypotheses() returning final hypotheses instead of initial ones.
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".
[x] 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
[x] 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.
What does this PR do ?
PR removed torch.stack calls from batched function yielding to faster decoding
Collection: ASR
Changelog
Changes in
nemo/collections/asr/modules/rnnt.py
Refactoring
batch_initialize_states()
renamed tobatch_stack_states
batch_initialize_states()
minimized torch stack callsbatch_select_state()
Argument Removal
batch_initialize_states()
: Removed thebatch_states
argument as it was unused.batch_score_hypothesis()
: Removed thebatch_states
argument as it was unused.Removing redundant calculations
batch_score_hypothesis()
: removed torch.stack calls since they are not needed. Returning python lists instead.batch_score_hypothesis()
: removedlm_tokens
return value as it was not used.Changes in
[nemo/collections/asr/modules/rnnt_abstract.py]
Changes in
[nemo/collections/asr/parts/submodules/rnnt_beam_decoding.py]
batch_select_state()
calls with index access as now everything is a python listrecombine_hypotheses()
returning final hypotheses instead of initial ones.Usage
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