fix(asr): fix beam score normalization - #16175
Draft
naymaraq wants to merge 2 commits into
Draft
Conversation
…eaming select_best_beam_idx_(score_norm=True) ranked beams at every EOU using score / (current_lengths_nb + 1), but both fields are cumulative over the whole stream -- they are only ever collapsed, never reset, at each EOU. On a multi-utterance stream this dilutes the ranking signal for utterance 2, 3, ... and manifests as leading-word truncation once enough prior session mass has accumulated (confirmed on SLURP: 19.07% WER at beam_size=12, ngram_lm_alpha=0.5, vs 14.29% fixed). Snapshot a per-utterance (score, length) baseline right after each EOU beam collapse and subtract it before normalizing. Also generalize the length term to a tunable length_norm_power (default 1.0, unchanged behavior) -- a SLURP sweep across the full beam_size x ngram_lm_alpha grid shows p=1.0 is never optimal and p=0 collapses to empty hypotheses under LM fusion once alpha >= 0.2; see BEAM_SEARCH_LENGTH_NORM_FIX.md for the full comparison table and recommended operating points. Signed-off-by: naymaraq <dkaramyan@nvidia.com>
…dation The SLURP comparison table was measured with endpointing.residue_tokens_at_end=0 on the old side, not main's actual default of 2. Direct A/B on pristine main alone (same code, only that flag changed) shows WER at beam_size=12, ngram_lm_alpha=0.5 jumping from 14.391% (rte=2, true default) to 19.071% (rte=0) -- most of the previously reported improvement was an artifact of an unrelated EoU-buffer-sizing bug being incidentally masked by that setting, not the beam-normalization fix itself. Re-running the grid at the correct default before restoring this doc with valid numbers. Signed-off-by: naymaraq <dkaramyan@nvidia.com>
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 ?
Add a one line overview of what this PR aims to accomplish.
Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use thisGitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
Trusted PRs run automatically through copy-pr-bot. For an untrusted PR, a maintainer can trigger CI by commenting
/ok to test <head-sha>; repeat this after a new push if the PR remains untrusted.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