Skip to content
Projects

Morrowmake/dsv41-flash-cmp170hx-recipe

View on GitHub

About

DeepSeek-V4.1-Flash on 4× NVIDIA CMP 170HX with vLLM: up to 297 tok/s for one user, up to 868 tok/s at eight, 262K context, one-command container install

Other Projects

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
+2
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

DeepSeek-V4.1-Flash on 4× NVIDIA CMP 170HX

by Morrowmake

Follow on X   engine   release   licence

DeepSeek-V4.1-Flash with a 262,144-token context, served on four CMP 170HX cards: 297 tok/s for one user on structured output and code (170 on prose) and up to 868 tok/s across eight, 3,824 tok/s cold prefill of a 32K prompt and a 1,295,894-token KV pool. The routed experts are EXL3 at 2.9 bits per weight; every other weight is DeepSeek's own FP8 or BF16, unchanged, and the KV cache is full precision.

This repository installs and runs DeepSeek-V4.1-Flash-1017 on four NVIDIA CMP 170HX cards behind an OpenAI-compatible API, with tool calls, reasoning and images, and the checkpoint's own DSpark speculative drafter. The CMP 170HX is Ampere (sm_80). Upstream vLLM with our patch queue and the sm_80 plugin vllm_sm80 (source) adds the Ampere kernels that make the model run at all, then spends the rest of its patches on making it fast and making it repeatable. It runs only as a container image, so the engine and its Python environment stay out of your system. P2P is enabled automatically after a startup content check passes; otherwise the server runs with P2P disabled.

Quick start

One command from a fresh clone, after the one-time host setup:

git clone https://github.com/Morrowmake/dsv41-flash-cmp170hx-recipe.git
cd dsv41-flash-cmp170hx-recipe
./start.sh          # pull the engine image, fetch the model, start, wait for /health

Then try it:

./start.sh smoke    # one chat request and one tool call
curl http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model": "dsv41-flash",
       "messages": [{"role": "user", "content": "Write a haiku about PCIe."}],
       "max_tokens": 4096}'

DeepSeek-V4.1 reasons before it answers by default. The reasoning comes back in the message's reasoning field and the answer in content. Set max_tokens for the reasoning plus the answer: if the limit is reached while the model is still reasoning, content comes back empty with finish_reason: "length". "chat_template_kwargs": {"thinking": false} turns the reasoning off; "reasoning_effort" (low, high, xhigh, max) sets how much it reasons (Talk to it).

./start.sh skips anything already done, so running it twice is safe; an interrupted download resumes. The first start compiles the kernels it needs (cold), so it is slower; later starts reuse them from ./cache. Any OpenAI-compatible client works with base URL http://127.0.0.1:8000/v1 and model dsv41-flash. The API listens on this machine only and has no API key unless you change that. Python, streaming and tool-call clients are in examples/.

Prefer Docker Compose? The same container, also one command from a fresh clone:

docker compose up              # or in the background: docker compose up -d

It downloads the checkpoints, then starts the server as the owner of the checkout; docker compose ps shows it healthy once /health answers (Docker Compose). Compose restarts a crashed server up to 3 times; ./start.sh does not (run ./start.sh restart). Use one or the other.

Both download the checkpoints at the exact Hugging Face revisions this release was validated with.

What this release is for. One layout: tensor-parallel 4 with every routed expert split across the four cards, optimised for PCIe x16 links (cards with the x16 capacitor modification). On cards limited to x4 links it runs, but bus-bound and much slower; ./start.sh warns when a card is narrower than x16.

One-time host setup

  • 4× NVIDIA CMP 170HX, each exposing 64 GiB, on PCIe Gen2 x16 links
  • About 240 GiB of host RAM for the fastest start: the model's Engram lookup tables (~189 GiB) are held in memory, and the server takes 202–204 GiB of host RAM in all. With less, the server reads the tables from the SSD instead, on its own (VLLM_ENGRAM_PLACEMENT=auto); that is slower (with a 38 GiB cache per card, a cold 2K prompt's first token 6 % later, decode within 1 %; less with a smaller cache) and wants the checkpoints on an SSD (Host memory)
  • Linux with NVIDIA driver 580 or newer
  • Docker with the NVIDIA Container Toolkit, usable by your user: docker run --rm --gpus all nvidia/cuda:13.3.1-base-ubuntu24.04 nvidia-smi lists all four cards
  • optional: a P2P-capable driver build for verified peer-to-peer (PCIe peer-to-peer); without it the server runs with P2P disabled
  • for ./start.sh: git, curl, flock, setsid, Python 3 for the boot check, and jq for the smoke test
  • about 680 GiB (730 GB) of disk for the two checkpoints, in ./models by default (Where models are stored), plus the engine image and the kernel compile caches (details)

Headline numbers

Measured 2026-11-01 on 4× CMP 170HX, 74 SMs per card, mainline cmpunlocker with P2P, recipe defaults, 262,144-token context, 180 W per card and PCIe x16 links, by this release's own release check, with the 1.0.0 image measured on the same machine in the same check. Decode uses the MiaAI-Lab protocol: 400 tokens, temperature 0, requests sent with thinking off; structured and code from its first prompt set, prose from its second. Each figure is the median of five runs on a boot, averaged over two boots; a run is its completion tokens over its whole duration, time to the first token included.

Tensor-parallel 4
+ peer-to-peer (default after verification)
1.0.0
1 user · structured 297 295
1 user · code 297 283
1 user · prose 170 163
8 users, total · structured 868 760
8 users, total · code 795 712
8 users, total · prose 464 426
Prompt reading (cold prefill, 2K tokens) 3,776 3,810
Prompt reading (cold prefill, 32K tokens) 3,824 3,795
KV pool (tokens) 1,295,894 1,247,406

All speeds in tok/s.

One user is the rate of a single request; eight users is the combined rate of eight simultaneous requests, both in tokens per second. Structured output and code are drafted well, so they decode fastest; prose least. DSpark drafts up to 7 tokens ahead for one user and 5 for more; from three users on, each step verifies only as many drafts as each request's recent acceptance makes worthwhile. Method, quality and exact figures: Results.

Settings

Settings live in .env; see Settings. Every serving default (context, concurrency, speculative decoding, engine switches) is part of the release's launch, which the image carries; .env only overrides. The server runs with swap disabled (MEM_LIMIT): swapping the Engram tables costs ~8 % of prefill speed.

Documentation

Update

  • ./start.sh update pulls the new release and engine image and restarts; your .env is preserved.
  • With Compose: git pull, then docker compose up -d.
  • Older releases are git tags; their images may be retired.

Licences

This recipe — the scripts and the documentation — is MIT, © 2026 Morrowmake. See LICENSE.

The engine — upstream vLLM 330c5bffee with our patch queue — is Apache-2.0; the vllm_sm80 plugin is Apache-2.0 with MIT portions adapted from ExLlamaV3 and GNmac-lab and Apache-2.0 portions adapted from Curtis White (licenses). The full table is in docs/credits.md.

orjson 3.13.0 ships in the engine image unmodified, compiled; parts of it are MPL-2.0 (the rest Apache-2.0 or MIT). Its source: PyPI and ijl/orjson tag 3.13.0.

The downloaded models have separate licences, both MIT:

The model-licence reference preserves the complete MIT notice.

The benchmark prompts come from MiaAI-Lab's repository (AGPL-3.0) and their sparkDash prompt constants (MIT), used as data with attribution. No code from their repositories is included here.

Credits

If this recipe helps you, please credit Morrowmake and link this repository. Citation metadata: CITATION.cff.

  • DeepSeek for DeepSeek-V4.1-Flash, and the vLLM project for the engine these patches sit on top of.
  • LibertAIDAI for the EXL3 2.9 bpw quantisation of the routed experts, and ExLlamaV3 (turboderp) for the EXL3 format and the adapted EXL3 decode/pack/codebook/Hadamard code (MIT).
  • MiaAI-Lab for publishing the benchmark prompts and protocol used in the decode tables.
  • GNmac-lab for the grouped FP8 wo_a GEMM the engine adapts (vllm_sm80/models/deepseek_v41/ops/sm80_wo_a_grouped.py, MIT, its notice kept in that file), and for the ideas behind the side-stream mHC, the sharded target argmax and the per-layer rotated tensor split of the routed experts.
  • Curtis White (CurtisAccelerate/DeepSeekv41-Flash-EXL3-TC-MoE), Apache-2.0, for the hidden-5120 tensor-core MoE lane shape and the tensor-split expert idea.
  • b12x (local-inference-lab, Apache-2.0) for the design of the copy-engine ring all-reduce; no code is copied.

Where each adapted part is used, with its licence: docs/credits.md.

Source

The engine source is upstream vLLM plus our patch queue and the vllm_sm80 plugin, with the adaptations credited in its notices: tags dsv41-flash-recipe-1.0.2-queue and dsv41-flash-recipe-1.0.2-plugin on Morrowmake/vllm-cmp170hx.

Acknowledgements

  • Mainline cmpunlocker and its maintainer's P2P work, plus our minimal TRAP31 patch, form the basis of the P2P driver build. Ready to install: Morrowmake/cmpunlocker.
  • The engine builds on Marlin (Elias Frantar and subsequent Neural Magic contributors) and DeepSeek's DeepGEMM reference implementation. Original source notices and component licences apply separately.

Explore related projects

Loading…