Skip to content

fix(imf): cut greedy-KV generation when the token window cycles - #61

Merged
ronaldtse merged 1 commit into
mainfrom
fix/decode-repetition-guard
Aug 28, 2026
Merged

fix(imf): cut greedy-KV generation when the token window cycles#61
ronaldtse merged 1 commit into
mainfrom
fix/decode-repetition-guard

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Flat-byte student models loop under greedy KV decode on short inputs

  • live: POST /v1/infer {"model":"ara-diac-small-1.0-int8",
    "input":"كتاب"} returned the phrase echoed repeatedly until max_len.

onnx_greedy_kv now stops when the trailing 24-token window repeats
verbatim earlier in the generated sequence. Normal generation is
untouched (dedicated no-loop test), and the full suite — including
the WO03 parity gate over real exports — passes 90/90.

Live failure: short inputs (كتاب) made the int8 students echo the
same phrase until max_len. The guard stops generation when the last
24 tokens repeat verbatim earlier in the output; goldens and parity
unaffected (90/90).
@ronaldtse
ronaldtse merged commit ef8b445 into main Aug 28, 2026
6 of 9 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