GLM 5.3 Metal: multi-minute silent stalls mid-decode in long tool sessions (chunks otherwise ~27 t/s)
I've been running GLM 5.3 Flash Q2 (your quant) as the backend for a local coding agent on a MacBook Pro M5 Max 128GB, ds4 built from ab06d19. Server:
./ds4-server -m gguf/GLM-5.3-Flash-Q2.gguf \
--vision gguf/GLM-5.3-Flash-Vision-Encoder.gguf \
--ctx 100000 --port 8092In a long multi-turn tool-calling session (OpenAI chat endpoint, agent doing tool calls, context grew to ~60k over about an hour) throughput seemed to fall off a cliff, but digging into the log it turns out decode isn't actually slow at depth. Individual chunks keep doing ~27 t/s. What actually happens is the stream stops dead for minutes at a time and then resumes at full speed. Clearest example:
23:42:58 chat ctx=59215..59265:50 gen=300 TOOLS THINKING decoding chunk=27.81 t/s avg=24.12 t/s 12.440s
23:46:37 chat ctx=59265..59315:50 gen=350 TOOLS THINKING decoding chunk=0.23 t/s avg=1.51 t/s 232.236s
23:46:39 chat ctx=59315..59365:50 gen=400 TOOLS THINKING decoding chunk=27.12 t/s avg=1.71 t/s 234.080sOne 50-token chunk took 3m39s and nothing at all was logged in between, then it's straight back to 27 t/s. I count 44 chunks under 1 t/s across the session, so request-level averages crater to ~4 t/s even though the model is fine between stalls.
Single-shot requests never do this at any size I tried. Quick sweep, fresh request each time with a big filler document, temp 0, 80 max tokens:
| prompt | decode |
|---|---|
| 1k | 33.2 t/s |
| 8k | 28.8 |
| 16k | 27.7 |
| 32k | 26.2 |
| 48k | 27.4 |
| 64k | 27.4 |
so context depth by itself looks innocent, and a cold 67k prefill went through at ~46 t/s overall too. A second agent session with --mtp --ctx 50000 (the settings from your README examples) also showed stalls, though MTP acceptance variance makes that log harder to read.
One thing I have to own up to before you burn time on this: the whole session overlapped with a large download writing to the same internal SSD (I was pulling your Q4_K at 10-20MB/s, ironically). So if these stalls are page cache or IO related, that's plausibly the trigger — though wired memory looked stable around 100GB the whole time and swap stayed flat under 1GB, so the text weights at least should have been pinned. I haven't reproduced with a quiet disk yet; happy to do that run if it helps, or send full server logs.
DeepSeek V4 Flash agent sessions on this same machine (with DSpark) never showed anything like this, but I don't think I had heavy background IO going during those either.
Great work on the GLM support btw, single-shot performance on this thing is excellent, and Q4_K over SSD streaming loading in 5 seconds is wild.
Source: antirez/ds4