Skip to content

canary: bias the greedy decode toward vocabulary terms - #249

Open
asanchez-droid wants to merge 1 commit into
handy-computer:mainfrom
fone4table:feat/canary-vocabulary-boost
Open

asanchez-droid wants to merge 1 commit into
handy-computer:mainfrom
fone4table:feat/canary-vocabulary-boost

Conversation

@asanchez-droid

Copy link
Copy Markdown

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

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants