DeepSeek-V4.1-Flash setup

On this page

New in v0.8.0. DeepSeek-V4.1-Flash is supported from veloGB10 v0.8.0 on.

DeepSeek-V4.1-Flash is a mixture-of-experts model with Engram n-gram lookup tables and a speculative drafter built into the checkpoint. veloGB10 serves it from a 2.9 bpw EXL3 pack together with DeepSeek's own FP8 Engram tables. The pack is larger than one GB10's memory, so it runs on two machines or more. The model page links to the measured speed in the benchmarks.

What you need

  • Two or four GB10 machines (DGX Spark, ASUS Ascent GX10 or another GB10 system) connected through their ConnectX-7 ports. Velo-Fabric also supports three, six and eight machines for this model; see Velo-Fabric. When both ConnectX-7 ports of every machine are cabled, the engine uses both.
  • The same gb10_inference build (v0.8.0 or later) on every machine. A head and a node from different builds refuse to work together.
  • The model pack on one machine only: the head. The head sends every node the part of the model it needs.
  • About 420 GB of free disk on the head for the pack.

1. Download the pack (head only)

The simplest download is the bundle that holds both the EXL3 weights and the Engram tables in one directory:

hf download doth4580/DeepSeek-V4.1-Flash-1017-Mia-EXL3-2.9bpw-Engram \
  --local-dir ./DeepSeek-V4.1-Flash-1017-Mia-EXL3-2.9bpw-Engram

It combines the EXL3 EAQ v1 2.9 bpw weights quantized by Mia-AiLab (Mia-AiLab/DeepSeek-V4.1-Flash-1017-EXL3-EAQ-v1-2.9-bpw) with the FP8 Engram tables from deepseek-ai/DeepSeek-V4.1-Flash-1017 (in its engram_source/ folder, found automatically) and a list of precomputed shard digests, so the first start does not have to hash the whole pack.

If you already have the Mia-AiLab weights and DeepSeek's original checkpoint as separate directories, point the head at the weights with --model-dir and at DeepSeek's checkpoint with --engram-source /path/to/DeepSeek-V4.1-Flash-1017.

The drafter is part of the checkpoint: there is nothing else to download.

2. Start the nodes

On every machine other than the head, start one node process:

gb10_inference --node --port 29500

A node needs no model and no other flags. It prints a ready line and waits for a head. To stop it, stop the process.

3. Start the server on the head

Two machines:

gb10_inference --server --host 0.0.0.0 --port 9000 \
  --model-dir /path/to/DeepSeek-V4.1-Flash-1017-Mia-EXL3-2.9bpw-Engram \
  --tp 2 --nodes <node-ip>:29500 \
  --max-seq-len 262144 --max-batch 4 --max-tokens 65536 --prefix-cache on

Four machines: run three nodes and name all three.

gb10_inference --server --host 0.0.0.0 --port 9000 \
  --model-dir /path/to/DeepSeek-V4.1-Flash-1017-Mia-EXL3-2.9bpw-Engram \
  --tp 4 --nodes <node1-ip>:29500,<node2-ip>:29500,<node3-ip>:29500 \
  --max-seq-len 262144 --max-batch 4 --max-tokens 65536 --prefix-cache on

Speculation, the sequence-parallel prefill and the use of both network ports switch on by themselves; the defaults are the recommended settings. The thermal guard stays on (the default): it paces GPU work when a machine runs hot, so long prompts do not push a GB10 into a power-off. See Heat and the thermal guard.

The model was trained for contexts up to 1,048,576 tokens. A longer --max-seq-len costs memory on every machine; on two machines, memory is tight and the engine shrinks or turns off the in-memory prefix pool to fit. Use four machines or more for very long contexts together with several requests at once.

The first start and later ones

The first start ships each node its share of the weights and Engram tables over the network, into the node's cache (~/.cache/gb10_tp). Later starts check the cache and send nothing that is already there. A node's cache is safe to delete: the next start sends what is missing. The node model cache describes it.

When the head prints a line that starts with SERVING, the API is up.

4. Send a request

Any OpenAI-compatible client works. A request that sends no sampler fields uses the model's own defaults, which is how the speed on the model page was measured:

curl -s http://<head-ip>:9000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"DeepSeek-V4.1-Flash-1017-Mia-EXL3-2.9bpw-Engram","max_tokens":256,"messages":[{"role":"user","content":"Explain what an Engram table is in two sentences."}]}'

Images go in as image_url content parts; the vision tower runs on the head.

Options worth knowing

Option Default What it does
--mtp off speculation on Turns speculation off. With it on, output at temperature 0 is the same as without it, and sampled output keeps the same distribution.
--max-batch N 4 Requests served at once (up to 8); the rest wait in a queue.
--dsv41-wire-bf16 on off Sends 16-bit instead of 32-bit values between machines during decode: a little faster, and it changes the output's rounding.
--dsv41-sp-laga off auto Turns off the 16-bit attention-output exchange that the sequence-parallel prefill uses from three machines up. Off sends more data between machines.
--engram-source DIR the bundle's own Where the FP8 Engram tables are, when they are not inside the pack directory.
--exit-on-fatal on on If a machine drops out, the server stops with exit code 70, so a supervisor can restart it.

The full list is in the command-line reference and in gb10_inference --help-advanced.

Watching it

Prometheus metrics are on the same port:

curl -s http://<head-ip>:9000/metrics | grep -E "velo_fabric|dsv41"

Credits