-
Notifications
You must be signed in to change notification settings - Fork 3.1k
NGPU-LM (N-Gram LM on GPU) + Transducer greedy decoding (RNN-T, TDT) #10989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7283fa1
to
442081f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
442081f
to
0e24533
Compare
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
Signed-off-by: artbataev <artbataev@users.noreply.github.com>
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
nemo/collections/asr/parts/submodules/ngram_lm/ngram_lm_batched.py
Outdated
Show resolved
Hide resolved
…with `FastNGramLM` Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
* `FastNGramLM` - N-Gram LM on GPU (GPULM) * `KenLMBatchedWrapper` for reference and testing purposes * Integrate `FastNGramLM` into Greedy RNN-T and TDT decoding (label-looping) --------- Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> Signed-off-by: artbataev <artbataev@users.noreply.github.com> Co-authored-by: artbataev <artbataev@users.noreply.github.com>
) * `FastNGramLM` - N-Gram LM on GPU (GPULM) * `KenLMBatchedWrapper` for reference and testing purposes * Integrate `FastNGramLM` into Greedy RNN-T and TDT decoding (label-looping) --------- Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> Signed-off-by: artbataev <artbataev@users.noreply.github.com> Co-authored-by: artbataev <artbataev@users.noreply.github.com>
) * `FastNGramLM` - N-Gram LM on GPU (GPULM) * `KenLMBatchedWrapper` for reference and testing purposes * Integrate `FastNGramLM` into Greedy RNN-T and TDT decoding (label-looping) --------- Signed-off-by: Vladimir Bataev <vbataev@nvidia.com> Signed-off-by: artbataev <artbataev@users.noreply.github.com> Co-authored-by: artbataev <artbataev@users.noreply.github.com> Signed-off-by: Nitin <28332485+nitin9252@users.noreply.github.com>
What does this PR do ?
Implements NGPU-LM (N-Gram LM on GPU) and transducer (RNN-T, TDT) greedy decoding with NGPU-LM.
Paper: "NGPU-LM: GPU-Accelerated N-Gram Language Model for Context-Biasing in Greedy ASR Decoding" https://arxiv.org/abs/2505.22857
Results for
nvidia/parakeet-rnnt-1.1b
andnvidia/parakeet-tdt-1.1b
on SLURP (out-of-domain):*LM weight - optimal on SLURP dev set with step
0.1
.Batch size 32, high fp32 matmul precision, sorted manifest, A6000 GPU.
6-gram LM is built on SLURP train texts.
Overhead for using LM - less than 2% (with CUDA graphs).
Collection: [ASR]
Changelog
Usage
Step 1: Build LM for ASR Model (tokenizer-dependent) on domain texts
Step 2: Run Decoding with LM
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