ds4 icon indicating copy to clipboard operation
ds4 copied to clipboard

Support for GLM-5.3-Flash

Open AutisticAF opened this issue 3 months ago • 5 comments

Z.ai dropped GLM-5.3-Flash this morning, which looks really promising. It's 320B parameters, 18B active. This was the model powering the free Ox Alpha model on OpenRouter last week.

I'd be really curious to see if it'd run on my M5 Max 128GB.

AutisticAF avatar Aug 26 '26 14:08 AutisticAF

Maybe IQ2_XXS can run on M5 Max, I hope so too.

williamxie1989 avatar Aug 26 '26 15:08 williamxie1989

with bigger ssd-streaming q4 might be possible, ~180 GB needed

gecobattya avatar Aug 26 '26 23:08 gecobattya

He's on it

simoltos avatar Aug 27 '26 15:08 simoltos

Can you just load this in DS4?

ajaxdude avatar Aug 27 '26 21:08 ajaxdude

Running the glm-5.3-flash branch (a60a2a0) with your Q2 GGUF on a 128 GB M5 Max — resident, works well. One small bug in the discovery endpoint:

send_models() (ds4_server.c) branches only on ds4_engine_is_glm_dsa(), so a GLM-5.3 engine advertises the 5.2 aliases:

$ curl -s localhost:8015/v1/models | jq -r '.data[].id'
glm-5.2
glm-5.2-chat
glm-5.2-reasoner

…while server_model_id_from_engine() checks ds4_engine_is_glm53() first and correctly returns glm-5.3-flash. So "model": "glm-5.3-flash" does work (responses echo it back, and it's already in server_model_alias_known()) — it just isn't discoverable. That breaks OpenAI-compatible clients that validate the requested id against /v1/models before starting.

Fix is a branch mirroring the existing one:

if (ds4_engine_is_glm53(s->engine)) {
    append_model_json(&b, s, "glm-5.3-flash");
    buf_putc(&b, ',');
    append_model_json(&b, s, "glm-5.3-flash-chat");
    buf_putc(&b, ',');
    append_model_json(&b, s, "glm-5.3-flash-reasoner");
} else if (ds4_engine_is_glm_dsa(s->engine)) {
    /* … existing 5.2 aliases … */

Verified locally: /v1/models now lists the three 5.3 ids and requests against them work unchanged. Happy to open a PR if useful.

Numbers from the same box, in case they're of interest: Q2 resident (96.72 GiB planned), --ctx 32768, temp 0 — 31.2 t/s decode plain, 37.4 t/s with --mtp, ~90–190 t/s prefill. Note --mtp-timing costs more than MTP earns (~30 ms added to a rejecting cycle, dropping decode to 26.4 t/s) — useful for reading acceptance, misleading for measuring speed.

agnoster avatar Aug 28 '26 19:08 agnoster