[GH-ISSUE #3580] [Engine] Multi-turn answers shrink to a few tokens with --batch 8+ and a large --conversation-cache (0.1.40.4 and 0.1.45) #1476

Closed
opened 2026-11-04 01:51:33 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @kevinhirsch on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3580

What happened

Summary. In one conversation that keeps adding turns, each answer is shorter than the last, until the engine stops after about 4 tokens on every turn. This happens only when the batch slots are 8 or more AND the parked-conversation cache is large (16384 MiB, 16 slots). With either setting alone, answer lengths stay normal. Prompt reuse looks healthy throughout (prompt N tokens = X reused + ~320 read, drafts accepted), so the engine itself ends the answers early.

Load. One stream for 150 s, one append-only conversation: a 1,500-token first turn, then +300-token turns, each asking for five bullet points; max_tokens 512; temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5.

Results (median answer length on turns 2 and later, and answers of 8 tokens or fewer):

parallel conversation cache engine later turns answers <= 8 tokens
4 3072 MiB / 4 slots 0.1.40.4 220-237 0
8 3072 MiB / 4 slots 0.1.40.4 212 0
4 16384 MiB / 16 slots 0.1.40.4 209 0
8 16384 MiB / 16 slots 0.1.40.4 (also with --ple-io ram) 2-4 47 of 57
8 16384 MiB / 16 slots 0.1.45 5 48 of 66
16 16384 MiB / 16 slots 0.1.45 2 43 of 51
16 16384 MiB / 16 slots + STRATA_SLOT_COPY_DIRECT/BATCHSYNC/CKPT_MOVE/CKPT_POOL/BATCH_SELF_COMMIT/QSA_SLOTS 0.1.45 39 0 (shrinks, no collapse)

The answers shrink from turn 2 on, for example 512, 95, 60, 40, 47, 35, 26, 9, 8, 13, 9, 4, 4, ... (0.1.40.4, parallel 8, 16 GiB/16). With 4 or more concurrent streams, most later turns stay normal (one run at 8 streams, 0.1.45 parallel 8, did shrink). A Qwen3.8-27B on vLLM under the same load keeps its later turns at 512 tokens.

Guess. Whatever the engine does with the live conversation between turns differs once the slot count and the parked cache are both large. Perhaps a park/restore or slot copy of the GDN state or turn checkpoints. The copy/checkpoint switches change how badly it shrinks.

Repro artifacts available: configs, engine logs (strata serve: prompt ... lines per turn), and the harness (speed.py load --streams 1 --start 1500 --turn 300 --max-tokens 512).

Strata version, GPU, OS

  • Strata 0.1.40.4 (6674a00) and the Strata engine of the PolyStrata tree at 0.1.45 (974552f); both reproduce it.
  • 2x RTX 2080 Ti 22 GB (sm_75), layer split, NVIDIA driver 595.91.07, CUDA 13.2.
  • Ubuntu, Linux 7.0.0-38-generic.
  • Qwen3.8-Flash-Next-GSQ-RCO IQ3_XXS (native shards), 2x RTX 2080 Ti 22 GB (sm_75), CUDA 13.2, layer split 24, --kv int8 --kv-resident 32768 --max-context 131072 --spec 4 --mtp <rt> --resident-experts --expert-cache auto, the server's "parallel". Engines: Strata 0.1.40.4 (6674a00) and the Strata engine of the PolyStrata tree at 0.1.45 (974552f).

Engine log

Per-turn lines from one single-stream run (0.1.40.4, parallel 8, 16384 MiB / 16-slot conversation cache). Prompt reuse stays normal while the generated length shrinks:

strata serve: prompt 1354 tokens = 0 reused + 1354 read in 4745 ms (285.3 tok/s), 512 generated in 7225 ms (70.9 tok/s), drafts accepted 274 of 356, 1 checkpoints
strata serve: prompt 2189 tokens = 1347 reused + 842 read in 3110 ms (270.8 tok/s), 95 generated in 1373 ms (69.2 tok/s), drafts accepted 51 of 66, 2 checkpoints
strata serve: prompt 2601 tokens = 2283 reused + 318 read in 2023 ms (157.2 tok/s), 60 generated in 924 ms (65.0 tok/s), drafts accepted 29 of 40, 3 checkpoints
strata serve: prompt 2971 tokens = 2660 reused + 311 read in 2090 ms (148.8 tok/s), 40 generated in 620 ms (64.6 tok/s), drafts accepted 17 of 28, 4 checkpoints
strata serve: prompt 3301 tokens = 3010 reused + 291 read in 1986 ms (146.5 tok/s), 47 generated in 657 ms (71.5 tok/s), drafts accepted 26 of 34, 5 checkpoints
strata serve: prompt 3685 tokens = 3347 reused + 338 read in 2212 ms (152.8 tok/s), 35 generated in 476 ms (73.5 tok/s), drafts accepted 20 of 28, 6 checkpoints
strata serve: prompt 4031 tokens = 3719 reused + 312 read in 2055 ms (151.8 tok/s), 26 generated in 410 ms (63.4 tok/s), drafts accepted 10 of 17, 6 checkpoints
strata serve: prompt 4381 tokens = 4056 reused + 325 read in 2185 ms (148.8 tok/s), 9 generated in 130 ms (69.2 tok/s), drafts accepted 5 of 9, 6 checkpoints
strata serve: prompt 4751 tokens = 4389 reused + 362 read in 2272 ms (159.3 tok/s), 8 generated in 107 ms (74.8 tok/s), drafts accepted 5 of 6, 6 checkpoints
strata serve: prompt 5110 tokens = 4758 reused + 352 read in 2267 ms (155.2 tok/s), 13 generated in 165 ms (79.0 tok/s), drafts accepted 8 of 9, 6 checkpoints
strata serve: prompt 5454 tokens = 5122 reused + 332 read in 2075 ms (160.0 tok/s), 9 generated in 182 ms (49.4 tok/s), drafts accepted 3 of 8, 6 checkpoints
strata serve: prompt 5785 tokens = 5462 reused + 323 read in 2190 ms (147.5 tok/s), 4 generated in 46 ms (87.5 tok/s), drafts accepted 2 of 2, 6 checkpoints
strata serve: prompt 6108 tokens = 5788 reused + 320 read in 2186 ms (146.4 tok/s), 5 generated in 86 ms (57.9 tok/s), drafts accepted 2 of 3, 6 checkpoints
Originally created by @kevinhirsch on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3580 ### What happened **Summary.** In one conversation that keeps adding turns, each answer is shorter than the last, until the engine stops after about 4 tokens on every turn. This happens only when the batch slots are 8 or more AND the parked-conversation cache is large (16384 MiB, 16 slots). With either setting alone, answer lengths stay normal. Prompt reuse looks healthy throughout (`prompt N tokens = X reused + ~320 read`, drafts accepted), so the engine itself ends the answers early. **Load.** One stream for 150 s, one append-only conversation: a 1,500-token first turn, then +300-token turns, each asking for five bullet points; `max_tokens` 512; temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5. **Results (median answer length on turns 2 and later, and answers of 8 tokens or fewer):** | parallel | conversation cache | engine | later turns | answers <= 8 tokens | |---:|---|---|---:|---:| | 4 | 3072 MiB / 4 slots | 0.1.40.4 | 220-237 | 0 | | 8 | 3072 MiB / 4 slots | 0.1.40.4 | 212 | 0 | | 4 | 16384 MiB / 16 slots | 0.1.40.4 | 209 | 0 | | 8 | 16384 MiB / 16 slots | 0.1.40.4 (also with `--ple-io ram`) | 2-4 | 47 of 57 | | 8 | 16384 MiB / 16 slots | 0.1.45 | 5 | 48 of 66 | | 16 | 16384 MiB / 16 slots | 0.1.45 | 2 | 43 of 51 | | 16 | 16384 MiB / 16 slots + STRATA_SLOT_COPY_DIRECT/BATCHSYNC/CKPT_MOVE/CKPT_POOL/BATCH_SELF_COMMIT/QSA_SLOTS | 0.1.45 | 39 | 0 (shrinks, no collapse) | The answers shrink from turn 2 on, for example 512, 95, 60, 40, 47, 35, 26, 9, 8, 13, 9, 4, 4, ... (0.1.40.4, parallel 8, 16 GiB/16). With 4 or more concurrent streams, most later turns stay normal (one run at 8 streams, 0.1.45 parallel 8, did shrink). A Qwen3.8-27B on vLLM under the same load keeps its later turns at 512 tokens. **Guess.** Whatever the engine does with the live conversation between turns differs once the slot count and the parked cache are both large. Perhaps a park/restore or slot copy of the GDN state or turn checkpoints. The copy/checkpoint switches change how badly it shrinks. **Repro artifacts available:** configs, engine logs (`strata serve: prompt ...` lines per turn), and the harness (speed.py load --streams 1 --start 1500 --turn 300 --max-tokens 512). ### Strata version, GPU, OS - Strata **0.1.40.4** (6674a00) and the Strata engine of the PolyStrata tree at **0.1.45** (974552f); both reproduce it. - 2x RTX 2080 Ti 22 GB (sm_75), layer split, NVIDIA driver 595.91.07, CUDA 13.2. - Ubuntu, Linux 7.0.0-38-generic. - Qwen3.8-Flash-Next-GSQ-RCO IQ3_XXS (native shards), 2x RTX 2080 Ti 22 GB (sm_75), CUDA 13.2, layer split 24, `--kv int8 --kv-resident 32768 --max-context 131072 --spec 4 --mtp <rt> --resident-experts --expert-cache auto`, the server's `"parallel"`. Engines: Strata 0.1.40.4 (6674a00) and the Strata engine of the PolyStrata tree at 0.1.45 (974552f). ### Engine log Per-turn lines from one single-stream run (0.1.40.4, parallel 8, 16384 MiB / 16-slot conversation cache). Prompt reuse stays normal while the generated length shrinks: ``` strata serve: prompt 1354 tokens = 0 reused + 1354 read in 4745 ms (285.3 tok/s), 512 generated in 7225 ms (70.9 tok/s), drafts accepted 274 of 356, 1 checkpoints strata serve: prompt 2189 tokens = 1347 reused + 842 read in 3110 ms (270.8 tok/s), 95 generated in 1373 ms (69.2 tok/s), drafts accepted 51 of 66, 2 checkpoints strata serve: prompt 2601 tokens = 2283 reused + 318 read in 2023 ms (157.2 tok/s), 60 generated in 924 ms (65.0 tok/s), drafts accepted 29 of 40, 3 checkpoints strata serve: prompt 2971 tokens = 2660 reused + 311 read in 2090 ms (148.8 tok/s), 40 generated in 620 ms (64.6 tok/s), drafts accepted 17 of 28, 4 checkpoints strata serve: prompt 3301 tokens = 3010 reused + 291 read in 1986 ms (146.5 tok/s), 47 generated in 657 ms (71.5 tok/s), drafts accepted 26 of 34, 5 checkpoints strata serve: prompt 3685 tokens = 3347 reused + 338 read in 2212 ms (152.8 tok/s), 35 generated in 476 ms (73.5 tok/s), drafts accepted 20 of 28, 6 checkpoints strata serve: prompt 4031 tokens = 3719 reused + 312 read in 2055 ms (151.8 tok/s), 26 generated in 410 ms (63.4 tok/s), drafts accepted 10 of 17, 6 checkpoints strata serve: prompt 4381 tokens = 4056 reused + 325 read in 2185 ms (148.8 tok/s), 9 generated in 130 ms (69.2 tok/s), drafts accepted 5 of 9, 6 checkpoints strata serve: prompt 4751 tokens = 4389 reused + 362 read in 2272 ms (159.3 tok/s), 8 generated in 107 ms (74.8 tok/s), drafts accepted 5 of 6, 6 checkpoints strata serve: prompt 5110 tokens = 4758 reused + 352 read in 2267 ms (155.2 tok/s), 13 generated in 165 ms (79.0 tok/s), drafts accepted 8 of 9, 6 checkpoints strata serve: prompt 5454 tokens = 5122 reused + 332 read in 2075 ms (160.0 tok/s), 9 generated in 182 ms (49.4 tok/s), drafts accepted 3 of 8, 6 checkpoints strata serve: prompt 5785 tokens = 5462 reused + 323 read in 2190 ms (147.5 tok/s), 4 generated in 46 ms (87.5 tok/s), drafts accepted 2 of 2, 6 checkpoints strata serve: prompt 6108 tokens = 5788 reused + 320 read in 2186 ms (146.4 tok/s), 5 generated in 86 ms (57.9 tok/s), drafts accepted 2 of 3, 6 checkpoints ```
bsakaguchi 2026-11-04 01:51:33 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 21, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6314104497 --> @github-actions[bot] commented on GitHub (Oct 21, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@kevinhirsch commented on GitHub (Oct 21, 2026):

Correction from the reporter, with more data: the trigger is --ple-io ram, not --batch 8+ or a large --conversation-cache.

Same machine (2x RTX 2080 Ti 22 GB, sm_75, layer split 24, IQ3_XXS, engine 0.1.40.4) and the same multi-turn harness (each conversation starts at ~1,500 tokens and grows ~300 per turn, 512 max tokens, thinking off), one client:

config --ple-io slots conversation cache later-turn answers (median)
ab-B off 4 3072 MiB / 4 220 tokens
ab-B8 off 8 3072 MiB / 4 213 tokens
ab-Bc off 4 16384 MiB / 16 209 tokens
r40-P ram 4 3072 MiB / 4 2 tokens (57 of 66 answers <= 8 tokens)
fn-R / fn-G ram 8 16384 MiB / 16 4 / 2 tokens

So 8+ slots and a large parked cache are fine on their own, and every run with --ple-io ram shrinks the multi-turn answers, even with 4 slots and a 3 GB cache. Fresh single-turn prompts with --ple-io ram are unaffected (decode 67-72 tok/s at 2K-102K, normal lengths). We have not re-tested on 0.1.47 yet and will add a line when we do. Sorry for the misleading title.

<!-- gh-comment-id:6317099823 --> @kevinhirsch commented on GitHub (Oct 21, 2026): Correction from the reporter, with more data: the trigger is `--ple-io ram`, not `--batch 8+` or a large `--conversation-cache`. Same machine (2x RTX 2080 Ti 22 GB, sm_75, layer split 24, IQ3_XXS, engine 0.1.40.4) and the same multi-turn harness (each conversation starts at ~1,500 tokens and grows ~300 per turn, 512 max tokens, thinking off), one client: | config | `--ple-io` | slots | conversation cache | later-turn answers (median) | |---|---|---|---|---| | ab-B | off | 4 | 3072 MiB / 4 | 220 tokens | | ab-B8 | off | 8 | 3072 MiB / 4 | 213 tokens | | ab-Bc | off | 4 | 16384 MiB / 16 | 209 tokens | | r40-P | ram | 4 | 3072 MiB / 4 | 2 tokens (57 of 66 answers <= 8 tokens) | | fn-R / fn-G | ram | 8 | 16384 MiB / 16 | 4 / 2 tokens | So 8+ slots and a large parked cache are fine on their own, and every run with `--ple-io ram` shrinks the multi-turn answers, even with 4 slots and a 3 GB cache. Fresh single-turn prompts with `--ple-io ram` are unaffected (decode 67-72 tok/s at 2K-102K, normal lengths). We have not re-tested on 0.1.47 yet and will add a line when we do. Sorry for the misleading title.
Author
Owner

@Niko1221 commented on GitHub (Oct 22, 2026):

Thanks for the correction — the trigger (--ple-io ram) is much clearer than the original title. Nothing else is needed to triage it; a re-test on 0.2.2 / engine 0.1.47 would tell us whether it still reproduces.

<!-- gh-comment-id:6337204181 --> @Niko1221 commented on GitHub (Oct 22, 2026): Thanks for the correction — the trigger (--ple-io ram) is much clearer than the original title. Nothing else is needed to triage it; a re-test on 0.2.2 / engine 0.1.47 would tell us whether it still reproduces.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 27, 2026):

Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.

To bring it back: fix the title (area prefix) and the missing parts, then comment /reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.

<!-- gh-comment-id:6438739128 --> @github-actions[bot] commented on GitHub (Oct 27, 2026): Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection. To bring it back: fix the title (area prefix) and the missing parts, then comment `/reopen`. A check runs and reopens it, or tells you what is still missing. See [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1476
No description provided.