mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1827] Chinese output collapses into a token loop after a few hundred tokens #720
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#720
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 @beginor on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1827
IQ3_S (unpruned): Chinese output collapses into a token loop after a few hundred tokens; English unaffected — deterministic, 5/5 on greedy
Summary
Long Chinese answers degrade into a repeated-token collapse partway through generation. The same
model and engine produce clean English at nearly 2x the length. It is fully deterministic on greedy
(5/5 byte-identical outputs), it is not a reasoning loop, and sampling penalties do not help.
The collapse is always in the same semantic cluster — the model gets stuck emitting
颊and itsEnglish glosses (
cheek,blush,face,扑) interleaved, after producing several hundredotherwise-correct tokens.
This is the symptom of #438, but on an unpruned IQ3_S pack, so the pruning explanation from that
issue does not apply here.
Environment
ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF, IQ3_S, the original unpruned filessetup.sh@d311345), engineBUILD.json:{"source":"local","version":"0.1.41","archs":[89],"src":"62eb4907c92a8cb7"}CMAKE_CUDA_ARCHITECTURES=89(no Linux prebuilt exists for any release, so this is the normal path)auto6.1 GB/s -> miss cost x3.27; CUDA1 PCIe 4.0 x16 —25.7 GB/s -> x1.00--pack packs/iq3_s --native …-00001-of-00002.gguf --ple-gguf …-00002-of-00002.gguf --expert-profile data/expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp mtp/rt --max-context 131072 --kv int8 --resident-experts"reasoning_loop_recovery": "recover","reasoning_budget_tokens": 8192(see "Guards" below)Experts are fully resident: the engine log reports
resident RAM: 0.00 GiB of experts in RAM, 0 exchanged with the VRAM tier, 0 blob reads from the fileand start-up filled
12288 experts, 22.14 GiB of VRAMper card (48 MoE layers × 512 experts = 24,576 total,12,288 per card). So there are no expert file reads and no VRAM/RAM swaps during these runs.
Symptom
Prompt
你是谁,详细介绍一下, default sampling (greedy),max_tokens: 4096.finish_reasonisstop— the model ends the turn itself, it is not truncated.The first ~400 tokens are correct and well formed. The tail of the same answer:
Reasoning for the same request is short (124 characters) and clean.
Reproduction
Run 5 times back to back: 5/5 byte-identical, 474 completion tokens,
finish_reason=stop, samecollapsed tail.
Measured matrix
重复度below is1 - unique/totalover character 8-grams of the answer (0 = no repetition).finish_reasonstop…讲 face-to-face 颊 cheek颊颊扑 cheek颊颊 cheek face-to-face face-to-facemax_tokens: 200length…- 日常问答 - 知识解释 - 写作与润色 - 翻译(truncated before the collapse point)temperature: 0.8, seed: 7stop…整颊颊颊颊颊横扑颊 face cheeky face cheecky cheeks cheeks cheeks.reasoning_effort: "none"stop…颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊颊…(60+ consecutive颊)Who are you? Please introduce yourself in detail.stop… can be a thoughtful, flexible, and capable assistant when used carefully and effectively.介绍一下杭州的历史和文化length… cheek cheek cheek cheek cheek cheek cheek …Two things follow from this table:
in every case tried. A general numerical fault (NaN, a miscompiled kernel) would hit English too.
颊), and thecollapse is in the answer body.
Sampling penalties do not help
Same prompt, same session:
repetition_penalty: 1.05face face face … face颊 cheekrepetition_penalty: 1.10把复杂概念讲 face颊红脸上的 cheek blush 扑 cheek blush cheek blushrepetition_penalty: 1.1+frequency_penalty: 0.3颊 cheek颊 cheek颊 cheek颊 … cheeks cheeks cheeksThe penalties change the shape of the collapse, not its occurrence.
Existing guards do not fire, and why
repeat_stop_tokens(default 256) — the run of颊is only ~60 long and is interleaved with Latintokens (
cheek,face), so the single-token run counter never reaches 256.reasoning_loop_recovery: "recover"andreasoning_budget_tokens: 8192— both were set instrata-iq3_s.jsonfor these tests and neither applies: the guard watches the reasoning span,while the collapse is in the answer, and the reasoning here is only 124 characters.
So at present nothing in the server bounds this failure mode:
finish_reasonisstop, so a clientcannot even tell the answer is corrupt.
What I ruled out
being "use the unpruned sizes (Q2_0, IQ2_XS, IQ3_S)". This pack is the unpruned original
(
IQ3_S/, both shards, sizes verified against the repo), and the symptom reproduces anyway. Thecollapse signature (
我是通(通通通通通…) is also the same family as ours.data/draft_vocab.binis425,196 bytes, which matches the 106,299-id post-fix size, not the 40,525-id broken one. Also MTP
acceptance on Chinese in these runs is 0.76–0.86, not the 0.22 of #137.
wrong. Here English is clean at 1,885 tokens and the Chinese answers are correct for the first few
hundred tokens, so the logits are not globally broken.
Variables I am disclosing about this setup
I do not know whether any of these matter, but they are unusual and may help triage:
--resident-experts, experts 100% resident,0 blob reads from the file,0 exchanged with the VRAM tier. I have no data point for this model on a single GPU yet.miss cost x3.27) againstCUDA1 at x16. The split search does see it (
CUDA0 link 6.1 GB/s -> miss cost x3.27).a Haswell Xeon, also AVX2-only, same CUDA 13.3.73, same
archs=[89]). I can recompile on thetarget if that is worth excluding.
--max-context 131072 --kv int8, MTP--spec 4 --spec-min-p 0.5with the fetched MTP adapter.Questions
mode? I could not find an open issue that matches "correct for N hundred tokens, then a
repeated-token collapse, CJK only, greedy, unpruned".
repeat_stop_tokenscounts a single token's run, so an interleaved颊 / cheek / facecycle is invisible to it — something like therepeat_stop_perioddiscussed in#1613 would catch this shape.
UD-Q4_K_XL) to separate "IQ3_S dequant path" from "engine-wide CJK path"? I can also recompile on
the target host, or bisect CUDA versions if #892's miscompile family is still open on sm_89.
@hogtinbao commented on GitHub (Oct 10, 2026):
你尝试使用qwen3.8-flash-next-iq3_xxs 模型,是否还会出现无限循环?
@beginor commented on GitHub (Oct 10, 2026):
iq3_xss 没试过, 但是 unsloth 的也是会出现循环输出。 但是用 llama.cpp 跑 unsloth 的 UD Q4 K xl 一切正常
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.