# GLM-5.3-Flash

Run Z.ai / Zhipu AI’s 320B GLM-5.3-Flash either on a single 96 GB GPU + 128 GB RAM workstation via Maxrio9’s Project Maya v3 hybrid offload (139.93 tok/s solo, 164.73 tok/s at 8 streams lossless) or across 2× DGX Spark via Mia’s AI Lab EXL3 4 bpw recipe on Ash Hart’s TensorFold.

[Canonical HTML page](https://lasse-ai.com/recipes/glm-5-3-flash/)

## Origin and credits

Built by upstream projects and independently tested by Lasse AI.

- [Maxrio9 / Project Maya v3 recipe](https://github.com/Maxrio9/glm-5.3-flash-maya-dflash-recipe)
- [Project Maya (v3 fork)](https://github.com/Maxrio9/project-maya/tree/glm53-dflash-opt-v3)
- [Mia's AI Lab](https://mia-ai.net)
- [Ash Hart / TensorFold](https://github.com/ashhart/TensorFold)
- [Turboderp / ExLlamaV3](https://github.com/turboderp-org/exllamav3)
- [Anbeeld / DFlash2 GGUF](https://huggingface.co/Anbeeld/GLM-5.3-Flash-DFlash2-GGUF)
- [Z.ai / Zhipu AI](https://huggingface.co/zai-org/GLM-5.3-Flash)
- [Inco AI / DFlash2](https://huggingface.co/incoai/GLM-5.3-Flash-DFlash2)
- [Maxrio9 / Project Maya v3 hybrid recipe](https://github.com/Maxrio9/glm-5.3-flash-maya-dflash-recipe)
- [Project Maya v3 engine fork](https://github.com/Maxrio9/project-maya/releases/tag/glm53-dflash-opt-v3)
- [Turboderp / GLM-5.3-Flash EXL3 (4.05 bpw)](https://huggingface.co/turboderp/GLM-5.3-Flash-exl3/tree/4.05bpw)
- [Anbeeld / GLM-5.3-Flash-DFlash2 GGUF](https://huggingface.co/Anbeeld/GLM-5.3-Flash-DFlash2-GGUF)
- [Mia's AI Lab / Spark recipe](https://github.com/MiaAI-Lab/GLM-5.3-Flash-DGX-Sparks-1104)
- [Mia's AI Lab / EXL3 4 bpw](https://huggingface.co/Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold)
- [Mia's AI Lab / X](https://x.com/MiaAI_lab)
- [Engine and patch contributors](https://github.com/MiaAI-Lab/GLM-5.3-Flash-DGX-Sparks-1104/blob/6c55c20da31a02d6d381a268fa42f8a9ebe0c5d2/CREDITS.md)

## Hardware and prerequisites

Choose between two paths: (1) Single-workstation hybrid offload (~152.6 GB EXL3 experts split across 96 GB GPU VRAM + 128 GB DDR5 system RAM via Project Maya v3, CUDA toolkit, CMake 3.24+); or (2) Two DGX Sparks connected via ConnectX-7 RoCE with Docker and passwordless SSH from rank 0.

| Preset | Engine | Quantization | Context | Vision | Speculative decoding | Port |
| --- | --- | --- | --- | --- | --- | --- |
| 96 GB GPU + 128 GB RAM · Project Maya v3 (Solo 256K) | Project Maya | Turboderp EXL3 4.05 bpw + Anbeeld DFlash2 Q4_K_M | 262144 | No | DFlash2 | 8080 |
| 96 GB GPU + 128 GB RAM · Project Maya v3 (8 Streams) | Project Maya | Turboderp EXL3 4.05 bpw + Anbeeld DFlash2 Q4_K_M | 32768 | No | DFlash2 | 8080 |
| 2× DGX Spark · TensorFold | TensorFold | Mia's AI Lab EXL3 4 bpw | Auto (≤1048576) | Yes | DFlash2 | 8080 |

### 96 GB GPU + 128 GB RAM · Project Maya v3 (Solo 256K) (`96gb-hybrid-single`)

API: `http://127.0.0.1:8080/v1`

```sh
git clone https://github.com/Maxrio9/glm-5.3-flash-maya-dflash-recipe.git
cd glm-5.3-flash-maya-dflash-recipe
./scripts/build-engine.sh --dir ./project-maya --cuda-arch 120
(cd ./project-maya && ./maya.sh --setup --model glm-exl3-4.05bpw --draft dflash2 --context 262144 --download-model --yes --no-start)
./scripts/start.sh --profile single --config configs/maya-config.example.json
```

Verify in a second terminal.

```sh
curl http://127.0.0.1:8080/v1/models
```

### 96 GB GPU + 128 GB RAM · Project Maya v3 (8 Streams) (`96gb-hybrid-concur`)

API: `http://127.0.0.1:8080/v1`

```sh
git clone https://github.com/Maxrio9/glm-5.3-flash-maya-dflash-recipe.git
cd glm-5.3-flash-maya-dflash-recipe
./scripts/build-engine.sh --dir ./project-maya --cuda-arch 120
(cd ./project-maya && ./maya.sh --setup --model glm-exl3-4.05bpw --draft dflash2 --context 262144 --download-model --yes --no-start)
./scripts/start.sh --profile concur --config configs/maya-config-concur.example.json
```

Verify in a second terminal.

```sh
curl http://127.0.0.1:8080/v1/models
```

### 2× DGX Spark · TensorFold (`2x-spark-tensorfold`)

API: `http://127.0.0.1:8080/v1`

```sh
git clone https://github.com/MiaAI-Lab/GLM-5.3-Flash-DGX-Sparks-1104.git
cd GLM-5.3-Flash-DGX-Sparks-1104
read -rp "Worker SSH target: " WORKER
export WORKER HOST=127.0.0.1 PORT=8080
DRY_RUN=1 ./start.sh
./start.sh
curl -s http://127.0.0.1:8080/v1/models
read -rp "Press Enter when ready to stop both ranks. "
./stop.sh
```

Verify in a second terminal.

```sh
curl http://127.0.0.1:8080/v1/models
```

## Connect clients

Use the API URL from the selected preset. Confirm the model ID with `/v1/models`. The recipe's example model ID is `GLM-5.3-Flash`.

- **Open WebUI** — Enter the OpenAI API URL under Settings → Connections.
- **Coding agent** — Select an OpenAI-compatible provider and enter the API URL and model ID.
- **Python SDK** — Use the port of the selected preset.

```python
from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="local")
```

`local` is a placeholder. If the server requires authentication, use the key configured on the server.

## Caveats

- The 96 GB GPU + RAM hybrid offload speeds were measured on one workstation (RTX PRO 6000 96 GB + 128 GB 8-channel DDR5-4800 + Xeon w7-3465X) and depend strongly on host RAM bandwidth and AVX-512/AMX support; results on other CPUs or RAM configs will differ. Update placeholder paths inside the example Maya configs (or pass ./project-maya/config.json from --setup).
- On 2× DGX Spark, the recipe selects context automatically up to 1,048,576 tokens (the 499,994-token test used vLLM). Inco AI licenses the default Spark DFlash2 drafter for noncommercial use. Run ./stop.sh on rank 0 after use.

## Measurements

- **Hybrid GPU+RAM offload (96 GB RTX PRO 6000 + 128 GB DDR5, Project Maya v3)** — 139.93 tok/s code solo lossless (256K ctx, 9/9 exact greedy parity) · 164.73 tok/s aggregate at 8 streams lossless AVX-512 (166.57 opt-in AMX, vs 59.97 stock) · 4,224 tok/s prefill at 64K lossless (4,720 opt-in TF32/BF16-TC). [1](https://lasse-ai.com/tests/2026-12-02-glm-5-3-flash-hybrid-gpu-ram-offload-on-96-gb-workstation-project-maya-v3/)
- **Decode & prefill (2× DGX Spark, TensorFold, EXL3 4 bpw)** — 58.35 tok/s prose · 109.71 tok/s structured · 1820 tok/s prefill at 8K · 4.51 s cold time to first token. [1](https://lasse-ai.com/tests/2026-10-01-glm-5-3-flash-in-tensorfold-writing-speed-reading-speed-and-first-word/)
- **Long context & agents** — tested up to 499994 tokens (~500K); 97% tool calling and 89% multi-step agent tasks. [1](https://lasse-ai.com/tests/2026-08-28-glm-5-3-flash-a-500-000-token-document/) [2](https://lasse-ai.com/tests/2026-08-29-glm-5-3-flash-six-test-sets-thinking-off/)
- **Real office benchmark** — 24/38 checks passed on real rental cases, 49.7 s median per matter. [1](https://lasse-ai.com/tests/2026-10-28-glm-5-3-flash-19-pieces-of-real-rental-paperwork-thinking-on/)

## Test records

- [GLM-5.3-Flash hybrid GPU+RAM offload on 96 GB workstation (Project Maya v3)](https://lasse-ai.com/tests/2026-12-02-glm-5-3-flash-hybrid-gpu-ram-offload-on-96-gb-workstation-project-maya-v3/)
- [GLM-5.3-Flash in TensorFold: writing speed, reading speed and first word](https://lasse-ai.com/tests/2026-10-01-glm-5-3-flash-in-tensorfold-writing-speed-reading-speed-and-first-word/)
- [GLM-5.3-Flash: a 500,000-token document](https://lasse-ai.com/tests/2026-08-28-glm-5-3-flash-a-500-000-token-document/)
- [GLM-5.3-Flash: 19 pieces of real rental paperwork, thinking on](https://lasse-ai.com/tests/2026-10-28-glm-5-3-flash-19-pieces-of-real-rental-paperwork-thinking-on/)
- [GLM-5.3-Flash: six test sets, thinking off](https://lasse-ai.com/tests/2026-08-29-glm-5-3-flash-six-test-sets-thinking-off/)
