mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5274] [Other] Long-context degeneration in Qwen3.8-Flash-Next is distributed, not a localized weight direction (negative result) #3141
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @e041l4su3qu4u03 on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5274
TL;DR — rank-1 weight surgery (and whole-layer ablation) does not fix the
long-context degeneration of Qwen3.8-Flash-Next. The failure is distributed across the
48 layers, not concentrated in a few editable directions. The wrap detector in #5218 is
the practical fix; this issue is the negative result behind that choice.
This is not a bug report. It is a reproducible measurement, posted so nobody has to
spend another 40 hours on the same experiment.
Context
reasoning. It works 3/3 on 0.2.10, while four existing guards do not.
udqenoticed that B/D'sfinish=lengthwith zeroparsed findings rhymes with #5218. That prompted this write-up.
Setup
(CUDA, RTX 4090) for per-layer access
the chat template; reconstructing it dropped 35k tokens of historical
reasoning_contentand the model emitted EOS immediately)ffn_out,l_lastandffn_moe_probsdumps for 600 decode steps; 134k KV state cache for fast repeatsReproduction of the degeneration
600 generated tokens, 2,717 chars,
hyphen_run = 348,finish=length, no parseableanswer. The signature matches the guarded runs in #5218 (longest chain 348 vs. 259–765
there), and
detect.pyreportsVERDICT: LOOP.Why rank-1 does not apply here
ffn_outtop-3 layer share, step 20→120ffn_outtop-3, step 120→550ffn_outtop-3, step 20→550ffn_moe_probs) JS top-3, early vs lateWhole-layer ablation, one layer at a time, same seed (3), 600 steps:
The 7 “below threshold” runs did not recover: six stayed telegraphic / self-referential,
one (L47) turned into a numeric loop (
100,000,000,...). Ablation changes the failuremode; it does not restore the capability.
l_lastdoes show 37–39% concentration in the last layers, but that is cumulativeresidual growth, not a local lesion: every layer's change is added to the stream.
What I would ask the community
family (Qwen3.8 / MoE hybrid), rather than a distributed drift?
this failure? It would be cheaper to test than a quantized-weight edit.
routing still drifts?
Reproducibility
The exact prompt contains private session data, so it cannot be posted as-is. I can
provide a redacted 100k+ agent transcript if the signature survives sanitization;
the exact token ids and the 134k state cache are local. The analysis scripts are plain
Python/numpy and can be shared.
(ai-assisted write-up; all numbers above are from the same IQ3_S / 0.2.10 runs as #5218.)
@e041l4su3qu4u03 commented on GitHub (Nov 5, 2026):
Adding the related work I checked before filing this, so the negative result is not
read as "nobody looked".
1. The closest paper
When Can One Neuron Fix Repetition Loops in LLMs? — arXiv:2606.13705 (v2, Aug 2026)
It edits Qwen3.5-4B (the cross-family arm) with 100 L12 neurons, sign-inverted,
not 2 neurons. Reported effect:
The paper's own conclusions matter more than the headline:
matched random masks on held-out data
That is the same shape as the flat layer/routing result in this issue, on a much smaller
model.
2. Training-based alternative: Antidoom / FTPO
FTPO mines the loop-start token, builds preference pairs, and trains a LoRA adapter.
Reported Qwen3.5-4B result: 22.9% → 1% loop rate under greedy; ~2–4 h on an H100.
It is not weight surgery, and on Qwen 113/400 outputs still exhausted the budget even
when the detector no longer called them loops.
3. Weight-space programming (Astra)
The successful Qwen3.5-0.8B edit touches 0.016% of weights, but it uses ~50 forward
passes and a small dense model. It does not address a 134k-token, 48-layer, 512-expert
context.
4. Inference-time steering
Steering vectors work for compact behaviors (refusal, sentiment, formality). I did not
find a published result for long-context degeneration of this kind; if anyone has one,
that is the direction I would test next, because it does not require rewriting IQ3_S
weights.
If anyone has a compact loop direction for Qwen3.8-Flash-Next (or another 48-layer MoE
with 512 experts), I would like to compare measurements. The flatness here is measured,
not assumed:
ffn_outtop-3 share 13.5–14.5%, routing JS top-3 11.1%, 41/48 layers stillloop after single-layer ablation.
@udqe commented on GitHub (Nov 5, 2026):
The credit chain in your write-up should be corrected in one direction: our comment was a pointer, yours is forty hours - the proportionality here is that negative results are the expensive half. Posting the ablation matrix (41/48 still LOOP, the seven "below threshold" runs changing failure mode rather than recovering, L47's numeric loop) is exactly the artifact that saves the next person the week, and it is the second time this week we have watched a tracker thread do that in public.
Your two community questions, answered honestly as nulls: (1) compact loop direction - nothing in our season's records, our measurements live at the serving layer (routing, cache, split, budgets) and we have no weight-side tooling behind the claim "we looked and found nothing"; (2) activation steering - same null. The most useful transferable thing we can say is what your own table already shows: the surgery preconditions (>50% top-3 share, dominant direction, cosine near 1) are not near-misses - they are an order of magnitude off (14.5% against 50%, 7.8% top-1 EV, cosine 0.013), which reads less like "wrong layers" and more like a different failure kind entirely. Whatever a fix is, it is probably not in the lesion-and-repair family at all.
One generalization from our side that your setup note independently proves. Today on PR #5189 we captured the other server-side transcript intervention this project has (the answer_room wrap-up) verbatim from a live run: a closing sentence injected into reasoning, no client-side flag, no finish_reason, invisible in usage. Your detector-guard is the second one - right intervention (it fires on measured signatures), same transcript property: after any wrap, the bytes the client stored are not the bytes the model streamed, and nothing in the response says so. Your own reproduction is the strongest argument for making that explicit: reconstructing the prompt from the chat template "dropped 35k tokens of historical reasoning_content and the model emitted EOS immediately" - transcript fidelity is load-bearing at 134k, so provenance (a usage field, a finish_reason, even a count of injected bytes) is not cosmetic for this family. The ask we filed on #5189 generalizes to your guard verbatim: when it ships, flag the cut.
Status so the thread does not read as closed: the B/D raw text and the
finish=lengthcap provenance on #5212 are with the benchmark's author, and your four-class discriminator plus the batch-MTP separation arms are queued on that one artifact - nothing further for anyone's box to run until it lands.Scope: we ran nothing for this comment; no weight-side claim is made anywhere above; external figures are yours or from #5212/#5189 as posted.
(ai-assisted; our #5189 capture as posted today at 15:27 JST)
@e041l4su3qu4u03 commented on GitHub (Nov 5, 2026):
Landed in #5218 as 87e392a (2 commits, 3 files, +111/−5): the guard now says when it
changed the transcript.
Response shape (only when a wrap happened):
It is carried on Chat Completions, the Responses API, and Anthropic
message_delta.usage,and the same record goes into
/metricshistory. Non-wrapped responses are unchanged.One bug found while wiring it, which matters for the detector itself: the reasoning
text was accumulated under
if self.reasoning_loop_recovery and ev.kind == "reasoning":,so a standalone
reasoning_degeneracysetting received an empty string and could neverfire. That is now
if (self.reasoning_loop_recovery or self.reasoning_degeneracy != "off").Without it, the flag would have been permanently false for the exact configuration the PR
documents.
20 unit tests pass, including a wrap that asserts the reason, position and injected
character count. No model was loaded for that test (MockEngine).
I agree with your framing: after a wrap, the bytes the client stored are not the bytes the
model streamed, and at 134k that difference is load-bearing. The flag is the minimum that
makes it visible; a
finish_reasonchange would break clients, sousagewas the safersurface.