MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks

GLM-5.3 Flash EXL3 for 2-4x DGX Sparks

Python

735

557 commits

updated Oct 18, 2026

See the code

README

Use the TensorFold recipe

[!IMPORTANT]

There is an improved version of this recipe that runs faster on TensorFold. Everyone should use that.

https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks-TensorFold

GLM

GLM-5.3 Flash EXL3 on DGX Spark

Serve GLM-5.3 Flash on 2, 3 or 4 NVIDIA DGX Sparks with one command.
by Mia's AI Lab and the community

2× Spark: supported 3× Spark: supported 4× Spark: experimental OpenAI-compatible API AGPL-3.0

Sponsor on GitHub Follow on X

Chris Scott (chriswritescode-dev) authored the root commit dc6b4fdd.

An OpenAI-compatible vLLM server for zai-org/GLM-5.3-Flash, using 4-bpw EXL3 weights, fp8 KV cache and DFlash2 speculative decoding, built natively for the GB10 (sm_121a). The launcher pulls the image, downloads the weights, shares them with the other Sparks and starts the cluster.

I want to...Go to
Run it on two SparksQuick start
See how fast it isPerformance
Get more speedSpeed boost opt-in
Serve an abliterated modelAbliteration opt-in
Use 3 or 4 SparksTopologies
Change a settingConfiguration
Find every knob, receipt and caveatFull reference

At a glance

Model idGLM-5.3-Flash-EXL3 on http://<head>:8888/v1
WeightsMia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold, EXL3 4 bpw, ~164 GiB, 83 shards
Speculative decodingDFlash2, 7 draft tokens
Context850k tokens by default; 1.23M-token KV pool (1.45× one full request)
FeaturesTool calling, reasoning, image and video input, prefix caching, optional API key
Imageghcr.io/miaai-lab/glm-5.3-flash-2x-dgx-sparks:exl3-instanttensor (public)

Quick start

On the head Spark, with the second Spark reachable over SSH and the CX7 cable connected:

git clone https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks.git
cd GLM-5.3-Flash-EXL3-2x-DGX-Sparks
cp .env.example .env     # set HEAD_IP, WORKER_IP and the CX7 interface names
./start.sh               # pull, download, share weights, start, warm up

The first start downloads ~164 GiB and takes a while. When it prints GLM-5.3-Flash EXL3 is UP, send a request:

curl -s http://127.0.0.1:8888/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model": "GLM-5.3-Flash-EXL3", "messages": [{"role": "user", "content": "Hello!"}]}'
CommandDoes
./start.sh statusShow the cluster state
./start.sh logs / logs workerFollow the head or worker logs
./start.sh restartApply .env changes
./start.sh stopStop both Sparks

[!NOTE] After a git pull that changes the image recipe, the next start rebuilds the image once. That is expected.

Network setup, NFS weight sharing, air-gapped installs and other kits: Quick start reference · Running on a different kit.

Performance

Latest TP2 measurements on 2× GB10, 2026-09-28: DFlash2, temperature 0, thinking off, mean of fresh boots. Decode excludes time to first token.

[!IMPORTANT] Default is what every install gets. Speed boost is opt-in: one .env line and a one-time ~25 min build on the head. See TP2 profiles.

Decode, tokens/sDefaultSpeed boostChange
Prose36.137.5+4%
Structured output83.092.3+11%
Code54.655.5+2%
Code at 32k context54.660.3+10%
Short code, 1 request36.041.3+15%
Short code, 2 requests (total)53.656.9+6%
xychart-beta
    title "TP2 decode (tokens/s): default vs speed boost"
    x-axis ["Prose", "Structured", "Code", "Code 32k", "Short code x1", "Short code x2"]
    y-axis "tokens/s" 0 --> 100
    bar [37.5, 92.3, 55.5, 60.3, 41.3, 56.9]
    line [36.1, 83.0, 54.6, 54.6, 36.0, 53.6]

Bars: speed boost. Line: default.

Cold prefill, tokens/s8k32k96k
Default1,4111,5111,498
Speed boost1,3901,5001,489

Recent gains

  • Default, 2026-09-26: decode 3.9–5.2% faster and 16k/64k time to first token 11.5–12.6% lower than the previous default, with the same weights and a numerics check that found no quality loss. (finding)
  • 4× Spark, 2026-09-27: faster prefill is now on by default: 1,772 / 2,422 / 2,733 tokens/s cold prefill at 8k / 32k / 100k, up from 1,316 / 1,761 / 1,940 (contributor measurement).
  • Abliteration + speed boost, 2026-09-30: decode 34.97 / 82.84 / 51.28 tokens/s (prose / structured / code) against 34.87 / 80.68 / 46.54 for plain abliteration: up to +10%, one boot per arm.

