Repository navigation
dsv41-1.1.0: DeepSeek-V4.1-Flash on two DGX Spark
The engine of the DeepSeek-V4.1-Flash recipe: DeepSeek-V4.1-Flash-1017 (EXL3, 2.9 bpw) on two DGX Spark, tensor-parallel (TP=2) over the QSFP link.
| Commit | 730d41abd8f4 on deepseek-v41-tp2 (same git tree as fc9200a44463, the tested image) |
| Previous release | dsv41-1.0.0 (07aa02585f64) |
| Image tag that the recipe builds | tensorfold-dsv41:730d41abd8f4 (first 12 characters of the commit) |
| Hardware | 2x NVIDIA DGX Spark (GB10), ConnectX-7, RoCE v2, MTU 9000 |
Fixes for problems that users reported
| Pull request | Change |
|---|---|
| #19 | No decode graph is captured while the engine serves. Users with long parallel sessions saw cudaErrorStreamCaptureInvalidated or a CUDA allocation failure during graph capture (NVIDIA forum thread, posts #48 and ashhart#70). Root cause: the --parallel warm-up captured only 64 round graphs, so other row and context sizes were captured on first use. Each late capture took about 12-13 MiB of memory that the allocator ceiling did not count, and the global capture mode let another thread invalidate it. Now the warm-up captures every round graph that the window can use, a round runs in the graph of the next row size up, and the capture mode is thread_local. A late capture prints a WARNING. Switches: TF_DS_ROUND_ROWS, TF_DS_ROUND_ROWS_LONG, TF_DS_FINE_CONTEXT, TF_DS_CAPTURE_MODE=global (old mode). |
| #21 | Lower host-memory peak on the head under long prompts and images (recipe issue #21, where earlyoom stopped rank 0). The Engram cross-rank sum runs in 512-row blocks (TF_DS_ENGRAM_BLOCK; chunk peak 1.19 → 0.84 GiB, identical tokens). Free torch blocks over 256 MiB go back to the node when the lane is idle (TF_DS_TRIM_MIB). With streams live, a new request waits while free memory is under floor + 1 GiB (TF_DS_ADMIT_GIB). Each part has a switch to turn it off. |
| #24 | The memory gate of #21 counts only the cached bytes that a trim can give back. Before, it also counted about 0.3-0.4 GiB of slack that can never be freed, so after a long session 4 long requests could start together, and in one gate run earlyoom stopped rank 0. Until the gate knows the slack, it counts no cached bytes. |
| #9 | The RDMA queue pairs take the path MTU from the port, not a fixed 4096. At netdev MTU 1500 the gather no longer fails with transport retry counter exceeded (recipe issue #15). MTU 9000 is still the tested and faster setting. |
| #13 | Lane streams are found by identity. Overlapping image requests no longer crash the lane. |
| #14 | --vision-max-images now applies to DeepSeek-V4.1 image input. |
New
| Pull request | Change |
|---|---|
| #20 | MTP drafts of all streams are ranked in one round by how likely each draft token is to survive (TF_DS_DEPTH_POLICY=rank, the new default). Drafts of a structured-output stream stop where the grammar cuts them, before the ranking. Output tokens do not change. |
| #15 | Opt-in TF_DROP_UNOFFERED_TOOL_CALLS=1: a call to a tool that the request did not offer is dropped (or kept as text), also while streaming. Off by default in the engine. |
| #8 | Dense BF16 overrides for DeepSeek-V4.1 TP=2: a checkpoint can replace selected EXL3 tensors with BF16 tensors. Prompt chunks use one BF16 GEMM with FP32 output. Not used by the default recipe. |
| #18 (re-land of #7) | 8-key tile search for the prompt indexer top-k: prefill +0.6 / +0.8 / +2.0 / +3.6% at 8K / 32K / 64K / 128K. #7 was merged into a stacked branch and missed 1.0.0's branch; this release has it. |
Maintenance
| Pull request | Change |
|---|---|
| #12 | CI: CPU tests, lint of changed files, workflow checks and a secret scan. |
| #16 | TLS 1.2 is the stated minimum for image URL fetches (CodeQL alert #1). No change at run time. |
Results
Measured on 2026-10-21 on the 2x DGX Spark pair, image tensorfold-dsv41:fc9200a44463 (same git tree as this commit), production settings (graphs on, SPILL_GIB=64, --parallel 4, 1M context). The baseline is the 1.0.x production image 3c45bdaeab7d, run in the same session.
| Check | 1.1.0 | Baseline 3c45bdaeab7d |
|---|---|---|
Suite (v41_suite.py, sent straight to the engine) |
32/32 | 32/32 |
Grammar check, --parallel 2 |
14/14 | 14/14 |
| Decode, 1 stream, prose / code | 51.9 / 99.7 tok/s | 52.7 / 100.4 tok/s |
| Decode, 4 streams, per stream / aggregate, prose | 26.8 / 99.3 tok/s (+5.9% / +3.3%) | 25.3 / 96.1 tok/s |
| Decode, 4 streams, per stream / aggregate, code | 39.7 / 145.7 tok/s (+7.0% / +3.0%) | 37.1 / 141.5 tok/s |
| Prefill, 32K prompt, cold (no prefix-cache hit), random text | 1,963 tok/s, TTFT 16.32 s (median of 3) | not measured with this method |
| Prefix cache, 24K prompt, cold / warm TTFT | 11.18 s / 1.05 s | 11.43 s / 1.10 s |
| Long run: 4 streams with 20K / 50K / 100K / 200K prompts | 0 errors, identical tokens | 0 errors, identical tokens |
| Late graph captures while serving | 0 | not counted (no warning in this version) |
- Each benchmark is one pass. The 1-stream decode difference is inside the noise.
- Correction (2026-10-21). The first version of this table showed a 32K prefill of 2,751 tok/s (1.1.0) and 2,717 tok/s (baseline). Those numbers came from a prefix-cache hit of 6,144 tokens in the test suite: the suite sent an 8K prompt and then a 32K prompt with the same repeated sentence. The old prefill comparison is withdrawn. With no prefix-cache hit, 1.1.0 gives 1,963 tok/s for random natural text (median of 3; random token ids 2,004 tok/s) and 2,228 tok/s for the repeated sentence. The baseline was not measured with a cold prompt, so no prefill difference between 1.1.0 and the baseline is claimed. The cold side of the 24K prefix-cache row below is not affected: the log shows
cached_tokens0 for it in both columns. - The 4-stream gain comes mainly from #20 (rank drafts). The release also contains #8 and #24, so the gain is not from #20 alone.
- With graphs off (
TF_DS_GRAPHS=0), the earlier candidatee2b282c50724passed all suite tests that reached it. The 2 router tests in that run went to a different model behind the router, so they did not count.
Use it
Do not install this engine by hand. The recipe builds the image from this commit and checks the setup:
git clone https://github.com/Elevatormusic/DeepSeek-V4.1-Flash-1017-EXL3-TensorFold-2x-DGX-SparkThen follow its README. A recipe pull request moves the image pin to this release.
Known issues
- Head memory margin under 4 long streams. In the long run above, the lowest head MemAvailable was 1.45 GiB (1.1.0) and 1.65 GiB (baseline), against the 1 GiB earlyoom limit. With less free memory at idle (for example after other processes on the head), set
TF_DS_PREFILL_CHUNK=1024or use--parallel 2. Recipe issue #21 stays open for this. - Head node hard hang under TP=2 load (CX-7 PCIe completion timeout, then mlx5 recovery and an SMMU stall): recipe issue #24 is still open. This release does not change it.
- Four concurrent 1M-token prompts are rejected, but they are tokenized first, and that can raise head memory by more than 1 GiB in 2 s.
Licence
Apache-2.0, as upstream TensorFold. See LICENSE and NOTICE.