[GH-ISSUE #4129] [Engine] 2x RTX 5060 Ti 16 GB: the one-group batch default from 0.2.1 is 17-32% slower with 2-4 requests; --batch-groups auto restores it #1807

Closed
opened 2026-11-04 01:54:14 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @Superbobo75 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4129

Area

[Engine]

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

Reproduction status

Reproduced locally

Strata version

Strata 0.2.6 from source (setup.py --update) · engine 0.1.50 prebuilt (BUILD.json commit 1aff6d1411)

Graphics card, memory and system

2x RTX 5060 Ti 16 GB (driver 617.14) · Ryzen 9 5950X (AVX2, no AVX-512) · 128 GB DDR4-3200 · Windows 11 Pro (build 26200)

Model, size and settings

Qwen3.8-Flash-Next IQ3_S and IQ3_XXS native packs · layer split 24 · parallel 4 (--batch 4) · --batch-mtp · --resident-experts · pictures on

What happened

After updating from 0.1.43.1 to 0.2.6 with the same config, several requests at once got slower on my two-card PC. A single request did not change. The 0.2.1 notes say that with a layer split over two NVIDIA cards, --batch N now runs one serial group instead of two pipelined groups, and that "a card with a very small expert cache can lose here". This PC seems to be that case. With --batch-groups auto added on 0.2.6, the speed is back to the 0.1.43.1 numbers or a little above them.

Total tokens/s, all from today on the same PC, temperature 0.6, 800 output tokens per request, 4 rounds per client count:

IQ3_S, short prompts 0.1.43.1 0.2.6 default 0.2.6 + --batch-groups auto
1 request 62.8 63.9 65.3
2 requests 88.6 72.6 (-18%) 89.0
4 requests 131.5 97.2 (-26%) 134.1
IQ3_XXS, short prompts 0.1.43.1 0.2.6 default 0.2.6 + --batch-groups auto
1 request 67.5 70.6 69.9
2 requests 94.4 78.5 (-17%) 95.6

IQ3_XXS with a ~24,000-token prompt per request and 200 output tokens (2 rounds); total tokens/s and time to first token p50/p95:

0.1.43.1 0.2.6 default 0.2.6 + --batch-groups auto
2 requests 12.5 tok/s · 20.9 / 27.9 s 9.5 tok/s · 26.0 / 38.6 s 12.5 tok/s · 20.7 / 27.8 s
4 requests 13.0 tok/s · 34.9 / 55.9 s 8.8 tok/s · 50.6 / 87.5 s 13.1 tok/s · 34.6 / 55.6 s

The rounds were steady: 0.2.6 default, IQ3_S, 4 requests gave 97.0 / 97.3 / 97.3 / 97.2 tok/s; with --batch-groups auto it gave 131.5-134 in every round.

The engine logs show the two paths. With the default, the verify windows are captured over slots 0,1,2,3 (one group). With --batch-groups auto, they are over slots 0,1 and 2,3 (two groups, as in 0.1.43.1). The default run's batch summary (IQ3_S, 4 requests):

strata batch: 800 windows, avg 3.99 rows, 37.18 ms/window = run 33.26 (CUDA0 GPU-reach wait 13.03 + CPU experts 3.51) + commit 2.83 + emit 0.05 + adapt wait 1.04; per stage (ms/window): CUDA0 wait 13.03 + pool 3.51, CUDA1 wait 13.14 + pool 3.06; per layer-window: CPU experts 2.31, VRAM hits 39.32, PCIe 0.00; routed entries per window: VRAM 1887.3 (93.6%), PCIe 0.0 (0.0%), CPU 128.1 (6.4%); adaptive tier: 400 rounds, 7325 experts swapped in; 99.9 rows/s over 31991 ms of wall time (admissions included)

Expert cache on this PC (IQ3_S): CUDA0 4562 slots (8.20 GiB) and CUDA1 4078 slots (8.18 GiB). The engine's prefill plan says 46.8 GiB of experts with 16.4 GiB in the GPU caches. The engine prints one decode expert cache hit rate line per request. In the default run the median of those lines was 62.9% (48.1-95.1%, 37 lines). With --batch-groups auto it was 75.6% (46.0-95.1%, 35 lines).

Smallest steps or command that reproduce it

  1. Use a source checkout of 0.2.6 on 2x NVIDIA 16 GB with the config below. It is the config setup wrote, plus parallel: 4.
  2. Start the server. Run tools/serve_load.py http://127.0.0.1:9100 --clients 1,2,4 --rounds 4 --max-tokens 800. I used a copy that also sets the temperature (0.6) and can prepend a long text for the 24k-prompt case.
  3. Add "--batch-groups", "auto" to args, restart and run the same load again.

The engine command line of the default run (IQ3_S, paths shortened):

strata.exe --serve --pack <data>\packs\iq3_s --native <data>\models\IQ3_S\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf --ple-gguf <data>\models\IQ3_S\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf --expert-profile <strata>\data\expert-profile.bin --expert-cache auto --prefill auto --spec 4 --mtp <data>\mtp\rt --kv int8 --kv-resident 32768 --vision --vram-reserve-mib 1728 --spec-min-p 0.7 --pcie-frac 0.00 --conversation-cache-mib 2048 --conversation-cache-slots 4 --adapt-every 2 --max-context 65536 --batch-mtp --trim-stage-weights --resident-experts --layer-split 24 --batch 4

The --batch-groups auto run is the same line with --batch-groups auto added. IQ3_XXS uses the same flags with its own pack and --max-context 131072.

What I did not test

  • Runs were sequential (one per variant, 4 rounds each), not interleaved pairs.
  • I did not check that answers stay token-identical between the two paths.
  • I did not try STRATA_BATCH_GROUPS_NV_SERIAL=0, a fixed --batch-groups 2, or 8 requests.
  • Not tested: without --batch-mtp, without --resident-experts, and on one card.
  • The 0.1.43.1 column is a separate build measured earlier the same day, with the same configs and the same tool.
  • I have not tried engine 0.1.51.

If the one-group default should only be used when the expert cache is large enough, this PC may help find the threshold. I can run more variants on request.


Prepared with Claude Code (Anthropic). It ran the measurements on my PC, read the engine logs and wrote this report. Every number and log line above comes from those runs. I can attach the raw results and the full engine logs.

Originally created by @Superbobo75 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4129 ### Area [Engine] ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### Reproduction status Reproduced locally ### Strata version Strata 0.2.6 from source (setup.py --update) · engine 0.1.50 prebuilt (BUILD.json commit 1aff6d14117b) ### Graphics card, memory and system 2x RTX 5060 Ti 16 GB (driver 617.14) · Ryzen 9 5950X (AVX2, no AVX-512) · 128 GB DDR4-3200 · Windows 11 Pro (build 26200) ### Model, size and settings Qwen3.8-Flash-Next IQ3_S and IQ3_XXS native packs · layer split 24 · parallel 4 (--batch 4) · --batch-mtp · --resident-experts · pictures on ### What happened After updating from 0.1.43.1 to 0.2.6 with the same config, several requests at once got slower on my two-card PC. A single request did not change. The 0.2.1 notes say that with a layer split over two NVIDIA cards, `--batch N` now runs one serial group instead of two pipelined groups, and that "a card with a very small expert cache can lose here". This PC seems to be that case. With `--batch-groups auto` added on 0.2.6, the speed is back to the 0.1.43.1 numbers or a little above them. Total tokens/s, all from today on the same PC, temperature 0.6, 800 output tokens per request, 4 rounds per client count: | IQ3_S, short prompts | 0.1.43.1 | 0.2.6 default | 0.2.6 + `--batch-groups auto` | | --- | --- | --- | --- | | 1 request | 62.8 | 63.9 | 65.3 | | 2 requests | 88.6 | 72.6 (-18%) | 89.0 | | 4 requests | 131.5 | 97.2 (-26%) | 134.1 | | IQ3_XXS, short prompts | 0.1.43.1 | 0.2.6 default | 0.2.6 + `--batch-groups auto` | | --- | --- | --- | --- | | 1 request | 67.5 | 70.6 | 69.9 | | 2 requests | 94.4 | 78.5 (-17%) | 95.6 | IQ3_XXS with a ~24,000-token prompt per request and 200 output tokens (2 rounds); total tokens/s and time to first token p50/p95: | | 0.1.43.1 | 0.2.6 default | 0.2.6 + `--batch-groups auto` | | --- | --- | --- | --- | | 2 requests | 12.5 tok/s · 20.9 / 27.9 s | 9.5 tok/s · 26.0 / 38.6 s | 12.5 tok/s · 20.7 / 27.8 s | | 4 requests | 13.0 tok/s · 34.9 / 55.9 s | 8.8 tok/s · 50.6 / 87.5 s | 13.1 tok/s · 34.6 / 55.6 s | The rounds were steady: 0.2.6 default, IQ3_S, 4 requests gave 97.0 / 97.3 / 97.3 / 97.2 tok/s; with `--batch-groups auto` it gave 131.5-134 in every round. The engine logs show the two paths. With the default, the verify windows are captured over slots `0,1,2,3` (one group). With `--batch-groups auto`, they are over slots `0,1` and `2,3` (two groups, as in 0.1.43.1). The default run's batch summary (IQ3_S, 4 requests): ``` strata batch: 800 windows, avg 3.99 rows, 37.18 ms/window = run 33.26 (CUDA0 GPU-reach wait 13.03 + CPU experts 3.51) + commit 2.83 + emit 0.05 + adapt wait 1.04; per stage (ms/window): CUDA0 wait 13.03 + pool 3.51, CUDA1 wait 13.14 + pool 3.06; per layer-window: CPU experts 2.31, VRAM hits 39.32, PCIe 0.00; routed entries per window: VRAM 1887.3 (93.6%), PCIe 0.0 (0.0%), CPU 128.1 (6.4%); adaptive tier: 400 rounds, 7325 experts swapped in; 99.9 rows/s over 31991 ms of wall time (admissions included) ``` Expert cache on this PC (IQ3_S): CUDA0 4562 slots (8.20 GiB) and CUDA1 4078 slots (8.18 GiB). The engine's prefill plan says 46.8 GiB of experts with 16.4 GiB in the GPU caches. The engine prints one `decode expert cache hit rate` line per request. In the default run the median of those lines was 62.9% (48.1-95.1%, 37 lines). With `--batch-groups auto` it was 75.6% (46.0-95.1%, 35 lines). ### Smallest steps or command that reproduce it 1. Use a source checkout of 0.2.6 on 2x NVIDIA 16 GB with the config below. It is the config setup wrote, plus `parallel: 4`. 2. Start the server. Run `tools/serve_load.py http://127.0.0.1:9100 --clients 1,2,4 --rounds 4 --max-tokens 800`. I used a copy that also sets the temperature (0.6) and can prepend a long text for the 24k-prompt case. 3. Add `"--batch-groups", "auto"` to `args`, restart and run the same load again. The engine command line of the default run (IQ3_S, paths shortened): ``` strata.exe --serve --pack <data>\packs\iq3_s --native <data>\models\IQ3_S\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf --ple-gguf <data>\models\IQ3_S\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf --expert-profile <strata>\data\expert-profile.bin --expert-cache auto --prefill auto --spec 4 --mtp <data>\mtp\rt --kv int8 --kv-resident 32768 --vision --vram-reserve-mib 1728 --spec-min-p 0.7 --pcie-frac 0.00 --conversation-cache-mib 2048 --conversation-cache-slots 4 --adapt-every 2 --max-context 65536 --batch-mtp --trim-stage-weights --resident-experts --layer-split 24 --batch 4 ``` The `--batch-groups auto` run is the same line with `--batch-groups auto` added. IQ3_XXS uses the same flags with its own pack and `--max-context 131072`. ### What I did not test - Runs were sequential (one per variant, 4 rounds each), not interleaved pairs. - I did not check that answers stay token-identical between the two paths. - I did not try `STRATA_BATCH_GROUPS_NV_SERIAL=0`, a fixed `--batch-groups 2`, or 8 requests. - Not tested: without `--batch-mtp`, without `--resident-experts`, and on one card. - The 0.1.43.1 column is a separate build measured earlier the same day, with the same configs and the same tool. - I have not tried engine 0.1.51. If the one-group default should only be used when the expert cache is large enough, this PC may help find the threshold. I can run more variants on request. --- *Prepared with Claude Code (Anthropic). It ran the measurements on my PC, read the engine logs and wrote this report. Every number and log line above comes from those runs. I can attach the raw results and the full engine logs.*
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 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:

  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

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:6400560947 --> @github-actions[bot] commented on GitHub (Oct 25, 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: - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". 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

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

Thanks, this follows the format now.

<!-- gh-comment-id:6400578728 --> @github-actions[bot] commented on GitHub (Oct 25, 2026): Thanks, this follows the format now.
Author
Owner

@qni-live commented on GitHub (Oct 25, 2026):

I see the same thing on 2x RTX PRO 4500 Blackwell (32 GB each), so it is not limited to small expert caches.

Setup: Strata 0.2.6 Terminal (build 0.1.51), engine 0.1.50 cuda13, Linux. Official ISTA IQ3_XXS, strata launch --tune skip defaults (128K, int8 KV, MTP, pictures on the GPU, --layer-split auto --batch 4). 2x 32 GB hold all experts: the decode expert cache hit rate was 100% in the log lines I read, in every variant. Load: tools/serve_load.py, 1/2/4/8 clients, 4 rounds, 800 output tokens, temperature 0, fixed prompts. Each variant started fresh. Order: default, --set batch-groups=auto, --set batch-groups=2, then the same three again (two passes).

Total tokens/s (median of 4 rounds; pass 1 / pass 2):

Clients default --batch-groups auto --batch-groups 2
1 147.1 / 146.1 146.3 / 146.4 146.3 / 145.9
2 155.9 / 154.6 176.2 / 174.8 (+13%) 174.9 / 175.2 (+13%)
4 210.8 / 210.4 263.4 / 263.8 (+25%) 264.4 / 263.5 (+25%)
8 210.9 / 211.0 264.0 / 263.5 (+25%) 263.0 / 263.6 (+25%)

With 4 clients the median request latency fell from 15.2 s to 12.1 s. With 8 clients the time to first token p50 fell from 8.45 s to 6.97 s. One client does not change. The rounds inside a run are very steady (default, 4 clients: 209.4 to 210.8).

The engine log shows the two paths. Default (flag not given): --batch-groups auto: 1 group of 4 slots - serial windows (measured faster than pipelined groups on two NVIDIA cards ...). With auto written on the command line and with 2: strata batch (pipelined, 2 groups of 2), about 268 rows/s. So an explicit auto is not the same as leaving the flag out.

Answers: with 1 client, all 4 answers are byte-identical in all six runs (default = auto = 2). With 2 or more clients the answers differ between two runs of the same setting about as much as between settings (56 of 60 files differ for default pass 1 vs default pass 2, 56 for default vs auto, 52 for auto vs 2), even at temperature 0. So I could not test "same tokens" with parallel clients, and I saw no sign that the pipelined path changes more than the run itself does. I did not measure quality.

Not tested: long prompts, other models (an earlier 0.2.2 run with Swift IQ3_XXS and our batch config showed the same direction, 2 to 10% in favour of 2 groups), STRATA_BATCH_GROUPS_NV_SERIAL=0.

So the "serial is faster on two NVIDIA cards" measurement behind the 0.2.1 default does not hold on this rig either: with a full expert cache the serial group is still 25% slower at 4 clients. Raw files (per-run engine logs, saved answers, serve_load output) are available if useful.

<!-- gh-comment-id:6403683826 --> @qni-live commented on GitHub (Oct 25, 2026): I see the same thing on 2x RTX PRO 4500 Blackwell (32 GB each), so it is not limited to small expert caches. **Setup:** Strata 0.2.6 Terminal (build 0.1.51), engine 0.1.50 cuda13, Linux. Official ISTA IQ3_XXS, `strata launch --tune skip` defaults (128K, int8 KV, MTP, pictures on the GPU, `--layer-split auto --batch 4`). 2x 32 GB hold all experts: the decode expert cache hit rate was 100% in the log lines I read, in every variant. Load: `tools/serve_load.py`, 1/2/4/8 clients, 4 rounds, 800 output tokens, temperature 0, fixed prompts. Each variant started fresh. Order: default, `--set batch-groups=auto`, `--set batch-groups=2`, then the same three again (two passes). Total tokens/s (median of 4 rounds; pass 1 / pass 2): | Clients | default | `--batch-groups auto` | `--batch-groups 2` | | --- | --- | --- | --- | | 1 | 147.1 / 146.1 | 146.3 / 146.4 | 146.3 / 145.9 | | 2 | 155.9 / 154.6 | 176.2 / 174.8 (+13%) | 174.9 / 175.2 (+13%) | | 4 | 210.8 / 210.4 | 263.4 / 263.8 (+25%) | 264.4 / 263.5 (+25%) | | 8 | 210.9 / 211.0 | 264.0 / 263.5 (+25%) | 263.0 / 263.6 (+25%) | With 4 clients the median request latency fell from 15.2 s to 12.1 s. With 8 clients the time to first token p50 fell from 8.45 s to 6.97 s. One client does not change. The rounds inside a run are very steady (default, 4 clients: 209.4 to 210.8). The engine log shows the two paths. Default (flag not given): `--batch-groups auto: 1 group of 4 slots - serial windows (measured faster than pipelined groups on two NVIDIA cards ...)`. With `auto` written on the command line and with `2`: `strata batch (pipelined, 2 groups of 2)`, about 268 rows/s. So an explicit `auto` is not the same as leaving the flag out. **Answers:** with 1 client, all 4 answers are byte-identical in all six runs (default = auto = 2). With 2 or more clients the answers differ between two runs of the *same* setting about as much as between settings (56 of 60 files differ for default pass 1 vs default pass 2, 56 for default vs auto, 52 for auto vs 2), even at temperature 0. So I could not test "same tokens" with parallel clients, and I saw no sign that the pipelined path changes more than the run itself does. I did not measure quality. **Not tested:** long prompts, other models (an earlier 0.2.2 run with Swift IQ3_XXS and our batch config showed the same direction, 2 to 10% in favour of 2 groups), `STRATA_BATCH_GROUPS_NV_SERIAL=0`. So the "serial is faster on two NVIDIA cards" measurement behind the 0.2.1 default does not hold on this rig either: with a full expert cache the serial group is still 25% slower at 4 clients. Raw files (per-run engine logs, saved answers, `serve_load` output) are available if useful.
Author
Owner

@qni-live commented on GitHub (Oct 25, 2026):

Note on how this was made: the measurements above were run and written up by Claude Code (Anthropic) on my PC. I reviewed the results and this comment before posting it.

<!-- gh-comment-id:6403685137 --> @qni-live commented on GitHub (Oct 25, 2026): Note on how this was made: the measurements above were run and written up by Claude Code (Anthropic) on my PC. I reviewed the results and this comment before posting it.
Author
Owner

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

Thank you for the measurements. Fixed in 0.2.7: two NVIDIA cards now pipeline their batch groups by default, so --batch-groups auto is no longer needed. The one-group mode is opt-in with STRATA_BATCH_GROUPS_NV_SERIAL=1, and STRATA_DEFAULTS=026 restores the 0.2.6 behaviour.

Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7

<!-- gh-comment-id:6491922513 --> @Niko1221 commented on GitHub (Oct 29, 2026): Thank you for the measurements. Fixed in 0.2.7: two NVIDIA cards now pipeline their batch groups by default, so `--batch-groups auto` is no longer needed. The one-group mode is opt-in with `STRATA_BATCH_GROUPS_NV_SERIAL=1`, and `STRATA_DEFAULTS=026` restores the 0.2.6 behaviour. Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
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#1807
No description provided.