maliubiao/dgx-spark-2-deepseek-flash-0731
About
setup guide for deepseek-flash-0731 on two dgx-spark from scratch
Learning & EducationMeasured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- 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.
en/README.md
OriginalDeepSeek-V4-Flash on Dual DGX Spark – Reproduction Guide (0731 / Vision-Exp, English)
This document records the complete process of building a two-node NVIDIA DGX Spark (GB10) cluster over a direct 200GbE QSFP link and serving the DeepSeek-V4-Flash model family with vLLM (Anemll DSpark image, TP=2, DSpark speculative decoding). Four sets of weights can be switched at any time: 0731 official / 0731 abliterated (§6.8) / Vision-Exp official / Vision-Exp abliterated (§6.9, currently served, native image input); the foundation chapters (01–05) apply to every model. It is a step-by-step tutorial so another pair of machines can reproduce the setup.
All sensitive information has been masked: every IP, hostname, Wi-Fi/proxy credential and SSH key is represented by
<PLACEHOLDER>; see VARIABLES.md.中文版:../README.md
Effect Preview (Live Deployment)
After deployment, the companion dashboards (standalone repo
dgx-spark-2-deepseek-flash-dashboard) show live status. Screenshots below are from a real environment: 60–70 tok/s (single session), GPU ~70°C, hours-long runs without crashes; full record in chapter 8.6.



