DeepSeek-V4.1-Flash-1017 EXL3 2.9bpw on 2x NVIDIA DGX Spark (GB10) with TensorFold: 2.1-2.3x the vLLM kit's decode speed.
Python
20
7 commits
updated Oct 18, 2026
Run DeepSeek's V4.1 Flash model on two NVIDIA DGX Spark computers, twice as fast as the standard setup, and ready for AI agents.
Also on Hugging Face: Elevatormusic/DeepSeek-V4.1-Flash-1017-EXL3-TensorFold-2x-DGX-Spark.
Measured on 17 October 2026 on one pair of DGX Spark. Every number on this page comes from a saved run in runs/.
| Standard setup (vLLM) | This recipe | ||
|---|---|---|---|
| Writing speed, text | 27 tokens/s | 57 tokens/s | 2.1× faster |
| Writing speed, code | 40 tokens/s | 92 tokens/s | 2.3× faster |
| Find one fact in a 64,000-token document | 80 s | 36 s | 2.2× faster |
A token is a piece of a word. 100 tokens are about 75 English words.
Both setups ran on the same two computers, with the same model files and the same prompts, on the same day.
You need:
curl, rsync, and the Hugging Face CLI (hf). The worker needs Docker and rsync.In this guide, the head is the computer where you type the commands. The worker is the second computer.
Run each command on the head, in this folder.
1. Make your settings file. Then open .env and type your addresses and folder paths.
cp .env.example .env
2. Download the model. This step gets 400 GB, checks every file, and copies it to the worker.
scripts/download.sh
3. Prepare the chat template. This step gets the template and applies a small fix.
scripts/patch_template.py --worker
4. Build the engine. This step builds the server software and copies it to the worker.
docker/build.sh
5. Start the server. It checks your setup first. The first start takes about 15 minutes. Later starts take 2 to 4 minutes.
./start.sh
6. Check that it works. This sends five real requests and shows the result of each.
./verify.sh
Your server is ready at http://127.0.0.1:8888/v1. It works with any app that supports the OpenAI API. The model name is DeepSeek-V4.1-Flash-1017.
Use these three settings in any app that supports a custom OpenAI endpoint:
| Setting | Value |
|---|---|
| Base URL | http://127.0.0.1:8888/v1 |
| Model | DeepSeek-V4.1-Flash-1017 |
| API key | any text (or your key, if you set one) |
Thinking is off by default. Turn it on per request with "reasoning_effort": "high".
The connection guide covers thinking levels, tool calls, exact formats, and use from other computers.
| To do this | Run this |
|---|---|
| See if the server is running | ./status.sh |
| Stop the server | ./stop.sh |
| Run all the tests | tests/run_all.sh |
| Install a new engine version safely | scripts/deploy_gate.sh <new> <old> |
If something goes wrong, read Operations. It covers restarts, logs, and what to avoid on DGX Spark.
The fast engine for this model was written by bertholomus. It was fast, but agent apps could not use it fully. I added what they need, with no loss of speed.
Read the full story, with the reason for each change. The engine code is in my fork, in pull requests #1, #2 and #3.
./stop.sh
vLLM: 1 run. This recipe: 6 runs (6 engine builds of the same day, the last is the released one). The table shows the middle value and the range.
| Single request | vLLM kit | This recipe (middle, range) | Faster by |
|---|---|---|---|
| Writing, text | 27.0 tok/s | 56.8 (52.5-57.7) tok/s | 2.1× |
| Writing, code | 39.9 tok/s | 92.2 (86.0-93.3) tok/s | 2.3× |
| Writing, text, thinking on | 25.7 tok/s | 54.2 (47.2-58.5) tok/s | 2.1× |
| Writing, code, thinking on | 34.5 tok/s | 71.6 (59.6-77.8) tok/s | 2.1× |
| Find a fact in 64K tokens | 80.4 s | 35.9 (34.0-40.0) s | 2.2× |
| Read a 32K prompt (*) | 925 tok/s | 2,100 (1,597-2,260) tok/s | 2.3× |
| Find a fact in 200K tokens (*) | 216.9 s | 109.8 (103.6-126.9) s | 2.0× |
| Read an 8K prompt, first after a start | 789 tok/s | 562 (427-958) tok/s | 0.7× |
bertholomus's own benchmark client (kit_bench.py) ran against this server with their settings. Their numbers are from their README: original V4.1 Flash weights, their computers. This recipe uses the 1017 weights.
| kit_bench row | Their Zig engine v0.6.0 | Their Python engine v0.5.1 | This recipe |
|---|---|---|---|
| Writing, set a: code / text / structured | 89.8 / 59.0 / 106.6 | 89.4 / 57.7 / 107.2 | 84.7 / 58.7 / 103.8 |
| Writing, set b: code / text / structured | 103.1 / 64.1 / 143.2 | 101.5 / 63.4 / 143.4 | 95.1 / 57.7 / 140.6 |
| 2 / 4 requests at once, total | 83.1 / 118.9 | 79.8 / 113.0 | 81.5 / 116.7 |
| 4 requests for 90 s, total | 142.0 | 125.3 | 120.0 |
| Read a prompt, no cache: 8K / 32K / 64K / 128K | 2,433 / 2,495 / 2,461 / 2,354 | 2,387 / 2,421 / 2,363 / 2,242 | 2,190 / 1,707 / 1,457 / 1,420 |
| Writing after a 128K prompt | 100.1 | 49.8 | 61.8 (52-73, 3 runs) |
Their Zig engine does not have the agent features above (forced tool calls and exact formats return an error there).
| Requests | Text, total | Code, total | Code, each |
|---|---|---|---|
| 1 | 29.6 tok/s (includes a 7.3 s first-request wait) | 94.1 tok/s | 95.8 tok/s |
| 2 | 73.5 tok/s | 106.6 tok/s | 57.2 tok/s |
| 3 | 82.3 tok/s | 124.3 tok/s | 43.5 tok/s |
| 4 | 94.4 tok/s | 140.3 tok/s | 36.8 tok/s |
SPILL_GIB=64, on by default): an 18K-token document came back in 2.7 s instead of 16.8 s.Method, definitions and every run: Benchmarks.
| What | Version |
|---|---|
| Model weights | LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw @ afc7aa0a (43 files) |
| Engram tables | deepseek-ai/DeepSeek-V4.1-Flash-1017 @ 1bae0e10, files 47 and 48 |
| Engine | Elevatormusic/TensorFold @ fd2365042f56 (TensorFold 0.6.6 + bertholomus's V4.1 engine + PRs #1-#3) |
| Base image | nvcr.io/nvidia/pytorch:26.07-py3 |
| Chat template | MiaAI kit files/chat_template.jinja @ 6f7d1590 + our patch |
| vLLM comparison | MiaAI kit @ 6f7d1590, image sha256:2f0cf3ad... |
| Tested on | DGX OS (Ubuntu 24.04.5), driver 580.178.04, CUDA 13.0, Docker 29.6.2 |
Every checksum, file size and computer detail: PROVENANCE.
| Path | What |
|---|---|
start.sh, stop.sh, status.sh, verify.sh | run the server |
scripts/ | download, template fix, setup checks, safe engine install (_raw_*: the scripts as they ran on the tested pair) |
docker/ | the engine build |
tests/ | the 32 agent tests, the format check, the benchmark, the prompt tests, the Hermes test (guide) |
runs/2026-10-17/ | every log and result behind this page |
docs/ | how to connect your app, the full story, benchmarks, network, operations, known limits |
This recipe stands on the work of DeepSeek (the model), LibertAIDAI (the compressed weights), turboderp (ExLlamaV3), ashhart and the TensorFold contributors, bertholomus (the fast V4.1 engine this recipe runs), willjriley and Capicua25x (engine fixes), MiaAI-Lab (the vLLM kit and the template) and tonyd2wild (the benchmark method). Full credits
The scripts, tests and documents here are Apache-2.0 (LICENSE). The model, the template and the engine keep their own licences.
DeepSeek-V4.1-Flash-1017 EXL3 2.9bpw on 2x NVIDIA DGX Spark (GB10) with TensorFold: 2.1-2.3x the vLLM kit's decode speed.
Python
20
7 commits
updated Oct 18, 2026
Run DeepSeek's V4.1 Flash model on two NVIDIA DGX Spark computers, twice as fast as the standard setup, and ready for AI agents.
Also on Hugging Face: Elevatormusic/DeepSeek-V4.1-Flash-1017-EXL3-TensorFold-2x-DGX-Spark.
Measured on 17 October 2026 on one pair of DGX Spark. Every number on this page comes from a saved run in runs/.
| Standard setup (vLLM) | This recipe | ||
|---|---|---|---|
| Writing speed, text | 27 tokens/s | 57 tokens/s | 2.1× faster |
| Writing speed, code | 40 tokens/s | 92 tokens/s | 2.3× faster |
| Find one fact in a 64,000-token document | 80 s | 36 s | 2.2× faster |
A token is a piece of a word. 100 tokens are about 75 English words.
Both setups ran on the same two computers, with the same model files and the same prompts, on the same day.
You need:
curl, rsync, and the Hugging Face CLI (hf). The worker needs Docker and rsync.In this guide, the head is the computer where you type the commands. The worker is the second computer.
Run each command on the head, in this folder.
1. Make your settings file. Then open .env and type your addresses and folder paths.
cp .env.example .env
2. Download the model. This step gets 400 GB, checks every file, and copies it to the worker.
scripts/download.sh
3. Prepare the chat template. This step gets the template and applies a small fix.
scripts/patch_template.py --worker
4. Build the engine. This step builds the server software and copies it to the worker.
docker/build.sh
5. Start the server. It checks your setup first. The first start takes about 15 minutes. Later starts take 2 to 4 minutes.
./start.sh
6. Check that it works. This sends five real requests and shows the result of each.
./verify.sh
Your server is ready at http://127.0.0.1:8888/v1. It works with any app that supports the OpenAI API. The model name is DeepSeek-V4.1-Flash-1017.
Use these three settings in any app that supports a custom OpenAI endpoint:
| Setting | Value |
|---|---|
| Base URL | http://127.0.0.1:8888/v1 |
| Model | DeepSeek-V4.1-Flash-1017 |
| API key | any text (or your key, if you set one) |
Thinking is off by default. Turn it on per request with "reasoning_effort": "high".
The connection guide covers thinking levels, tool calls, exact formats, and use from other computers.
| To do this | Run this |
|---|---|
| See if the server is running | ./status.sh |
| Stop the server | ./stop.sh |
| Run all the tests | tests/run_all.sh |
| Install a new engine version safely | scripts/deploy_gate.sh <new> <old> |
If something goes wrong, read Operations. It covers restarts, logs, and what to avoid on DGX Spark.
The fast engine for this model was written by bertholomus. It was fast, but agent apps could not use it fully. I added what they need, with no loss of speed.
Read the full story, with the reason for each change. The engine code is in my fork, in pull requests #1, #2 and #3.
./stop.sh
vLLM: 1 run. This recipe: 6 runs (6 engine builds of the same day, the last is the released one). The table shows the middle value and the range.
| Single request | vLLM kit | This recipe (middle, range) | Faster by |
|---|---|---|---|
| Writing, text | 27.0 tok/s | 56.8 (52.5-57.7) tok/s | 2.1× |
| Writing, code | 39.9 tok/s | 92.2 (86.0-93.3) tok/s | 2.3× |
| Writing, text, thinking on | 25.7 tok/s | 54.2 (47.2-58.5) tok/s | 2.1× |
| Writing, code, thinking on | 34.5 tok/s | 71.6 (59.6-77.8) tok/s | 2.1× |
| Find a fact in 64K tokens | 80.4 s | 35.9 (34.0-40.0) s | 2.2× |
| Read a 32K prompt (*) | 925 tok/s | 2,100 (1,597-2,260) tok/s | 2.3× |
| Find a fact in 200K tokens (*) | 216.9 s | 109.8 (103.6-126.9) s | 2.0× |
| Read an 8K prompt, first after a start | 789 tok/s | 562 (427-958) tok/s | 0.7× |
bertholomus's own benchmark client (kit_bench.py) ran against this server with their settings. Their numbers are from their README: original V4.1 Flash weights, their computers. This recipe uses the 1017 weights.
| kit_bench row | Their Zig engine v0.6.0 | Their Python engine v0.5.1 | This recipe |
|---|---|---|---|
| Writing, set a: code / text / structured | 89.8 / 59.0 / 106.6 | 89.4 / 57.7 / 107.2 | 84.7 / 58.7 / 103.8 |
| Writing, set b: code / text / structured | 103.1 / 64.1 / 143.2 | 101.5 / 63.4 / 143.4 | 95.1 / 57.7 / 140.6 |
| 2 / 4 requests at once, total | 83.1 / 118.9 | 79.8 / 113.0 | 81.5 / 116.7 |
| 4 requests for 90 s, total | 142.0 | 125.3 | 120.0 |
| Read a prompt, no cache: 8K / 32K / 64K / 128K | 2,433 / 2,495 / 2,461 / 2,354 | 2,387 / 2,421 / 2,363 / 2,242 | 2,190 / 1,707 / 1,457 / 1,420 |
| Writing after a 128K prompt | 100.1 | 49.8 | 61.8 (52-73, 3 runs) |
Their Zig engine does not have the agent features above (forced tool calls and exact formats return an error there).
| Requests | Text, total | Code, total | Code, each |
|---|---|---|---|
| 1 | 29.6 tok/s (includes a 7.3 s first-request wait) | 94.1 tok/s | 95.8 tok/s |
| 2 | 73.5 tok/s | 106.6 tok/s | 57.2 tok/s |
| 3 | 82.3 tok/s | 124.3 tok/s | 43.5 tok/s |
| 4 | 94.4 tok/s | 140.3 tok/s | 36.8 tok/s |
SPILL_GIB=64, on by default): an 18K-token document came back in 2.7 s instead of 16.8 s.Method, definitions and every run: Benchmarks.
| What | Version |
|---|---|
| Model weights | LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw @ afc7aa0a (43 files) |
| Engram tables | deepseek-ai/DeepSeek-V4.1-Flash-1017 @ 1bae0e10, files 47 and 48 |
| Engine | Elevatormusic/TensorFold @ fd2365042f56 (TensorFold 0.6.6 + bertholomus's V4.1 engine + PRs #1-#3) |
| Base image | nvcr.io/nvidia/pytorch:26.07-py3 |
| Chat template | MiaAI kit files/chat_template.jinja @ 6f7d1590 + our patch |
| vLLM comparison | MiaAI kit @ 6f7d1590, image sha256:2f0cf3ad... |
| Tested on | DGX OS (Ubuntu 24.04.5), driver 580.178.04, CUDA 13.0, Docker 29.6.2 |
Every checksum, file size and computer detail: PROVENANCE.
| Path | What |
|---|---|
start.sh, stop.sh, status.sh, verify.sh | run the server |
scripts/ | download, template fix, setup checks, safe engine install (_raw_*: the scripts as they ran on the tested pair) |
docker/ | the engine build |
tests/ | the 32 agent tests, the format check, the benchmark, the prompt tests, the Hermes test (guide) |
runs/2026-10-17/ | every log and result behind this page |
docs/ | how to connect your app, the full story, benchmarks, network, operations, known limits |
This recipe stands on the work of DeepSeek (the model), LibertAIDAI (the compressed weights), turboderp (ExLlamaV3), ashhart and the TensorFold contributors, bertholomus (the fast V4.1 engine this recipe runs), willjriley and Capicua25x (engine fixes), MiaAI-Lab (the vLLM kit and the template) and tonyd2wild (the benchmark method). Full credits
The scripts, tests and documents here are Apache-2.0 (LICENSE). The model, the template and the engine keep their own licences.