Skip to content

docs: greedy correction — tha-g2p-small 2.85% PER; beam decode counterproductive - #36

Merged
ronaldtse merged 2 commits into
mainfrom
docs/greedy-correction
Aug 24, 2026
Merged

docs: greedy correction — tha-g2p-small 2.85% PER; beam decode counterproductive#36
ronaldtse merged 2 commits into
mainfrom
docs/greedy-correction

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • re-measured tha-g2p-small-1.0 through the shipped int4 zip and the Python runtime ONNX KV decode (the exact user path), true Levenshtein, full 1,219-sentence set: greedy 2.85% PER / 88.93% EM vs published beam-4 12.06% / 87.94%
  • beam decode is counterproductive for these students: length-normalized beam systematically lengthens non-exact outputs on flat per-token distributions; greedy is optimal and stays the runtime default
  • runtime gains a verified opt-in num_beams (batched KV beam; graph batch-independence asserted against per-beam batch-1 references)
  • metrics chain updated (RESULTS table, metrics-sources, in-tree metadata, models.yaml); tha-g2p-small metrics ref points at this branch until merge (release-branch pattern), flip-back follow-up after

Test plan

  • CI green (metrics-provenance validated locally)
  • after merge: flip tha-g2p-small ref back to main in a follow-up

Ronald Tse added 2 commits August 24, 2026 10:57
…l); beam decode counterproductive

Re-measured through the shipped int4 zip and the Python runtime's ONNX
KV decode (the exact path users get), true Levenshtein, full 1,219
sentences: greedy 2.85% PER / 88.93% EM vs the published beam-4
12.06% / 87.94%. Beam length-normalization systematically lengthens
every non-exact output on this model's flat per-token distributions
(top-1 logprob -4.6 vs uniform -5.6): EM barely moves, edit distance
quadruples. Greedy is the optimal decode for these students; the
runtime keeps greedy as default and exposes num_beams as a verified
opt-in (batch-independence of the KV graph asserted against per-beam
batch-1 references). All future gates decode greedy.
@ronaldtse
ronaldtse merged commit abb55f1 into main Aug 24, 2026
10 checks passed
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.

1 participant