Skip to content

fix(imf): decoded-text repetition guard for varying-punctuation loops - #62

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

fix(imf): decoded-text repetition guard for varying-punctuation loops#62
ronaldtse merged 1 commit into
mainfrom
fix/decode-text-guard

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Follow-up to #61: the live model's loop rotates punctuation, so no
verbatim token window repeats and the first guard only fired late.
This adds a decoded-text check - when the trailing 16 chars echo 3+
times, generation stops. Also fixes decode over vocab-edge tokens
(mod 256, matching the TS runtime). 91/91 including the parity gate.

The token-window guard bounds periodic loops, but live int8 output
loops with rotating punctuation (phrase + varied separator) never
repeats a verbatim window. Cut when the recent 16 decoded chars echo
3+ times. decode_tokens mirrors the TS runtime (% 256).
@ronaldtse
ronaldtse merged commit d0979f7 into main Aug 28, 2026
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