DGX Spark · documentation

Qwen3.8-Flash-Next on a DGX Spark

View the repository Last pushed 30 August 2026 17 documents

Run a 180-billion-parameter model on one desktop box with 128 GB of memory, at its full 262,144-token context.

The trick that makes it fit: 51.2B of the model's 176.9B parameters are a single lookup table that is never multiplied by anything — only read from. It can live on your SSD instead of in memory. That leaves 125.7B parameters of actual compute to fit in the box, which they do.


Start here: which setup do you want?

There are two, and they are good at genuinely different things. Picking the wrong one costs you a factor of two, so it is worth thirty seconds.

Editing Writing & long documents
Best for coding agents, rewriting files, refactors chat, reasoning, summarising big documents
Rewriting a file with one change 88 tokens/sec 39
Fixing a bug in a file 46 35
Writing prose 28 32
Time to start answering (short prompt) ~1–2 s ~0.3 s
Reading a 128,000-token document ~7 min ~56 s
Speed at very long context degrades stays flat
Handles more than one request at a time two, at half the context each sixteen
Disk needed 105 GB 126 GB

Rule of thumb

  • A coding agent drives it, and it mostly rewrites files you give it → Editing
  • You talk to it, ask it questions, or feed it long documents → Writing & long documents
  • Not sure → start with Writing & long documents. It is the more even performer, and its fast document reading is the difference you will feel first.

You can install both. They use the same GPU, so only one runs at a time.


Install

You need an NVIDIA DGX Spark or compatible GB10 box (128 GB unified memory), a recent driver with Docker, and free disk space per the table above.

git clone https://github.com/0xBakeer/qwen38-flash-next-spark.git
cd qwen38-flash-next-spark

Editing setup — builds llama.cpp and downloads the model (~105 GB):

./run.sh edit setup
./run.sh edit serve

Writing & long-document setup — builds a container and downloads the model (~126 GB):

./run.sh longctx setup
./run.sh longctx serve

Either one then answers on http://localhost:8000/v1, speaking the OpenAI API, so anything that talks to OpenAI talks to this: Open WebUI, coding agents, your own scripts.

First start takes a while — it is reading 100+ GB off disk. Later starts are faster.

Full instructions per setup: recipes/llamacpp-edit · recipes/vllm-longctx


One setting worth knowing

The model thinks before it answers, and you pay for every thought token even though you never see them. In our measurements 86% of generated tokens were reasoning.

Turning thinking off made the same answer arrive in 15 seconds instead of 55 — not because tokens got faster (they got slightly slower) but because there were far fewer of them.

Add this to your request:

{"chat_template_kwargs": {"enable_thinking": false}}

Leave thinking on for hard reasoning and maths. Turn it off for everything else.


What the numbers actually mean

You will see very different speeds from the same model depending on what you ask it to do. That is not noise — it is the whole story of how these setups work, and it is worth understanding before you compare any two figures.

The Editing setup drafts its guesses from your prompt. When you paste a file and ask for one change, almost every token of the answer already exists in the question, so it can leap ahead 60 tokens at a time and verify them in one pass. That is where 88 tokens/sec comes from. Ask it to write something new and there is nothing to copy, so it falls back to about 28.

The Writing setup drafts from a trained predictor shipped inside the model. That works the same on any kind of text, so it lands near 32–39 whatever you ask — much steadier, lower at the top end.

So: a speed figure for this model is meaningless without the task attached to it. Ours are all published with the task named, in docs/measurements.md.


Documentation

Start here - Choosing a setup — the longer version of the table above - How it works — the SSD trick and the memory arithmetic

Measurements - All measurements — every number, how it was taken - Independent measurements — the same configurations through a harness we did not write - What we ruled out — five things that should have helped and did not - Benchmarks — reproducing them yourself

Going deeper - Hardware notes — GB10 specifics, and where the remaining performance is - Speculative decoding — why throughput varies 3× by task - How many at once — slots cost context on llama.cpp, and 64 is not a setting - Open WebUI — connecting it to a chat interface - Sources — model, weights, upstream issues - Changelog — which defaults changed when, and what that does to your numbers


Credits

This builds on other people's work — the model, the quantisations, the engines, and in particular the vLLM container that the long-context setup depends on. See CREDITS.md.

MIT licensed. The model weights carry Qwen's own licence, which has conditions of its own.

§Documentation

01

Choosing a setup

Two setups. Same model, same box, and they differ by more than a factor of two depending on what you ask.

02

How it works

This document explains why a 180B-parameter model fits and runs on a 128 GB DGX Spark: what the n-gram/PLE table is, the memory arithmetic, how the page cache serves the table from NVMe,…

03

Benchmarks — how to reproduce them

Current numbers live in measurements.md. This page is the method: how each figure was taken, for both recipes, so you can check them on your own box.

04

All measurements

Every number in this repository, how it was taken, and what it does and does not support.

05

Benchmark results

Hardware: DGX Spark (GB10, SM121), 121 GiB unified memory, ~273 GB/s, CUDA 13.0, aarch64.

06

What the atlas has measured

Every figure in this repository comes from bench/portable_bench.py — one harness, written here, run by the people who wrote the recipes.

07

Speculative decoding: what it does here, and how to measure it

run.sh enables --spec-type ngram-mod by default. This document explains why that changes throughput by 3x on some tasks and not at all on others, and records several ways of measuring it…

08

How many requests at once

The editing recipe shipped --parallel 1 from the start. It now ships 2.

09

Vision

Both recipes see images, and they score the same.

10

Serving this to Open WebUI

Two things need setting up: pointing Open WebUI at the server, and turning reasoning off so the speculation actually shows.

11

Hardware notes — GB10, and where the missing performance is

This page is for anyone who wants to make this faster. It is the diagnostic work, not the recipe.

12

What we ruled out

Things that should have made this faster and did not. Kept because a negative result closes off a direction, and because several of them contradict advice that is circulating — including…

13

Sources

Everything this recipe depends on, and where the claims in the docs come from.

14

Editing recipe — llama.cpp + context-copying speculation

For coding agents that rewrite files you hand them.

15

Long-context recipe — vLLM + NVFP4 + MTP

For chat, reasoning, and anything that reads long documents.

16

Changelog

What a version means here: this repository is not a library, and nothing imports it.

17

Credits

This repository is a thin layer over other people's work. What is genuinely ours is the measurement methodology, the canreuse-qwen4exp and rowband-ple-quant patches, the serving…

Read it where it lives, and open an issue if a number looks wrong.

Back to DGX Spark