Skip to content

test: strengthen GDN coherence check + document Qwen3.5 GDN regression#48

Merged
kekzl merged 1 commit into
mainfrom
test/gdn-coherence-fresh
Apr 24, 2026
Merged

test: strengthen GDN coherence check + document Qwen3.5 GDN regression#48
kekzl merged 1 commit into
mainfrom
test/gdn-coherence-fresh

Conversation

@kekzl
Copy link
Copy Markdown
Owner

@kekzl kekzl commented Apr 24, 2026

Summary

  • Test: strengthen `GDNModelTest.GenerateCoherentOutput` from a size-only check to a token-repetition-ratio check (unique / total ≥ 30 %, fires only when output has ≥10 words)
  • TODO.md: document the Qwen3.5-4B/9B Q8_0 recurrent-state-collapse regression that reproduces on clean `imp:main` today

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.

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 kekzl merged commit 23e0704 into main Apr 24, 2026
2 checks passed
@kekzl kekzl deleted the test/gdn-coherence-fresh branch April 24, 2026 06:58
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