[!NOTE] Speed-boost figures come from 2–3 boots per arm with unlocked clocks; treat them as descriptive, not confidence intervals. Methods, raw receipts and older tables: Performance history.

TP2 profiles

Pick one per start. All run on the same public base weights.

ProfileTurn onBest forNotes
Default defaultnothingEveryoneFP8 dense layers, BF16 prefill path
Speed boost opt-inGLM53_MODEL_PRESET=dense-h3 in .envMore decode speedFirst start builds a matched EXL3 target and 6-bpw draft on the head (~25 min, once)
Abliteration opt-inABLIT=1 ./start.sh restartUncensored outputRun python3 ablit/fetch_transplant.py once first
Abliteration + speed boost opt-inthe preset line and ABLIT=1BothUp to 10% faster decode than plain abliteration in first tests
Prebuilt abliterated./start-abliterated.shNo load-time editDownloads a separate checkpoint

[!TIP] Pass ABLIT=1 on the command line, not in .env: the launcher resets it unless you ask for it at start.

Details: Speed boost · Abliteration · Both together

Optional tuning

Off by default. Each has a measured benefit and a tradeoff; try one at a time.

OptionTurn onWhat it gets youTradeoff
Adaptive draft lengthGLM53_ADAPTIVE_K=emaProse decode +13–21%Mostly helps prose (details)
Cooperative decode MoEa generated EXL3_OVERLAY_HOST overlayStructured decode +7–9%Needs a separately built extension (quickstart)
Thin-decode MoE kernelsGLM53_EXL3_MOE_FAST=1Decode +8–15% in one A/B/ANumerics study inconclusive (details)
Long-coding profileappend examples/tp2-long-coding.env to .envTuned for 262k-context coding sessionsTwo concurrent requests

All options and their tradeoffs: full reference.

Topologies

SparksLauncherStatusGuide
2./start.shsupported The reference setupthis page
3./start-tp3.sh + .env.tp3supported Same image and weights3× Spark
4./start-tp4.sh + .env.tp4experimental Community-tested4× Spark

Stop one topology before starting another; they share port 8888.

Configuration

.env holds everything; the shipped defaults are tuned for 2× Spark. A variable set on the command line wins over .env (MAX_NUM_SEQS=2 ./start.sh restart).

SettingDefaultWhat it does
HEAD_IP, WORKER_IP, CX7 pinsexample valuesWhere your Sparks and cable are
MAX_MODEL_LEN850000Maximum context per request
MAX_NUM_SEQS4Concurrent requests
VLLM_API_KEYemptySet to require Authorization: Bearer <key>
GLM53_DEFAULT_REASONING_EFFORTemptylow, high or max for clients that send none
SPEC_METHODdflashmtp rolls back to MTP decoding

Using the API. Thinking is on by default. For long structured output, prefer "chat_template_kwargs": {"reasoning_effort": "low"} over turning thinking off; thinking off can corrupt long numeric tables. Responses report cached prompt tokens in usage.

Every knob with its measured tradeoff: .env reference · Client request defaults · KV cache · Prefix caching.

[!WARNING] Do not use --moe-backend marlin, NVFP4 or bf16 KV cache, or TRITON_ATTN for the draft. They fail or silently degrade on this image. Full list: Do not.

For agents and contributors

  • Start here, then go deep: docs/REFERENCE.md is the complete reference, including what runs, why the overlay exists and the image build.
  • What changed and when: CHANGELOG.md.
  • Design notes and measurements: docs/.
  • Tests: CPU tests live in tests/ and run with python3 -m pytest tests/ or directly. tests/test_image_layer_budget.py keeps the image loadable on workers; fold new Dockerfile steps into existing layers.
  • Pull requests: describe what you measured and on which kit. Defaults change only with receipts.

License and credits

Recipe code and docs: AGPL-3.0 (contributions before 2026-09-07: MIT). Weights keep their own licenses: the EXL3 checkpoint is Apache-2.0 and DFlash2 is CC BY-NC-ND 4.0.

Chris Scott (chriswritescode-dev) authored the root commit dc6b4fdd.

tonyd2wild (profile) authored overlay/patch_glm5_drafter_group.py, which adds the DFlash2 sliding-window KV group to the GLM-5-Next layout, in commit 64c92e98 of GLM-5.3-Flash-NVFP4-DFlash2-2x-DGX-Spark. This repo's first copy of the file is his, byte for byte; later changes are ours.

Built on the work of turboderp (ExLlamaV3), Z.ai (base model), IncoAI (DFlash2), Alexbob0 and vcruz305 (dense EXL3 loader), drowzeys and bullerwins (abliteration), FlyCockpit (TP3 shapes), malaiwah (KLD panel), and every contributor who sent a fix or a measurement. Full credits.

MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks

GLM-5.3 Flash EXL3 for 2-4x DGX Sparks

Python

735

557 commits

updated Oct 18, 2026

