perf(whisper): remove redundant timestamp normalization - #2
Open
unohee wants to merge 1 commit into
Open
Conversation
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.
Summary
Exact-output benchmarks
Production MLX 0.31.2,
whisper-large-v3-turbo, fixed seed, word timestamps enabled:4d966dbd85fe2a2405098dcf8f51d1daadea075a0a9f61c7fb6210697b7fd6aeab0a926a8e18d32458329a5129dc8c3da6f28c2e5edc605a2d938de9c7113d52Review
OpenSwarm Codex was invoked against the installed package source, but it could not produce a verdict because the connector-created branch was not a local Git worktree (
No working-tree changes to review). Exact 4-minute and 71-minute remote-commit golden runs are retained as the deterministic gate.Tracking
feat/kt-641-exact-ceiling)Note
Low Risk
Single localized algebraic equivalence in timestamp logit filtering; behavior is gated by exact-output golden hashes in the PR description.
Overview
ApplyTimestampRulesno longer runs a full-vocabularylogsumexpand per-token log-prob subtraction on every decode step when deciding whether aggregate timestamp mass beats the best text token.That decision now compares
logsumexpover timestamp logits directly to the max text-token logit, relying on the fact that the shared softmax normalization constant cancels in the inequality. All other timestamp masking (pairs, initial timestamp cap, legacy lower bound, etc.) is unchanged.This is a hot-path perf tweak inside the autoregressive loop; PR benchmarks report ~1% faster long runs with identical full JSON hashes.
Reviewed by Cursor Bugbot for commit 99e22af. Bugbot is set up for automated code reviews on this repo. Configure here.