1. Architecture and Results
┌──────────────┐ QSFP112 DAC direct (200GbE) ┌──────────────┐
│ DGX Spark A │◄══════════════════════════════►│ DGX Spark B │
│ (head) │ RoCE: 10.100.192.x / 193.x │ (worker) │
│ GB10 ×1 │ │ GB10 ×1 │
└──────┬───────┘ └──────────────┘
│ Management LAN (wired / Wi-Fi, same subnet)
▼
OpenAI-compatible API: http://<IP_MGMT_A>:8888/v1
Model matrix (all four are 48-shard official FP8 weights: E4M3 + UE8M0 scales, 128×128 blocks; at runtime MoE executes through B12X MXFP4 kernels and the KV cache uses
nvfp4_ds_mla— see chapter 06):# Model Weights Image Status (2026-09-01) Download / switch 1 DeepSeek-V4-Flash-0731 official 166.9 GB, not gated ✗ on disk, switchable §6.4 / §9.7.4 2 0731-ablit-anchored (Keys abliterated) 86.7 GiB incremental, gated ✗ on disk, switchable (previous serving) §6.8 / §7.6 3 DeepSeek-V4-Flash-Vision-Exp official 157 GB, not gated ✓ native on disk (worker copy not staged yet — sync before serving) §6.9 / §9.7.4 4 Vision-Exp abliterated (Keys) 86.7 GiB incremental, gated ✓ native currently served §6.9 / §7.7 Engine: vLLM 0.25.2 (
ghcr.io/anemll/dspark-vllm-gx10:0.1.1), TP=2, DSpark speculative decoding (0731 MTP5 / Vision MTP6,max_model_len=409600, see chapter 09 §9.7.4)KV cache:
nvfp4_ds_mla; ~2.3M tokens shared pool on 0731, ~1.33M on Vision-Exp (ViT+Aligner take VRAM)Measured performance (0731, community + this setup): single stream about 60–96 tok/s, warm decode ~78–80 tok/s, DSpark acceptance ~91%, up to ~340 tok/s aggregate at high concurrency (community data, benchmark with
DEFAULT_THINKING=low/off)Long-run experience (0731, measured here): multi-hour Agent/Vibe-Coding marathons stable, no crashes, 60–70 tok/s per session, GPU ~70°C — “fully usable, pleasant experience”, full record in chapter 8.6; Vision-Exp verification (text + image smoke) in chapter 8.8
2. Chapter Index
| Chapter | Content | Approx. time |
|---|---|---|
| 01 Hardware & Topology | Machines, cable, physical-port mapping | 30 min |
| 02 System Initialization | First boot, OTA, firmware, driver checks | 1–2 h |
| 03 Base Configuration | Users, SSH, network, proxy (masked template) | 30 min |
| 04 Two-Node Cluster | NVIDIA Sync + Cluster Assistant | 30 min |
| 05 NCCL Validation | Build NCCL + two-node communication test | 30–60 min |
| 06 Model Download | Official manifest, chunked downloader, fabric sync, integrity; §6.8 0731-ablit incremental; §6.9 Vision-Exp dual-model incremental | 2–4 h (bandwidth dependent) |
| 07 Deploy & Launch | Image, config, start service; §7.6 switch to 0731-ablit; §7.7 switch to Vision-Exp | 30 min + ~8 min cold start |
| 08 Verification & Performance | API, smoke, benchmark, expectations; §8.8 Vision image smoke | 15 min |
| 09 Operations | Auto-resume, hardening, troubleshooting; §9.7 multi-model coexistence & rollback | ongoing |
| 10 Appendices | Upstream repos, file inventory, variables | — |
| 11 LMCache Deployment | arm64 source build, SSD cold backup, memory budget (500K profile), auto-start, verify/rollback | build 15–30 min (~5 min with cache) + sync 5–10 min |
3. Quick Start (TL;DR)
Prerequisites: two networked DGX Spark units (system ≥ 2026-04), one QSFP112 DAC cable, a computer with NVIDIA Sync installed (Windows, macOS, or Ubuntu — any of them works, see chapter 04).
# 0. Replace every <PLACEHOLDER> in VARIABLES.md
# 1. Hardware: cable → system update → passwordless SSH (chapters 01–03)
# 2. Cluster: NVIDIA Sync → Cluster Assistant (chapter 04)
# 3. NCCL: chapter 05
# 4. Model: chapter 06 (restricted networks already covered; use official HF on open networks)
# 5. Deploy: chapter 07 → ./start-deepseek-v4-flash-dspark.sh
# 6. Verify: curl http://<IP_MGMT_A>:8888/v1/models
# 7. Switch model: 0731 abliterated §6.8+§7.6; Vision-Exp (images) §6.9+§7.7; rollback §9.7
4. Package Layout
The clone directory name equals the repo name (
dgx-spark-2-deepseek-flash-0731). Current tree:
dgx-spark-2-deepseek-flash-0731/
├── README.md # Chinese overview (incl. effect preview screenshots)
├── LICENSE # MIT
├── VARIABLES.md # Placeholder reference (Chinese)
├── .gitignore # .DS_Store / *.log
├── en/ # English version (this tree)
├── docs/ # Chinese chapters 01–10 + DOWNLOADS + perf/ images
└── scripts/
├── dsv4-chunkdl.py # Chunked downloader for 0731 (sha256 + resume)
├── hf-chunkdl.py # Universal HF chunked downloader (any repo/gated, added 2026-09-01)
├── vision-ablit-manifest.py # Vision-Exp incremental manifest + shared-blob hardlink tool
├── resume-downloads.sh # Boot-time auto-resume
├── repro-preflight.sh # Environment preflight check
├── .env.dspark.example # Two-node vLLM config template (masked)
├── dspark-vllm-start.sh # systemd start wrapper (head, masked template)
├── dspark-vllm-stop.sh # systemd stop wrapper (head, masked template)
├── dspark-vllm-ensure.sh # worker container ensure script (masked template)
├── dspark-vllm.service # head systemd unit
├── dspark-vllm-worker.service # worker systemd unit
├── gpu-clock-lock.service # GPU clock lock unit (0-2200MHz, on boot)
├── install-autostart.sh # one-shot auto-start installer (incl. clock lock)
├── build-lmcache-images.sh # Ch 11: build LMCache arm64 + vLLM overlay
├── Dockerfile.lmcache-client # Ch 11: vLLM client overlay reference
├── install-lmcache-server-unit.sh # Ch 11: install lmcache-server on both nodes
└── lmcache-server.service # Ch 11: LMCache server systemd unit template
The
scripts/directory is shared by both language versions. English chapters reference../scripts/...paths.
5. Official Documentation and Downloads
Read docs/DOWNLOADS.md first — it lists everything you need to download (NVIDIA Sync, system OTA, NCCL sources, the Anemll image, the models, Python tooling, and the deployment repo), each with its official source, size, destination and verification command.
Key official references:
- NVIDIA Sync installation
- Cluster Assistant
- DGX Spark User Guide / First Boot
- NCCL playbook
- vLLM playbook
- 0731 model card
- Vision-Exp model card (official)
- Vision-Exp abliterated weights (Keys, gated)
- Anemll image source
- MiaAI deployment repo
Source-material index: the complete mapping of every referenced repo/website/image/model — including which are bundled with this package vs referenced — is in §10.2 of the appendix.
6. Security and Masking Notes
- No real IP, hostname, MAC, Wi-Fi/proxy password or SSH private key appears anywhere.
- Set your own
sudopasswords; never use example credentials. - The models and images come from official/public sources; verify image digests before use (chapter 06).
- If you are not on a restricted (China) network, replace the mirror sources with the official ones (alternatives are noted in each chapter).
Explore related projects
Loading…