Repository navigation
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 | cb4ceaff2b8c on deepseek-v41-tp2 |
| Previous release | dsv41-1.1.0 (730d41abd8f4) |
| Image tag that the recipe builds | tensorfold-dsv41:cb4ceaff2b8c (first 12 characters of the commit) |
| Hardware | 2x NVIDIA DGX Spark (GB10), ConnectX-7, RoCE v2, MTU 9000 |
This release holds 8 pull requests since 1.1.0. Most are fixes: host memory and RDMA setup, tool-call safety, special-token text, and a clean stop after SIGTERM.
Fixes
| Pull request | Change |
|---|---|
| #22 | Three host fixes, each written again in Python after an idea of the official TensorFold. (1) NCCL cuMem is off by default (NCCL_CUMEM_ENABLE=0, NCCL_CUMEM_HOST_ENABLE=0, unless you set them). A probable cause of the NV_ERR_NO_MEMORY reports on GB10. (2) The RDMA GID index is read from sysfs: the lowest RoCE v2 IPv4 entry of each port. NCCL_IB_GID_INDEX and TF_RDMA_GID_INDEX can stay unset, or be -1. A value of 0 or more still fixes the index. A link flap that moves the GID table no longer breaks the gather. (3) The page cache of the weight files is released after the weight load (fadvise), and the log shows the page cache size. |
| #23 | DSML tool calls are contained. A call counts only when its calls block is complete and well formed at the top level of the reply. Text in an open block is never a call, and a <tool_call> or DSML block inside an argument value is argument text. This holds for the whole reply, for the stream, and with TF_DROP_UNOFFERED_TOOL_CALLS=1. A block that does not count and hides a later call prints one WARNING line and counts in tensorfold:tool_calls_suppressed_total on /metrics. |
| #28 (security) | A special-token spelling in message text (</think>, <|User|>, <|Assistant|>, |DSML| and others) is plain text. Before, the tokenizer made a token of it, in a system, user or tool message, in an assistant history, in a tool argument, a tool description, the response format and an image caption. A client could end the thinking, forge a turn or start a forged tool call. The rule follows deepseek-ai/deepseek-recipe. A request without such a spelling gets the same token ids and the same prefix-cache keys as before. |
| #34 | Clean stop after SIGTERM. Rank 0 no longer aborts with terminate called without an active exception when it gets SIGTERM during a prefill (earlyoom or docker stop). The server leaves with exit code 0 within TF_SHUTDOWN_GRACE_S (default 3 s). |
| #35 | A reply that stops inside a DSML calls block (max_tokens) loses the open block from content. Streamed and whole replies now give the same content and the same calls at every cut. Complete blocks before the cut still run. |
| #27 (by @hyungraekim-bagelcode) | With response_format json_schema, the prompt shows the schema, not the OpenAI wrapper. This is what the DeepSeek API layer does. The grammar of the request does not change. |
New
| Pull request | Change |
|---|---|
| #25 | The DSpark drafts of a sampled stream follow the stream's own keyed draw (TF_DS_DRAFT_COUPLED, default on; scale TF_DS_DRAFT_COUPLED_SCALE, default 0.5). The pick is fused into the Markov kernels. Output tokens do not change. A greedy stream keeps the argmax drafts. TF_DS_DRAFT_COUPLED=0 turns it off. It adds a second draft graph (see the known issue below). |
Maintenance
| Pull request | Change |
|---|---|
| #26 | The decode L2 prefetch issues at once: the default of TF_EXL3_L2_DELAY_NS is now 0 (before: 3000). It writes no memory, so no output bit changes. TF_EXL3_L2_DELAY_NS=3000 restores the old wait. |
Results
Measured on 2026-10-21 on the 2x DGX Spark pair, image tensorfold-dsv41:cb4ceaff2b8c, against the 1.1.0 image tensorfold-dsv41:fc9200a44463 (same git tree as 730d41abd8f4). Production settings (graphs on, SPILL_GIB=64, --parallel 4, 1M context, a fresh prompt-spill folder per start). Two lock windows, with the order swapped in the second one: each cell shows window 1 / window 2. The candidate ran with NCCL_IB_GID_INDEX and TF_RDMA_GID_INDEX unset (detected index 3); 1.1.0 ran with the index pinned to 3.
| Check | 1.1.1 | Baseline 1.1.0 |
|---|---|---|
Suite (v41_suite.py, sent straight to the engine) |
32/32, 32/32 | 32/32, 32/32 |
| Grammar check | 14/14, 14/14 | 14/14, 14/14 |
| Decode, 1 stream, prose / code | 54.8 / 99.9 and 54.7 / 99.4 tok/s | 53.4 / 101.4 and 53.4 / 101.3 tok/s |
| Decode, 4 streams, prose, per stream (aggregate) | 27.2 (101.8) and 27.0 (101.2) tok/s | 27.3 (101.1) and 27.1 (100.3) tok/s |
| Decode, 4 streams, code, per stream (aggregate) | 40.2 (148.9) and 40.0 (148.0) tok/s | 40.3 (147.7) and 40.1 (147.3) tok/s |
| Prefill, 32K prompt, cold (no prefix-cache hit), random natural text, median of 3 | 1,966 and 1,959 tok/s (TTFT 16.29 s, 16.35 s) | 1,862 and 1,950 tok/s (TTFT 17.20 s, 16.42 s) |
| Prefill, 32,768 tokens, cold, kit_bench words, median of 3 | 2,250 and 2,234 tok/s | 2,121 and 2,228 tok/s |
| Prefix cache, 24K prompt, cold / warm TTFT | 11.14 s / 1.07 s and 11.21 s / 1.17 s | 11.37 s / 1.11 s and 11.21 s / 1.31 s |
| Long run: 4 streams with 20K / 50K / 100K / 200K prompts | 0 errors, identical tokens | 0 errors, identical tokens |
Long run: lowest head MemAvailable |
1,621 and 1,584 MiB | 1,848 and 1,684 MiB |
| Late graph captures, earlyoom events | 0, none | 0, none |
| Live checks of the new fixes (22 checks) | 22/22 and 22/22 | 5/22 and 5/22 |
- Every prefill value is cold:
cached_tokenswas 0 for all of them. Prompts start with a unique line, and the spill folder is new at each start. - Every benchmark is one pass per window, except the prefill rows (median of 3). Decode and prefill differences are inside the noise (about 2%). Do not read a speed gain into this release.
- The long run tokens have the same four hashes in all four runs (
d58f653b2ce8,f42ae2e092ab,0ed6e9e70041,0d2a3aa664b6), also the same as in the 1.1.0 gate. - Live checks: a user message with
</think>and<|User|>adds no special token id;tool_choicerequiredandautocut at 4 to 64 new tokens give no raw DSML incontent, and the stream equals the whole reply; ajson_schemarequest works and the prompt shows only the schema. 1.1.0 fails 17 of these checks, which are the bugs that this release fixes. - SIGTERM to rank 0 11 s into a 100K-token prefill: exit code 0 after 2.6 s, no
terminate calledin either rank log. Rank 1 then ends withrank 0's step link closed, as expected. - RDMA: with no GID variable set, both ports of both nodes use index 3 (
detected), the log showsdecode gathers over RDMA writes, and the gather does not fall back to NCCL.
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
MemAvailablewas 1.58 to 1.62 GiB (1.1.1), against 1.68 to 1.85 GiB (1.1.0). The new image holds about 0.14 GiB more on the head (the second draft graph of #25). The rest of the gap came from less free memory at the start of each window: the free memory after a start varies by 0.3 to 0.6 GiB from one start to the next, on both images. There was no earlyoom stop, and the low point stayed 0.58 GiB over the 1 GiB earlyoom limit. With less free memory at idle, use the low-memory settings (PREFILL_CHUNK=1024orPARALLEL=2). See docs/MEMORY.md in the recipe. A separate recipe change tovm.watermark_scale_factor25 is in review (about +0.47 GiB of measured head headroom). 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.
- A message that writes a special-token spelling is encoded twice (once to find the spelling, once as plain text). The cost is CPU time on very large messages (about 5.8 s against 2.6 s for 3.9 MB).
Licence
Apache-2.0, as upstream TensorFold. See LICENSE and NOTICE.