Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speedup RNN-T greedy decoding (NVIDIA#7926)
* Add structure for batched hypotheses Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Add faster decoding algo Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Simplify max_symbols support. More speedup Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Clean up Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Clean up Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Filtering only when necessary Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Move max_symbols check to the end of loop Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Support returning prediction network states Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Support preserve_alignments flag Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Support confidence Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Partial fix for jit compatibility Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Support switching between decoding algorithms Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix switching algorithms Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Clean up Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Clean up Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix max symbols per step Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Add tests. Preserve torch.jit compatibility for BatchedHyps Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Separate projection from Joint calculation in decoding Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix config instantiation Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix after main merge Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Add tests for batched hypotheses Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Speedup alignments Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Test alignments Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix alignments Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix tests for alignments Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Add more tests Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix confidence tests Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Avoid common package modification Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Support Stateless prediction network Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Improve stateless decoder support. Separate alignments and confidence Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix alignments for max_symbols_per_step Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix alignments for max_symbols_per_step=0 Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix tests Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix test Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Add comments Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Batched Hyps/Alignments: lengths -> current_lengths Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Simplify indexing Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Improve type annotations Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Rework test for greedy decoding Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Document loop_labels Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Raise ValueError if max_symbols_per_step <= 0 Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Add comments Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> * Fix test Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> --------- Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information