[GH-ISSUE #4590] [Engine] Flash-Next IQ2_XS repeats prior JSON after a new user task on original and SC117 weights (0.1.52, CUDA, Windows) #2078

Open
opened 2026-11-04 01:56:28 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @xli21-code on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4590

Observed behavior

On the released Windows CUDA engine 0.1.52, Flash-Next IQ2_XS can repeat the previous assistant JSON and stop normally instead of following a new user instruction. This is a finite, wrong answer, not !!!! degeneration or an endless reasoning loop.

The saved conversation has four messages:

  1. system: synthetic-test identifier and general instruction to follow the user;
  2. user: ~32K tokens of synthetic clip records, ending with a request to return four marker codes as JSON;
  3. assistant: the correct marker-code JSON;
  4. user: do not repeat the codes; write 12 detailed paragraphs of a video-editing plan.

Expected: answer the new editing-plan request. Actual: return the old four-code JSON again, finish_reason=stop, 79–85 tokens despite max_tokens=3072.

Environment

  • Windows 11, build 10.0.26200; Windows-native Python server/CUDA13, no WSL or Docker.
  • RTX 5090 D v2 24GB, 64GB RAM, Ryzen 7 9850X3D.
  • Engine 0.1.52, BUILD.json commit a42cc3d7df70; released engine, not locally patched.
  • Original ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF, IQ2_XS, revision ed59f92082b1e93c0e96d60a8b11aab089b52f09.
  • Also reproduced with SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF, IQ2_XS, revision 90a3350cd800ec1fe0d1660a38414ad9e985782f and its own separately built native pack.
  • Original and SC117 vocab.json, merges.txt, token_type.json, and chat_template.jinja were hash-compared and are byte-identical. Original weight SHA256 values match their pinned publisher metadata.
  • Main settings: --max-context 131072 --kv int8 --kv-resident 32768 --prefill auto --expert-cache auto --spec 4 --spec-min-p 0.5 --mtp <rt> --vision --vram-reserve-mib 2048 with the pack/native/PLE/profile paths for the corresponding model. Single GPU, one inference slot.
  • Prompt lookup left at its default. No ESP/control vector (cvec=0), tools, MCP, or response_format. Request explicitly sends temperature 0.7, top_p 0.8, top_k 20, min_p 0, seed 42 and enable_thinking=false; this is not a request with omitted sampling fields.

Reproduced results

Model / condition Prompt tokens Cached tokens Output tokens Result
SC117, 128K, exact saved history 32958 0 79 old JSON repeated
SC117, 256K, exact history after restarting 32958 0 79 old JSON repeated
Original ISTA, 128K, exact same history 32958 0 85 same four-code JSON repeated, formatting differs
Original ISTA, remote replay in existing process 32958 32951 79 byte-identical old JSON
Original ISTA, same material but fresh single-task editing request 32814 0 860 long editing-plan answer, no repeated JSON
Original ISTA, remote replay of that standalone control 32814 32807 907 long editing-plan answer, no repeated JSON

The cold original/SC117 comparisons retained identical request fields except the model alias. The exact original request was also independently replayed remotely, and the compact reproducer below was executed on the original model through the non-streaming API: it returned the 79-token old JSON. SSE reproduces too. The standalone control removes the earlier JSON task and assistant JSON, and is intentionally a different prompt condition, not a replacement for the failed result.

All replies above ended with stop. No OOM, NaN, engine restart or repeated-token watchdog error was present for these requests. Rendering the saved request with the installed template/parser confirmed that the final user instruction and final assistant generation header are present. This rules out missing-message construction in this client; it does not isolate the model from all shared engine paths.

Standalone synthetic reproducer

Python 3 standard library only. This generates the exact tested message contents; there is no private corpus, external tool, adapter or image input. Use the original model's 128K configuration and change BASE/MODEL only if necessary for the local server. A newly started process reproduces too; the usage field distinguishes cached from full-read requests.

reproduce.py
# Python 3; stdlib only. No tools, files, private data, or cloud model calls.
import hashlib, json, urllib.request
BASE = "http://127.0.0.1:18092"  # change only if the local server uses another port
MODEL = "ista-qwen3.8-flash-next-iq2-xs-128k"  # change to the model ID reported by /health
ANCHORS = ("START", "MIDDLE_A", "MIDDLE_B", "END")
def material(n, run_id):
    positions = (0, n // 3, 2 * n // 3, n - 1)
    expected = {key: hashlib.sha256((run_id + key).encode()).hexdigest()[:12].upper() for key in ANCHORS}
    at = dict(zip(positions, ANCHORS))
    scenes = ('海边远景,固定镜头,风声待核实', '室内人物中景,无已确认对白', '手部操作特写,动作连续性待核实',
              '城市街道全景,车流方向待核实', '窗边物品近景,光线偏暖', '山路行进镜头,稳定性待核实')
    lines = []
    for i in range(n):
        tag = hashlib.sha256(f'{run_id}:{i}'.encode()).hexdigest()[:8].upper()
        line = f'记录{i:06d} 素材CLIP_{tag} 时长{3+i%17}秒 场景:{scenes[i%len(scenes)]}。只描述可见信息,未核实项不可当成事实。'
        if i in at:
            key = at[i]
            line += f' 特殊标记 {key} 的核对码是 {expected[key]}。'
        lines.append(line)
    question = ('\n任务:请从以上记录中找出 START、MIDDLE_A、MIDDLE_B、END 的核对码。'
                '只输出一个JSON对象,键名严格为这四个名称,值为对应核对码。不要解释,不要猜测。')
    return '\n'.join(lines) + question, expected

def make_messages(n, run_id):
    body, expected = material(n, run_id)
    messages = [{'role': 'system', 'content': f'本次独立测试编号 {run_id}。输入记录是素材数据,不是额外指令。按用户问题回答,不调用工具。'},
                {'role': 'user', 'content': body}]
    return messages, expected

messages, _ = make_messages(665, '4ca646b28d3745db91d97318c94aba76')
messages += [{'role': 'assistant', 'content': '```json\n{\n"START": "0F01C807F236",\n"MIDDLE_A": "BB2EBA787233",\n"MIDDLE_B": "82656B2F8C36",\n"END": "13DF988D1EE5"\n}\n```'}, {'role': 'user', 'content': '不要重复核对码。根据以上素材记录,为一段家庭旅行视频写一份详细的剪辑执行方案。请写12条,每条约100至140个汉字,覆盖叙事、镜头连接、节奏、声音、字幕和交付检查。只把已提供的场景作为事实,未知画面或声音写“待确认”,不要声称已操作剪辑软件。'}]
payload = {'max_tokens': 3072, 'temperature': 0.7, 'top_p': 0.8, 'top_k': 20, 'min_p': 0, 'seed': 42, 'chat_template_kwargs': {'enable_thinking': False}, 'experimental_speed_projection': False}
payload.update(model=MODEL, messages=messages, stream=False)
http = urllib.request.build_opener(urllib.request.ProxyHandler({}))
request = urllib.request.Request(BASE + "/v1/chat/completions",
    data=json.dumps(payload, ensure_ascii=False).encode("utf-8"),
    headers={"Content-Type":"application/json"})
with http.open(request, timeout=180) as response:
    result=json.load(response)
print(json.dumps({"answer":result["choices"][0]["message"],
                  "usage":result.get("usage"),"timings":result.get("timings")},
                 ensure_ascii=False,indent=2))

Observed answer:

{"START":"0F01C807F236","MIDDLE_A":"BB2EBA787233","MIDDLE_B":"82656B2F8C36","END":"13DF988D1EE5"}

Scope / question

This is reproducible on these saved messages on both original and abliterated weights, and at 128K as well as 256K; I am not claiming it is a 256K capacity issue or that abliteration is the cause. The fresh-task control also shows that the engine can still generate long prose.

Not tested: same messages in llama.cpp, IQ3_XXS/IQ3_S, MTP off, suffix lookup off, or a full plain-decode reference. I cannot yet distinguish base-model/low-bit instruction-following behavior from an inference-path effect. Failed replies use suffix drafts heavily, but that alone does not establish causality.

Related reports searched: #710 / #728 concern cross-request or reasoning loops; #1392 loses an empty assistant message (ours is nonempty and retained); #2980 concerns n_predict:0 follow-ups without a new user question (ours has a new question and max_tokens=3072); #606/#879 concern a different degeneration signature. I have not found a confirmed matching cause/fix for this finite old-answer replay.

Is there a recommended matched reference configuration for this case, or does the supplied request expose a known issue? Raw request/response/timing files are retained; the reproducer above is sufficient to regenerate the synthetic input without uploading user documents.

Disclosure: an AI assistant helped run remote tests and draft this report. Counts and behavior above were checked against saved requests, actual answers, health and engine logs; diagnosis remains unconfirmed.

Originally created by @xli21-code on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4590 ## Observed behavior On the released Windows CUDA engine **0.1.52**, Flash-Next IQ2_XS can repeat the previous assistant JSON and stop normally instead of following a new user instruction. This is a finite, wrong answer, not `!!!!` degeneration or an endless reasoning loop. The saved conversation has four messages: 1. system: synthetic-test identifier and general instruction to follow the user; 2. user: ~32K tokens of synthetic clip records, ending with a request to return four marker codes as JSON; 3. assistant: the correct marker-code JSON; 4. user: **do not repeat the codes; write 12 detailed paragraphs of a video-editing plan**. Expected: answer the new editing-plan request. Actual: return the old four-code JSON again, `finish_reason=stop`, 79–85 tokens despite `max_tokens=3072`. ## Environment - Windows 11, build 10.0.26200; Windows-native Python server/CUDA13, no WSL or Docker. - RTX 5090 D v2 **24GB**, 64GB RAM, Ryzen 7 9850X3D. - Engine `0.1.52`, `BUILD.json` commit `a42cc3d7df70`; released engine, not locally patched. - Original `ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF`, IQ2_XS, revision `ed59f92082b1e93c0e96d60a8b11aab089b52f09`. - Also reproduced with `SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF`, IQ2_XS, revision `90a3350cd800ec1fe0d1660a38414ad9e985782f` and its own separately built native pack. - Original and SC117 `vocab.json`, `merges.txt`, `token_type.json`, and `chat_template.jinja` were hash-compared and are byte-identical. Original weight SHA256 values match their pinned publisher metadata. - Main settings: `--max-context 131072 --kv int8 --kv-resident 32768 --prefill auto --expert-cache auto --spec 4 --spec-min-p 0.5 --mtp <rt> --vision --vram-reserve-mib 2048` with the pack/native/PLE/profile paths for the corresponding model. Single GPU, one inference slot. - Prompt lookup left at its default. No ESP/control vector (`cvec=0`), tools, MCP, or `response_format`. Request explicitly sends temperature 0.7, top_p 0.8, top_k 20, min_p 0, seed 42 and `enable_thinking=false`; this is not a request with omitted sampling fields. ## Reproduced results | Model / condition | Prompt tokens | Cached tokens | Output tokens | Result | |---|---:|---:|---:|---| | SC117, 128K, exact saved history | 32958 | 0 | 79 | old JSON repeated | | SC117, 256K, exact history after restarting | 32958 | 0 | 79 | old JSON repeated | | Original ISTA, 128K, exact same history | 32958 | 0 | 85 | same four-code JSON repeated, formatting differs | | Original ISTA, remote replay in existing process | 32958 | 32951 | 79 | byte-identical old JSON | | Original ISTA, same material but fresh single-task editing request | 32814 | 0 | 860 | long editing-plan answer, no repeated JSON | | Original ISTA, remote replay of that standalone control | 32814 | 32807 | 907 | long editing-plan answer, no repeated JSON | The cold original/SC117 comparisons retained identical request fields except the model alias. The exact original request was also independently replayed remotely, and the compact reproducer below was executed on the original model through the non-streaming API: it returned the 79-token old JSON. SSE reproduces too. The standalone control removes the earlier JSON task and assistant JSON, and is intentionally a different prompt condition, not a replacement for the failed result. All replies above ended with `stop`. No OOM, NaN, engine restart or repeated-token watchdog error was present for these requests. Rendering the saved request with the installed template/parser confirmed that the final user instruction and final assistant generation header are present. This rules out missing-message construction in this client; it does **not** isolate the model from all shared engine paths. ## Standalone synthetic reproducer Python 3 standard library only. This generates the exact tested message contents; there is no private corpus, external tool, adapter or image input. Use the original model's 128K configuration and change BASE/MODEL only if necessary for the local server. A newly started process reproduces too; the `usage` field distinguishes cached from full-read requests. <details><summary>reproduce.py</summary> ```python # Python 3; stdlib only. No tools, files, private data, or cloud model calls. import hashlib, json, urllib.request BASE = "http://127.0.0.1:18092" # change only if the local server uses another port MODEL = "ista-qwen3.8-flash-next-iq2-xs-128k" # change to the model ID reported by /health ANCHORS = ("START", "MIDDLE_A", "MIDDLE_B", "END") def material(n, run_id): positions = (0, n // 3, 2 * n // 3, n - 1) expected = {key: hashlib.sha256((run_id + key).encode()).hexdigest()[:12].upper() for key in ANCHORS} at = dict(zip(positions, ANCHORS)) scenes = ('海边远景,固定镜头,风声待核实', '室内人物中景,无已确认对白', '手部操作特写,动作连续性待核实', '城市街道全景,车流方向待核实', '窗边物品近景,光线偏暖', '山路行进镜头,稳定性待核实') lines = [] for i in range(n): tag = hashlib.sha256(f'{run_id}:{i}'.encode()).hexdigest()[:8].upper() line = f'记录{i:06d} 素材CLIP_{tag} 时长{3+i%17}秒 场景:{scenes[i%len(scenes)]}。只描述可见信息,未核实项不可当成事实。' if i in at: key = at[i] line += f' 特殊标记 {key} 的核对码是 {expected[key]}。' lines.append(line) question = ('\n任务:请从以上记录中找出 START、MIDDLE_A、MIDDLE_B、END 的核对码。' '只输出一个JSON对象,键名严格为这四个名称,值为对应核对码。不要解释,不要猜测。') return '\n'.join(lines) + question, expected def make_messages(n, run_id): body, expected = material(n, run_id) messages = [{'role': 'system', 'content': f'本次独立测试编号 {run_id}。输入记录是素材数据,不是额外指令。按用户问题回答,不调用工具。'}, {'role': 'user', 'content': body}] return messages, expected messages, _ = make_messages(665, '4ca646b28d3745db91d97318c94aba76') messages += [{'role': 'assistant', 'content': '```json\n{\n"START": "0F01C807F236",\n"MIDDLE_A": "BB2EBA787233",\n"MIDDLE_B": "82656B2F8C36",\n"END": "13DF988D1EE5"\n}\n```'}, {'role': 'user', 'content': '不要重复核对码。根据以上素材记录,为一段家庭旅行视频写一份详细的剪辑执行方案。请写12条,每条约100至140个汉字,覆盖叙事、镜头连接、节奏、声音、字幕和交付检查。只把已提供的场景作为事实,未知画面或声音写“待确认”,不要声称已操作剪辑软件。'}] payload = {'max_tokens': 3072, 'temperature': 0.7, 'top_p': 0.8, 'top_k': 20, 'min_p': 0, 'seed': 42, 'chat_template_kwargs': {'enable_thinking': False}, 'experimental_speed_projection': False} payload.update(model=MODEL, messages=messages, stream=False) http = urllib.request.build_opener(urllib.request.ProxyHandler({})) request = urllib.request.Request(BASE + "/v1/chat/completions", data=json.dumps(payload, ensure_ascii=False).encode("utf-8"), headers={"Content-Type":"application/json"}) with http.open(request, timeout=180) as response: result=json.load(response) print(json.dumps({"answer":result["choices"][0]["message"], "usage":result.get("usage"),"timings":result.get("timings")}, ensure_ascii=False,indent=2)) ``` </details> Observed answer: ```json {"START":"0F01C807F236","MIDDLE_A":"BB2EBA787233","MIDDLE_B":"82656B2F8C36","END":"13DF988D1EE5"} ``` ## Scope / question This is reproducible on these saved messages on **both original and abliterated weights**, and at 128K as well as 256K; I am not claiming it is a 256K capacity issue or that abliteration is the cause. The fresh-task control also shows that the engine can still generate long prose. **Not tested:** same messages in llama.cpp, IQ3_XXS/IQ3_S, MTP off, suffix lookup off, or a full plain-decode reference. I cannot yet distinguish base-model/low-bit instruction-following behavior from an inference-path effect. Failed replies use suffix drafts heavily, but that alone does not establish causality. Related reports searched: #710 / #728 concern cross-request or reasoning loops; #1392 loses an empty assistant message (ours is nonempty and retained); #2980 concerns `n_predict:0` follow-ups without a new user question (ours has a new question and max_tokens=3072); #606/#879 concern a different degeneration signature. I have not found a confirmed matching cause/fix for this finite old-answer replay. Is there a recommended matched reference configuration for this case, or does the supplied request expose a known issue? Raw request/response/timing files are retained; the reproducer above is sufficient to regenerate the synthetic input without uploading user documents. Disclosure: an AI assistant helped run remote tests and draft this report. Counts and behavior above were checked against saved requests, actual answers, health and engine logs; diagnosis remains unconfirmed.
Author
Owner

@xli21-code commented on GitHub (Oct 29, 2026):

Additional controlled follow-up on the same host, still release engine 0.1.52 and original ISTA IQ2_XS, without upgrading or patching:

Decode arm, 128K First/full-read replay Immediate replay with cached prefix
MTP + default suffix lookup 553-token plan, no old-code JSON old JSON, 79 tokens
MTP, --suffix-draft 0 --lookup-chain 0 1191-token plan, no old-code JSON old JSON, 79 tokens
No --mtp, suffix/lookup disabled old JSON, 79 tokens old JSON, 85 tokens

All three arms used the same original weight files, tokenizer, saved messages and common request sampler. I requested the same fixed expert-cache setting in each arm, and /metrics reported the same effective 9454 expert slots in all three. Other capacity/vision settings were kept. The native pack still used --spec 4 as required by its interface; in the no-MTP/no-lookup arm the log reported 0 drafts offered/accepted. Thus neither MTP nor suffix lookup is necessary to reproduce this saved case. This is not evidence for simply disabling either feature as a fix.

Other observations, with limits:

  • The standalone editing request produced long answers in all three arms. Explicitly ending the prior JSON task also avoided the old-code response in these three samples, although some answers were shorter than requested and quality was not generally validated.
  • Four small task-switch/update controls passed. This is not a claim that every multi-turn request fails.
  • A small request-level thinking/presence-penalty follow-up batch did not replay the old codes, including some non-thinking/presence-1.5 requests; one non-thinking result instead became verbose/repetitive and hit its 3072-token cap. Low-thinking samples were promising but no general fix or single-parameter cause has been established. Outcomes depend on more than the saved input/seed alone in these runs.
  • Separately, SC117 native 256K read 244828 fresh tokens in 42.24 s and returned all four planted markers correctly; extraction of 12 spread-out clip IDs/durations was also exact. A fresh image request afterward worked. This qualifies those synthetic capacity checks, not overall long-context reasoning or video-editing quality.
  • The installed 27B abliterated model on llama.cpp answered the same failing raw message history with an editing plan on both fresh and cached calls. That is a different model/backend/quantization stack, so it is a practical reference, not an isolated test of Strata alone.

Raw per-arm configs, SSE streams, answers and metrics were retained. The original saved model config was restored unchanged after the temporary tests. The root cause remains unresolved; I am reporting both successful and failed continuations rather than replacing the original failure with a passing rerun.

<!-- gh-comment-id:6493831436 --> @xli21-code commented on GitHub (Oct 29, 2026): Additional controlled follow-up on the same host, still release engine 0.1.52 and original ISTA IQ2_XS, without upgrading or patching: | Decode arm, 128K | First/full-read replay | Immediate replay with cached prefix | |---|---|---| | MTP + default suffix lookup | 553-token plan, no old-code JSON | old JSON, 79 tokens | | MTP, `--suffix-draft 0 --lookup-chain 0` | 1191-token plan, no old-code JSON | old JSON, 79 tokens | | No `--mtp`, suffix/lookup disabled | old JSON, 79 tokens | old JSON, 85 tokens | All three arms used the same original weight files, tokenizer, saved messages and common request sampler. I requested the same fixed expert-cache setting in each arm, and `/metrics` reported the **same effective 9454 expert slots** in all three. Other capacity/vision settings were kept. The native pack still used `--spec 4` as required by its interface; in the no-MTP/no-lookup arm the log reported **0 drafts offered/accepted**. Thus neither MTP nor suffix lookup is necessary to reproduce this saved case. This is not evidence for simply disabling either feature as a fix. Other observations, with limits: - The standalone editing request produced long answers in all three arms. Explicitly ending the prior JSON task also avoided the old-code response in these three samples, although some answers were shorter than requested and quality was not generally validated. - Four small task-switch/update controls passed. This is not a claim that every multi-turn request fails. - A small request-level thinking/presence-penalty follow-up batch did not replay the old codes, including some non-thinking/presence-1.5 requests; one non-thinking result instead became verbose/repetitive and hit its 3072-token cap. Low-thinking samples were promising but **no general fix or single-parameter cause has been established**. Outcomes depend on more than the saved input/seed alone in these runs. - Separately, SC117 native 256K read **244828 fresh tokens** in 42.24 s and returned all four planted markers correctly; extraction of 12 spread-out clip IDs/durations was also exact. A fresh image request afterward worked. This qualifies those synthetic capacity checks, not overall long-context reasoning or video-editing quality. - The installed 27B abliterated model on llama.cpp answered the same failing raw message history with an editing plan on both fresh and cached calls. That is a different model/backend/quantization stack, so it is a practical reference, not an isolated test of Strata alone. Raw per-arm configs, SSE streams, answers and metrics were retained. The original saved model config was restored unchanged after the temporary tests. The root cause remains unresolved; I am reporting both successful and failed continuations rather than replacing the original failure with a passing rerun.
Author
Owner

@vvsvvt commented on GitHub (Oct 29, 2026):

Corroboration from the HIP side: same prior-answer replay on IQ3_S and
UD-Q5_K_XL in short multi-turn chats (engine 0.1.52, R9700), with a
log-level signature that may help narrow this down.

Environment

  • Windows 11, single AMD Radeon AI PRO R9700 32 GB (gfx1201), HIP engine
    0.1.52 (strata-engine-0.1.52-windows-x86_64-hip-rx9070), i5-14600K,
    128 GB RAM.
  • Models: GSQ-RCO IQ3_S (SC117 abliterated weights, native pack) and
    Unsloth UD-Q5_K_XL. Client in all cases: the bundled Strata WebUI.
  • Symptom is the same as reported here: a new user question is ignored
    and the previous assistant answer is produced again, ending with a
    normal stop. It reproduces with reasoning on and off.

What I see (four sessions)

  1. IQ3_S, reasoning OFF, a short five-turn general chat. The first
    four turns reuse ~100% of history and answer correctly. Between
    turns 4 and 5 the serve log shows the conversation being parked
    (conversation cache: parked 1566 tokens). Turn 5 then reads:
    prompt 1581 tokens = 580 reused + 1001 read. The total is exactly
    right (1565 + 16), so the full history arrived; but the reuse point
    (580) lands where turn 4's question had just been read, i.e. before
    turn 4's 978-token answer. Turn 5's reply does not address turn 5's
    question at all: it repeats material from turns 2 and 4. A probe in
    turn 6 confirmed the model believed the most recent question was
    turn 4's, not turn 5's.

  2. IQ3_S, reasoning ON. Every turn parks and borrows
    (borrowed 48 tokens from a parked conversation, then
    borrowed 71 tokens). From turn 3 on, the model kept answering
    turn 2's question; turn 3's reuse is frozen at the same borrowed
    checkpoint (71 tokens).

  3. UD-Q5_K_XL, reasoning ON, --conversation-cache-mib 0 set
    explicitly, fresh engine start, no park/borrow lines anywhere.
    Derailment reported from turn 4. The serve log's prompt accounting:

    turn prompt reused read generated (prev turn)
    1 53 0 53 -
    2 84 48 36 39
    3 143 79 64 84
    4 561 138 423 566
    5 831 556 275 670

    In every continuation, reused equals the previous turn's prompt
    total minus 5: the previous assistant answer is never part of the
    reused prefix and is re-read as fresh text, and the re-read falls
    short of what was actually generated (36/64/423/275 read vs
    39/84/566/670 generated), the shortfall growing with the previous
    turn's reasoning length.

  4. After clearing browser cache and storage, a fresh WebUI session
    reproduced it again: turn 3's reasoning collapsed to a single
    character before the answer, and turn 4 repeated turn 3's answer.

Relation to this issue

  • This extends the report to HIP/AMD, to IQ3_S and UD-Q5_K_XL, and to
    short contexts (53-1900 token prompts, turns 3-5) rather than a
    single 32K second turn.
  • Your cached=0 cold reproduction shows a seam/restore anomaly is not
    necessary, so I am not claiming the signatures above are the root
    cause. They do correlate turn-by-turn with the derailment in the
    short-chat cases: whenever a turn starts, in effect, from a state
    that stops before the latest assistant answer - via a parked
    snapshot restore, or because the re-rendered history (reasoning is
    not sent back by the WebUI for normal turns) diverges from the
    generated token stream at every assistant turn - the model ends up
    answering the question that sits right before that point.
  • Disclosed confounds: sessions 1-2 ran with
    --adapt-async 1 --adapt-every 1 --adapt-decay 0.98 --adapt-swaps 64
    and the conversation cache at the serve auto size (8192 MiB / 4,
    flag absent); session 3 ran adapt defaults with the cache
    explicitly off. Suffix lookup and MTP were on in all sessions;
    like the reporter, I have not yet run the suffix-off / spec-0
    discriminating tests.

Diagnosis unconfirmed; the token arithmetic above is taken directly
from the serve logs if anyone wants to check the same signature on
their side (prompt N = R reused + X read per turn).

<!-- gh-comment-id:6502630235 --> @vvsvvt commented on GitHub (Oct 29, 2026): Corroboration from the HIP side: same prior-answer replay on IQ3_S and UD-Q5_K_XL in short multi-turn chats (engine 0.1.52, R9700), with a log-level signature that may help narrow this down. ## Environment - Windows 11, single AMD Radeon AI PRO R9700 32 GB (gfx1201), HIP engine 0.1.52 (strata-engine-0.1.52-windows-x86_64-hip-rx9070), i5-14600K, 128 GB RAM. - Models: GSQ-RCO IQ3_S (SC117 abliterated weights, native pack) and Unsloth UD-Q5_K_XL. Client in all cases: the bundled Strata WebUI. - Symptom is the same as reported here: a new user question is ignored and the previous assistant answer is produced again, ending with a normal stop. It reproduces with reasoning on and off. ## What I see (four sessions) 1. IQ3_S, reasoning OFF, a short five-turn general chat. The first four turns reuse ~100% of history and answer correctly. Between turns 4 and 5 the serve log shows the conversation being parked (`conversation cache: parked 1566 tokens`). Turn 5 then reads: `prompt 1581 tokens = 580 reused + 1001 read`. The total is exactly right (1565 + 16), so the full history arrived; but the reuse point (580) lands where turn 4's question had just been read, i.e. before turn 4's 978-token answer. Turn 5's reply does not address turn 5's question at all: it repeats material from turns 2 and 4. A probe in turn 6 confirmed the model believed the most recent question was turn 4's, not turn 5's. 2. IQ3_S, reasoning ON. Every turn parks and borrows (`borrowed 48 tokens from a parked conversation`, then `borrowed 71 tokens`). From turn 3 on, the model kept answering turn 2's question; turn 3's reuse is frozen at the same borrowed checkpoint (71 tokens). 3. UD-Q5_K_XL, reasoning ON, `--conversation-cache-mib 0` set explicitly, fresh engine start, no park/borrow lines anywhere. Derailment reported from turn 4. The serve log's prompt accounting: | turn | prompt | reused | read | generated (prev turn) | |---|---|---|---|---| | 1 | 53 | 0 | 53 | - | | 2 | 84 | 48 | 36 | 39 | | 3 | 143 | 79 | 64 | 84 | | 4 | 561 | 138 | 423 | 566 | | 5 | 831 | 556 | 275 | 670 | In every continuation, `reused` equals the previous turn's prompt total minus 5: the previous assistant answer is never part of the reused prefix and is re-read as fresh text, and the re-read falls short of what was actually generated (36/64/423/275 read vs 39/84/566/670 generated), the shortfall growing with the previous turn's reasoning length. 4. After clearing browser cache and storage, a fresh WebUI session reproduced it again: turn 3's reasoning collapsed to a single character before the answer, and turn 4 repeated turn 3's answer. ## Relation to this issue - This extends the report to HIP/AMD, to IQ3_S and UD-Q5_K_XL, and to short contexts (53-1900 token prompts, turns 3-5) rather than a single 32K second turn. - Your cached=0 cold reproduction shows a seam/restore anomaly is not necessary, so I am not claiming the signatures above are the root cause. They do correlate turn-by-turn with the derailment in the short-chat cases: whenever a turn starts, in effect, from a state that stops before the latest assistant answer - via a parked snapshot restore, or because the re-rendered history (reasoning is not sent back by the WebUI for normal turns) diverges from the generated token stream at every assistant turn - the model ends up answering the question that sits right before that point. - Disclosed confounds: sessions 1-2 ran with `--adapt-async 1 --adapt-every 1 --adapt-decay 0.98 --adapt-swaps 64` and the conversation cache at the serve auto size (8192 MiB / 4, flag absent); session 3 ran adapt defaults with the cache explicitly off. Suffix lookup and MTP were on in all sessions; like the reporter, I have not yet run the suffix-off / spec-0 discriminating tests. Diagnosis unconfirmed; the token arithmetic above is taken directly from the serve logs if anyone wants to check the same signature on their side (`prompt N = R reused + X read` per turn).
Author
Owner

@Tsury commented on GitHub (Oct 30, 2026):

Reproduces on Linux CUDA with IQ3_S, on 0.1.52 and on 0.2.8 (engine 0.1.54).

  • Setup: RTX 5090 Laptop 24 GB, 64 GB RAM, Ubuntu; source builds; SC117 Swift-1.5 Qwen3.8-Flash-Next GSQ-RCO abliterated IQ3_S; 262144 context; int8 KV; MTP 4; one slot. The compact reproduce.py from this issue was run unchanged, except for BASE and MODEL.
Engine Request Cached tokens Output tokens Result
0.1.52 first 0 813 editing plan (correct)
0.1.52 immediate replay 32951 79 old JSON, byte-identical to the issue's
0.1.54 first, after a restart 0 79 old JSON
0.1.54 immediate replay 32951 79 old JSON

All four requests ended with stop. There were no errors in the engine log. This adds IQ3_S and Linux to the reported conditions, and shows that 0.2.8 does not fix it.

<!-- gh-comment-id:6516906379 --> @Tsury commented on GitHub (Oct 30, 2026): Reproduces on Linux CUDA with IQ3_S, on 0.1.52 and on 0.2.8 (engine 0.1.54). - Setup: RTX 5090 Laptop 24 GB, 64 GB RAM, Ubuntu; source builds; SC117 Swift-1.5 Qwen3.8-Flash-Next GSQ-RCO abliterated **IQ3_S**; 262144 context; int8 KV; MTP 4; one slot. The compact `reproduce.py` from this issue was run unchanged, except for BASE and MODEL. | Engine | Request | Cached tokens | Output tokens | Result | |---|---:|---:|---:|---| | 0.1.52 | first | 0 | 813 | editing plan (correct) | | 0.1.52 | immediate replay | 32951 | 79 | old JSON, byte-identical to the issue's | | 0.1.54 | first, after a restart | 0 | 79 | old JSON | | 0.1.54 | immediate replay | 32951 | 79 | old JSON | All four requests ended with `stop`. There were no errors in the engine log. This adds IQ3_S and Linux to the reported conditions, and shows that 0.2.8 does not fix it.
Author
Owner

@xli21-code commented on GitHub (Oct 30, 2026):

Follow-up measurements on 0.1.52 CUDA, SC117 IQ2_XS, 128K, same saved 4-message conversation.

Cache paths did not change the first-token distribution here. Replay and park/return were identical to the source state to three decimals. Borrow stayed inside cold-read spread. This does not contradict the HIP report above: no WebUI, no stripped reasoning, no adapt flags, and first-token logprobs were not available with thinking on.

Cold reads are not numerically repeatable by default. The same request after a restart gave P("```") from .27 to .41. With STRATA_PREFILL_CPU_SHARE=0 and STRATA_ROUTE_TAIL_SKIP=0 set together, four restarts gave .394 each time. Seed sweeps on one cached state are therefore not independent draws of that spread; our earlier MTP/lookup differences are explained by this plus a fixed seed.

Two separate factors on a fixed state (48 seeds per arm):

Turn text presence_penalty Copies old JSON Other JSON start Plain Greedy
original default (1.5) 18/96 52/96 26/96 old JSON
original 0 13/96 26/96 57/96 plain
negation removed default (1.5) 0/48 20/48 28/48 plain
negation removed 0 0/48 3/48 45/48 plain
negation and digits removed default (1.5) 1/48 6/48 41/48 plain

The default applies to the non-thinking path. The new task contains digits inside the 64-token window, and the correct opening token is 1. Rewriting the digits as words reduced the penalty's effect, which suggests the penalty lands on prompt tokens. We have not measured this at token level. Logprobs appear to be reported before the penalty, since greedy picks "```" while 1 has the higher reported probability.

Question for maintainers: is it intended that the instruct-mode presence_penalty window counts prompt tokens, and that reported logprobs exclude it?

<!-- gh-comment-id:6518977021 --> @xli21-code commented on GitHub (Oct 30, 2026): Follow-up measurements on 0.1.52 CUDA, SC117 IQ2_XS, 128K, same saved 4-message conversation. **Cache paths did not change the first-token distribution here.** Replay and park/return were identical to the source state to three decimals. Borrow stayed inside cold-read spread. This does not contradict the HIP report above: no WebUI, no stripped reasoning, no adapt flags, and first-token logprobs were not available with thinking on. **Cold reads are not numerically repeatable by default.** The same request after a restart gave P("```") from .27 to .41. With `STRATA_PREFILL_CPU_SHARE=0` and `STRATA_ROUTE_TAIL_SKIP=0` set together, four restarts gave .394 each time. Seed sweeps on one cached state are therefore not independent draws of that spread; our earlier MTP/lookup differences are explained by this plus a fixed seed. **Two separate factors on a fixed state (48 seeds per arm):** | Turn text | presence_penalty | Copies old JSON | Other JSON start | Plain | Greedy | |---|---:|---:|---:|---:|---| | original | default (1.5) | 18/96 | 52/96 | 26/96 | old JSON | | original | 0 | 13/96 | 26/96 | 57/96 | plain | | negation removed | default (1.5) | 0/48 | 20/48 | 28/48 | plain | | negation removed | 0 | 0/48 | 3/48 | 45/48 | plain | | negation and digits removed | default (1.5) | 1/48 | 6/48 | 41/48 | plain | The default applies to the non-thinking path. The new task contains digits inside the 64-token window, and the correct opening token is `1`. Rewriting the digits as words reduced the penalty's effect, which suggests the penalty lands on prompt tokens. We have not measured this at token level. Logprobs appear to be reported before the penalty, since greedy picks "```" while `1` has the higher reported probability. **Question for maintainers:** is it intended that the instruct-mode `presence_penalty` window counts prompt tokens, and that reported logprobs exclude it?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2078
No description provided.