test: strengthen GDN coherence check + document Qwen3.5 GDN regression#48
Merged
Conversation
Old assertion was `text.size() > 5` which passes trivially for any non-empty output — including degenerate repetition like "my my my my my my my my my my" (30 chars, looks fine by size). New check (fires when ≥10 output words): unique_ratio ≥ 30 %. The bug mode this catches is the Qwen3.5 GDN recurrent-state collapse where the scan converges to a fixed token within 3–8 decode steps. Also switched the prompt to "Write a short paragraph about the planet Jupiter." (was "One word answer") so the generation is long enough to actually stress the scan past the first handful of tokens. TODO.md updated with the full Qwen 3.5 GDN regression writeup (bug reproduces on clean `imp:main`, is NOT caused by the Phase-4 refactor, persists under IMP_GDN_REF and IMP_DEBUG_RAW, needs layer-diff root cause). Does not fix the bug. Makes the bug visible to CI when IMP_TEST_MODEL_GDN points at an affected model.
kekzl
added a commit
that referenced
this pull request
Apr 30, 2026
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.
Summary
Background
Today's audit reproduced severe `"my my my my..."` output on Qwen3.5-4B Q8_0 on clean main, across `IMP_GDN_REF=1` / `IMP_DEBUG_RAW=1` / various sampling. Qwen3-4B (dense) does not reproduce, isolating the bug to GDN scan path. Old test assertion `text.size() > 5` trivially passed on such degenerate output. New check catches it.
Does NOT fix the bug
Separate root-cause work tracked in TODO.md.