[GH-ISSUE #4365] [Engine] Batch slots (several requests at once) for DeepSeek-V4.1-Flash in strata-dsv41 #1934

Open
opened 2026-11-04 01:55:25 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @chestercs on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4365

Area

[Engine] (speed, kernels, models, the server and API)

What do you want to do?

Serve several requests at once with DeepSeek-V4.1-Flash: batch slots ("parallel": N / --batch N) in strata-dsv41, the way the Qwen engine already has them (docs/BATCHING.md). Today docs/DEEPSEEK41.md says "Not in this version: several requests at once (--parallel is ignored with a warning)".

Who needs it and why:

  • Coding agents. Claude Code, OpenCode and similar tools send side requests next to the main conversation, and they start sub-agents in parallel. On strata-dsv41 these wait in the queue. The conversation slots help a lot: a side request that continues a parked prompt takes ~10 s instead of ~55 s. Even so, every sub-agent and every side request still waits for the one stream.
  • Small multi-user setups. For example a chat bot for a few people, or a team sharing one box.
  • Unified-memory machines (DGX Spark / GB10, Strix Halo). On these all or nearly all experts are resident, so the union of the experts a window touches stays in memory. This is the case where docs/BATCHING.md measured batching to pay off.

Our numbers on one NVIDIA GB10 (DGX Spark, 128 GB unified, aarch64, CUDA 13.0, sm_121), IST-DAS 1.75 bpw, engine 0.1.52 built from main 5e8a4cc:

  • 12,936 of 15,360 experts on the GPU (96.8 GB). 2,424 experts (18 GB) on the CPU lane, read in place.
  • 542 tok/s prompt at 25K tokens.
  • 16.5-17.7 tok/s decode in Faster mode (5 experts).
  • GPU utilisation ~93% while decoding, at 25 W. We think one stream leaves a good share of the 273 GB/s memory bandwidth unused, but we have not measured that.
  • Claude Code turns with 20-70K contexts ran stably for 30 minutes, with ~10.4 GB of memory left at minimum.

Even 2-4 slots with one token per slot in the verify window would help these workloads. We understand that with 6 of 384 experts per token, the expert reads overlap less than with a dense model.

What do you do today instead?

Requests are served one at a time; the server queues the rest. The only DeepSeek-V4 alternative with parallel slots that we know of on this hardware is llama.cpp with the Unsloth GGUFs. On the same box it is clearly slower than strata-dsv41 even for a single stream (~155 tok/s prompt, 12.9 tok/s decode), and it cannot load the IST-DAS sets.

Side note: building strata-dsv41 on aarch64

Building strata-dsv41 on aarch64 (GB10) from main 5e8a4cc needed three small fixes. We are happy to open a PR with them.

  • src/dsv41/vendor/exl3_cpu.cpp: exl3_cpu_gemm_scratch() uses kGemmK, which is only defined inside the EXL3_X86 block.
  • src/dsv41/ds4_gg_cpu.cpp: amd_family() has an #else return 0; branch, and the code after it uses an undeclared eax.
  • src/kernels/cpu/portable.cpp: the DeepSeek CPU lane links iq256x_supported / iq256x_rows, tq_state_table_for and tq_detail::tq_rows_{scalar,avx2,avx512}, which have no non-x86 stand-ins. We added stubs: iq256x_supported returns false, so the rows go to ggml-cpu's NEON dots, and the trellis rows are unreachable.

One more GB10 detail. cudaMemGetInfo reports MemFree, so the page cache counts as used and cudaMalloc does not reclaim it. With the Engram and the model files in the page cache, the expert tier came out at 78-85 GB while 22-29 GB were still available. Dropping the model files' cached pages during the load (posix_fadvise(DONTNEED)) and setting --vram-experts from MemAvailable brought it to 96.8 GB.

Originally created by @chestercs on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4365 ### Area [Engine] (speed, kernels, models, the server and API) ### What do you want to do? Serve several requests at once with DeepSeek-V4.1-Flash: batch slots (`"parallel": N` / `--batch N`) in `strata-dsv41`, the way the Qwen engine already has them (docs/BATCHING.md). Today docs/DEEPSEEK41.md says "Not in this version: several requests at once (`--parallel` is ignored with a warning)". Who needs it and why: - **Coding agents.** Claude Code, OpenCode and similar tools send side requests next to the main conversation, and they start sub-agents in parallel. On `strata-dsv41` these wait in the queue. The conversation slots help a lot: a side request that continues a parked prompt takes ~10 s instead of ~55 s. Even so, every sub-agent and every side request still waits for the one stream. - **Small multi-user setups.** For example a chat bot for a few people, or a team sharing one box. - **Unified-memory machines (DGX Spark / GB10, Strix Halo).** On these all or nearly all experts are resident, so the union of the experts a window touches stays in memory. This is the case where docs/BATCHING.md measured batching to pay off. Our numbers on one NVIDIA GB10 (DGX Spark, 128 GB unified, aarch64, CUDA 13.0, sm_121), IST-DAS 1.75 bpw, engine 0.1.52 built from main 5e8a4cc: - 12,936 of 15,360 experts on the GPU (96.8 GB). 2,424 experts (18 GB) on the CPU lane, read in place. - 542 tok/s prompt at 25K tokens. - 16.5-17.7 tok/s decode in Faster mode (5 experts). - GPU utilisation ~93% while decoding, at 25 W. We think one stream leaves a good share of the 273 GB/s memory bandwidth unused, but we have not measured that. - Claude Code turns with 20-70K contexts ran stably for 30 minutes, with ~10.4 GB of memory left at minimum. Even 2-4 slots with one token per slot in the verify window would help these workloads. We understand that with 6 of 384 experts per token, the expert reads overlap less than with a dense model. ### What do you do today instead? Requests are served one at a time; the server queues the rest. The only DeepSeek-V4 alternative with parallel slots that we know of on this hardware is llama.cpp with the Unsloth GGUFs. On the same box it is clearly slower than `strata-dsv41` even for a single stream (~155 tok/s prompt, 12.9 tok/s decode), and it cannot load the IST-DAS sets. ### Side note: building `strata-dsv41` on aarch64 Building `strata-dsv41` on aarch64 (GB10) from main 5e8a4cc needed three small fixes. We are happy to open a PR with them. - `src/dsv41/vendor/exl3_cpu.cpp`: `exl3_cpu_gemm_scratch()` uses `kGemmK`, which is only defined inside the `EXL3_X86` block. - `src/dsv41/ds4_gg_cpu.cpp`: `amd_family()` has an `#else return 0;` branch, and the code after it uses an undeclared `eax`. - `src/kernels/cpu/portable.cpp`: the DeepSeek CPU lane links `iq256x_supported` / `iq256x_rows`, `tq_state_table_for` and `tq_detail::tq_rows_{scalar,avx2,avx512}`, which have no non-x86 stand-ins. We added stubs: `iq256x_supported` returns false, so the rows go to ggml-cpu's NEON dots, and the trellis rows are unreachable. One more GB10 detail. `cudaMemGetInfo` reports MemFree, so the page cache counts as used and cudaMalloc does not reclaim it. With the Engram and the model files in the page cache, the expert tier came out at 78-85 GB while 22-29 GB were still available. Dropping the model files' cached pages during the load (`posix_fadvise(DONTNEED)`) and setting `--vram-experts` from MemAvailable brought it to 96.8 GB.
Author
Owner

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

Thank you for the numbers and the GB10 report. 0.2.7.1 adds a ready-made DeepSeek engine for the DGX Spark, so you no longer have to build it (strata launch downloads it with the model; guide: docs/DGX_SPARK_LINUX.md). On our Spark a short chat with the 2.00 bpw set at 8K context answered at 13 to 18 tok/s. Batch slots for DeepSeek are not part of this update, and this issue stays open for them. If you re-measure with the package, your 1.75 bpw numbers next to ours would help.

Release notes: https://github.com/Niko1221/Strata/releases/tag/v0.2.7 (0.2.7.1 is published on that release).

<!-- gh-comment-id:6465660886 --> @Niko1221 commented on GitHub (Oct 28, 2026): Thank you for the numbers and the GB10 report. 0.2.7.1 adds a ready-made DeepSeek engine for the DGX Spark, so you no longer have to build it (`strata launch` downloads it with the model; guide: [docs/DGX_SPARK_LINUX.md](https://github.com/Niko1221/Strata/blob/main/docs/DGX_SPARK_LINUX.md)). On our Spark a short chat with the 2.00 bpw set at 8K context answered at 13 to 18 tok/s. Batch slots for DeepSeek are not part of this update, and this issue stays open for them. If you re-measure with the package, your 1.75 bpw numbers next to ours would help. Release notes: https://github.com/Niko1221/Strata/releases/tag/v0.2.7 (0.2.7.1 is published on that release).
Author
Owner

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

Thank you! We moved to the 0.2.7.1 package (strata-dsv41-0.1.53-linux-aarch64-cuda-cuda13, checksum OK) and measured it against our own 0.1.52 build from 5e8a4cc.

Setup.

  • One GB10 (DGX Spark, 128 GB).
  • IST-DAS 1.75 bpw (GSQ-RCO IQ1_M) with the DSpark drafter, in Faster mode (5 experts).
  • 131,072 context, --prefill-chunk 16384, DS4_ASYNC_T=4.
  • 10 CPU-lane threads pinned to the Cortex-A725 cores, for heat.
  • An agent stack runs beside Strata, so the expert tier is sized to leave ~16 GB of MemAvailable.

Method. Both engines with the same settings, two rounds each. The prompts are fresh nonce word-list prompts like tools/dgx_bench.py, at temperature 0, with no thinking and 256-token answers.

0.1.52 (own build) 0.1.53 (package)
Experts on the GPU 10,989 11,104
Prompt 4K / 16K / 32K, tok/s 375-376 / 515-545 / 609-622 383-386 / 527-535 / 563-574
Prompt 25K (source code), tok/s 451 504
Short chat decode (~40-token question), tok/s 10.5-11.9 11.6-12.5
Prose decode, tok/s 13.0-14.5 14.0-15.3
Code decode with DSpark (~90% of drafts kept), tok/s 26.0-28.0 22.4-26.1
acpitz max 76 °C 76 °C

There is no speed change beyond our run-to-run spread. Our short-chat numbers are below your 13-18 tok/s. The likely reasons are the A725-only CPU lane and the ~4,300 experts we leave on the CPU for the other services.

A few unrelated things came up on the way:

  • The memory sizing beside other processes is filed as #4637.
  • medium effort with the ISTA template: we added real-engine results to #4327.
  • thinking: {"type": "disabled"} on Chat Completions is filed as #4638, with a diff.
<!-- gh-comment-id:6501916807 --> @chestercs commented on GitHub (Oct 29, 2026): Thank you! We moved to the 0.2.7.1 package (`strata-dsv41-0.1.53-linux-aarch64-cuda-cuda13`, checksum OK) and measured it against our own 0.1.52 build from 5e8a4cc. **Setup.** - One GB10 (DGX Spark, 128 GB). - IST-DAS 1.75 bpw (GSQ-RCO IQ1_M) with the DSpark drafter, in Faster mode (5 experts). - 131,072 context, `--prefill-chunk 16384`, `DS4_ASYNC_T=4`. - 10 CPU-lane threads pinned to the Cortex-A725 cores, for heat. - An agent stack runs beside Strata, so the expert tier is sized to leave ~16 GB of MemAvailable. **Method.** Both engines with the same settings, two rounds each. The prompts are fresh nonce word-list prompts like `tools/dgx_bench.py`, at temperature 0, with no thinking and 256-token answers. | | 0.1.52 (own build) | 0.1.53 (package) | |---|---|---| | Experts on the GPU | 10,989 | 11,104 | | Prompt 4K / 16K / 32K, tok/s | 375-376 / 515-545 / 609-622 | 383-386 / 527-535 / 563-574 | | Prompt 25K (source code), tok/s | 451 | 504 | | Short chat decode (~40-token question), tok/s | 10.5-11.9 | 11.6-12.5 | | Prose decode, tok/s | 13.0-14.5 | 14.0-15.3 | | Code decode with DSpark (~90% of drafts kept), tok/s | 26.0-28.0 | 22.4-26.1 | | acpitz max | 76 °C | 76 °C | There is no speed change beyond our run-to-run spread. Our short-chat numbers are below your 13-18 tok/s. The likely reasons are the A725-only CPU lane and the ~4,300 experts we leave on the CPU for the other services. A few unrelated things came up on the way: - The memory sizing beside other processes is filed as #4637. - `medium` effort with the ISTA template: we added real-engine results to #4327. - `thinking: {"type": "disabled"}` on Chat Completions is filed as #4638, with a diff.
Author
Owner

@chestercs commented on GitHub (Nov 3, 2026):

Following up with the other two ISTA sets on the same GB10, so the 1.75 numbers have the 2.00 and
2.25 sets next to them. Same machine and settings as in my last comment: package 0.1.53, Faster
mode, DSpark, 131,072 context, 10 CPU-lane threads on the A725 cores, and the agent stack running
beside Strata, so the expert tier is MemAvailable − 16 GB. All sets are at your pinned revision
cb02422c, SHA-256 checked, each packed with its own profile-<bpw>.bin.

Method. For each set: stop, drop the page cache, start, then the same short bench twice (code
with DSpark, prose, and one answer after a 25K-token source prompt). The table shows the warm
second round. Each A/B ran against a fresh 1.75 arm right before it, so the 1.75 column is a range
over both runs.

1.75 (IQ1_M) 2.00 2.25 (IQ2_XS)
Experts on the GPU 11,162–11,196 9,802 8,738
Experts on the CPU lane 34 GB 51 GB 68 GB
CPU-lane share of expert hits 0.4–0.5% 0.8–1.0% 1.0–1.3%
Code decode (DSpark), tok/s 24.7–29.0 16.6–17.2 11.3–12.6
Prose decode, tok/s 15.2–17.7 11.0–13.3 8.1–8.6
Decode after a 25K prompt, tok/s 17.7–18.8 13.0 9.2
25K prompt read, tok/s 458–495 470 427

On this box beside other services, 2.00 decodes ~35% slower than 1.75 and 2.25 ~50% slower.
Prompt reading barely changes.

The slowdown grows much faster than the CPU-lane share of hits. Our guess: with ~15 GB of page
cache left beside the stack, most of the 51–68 GB on the CPU lane cannot stay cached, so those hits
read the NVMe (PCIe Gen4 x4 on this unit). We have not separated this from the speed of the
low-bit GPU kernels, and a standalone run would show which one it is. Your 13–18 tok/s for 2.00 at
8K standalone fits the same picture, since a standalone Spark keeps more experts on the GPU and
more of the rest in the page cache.

For anyone choosing a set for a Spark that runs other services as well: 1.75 is the fast option,
and 2.00 is usable if the quality gain is worth a third of the speed.

<!-- gh-comment-id:6608474878 --> @chestercs commented on GitHub (Nov 3, 2026): Following up with the other two ISTA sets on the same GB10, so the 1.75 numbers have the 2.00 and 2.25 sets next to them. Same machine and settings as in my last comment: package 0.1.53, Faster mode, DSpark, 131,072 context, 10 CPU-lane threads on the A725 cores, and the agent stack running beside Strata, so the expert tier is MemAvailable − 16 GB. All sets are at your pinned revision `cb02422c`, SHA-256 checked, each packed with its own `profile-<bpw>.bin`. **Method.** For each set: stop, drop the page cache, start, then the same short bench twice (code with DSpark, prose, and one answer after a 25K-token source prompt). The table shows the warm second round. Each A/B ran against a fresh 1.75 arm right before it, so the 1.75 column is a range over both runs. | | 1.75 (IQ1_M) | 2.00 | 2.25 (IQ2_XS) | |---|---|---|---| | Experts on the GPU | 11,162–11,196 | 9,802 | 8,738 | | Experts on the CPU lane | 34 GB | 51 GB | 68 GB | | CPU-lane share of expert hits | 0.4–0.5% | 0.8–1.0% | 1.0–1.3% | | Code decode (DSpark), tok/s | 24.7–29.0 | 16.6–17.2 | 11.3–12.6 | | Prose decode, tok/s | 15.2–17.7 | 11.0–13.3 | 8.1–8.6 | | Decode after a 25K prompt, tok/s | 17.7–18.8 | 13.0 | 9.2 | | 25K prompt read, tok/s | 458–495 | 470 | 427 | On this box beside other services, 2.00 decodes ~35% slower than 1.75 and 2.25 ~50% slower. Prompt reading barely changes. The slowdown grows much faster than the CPU-lane share of hits. Our guess: with ~15 GB of page cache left beside the stack, most of the 51–68 GB on the CPU lane cannot stay cached, so those hits read the NVMe (PCIe Gen4 x4 on this unit). We have not separated this from the speed of the low-bit GPU kernels, and a standalone run would show which one it is. Your 13–18 tok/s for 2.00 at 8K standalone fits the same picture, since a standalone Spark keeps more experts on the GPU and more of the rest in the page cache. For anyone choosing a set for a Spark that runs other services as well: 1.75 is the fast option, and 2.00 is usable if the quality gain is worth a third of the speed.
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#1934
No description provided.