See the code

README

Use the TensorFold recipe

[!IMPORTANT]

There is an improved version of this recipe that runs faster on TensorFold. Everyone should use that.

https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks-TensorFold

GLM

GLM-5.3 Flash EXL3 on DGX Spark

Serve GLM-5.3 Flash on 2, 3 or 4 NVIDIA DGX Sparks with one command.
by Mia's AI Lab and the community

2× Spark: supported 3× Spark: supported 4× Spark: experimental OpenAI-compatible API AGPL-3.0

Sponsor on GitHub Follow on X

Chris Scott (chriswritescode-dev) authored the root commit dc6b4fdd.

An OpenAI-compatible vLLM server for zai-org/GLM-5.3-Flash, using 4-bpw EXL3 weights, fp8 KV cache and DFlash2 speculative decoding, built natively for the GB10 (sm_121a). The launcher pulls the image, downloads the weights, shares them with the other Sparks and starts the cluster.

I want to...Go to
Run it on two SparksQuick start
See how fast it isPerformance
Get more speedSpeed boost opt-in
Serve an abliterated modelAbliteration opt-in
Use 3 or 4 SparksTopologies
Change a settingConfiguration
Find every knob, receipt and caveatFull reference

At a glance

Model idGLM-5.3-Flash-EXL3 on http://<head>:8888/v1
WeightsMia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold, EXL3 4 bpw, ~164 GiB, 83 shards
Speculative decodingDFlash2, 7 draft tokens
Context850k tokens by default; 1.23M-token KV pool (1.45× one full request)
FeaturesTool calling, reasoning, image and video input, prefix caching, optional API key
Imageghcr.io/miaai-lab/glm-5.3-flash-2x-dgx-sparks:exl3-instanttensor (public)

Quick start

On the head Spark, with the second Spark reachable over SSH and the CX7 cable connected:

git clone https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks.git
cd GLM-5.3-Flash-EXL3-2x-DGX-Sparks
cp .env.example .env     # set HEAD_IP, WORKER_IP and the CX7 interface names
./start.sh               # pull, download, share weights, start, warm up

The first start downloads ~164 GiB and takes a while. When it prints GLM-5.3-Flash EXL3 is UP, send a request:

curl -s http://127.0.0.1:8888/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model": "GLM-5.3-Flash-EXL3", "messages": [{"role": "user", "content": "Hello!"}]}'
CommandDoes
./start.sh statusShow the cluster state
./start.sh logs / logs workerFollow the head or worker logs
./start.sh restartApply .env changes
./start.sh stopStop both Sparks

[!NOTE] After a git pull that changes the image recipe, the next start rebuilds the image once. That is expected.

Network setup, NFS weight sharing, air-gapped installs and other kits: Quick start reference · Running on a different kit.

Performance

Latest TP2 measurements on 2× GB10, 2026-09-28: DFlash2, temperature 0, thinking off, mean of fresh boots. Decode excludes time to first token.

[!IMPORTANT] Default is what every install gets. Speed boost is opt-in: one .env line and a one-time ~25 min build on the head. See TP2 profiles.

Decode, tokens/sDefaultSpeed boostChange
Prose36.137.5+4%
Structured output83.092.3+11%
Code54.655.5+2%
Code at 32k context54.660.3+10%
Short code, 1 request36.041.3+15%
Short code, 2 requests (total)53.656.9+6%
xychart-beta
    title "TP2 decode (tokens/s): default vs speed boost"
    x-axis ["Prose", "Structured", "Code", "Code 32k", "Short code x1", "Short code x2"]
    y-axis "tokens/s" 0 --> 100
    bar [37.5, 92.3, 55.5, 60.3, 41.3, 56.9]
    line [36.1, 83.0, 54.6, 54.6, 36.0, 53.6]

Bars: speed boost. Line: default.

Cold prefill, tokens/s8k32k96k
Default1,4111,5111,498
Speed boost1,3901,5001,489

Recent gains

  • Default, 2026-09-26: decode 3.9–5.2% faster and 16k/64k time to first token 11.5–12.6% lower than the previous default, with the same weights and a numerics check that found no quality loss. (finding)
  • 4× Spark, 2026-09-27: faster prefill is now on by default: 1,772 / 2,422 / 2,733 tokens/s cold prefill at 8k / 32k / 100k, up from 1,316 / 1,761 / 1,940 (contributor measurement).
  • Abliteration + speed boost, 2026-09-30: decode 34.97 / 82.84 / 51.28 tokens/s (prose / structured / code) against 34.87 / 80.68 / 46.54 for plain abliteration: up to +10%, one boot per arm.

[!NOTE] Speed-boost figures come from 2–3 boots per arm with unlocked clocks; treat them as descriptive, not confidence intervals. Methods, raw receipts and older tables: Performance history.

TP2 profiles

