Repository navigation
canary: bias the greedy decode toward vocabulary terms - #249
Open
asanchez-droid wants to merge 1 commit into
Open
asanchez-droid wants to merge 1 commit into
asanchez-droid wants to merge 1 commit into
Conversation
Canary has no prompt slot for custom terms: the decoder-context slot made the output loop and over-insert. transcribe_run_params::vocabulary now biases the decode instead, by shallow fusion on the raw logits: a term's first token gets +strength at any step, and each following token while the transcript so far ends with the term's previous tokens. Each term is also tried with its first letter's case flipped. Strength defaults to 3; TRANSCRIBE_CANARY_VOCAB_BOOST tunes it and 0 turns it off (output then identical to no vocabulary). Measured on canary-1b-v2 over 312 phone turns answering "which area?" (8 kHz, es/de): 21 more area names read, about 5 inserted into unrelated speech, 3 lost to answers that named two areas; no added empty output, p50 latency 242 -> 258 ms. A strength of 5 started to loop. VOCABULARY is advertised on the canary2 checkpoints that encode a prefix (1b-v2, 1b-flash, 180m-flash). The static GPU step graph now also outputs the raw logits, and a batch with a vocabulary decodes serially. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
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.
Canary has no prompt slot for custom terms: the decoder-context slot made the output loop and over-insert. transcribe_run_params::vocabulary now biases the decode instead, by shallow fusion on the raw logits: a term's first token gets +strength at any step, and each following token while the transcript so far ends with the term's previous tokens. Each term is also tried with its first letter's case flipped.
Strength defaults to 3; TRANSCRIBE_CANARY_VOCAB_BOOST tunes it and 0 turns it off (output then identical to no vocabulary). Measured on canary-1b-v2 over 312 phone turns answering "which area?" (8 kHz, es/de): 21 more area names read, about 5 inserted into unrelated speech, 3 lost to answers that named two areas; no added empty output, p50 latency 242 -> 258 ms. A strength of 5 started to loop.
VOCABULARY is advertised on the canary2 checkpoints that encode a prefix (1b-v2, 1b-flash, 180m-flash). The static GPU step graph now also outputs the raw logits, and a batch with a vocabulary decodes serially.
Summary
Scope
AI Assistance
Validation