Skip to content

GLM-5.3-Flash EXL3 on 2x DGX Spark with TensorFold

Python

v1.7: thinking off by default with ABLIT=1

MiaAI-Lab5ce8051d103f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aee9412..a019014 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@ Image: `v0.6.0-c4cab25d2d36` (`sha256:b47c19d66633f27cbe37da13fbc580363f466c08b9
get one and accept the terms on the model's page, and `prepare.sh` checks that the token reaches the gated files
before the image and the download (README: Ablit weights), without putting the token on a command line. `HF_TOKEN`
set in `scripts/local.sh` is now exported to the download.
+- **With `ABLIT=1`, thinking is off by default** (`THINKING` defaults to `0`): the Ablit weights give their best
+ results answering directly. A request can still ask to think, and `THINKING=1` turns it back on by default.
## v1.6 (2026-10-05): agent sessions keep their history (beside sub-agents and under a full pool), queued requests whose client left are dropped, no raw `<|assistant|>` in replies, the display reservation in the pool, a longer RoCE wait, SPLIT retried at start
diff --git a/README.md b/README.md
index 6ce6e4e..faac5cc 100644
--- a/README.md
+++ b/README.md
@@ -324,12 +324,12 @@ Everything else (drafts, the window, NFS, 3 Sparks) works the same. The reposito
```bash
ABLIT=1
HF_TOKEN=hf_...
- THINKING=0 # best results with the Ablit weights (below)
```
-**For best results, run the Ablit weights with thinking off:** `THINKING=0` beside `ABLIT=1` makes the server answer
-directly unless a request asks to think. Per request, `"reasoning_effort": "none"` (or
-`"chat_template_kwargs": {"enable_thinking": false}`) does the same ([Thinking and sampling](#thinking-and-sampling)).
+**Thinking is off by default with the Ablit weights**, which give their best results that way: with `ABLIT=1`,
+`THINKING` defaults to `0`, so the server answers directly unless a request asks to think (`"reasoning_effort"`, or
+`"chat_template_kwargs": {"enable_thinking": true}`; [Thinking and sampling](#thinking-and-sampling)). `THINKING=1`
+turns it back on by default.
Without `HF_TOKEN`, `start.sh`, `start-tp3.sh` and `prepare.sh` stop at once and say what to do. Before the image
and the download, `prepare.sh` also checks that the token reaches the gated files: a `401` means Hugging Face does not
@@ -445,7 +445,7 @@ sets a value wins: the environment, then `scripts/local.sh`, then `.env`, then t
| `KV_POOL_GIB` / `MEMORY_RESERVE_GIB` | `12.5` (`32` at `TP=3`) / `14.5`, plus ~0.95 a request past 4 and ~0.04 a window row past 32 (`19.6` at 8 requests and 64 rows) | the shared pool beyond the window (kept prompts, more long conversations at once) grows into what is free at start minus the reserve, up to `KV_POOL_GIB` GiB a Spark; the reserve sets the lowest free memory on the head (~4.5-5 GiB under a 1M-token prompt); it grows with `PARALLEL` because more requests at once take more than the startup estimate counts; raise it when other work shares the Sparks |
| `DISPLAY_KV_MIB` | `0` (off) | MiB of the GPU's display reservation added to the shared pool on every rank (patch 0072, `PARALLEL` above 1; a multiple of 16 up to 2032, 1792 measured): pool tokens without host memory, on top of `KV_POOL_GIB`; needs `/dev/dri/card0`; headless Sparks only (refused while a display is connected) |
| `DENSE` | `q4` | the checkpoint's BF16 weights (attention, shared experts, dense layers, head): `q4` (4-bit groups of 64, the head in FP8, kv_b in BF16), `fp8` or `bf16`. **Non-English prompts:** `q4` can lose the end of turn on short French coding prompts (replies run to `max_tokens`, issue #18); `fp8` keeps it, at ~10% decode speed |
-| `ABLIT` | `0` | `1`: serve the gated [Ablit weights](https://huggingface.co/Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold-Ablit) instead of the published checkpoint; needs `HF_TOKEN` and the terms accepted on the model's page ([Ablit weights](#ablit-weights)) |
+| `ABLIT` | `0` | `1`: serve the gated [Ablit weights](https://huggingface.co/Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold-Ablit) instead of the published checkpoint; needs `HF_TOKEN` and the terms accepted on the model's page; thinking defaults to off ([Ablit weights](#ablit-weights)) |
| `DRAFTER` | `dflash2` | `dflash2`: IncoAI's DFlash2 drafter, licensed [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/), **non-commercial use only**; +5-10% decode. `mtp`: the checkpoint's own MTP head, one request at a time, which avoids that license (set it before the first `./start.sh` and DFlash2 is never downloaded) |
| `TF_GLM_MTP` | `auto` | the checkpoint's MTP head beside DFlash2: `auto` leaves it out while DFlash2 drafts every request; `1` (TensorFold v0.6.0's own default) loads it, 1.77 GiB a Spark, with `PARALLEL=1`. `DRAFTER=mtp` always loads it |
| `TF_GLM_ASSISTANT_ENDS` | `1` | `<\|assistant\|>` ends a reply, like `<\|user\|>` and `<\|observation\|>` (patch 0075, issue #60); `0`: only the checkpoint's own end tokens |
@@ -454,7 +454,7 @@ sets a value wins: the environment, then `scripts/local.sh`, then `.env`, then t
| `COPY_CODE` | `1` | 16-row verify windows as CUDA graphs, and copies from the reply itself only after a 16-token match |
| `SHARED_PREFIX` | `1` | conversations that share a system prompt reuse its prompt state |
| `MAX_TOKENS` | `32768` | the reply budget (reasoning and answer) of a request that sets no `max_tokens`; TensorFold's own default is 4,096 |
-| `THINKING` | `1` | think before answering by default; `0` answers directly unless a request asks to think |
+| `THINKING` | `1` (`0` with `ABLIT=1`) | think before answering by default; `0` answers directly unless a request asks to think |
| `VISION` / `VISION_URLS` | `1` / `0` | image and video input; `1` also accepts public `https://` URLs |
| `COMM` | `roce` | the ranks' small all-gathers as one-shot RDMA writes over the RoCE link; `nccl`: NCCL for all |
| `SPLIT` | `1` | prompt chunks' hyper-connection work split between the Sparks, its exchanges overlapped with the next rows' work; when a rank's first NCCL connection fails with it (NCCL error 2, issue #36), `start.sh` tries once more, then starts with `SPLIT=0` and says so |
diff --git a/scripts/config.sh b/scripts/config.sh
index 7e64984..14489b0 100644
--- a/scripts/config.sh
+++ b/scripts/config.sh
@@ -51,7 +51,7 @@ SOCKET_IFNAME="${SOCKET_IFNAME:-}"
# abliterated; README "Ablit weights"), instead of the published checkpoint; 0 (default) the published one. The Ablit
# repository is gated: HF_TOKEN must be set (a Hugging Face access token whose account accepted the terms on the
# model's page), or prepare.sh, start.sh and start-tp3.sh stop and say so. Switching downloads the other checkpoint
-# (~176 GB).
+# (~176 GB). With ABLIT=1, THINKING defaults to 0 (below).
ABLIT="${ABLIT:-0}"
ABLIT_ID="Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold-Ablit"
_id="Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold"; [[ "$ABLIT" == 1 ]] && _id=$ABLIT_ID
@@ -125,7 +125,10 @@ CONTEXT="${CONTEXT:-$_ctx}"
DFLASH2_ID="${DFLASH2_ID:-incoai/GLM-5.3-Flash-DFlash2}"
_rev=""; [[ "$DFLASH2_ID" == incoai/GLM-5.3-Flash-DFlash2 ]] && _rev=bf582e4eacc1810f76656d1811693ff6c6737d2a
DFLASH2_REVISION="${DFLASH2_REVISION-$_rev}" # DFlash2's pinned revision, as MODEL_REVISION above
-THINKING="${THINKING:-1}"
+# Think before answering by default (0: answer directly unless a request asks to think); off by default with the Ablit
+# weights (ABLIT=1), which give their best results without thinking
+_think=1; [[ "$MODEL_ID" == "$ABLIT_ID" ]] && _think=0
+THINKING="${THINKING:-$_think}"
# The reply budget of a request that sets no max_tokens (or max_completion_tokens), reasoning and answer together:
# 32768. GLM thinks at Max by default, and TensorFold's own 4,096 could end a reply inside a tool call (an agent such
# as Codex sets none). A request's own value wins; this one is cut to what the window has left, never refused.