Pick one per start. All run on the same public base weights.

ProfileTurn onBest forNotes
Default defaultnothingEveryoneFP8 dense layers, BF16 prefill path
Speed boost opt-inGLM53_MODEL_PRESET=dense-h3 in .envMore decode speedFirst start builds a matched EXL3 target and 6-bpw draft on the head (~25 min, once)
Abliteration opt-inABLIT=1 ./start.sh restartUncensored outputRun python3 ablit/fetch_transplant.py once first
Abliteration + speed boost opt-inthe preset line and ABLIT=1BothUp to 10% faster decode than plain abliteration in first tests
Prebuilt abliterated./start-abliterated.shNo load-time editDownloads a separate checkpoint

[!TIP] Pass ABLIT=1 on the command line, not in .env: the launcher resets it unless you ask for it at start.

Details: Speed boost · Abliteration · Both together

Optional tuning

Off by default. Each has a measured benefit and a tradeoff; try one at a time.

OptionTurn onWhat it gets youTradeoff
Adaptive draft lengthGLM53_ADAPTIVE_K=emaProse decode +13–21%Mostly helps prose (details)
Cooperative decode MoEa generated EXL3_OVERLAY_HOST overlayStructured decode +7–9%Needs a separately built extension (quickstart)
Thin-decode MoE kernelsGLM53_EXL3_MOE_FAST=1Decode +8–15% in one A/B/ANumerics study inconclusive (details)
Long-coding profileappend examples/tp2-long-coding.env to .envTuned for 262k-context coding sessionsTwo concurrent requests

All options and their tradeoffs: full reference.

Topologies

SparksLauncherStatusGuide
2./start.shsupported The reference setupthis page
3./start-tp3.sh + .env.tp3supported Same image and weights3× Spark
4./start-tp4.sh + .env.tp4experimental Community-tested4× Spark

Stop one topology before starting another; they share port 8888.

Configuration

.env holds everything; the shipped defaults are tuned for 2× Spark. A variable set on the command line wins over .env (MAX_NUM_SEQS=2 ./start.sh restart).

SettingDefaultWhat it does
HEAD_IP, WORKER_IP, CX7 pinsexample valuesWhere your Sparks and cable are
MAX_MODEL_LEN850000Maximum context per request
MAX_NUM_SEQS4Concurrent requests
VLLM_API_KEYemptySet to require Authorization: Bearer <key>
GLM53_DEFAULT_REASONING_EFFORTemptylow, high or max for clients that send none
SPEC_METHODdflashmtp rolls back to MTP decoding

Using the API. Thinking is on by default. For long structured output, prefer "chat_template_kwargs": {"reasoning_effort": "low"} over turning thinking off; thinking off can corrupt long numeric tables. Responses report cached prompt tokens in usage.

Every knob with its measured tradeoff: .env reference · Client request defaults · KV cache · Prefix caching.

[!WARNING] Do not use --moe-backend marlin, NVFP4 or bf16 KV cache, or TRITON_ATTN for the draft. They fail or silently degrade on this image. Full list: Do not.

For agents and contributors

  • Start here, then go deep: docs/REFERENCE.md is the complete reference, including what runs, why the overlay exists and the image build.
  • What changed and when: CHANGELOG.md.
  • Design notes and measurements: docs/.
  • Tests: CPU tests live in tests/ and run with python3 -m pytest tests/ or directly. tests/test_image_layer_budget.py keeps the image loadable on workers; fold new Dockerfile steps into existing layers.
  • Pull requests: describe what you measured and on which kit. Defaults change only with receipts.

License and credits

Recipe code and docs: AGPL-3.0 (contributions before 2026-09-07: MIT). Weights keep their own licenses: the EXL3 checkpoint is Apache-2.0 and DFlash2 is CC BY-NC-ND 4.0.

Chris Scott (chriswritescode-dev) authored the root commit dc6b4fdd.

tonyd2wild (profile) authored overlay/patch_glm5_drafter_group.py, which adds the DFlash2 sliding-window KV group to the GLM-5-Next layout, in commit 64c92e98 of GLM-5.3-Flash-NVFP4-DFlash2-2x-DGX-Spark. This repo's first copy of the file is his, byte for byte; later changes are ours.

Built on the work of turboderp (ExLlamaV3), Z.ai (base model), IncoAI (DFlash2), Alexbob0 and vcruz305 (dense EXL3 loader), drowzeys and bullerwins (abliteration), FlyCockpit (TP3 shapes), malaiwah (KLD panel), and every contributor who sent a fix or a measurement. Full credits.

Significant stargazers

(top 24 of 26)

Leonard

409 followers · starred Aug 2026

Alex Ellis

5,205 followers · starred Aug 2026

Ivan Fioravanti

581 followers · starred Sep 2026

Nathan Raw

1,111 followers · starred Aug 2026