FreshContext , home
Drawing
02 · Benchmarks
Sheet
2 of 3
Rev
A · 2026-10-01

Model family ← Models

GLM-4.7-Flash

Z.ai's mixture-of-experts model, about 31 billion parameters with about 3 billion at work on each token. It needed little extra memory for long conversations, but often gave a plausible answer instead of "I don't know", and seldom reached for a tool on its own.

Parameters
31B / ~3B active
Files tested
8
Scored runs
17

Made by Z.ai · MIT

Overview Should you use it · what it taught us · why we tested it · what happened

How this page was made. The tests run automatically on our Mac Studio, and every score here comes straight from those runs. This overview was written by Claude, an AI model, from the lab's own records: the run log, notes kept at the time, and the working sessions where each decision was made. Quotes are Alan's words, with spelling fixed. How these pages are made.

Should you use it?

If you need long conversations on a Mac with room for it, it holds 131K tokens without much extra memory, though we never tested how well it answers at that length, and it checks extractions well. It is not for work where it must admit a gap, or decide for itself when to call a tool; for tool use, Ornith-1.5-35B-A3B did better here, and we chose it for coding instead. Run the GGUF files under llama.cpp: our MLX builds were never published, and llama.cpp was faster. Check the smallest Mac for each file below.

What it taught us

  • Measure memory at full length; don't predict it from the specification. The memory a model needs for each token of conversation it holds decides what fits, and only measurement predicts it.
  • A small test can rank builds the wrong way. At 60 cases, screening put plain 4-bit ahead of the mixed builds. Perplexity reversed it.
  • Choosing the right tool and noticing you need one are different skills.

Why we tested it

GLM-4.7-Flash is Z.ai's mixture-of-experts model: about 31 billion parameters, of which reviews put about 3 billion at work on each token. It reads up to 202,752 tokens and is MIT-licensed. We tested it three times, for three different questions.

  • 26 August, as the intact copy. In files under about 17 GB, models kept intact had done better than ones compressed hard. We wanted to know if that held around 30 GB, and this model fitted on the Mac Studio at Q8_0, close to full precision.
  • 7 September, for MLX. We could find no build of it for MLX, Apple's own framework, so we made our own. Alan: "Can we quantize it?"
  • 12 September, as a coder. Alan: "Been watching videos on GLM 4.7 flash which is a very capable agentic coding model. We tested it on other stuff, I’m gonna have to take it for another spin".

What it took

llama.cpp ran the downloaded files as they were. For MLX, support for this design was only in the development version of mlx-lm, so we used that to make four builds from Z.ai's full-size original: plain 8-bit and 4-bit, and two mixed builds that give different layers different precision. Alan, the next morning: "We should try mixed precision etc so keep the bf16 GLM".

The first test run, serving four requests at once on the 8-bit file, failed with the Mac almost out of memory. One at a time worked.

What happened

  • It was good at checking extractions. On screening, judging whether a value pulled from a document is right, the 8-bit file scored 95.0%. The MLX builds scored 93.3% to 96.7%.
  • It was weak at saying "I don't know". When the answer wasn't in the document, it declined only 48.6% of the time at 8-bit and 44.4% at Q4_0. Otherwise it filled the gap with a plausible value; at 8-bit, always one taken from elsewhere in the document.
  • Long conversations cost it little memory. Worked out from its published configuration, a full-length conversation looked too big for the Mac Studio. Measured, it went from 29.75 GB at 8K tokens to 36.42 GB at 131K, at about 37 tokens a second throughout.
  • llama.cpp ran it faster than MLX. 37.2 tokens a second for the 8-bit file, against 21.3 for our 8-bit MLX build. The two were measured differently, so the gap is approximate.
  • Mixed precision gave the best quality for its size among the MLX builds. Perplexity measures how well a model predicts a fixed text; lower is better. The mixed 3/6 build, the smallest of the four, scored 11.677, close to 8-bit's 11.149 and well ahead of the larger plain 4-bit at 14.457. Screening could not tell them apart.
  • It picked tools well but reached for one only when its instructions pointed to it. On Q4_0 it chose the right tool every time as the choice grew. But in its tool test it called a tool only 38.3% of the time: when its instructions said a tool existed or gave an if-then rule for it, 23 times in 24; otherwise, never, even with the same rule written into the tool's own description. Ornith-1.5-35B-A3B scored 80.0%, ran a little faster at 55.3 tokens a second against 50.2, and became our coding model instead.
  • The question it first came for got half an answer. At 30 GB, the intact copy did not show the edge intact models had shown in smaller files. The 4-bit copy meant as a second point never ran.

We planned to publish our MLX builds on Hugging Face. Alan: "see if it's any good first but releasing honest models isn't a bad thing". The 8-bit and mixed 3/6 builds were chosen, but neither was uploaded. Both went in disk clear-outs, on 9 and 16 September, and the last file we held, the Q4_0, on 11 October.

The files 8 tested · each has its own page
  • Q4_0 GGUF

    The smaller copy we tested on tool use. The last file we held.

    Unsloth · Deleted 11 Oct 2026 · 17.2 GB · 6 scored runs · smallest Mac 32 GB

  • Q8_0 GGUF

    The first file, a near-full-precision copy. It ran the first tests and the long-conversation memory test.

    Unsloth · Deleted 9 Sep 2026 · 31.8 GB · 3 scored runs · smallest Mac 64 GB

  • MLX 8-bit g64

    Our 8-bit build for Apple's MLX. Slower than llama.cpp, and never uploaded.

    Made here from bf16 · Deleted 9 Sep 2026 · size not recorded · 3 scored runs

  • MLX 4-bit g64

    Our plain 4-bit MLX build. Lost to the mixed builds on perplexity and deleted.

    Made here from bf16 · Deleted 8 Sep 2026 · size not recorded · 3 scored runs

  • MLX mixed_3_6

    A mixed-precision MLX build, the best for its size. Meant for upload, never uploaded.

    Made here from bf16 · Deleted 16 Sep 2026 · 14.9 GB · 1 scored run · smallest Mac 32 GB

  • MLX mixed_4_6

    A second mixed-precision build. Bigger than the 3/6 and no better, so deleted.

    Made here from bf16 · Deleted 8 Sep 2026 · size not recorded · 1 scored run

  • bf16 safetensors

    Z.ai's full-size original. Never run; we made the four MLX builds from it.

    Zai-org · Deleted 9 Sep 2026 · 62.5 GB · never scored

  • Q4_K_M GGUF

    A smaller copy for comparison. Downloaded, never tested, then deleted.

    Unsloth · Deleted 7 Sep 2026 · 18.3 GB · never scored

Corrections 7 to the record published 21 October 2026
  • 2 runs voided (the nullschema run of 26 August 2026; the screening run of 26 August 2026). A killed start (the server failed mid-run and every request errored); nothing was measured and a clean run was made afterwards.

    Corrected 26 October 2026 · a mechanical fix

  • 4 runs voided (the glm-4.7-flash-mlx-q4 nullschema run of 8 September 2026; the glm-4.7-flash-mlx-q4 grounding run of 8 September 2026; the glm-4.7-flash-mlx-q8 nullschema run of 8 September 2026; the glm-4.7-flash-mlx-q8 grounding run of 8 September 2026). mlx_lm's server ignores response_format, so this run was free generation, not schema-enforced, and is not comparable with the constrained runs.

    Corrected 26 October 2026 · a mechanical fix

  • Size (GB) was 30.0, now 31.84. The file this write-up describes (GLM-4.7-Flash-Q8_0.gguf) is 31,842,799,968 bytes, 31.84 GB.

    Corrected 26 October 2026 · a mechanical fix

The lab's record Every decision, with its date · the model's specification
Decisions, in order
  • 2026-08-23 10:37Z — GLM-4 assessed, not run. GLM-4-9B-0414 skipped for its 32,768 window; GLM-4.7-Flash noted as the interesting one. Alan: "we don't have to look at those now".
  • 2026-08-26 09:57Z — Q8_0 downloaded as the "intact" arm of the big-MoE study, beside Qwen3.5-122B at IQ3. Reviews checked at Alan's "What are the reviews of the GLM model like?". Pre-registered: the assistant predicted ~30 t/s from 4-of-64 active experts ("I predicted ~30"). Alan predicted the opposite ("Not sure it’ll be faster"). Result: 22.9 t/s.
  • 2026-08-26 11:36Z — Q4_K_M pulled for the other end. Alan: "We have capability to test quants 4 - 8" and "Try the q4 just now then we have both ends before doing the in between". Its runner was queued behind the Q8_0 with -np 1 held constant. It never ran. Why is not on record; the 26 Aug report says "downloaded but has not run".
  • 2026-08-26 16:26Z — verdict. "Did not vindicate intact-over-compressed" (a lab note). No seat.
  • 2026-08-30 17:04Z — kept as the best screener ("it's the best you've measured at that"). 95.0% was then the top screening score in the run log, noted for a quarantine role. REAP-23B-A3B prunes of it were found but never pulled.
  • 2026-09-07 17:36Z — Q4_K_M deleted unrun in a disk sweep: "Duplicate quants of the same model" and "keeping the better" (script echo). Alan: "Go for it".
  • 2026-09-07 21:13Z — bf16 pulled to make the first MLX builds. After "Can we quantize it?" the assistant checked that mlx-lm git main maps glm4_moe_lite. Order: "q8 first: matches the existing GGUF q8 baseline for a like-for-like runtime comparison".
  • 2026-09-07 21:29Z — HF card drafted, for freshcontext/GLM-4.7-Flash-MLX-8bit. The assistant proposed private upload first, public after the numbers held. Alan: "see if it's any good first but releasing honest models isn't a bad thing".
  • 2026-09-08 06:50Z — keep the bf16 for a mixed-precision study. Alan: "We should try mixed precision etc so keep the bf16 GLM".
  • 2026-09-08 14:26Z — perplexity reverses screening. Assistant: q4 is dominated and should not be published, mixed_4_6 is dominated too; publish q8 and mixed_3_6. Alan: "of course ;) We may need to bin a few more models though", then "we would be fools to not take it all the way with awq and gptq (not that I know what they are or the impact they'll have)". q4 and mixed_4_6 were deleted at 14:29Z; the bf16 was kept for AWQ/GPTQ.
  • 2026-09-08 14:32Z — AWQ/GPTQ deferred (needed ~38 GB reclaimable, 12 GB free). They never ran.
  • 2026-09-09 14:08Z — bf16, Q8_0 GGUF and MLX q8 deleted. Rationale in the inventory: bf16 "conversion source, job done"; GGUF and MLX q8 "mixed_3_6 covers it". Alan: "ok remove the granite extras and the superseded models". This removed the only file with valid enforced grounding/nullschema numbers. It also removed AWQ/GPTQ's input, though they had been deferred, not cancelled.
  • 2026-09-12 10:11Z — Q4_0 GGUF pulled for the agentic suites. Bench "deliberately not queued" while Alan was using our agents, for the 2.6× contention noise floor. Ran 12:06–12:14Z on an idle box.
  • 2026-09-12 22:53Z — not the coding seat. Alan wanted it as a coder: "It’s more a coding model though I want to put 4.7 into dsh and open code to try it out". The assistant wrote coding-seat-ornith35b.sh instead: "Why this over glm-4.7-flash … toolcall 80.0% vs 38.3% <- notices a tool is needed … decode 55.3 t/s vs 50.2 t/s". Earlier that day Alan had asked "Why did you suddenly reach for GLM 4.7 it’s been an outlier for a while" — the assistant had confused GLM-5.2 frontier on Ollama Cloud with this model (Alan: "It was a frontier GLM model using ollama cloud").
  • 2026-09-16 20:10Z — mixed_3_6 deleted, Q4_0 kept. Inventory tier "SUPERSEDED … slower than the Q4_0 beside it (byte-alignment-governs-decode)". Alan: "Does that leave another GLM flash"; answer: the Q4_0 at 16 GB stays; Alan "Go for it then". The speed claim was inferred from a finding, not measured on this pair.
  • 2026-10-11 — Q4_0 deleted in sweep Tier B ("benched-once, abandoned"), Alan: "nuke tiers a & b" (a lab note).
What we learned, in the lab's words
  • Weak at declining. nullschema 48.6% on the Q8_0 and 44.4% on the Q4_0, both under llama.cpp schema enforcement (table below). Where it fails, it fills the field with a plausible string: {"interval": "Routine maintenance"} in the forbid arm.
  • Strong screener, with the board's then-best general result: 95.0% on Q8_0 GGUF, 96.7% on MLX q8 and q4. Screening needs no schema enforcement, so it is the one suite comparable across runtimes. Beaten 2026-08-31 by granite-guardian-4.1-8b at 100%.
  • Zero invention, many misreads on grounding: 0 invented, 21 misread, 57 abstained of 125 at Q8_0 — "zero invention is the cheap win; 21 misreads is the expensive loss" (a lab note §6).
  • Intact did not beat compressed. The Q8_0 arm did not vindicate the ≤17 GB "intact beats compressed" finding at 30 GB (a lab note). The planned Q4 arm never ran, so the comparison is one point, not two.
  • A tool selector, not a tool reacher. On the Q4_0: toolscale 100%, toolcall 38.3%. Per arm: availability 11/12, conditional 12/12, descriptive 0/12, need 0/12, unmentioned 0/12; 37 of 60 answered directly instead of calling. Ornith-1.5-35B-A3B got the coding seat on this axis.
  • Synthesis over sources is poor: worldview 37.5%, synthesis 60.0% on the Q4_0. The site's "a 7 GB model beats a 17 GB one by sixty points" card is gemma4-12b 97.5 against this 37.5.
  • KV is cheap, and the first prediction was wrong. Predicted from the HF config (20 KV heads, no GQA): 0.366 MB/token, 72.4 GB of KV at 202k, and "it does not fit on your machine at all". Measured on the ctx ladder (Q8_0, f16 KV, 8k→131k): 29.75→36.42 GB RSS, 6.67 GB of KV, about 52 KB/token, at 37.1–37.4 tok/s on every rung (KV cache decides what fits, and only measurement predicts KV). (reconstructed) The explanation is in the GGUF header read four days later: llama.cpp loads this model as deepseek2 with MLA (1 KV head, head_dim 576 → 99.9 KB/token f16), so the formula was right and the config it was fed was the wrong one. On 2026-09-12 the assistant twice re-asserted 375 KB/token with no GQA before reading the header.
  • Runtime: llama.cpp beats mlx_lm on this MoE. GGUF Q8_0 37.2 tok/s (ladder) against MLX 8-bit 21.3 tok/s (300-token probe), "bit-matched, llama.cpp 75 percent faster". Different probes, so the ratio is approximate.
  • Mixed precision beats uniform 4-bit on perplexity, and the screening suite could not see it. mixed_3_6 at 14 G scores 11.677 against q4's 14.457 at 16 G, within 0.53 of q8 (table below). Screening had ranked the mixed builds behind q4 (93.3 vs 96.7); the assistant's verdict: "screening was wrong" at n=60. This was reused as the reason to build granite-guardian at mixed_3_6.
  • MLX grounding and nullschema here are not valid measurements. mlx_lm's server accepts response_format and ignores it, so those suites measured free generation. The q8→q4 drop (grounding 76.8→53.6, nullschema 59.7→40.3) is real but unenforced.

Perplexity — four MLX builds, identical corpus

buildsize (du)perplexitypeak memorytok/s (ppl pass)
MLX q830 G11.149 ± 0.17345.49 GB481
MLX q416 G14.457 ± 0.23630.52 GB470
MLX mixed_3_614 G11.677 ± 0.17228.61 GB466
MLX mixed_4_617 G11.699 ± 0.18131.74 GB467

Command, run 2026-09-08 15:13–15:20 BST: mlx-main-venv/bin/mlx_lm.perplexity --model <build> --data-path eval/ppl-corpus --num-samples 48 --sequence-length 1024 --seed 42. Not in the run log.

Why it was tested, in the lab's words

Three separate questions, months apart, brought the model back each time.

  • "Is GLM worth a look?" (23–24 Aug). Alan, 2026-08-23 10:34Z: "which glm 4 family models are available also". The assistant advised skipping GLM-4-9B-0414 for its 32k window and named GLM-4.7-Flash the one worth a night. Alan, 2026-08-24 00:33Z: "what do you think on the glm models?" and "one model suite I'm still curious about is the glm 4 series models but we don't have to look at those now".
  • The big-MoE arm (26 Aug). Alan, 09:56Z: "Are there any interesting 105b range MOE models we can look at?". The assistant found GLM-4.7-Flash fits at Q8_0 and framed it as "the first model in your fleet running at essentially full fidelity". The written question: does the intact-beats-compressed finding, established below ~17 GB, hold at 30–45 GB? Alan, 10:41Z, against the assistant's speed prediction: "Not sure it’ll be faster". The assistant later: "you called this correctly and I didn't".
  • First MLX build anywhere (7–8 Sep). Alan, 2026-09-07 21:05Z: "also is there a glm 4.7 flash mlx build?", then "Can we quantize it?", "First model for my hugging face profile :)" and "see if it's any good first but releasing honest models isn't a bad thing".
  • As an agentic coder (12 Sep). Alan, 09:48Z: "Been watching videos on GLM 4.7 flash which is a very capable agentic coding model. We tested it on other stuff, I’m gonna have to take it for another spin"; 10:10Z "actually think glm 4.7 could be good?". The assistant's diagnosis: it "has only ever been run on extraction suites".
Open questions
  • Was Alan's DSH/opencode trial ever run? Nothing on record after 2026-09-12 23:42Z ("I’ll try coders in the morning in different harnesses").
  • Why 22.9 tok/s (26 Aug gate probe, Q8_0, b10618) against 37.2 (8 Sep ladder, same file and binary)? The gate probe was a 200-token tool-call request with reasoning; the cause is not recorded.
  • The real KV cost per token under llama.cpp: 99.9 KB/token (f16, from the header) against about 52 KB/token from ladder RSS deltas. RSS may under-report Metal allocations; this was not reconciled.
  • Never measured at all: vendor settings, chainwalk (listed in glm_bench.sh's header but not in its loop), contract, needle, and MLX speed after the mixed builds.
  • The HF upload decision was left open on 2026-09-09 and lapsed when the builds were deleted. Re-making them needs mlx-lm ≥ the 7fb4be44 commit and the bf16.
The model in detail
fieldvalue
vendorZ.ai (zai-org)
upstream repozai-org/GLM-4.7-Flash (bf16 safetensors, 48 shards, 58.2 GiB summed from the HF listing)
revisionnot on record (every hf download here was unpinned)
licenceMIT, not gated
listed on HF2026-01-19 (date column of the 2026-08-23 zai-org listing; which HF date field is not recorded)
parameters~31B total (58.2 GiB bf16 ÷ 2); 64 routed experts, 4 used per token, 1 shared; about 3B active per the reviews quoted at the time
architecture (HF config)glm4_moe_lite (Glm4MoeLiteForCausalLM); 47 layers; hidden 2048; 20 attention heads and 20 KV heads; moe_intermediate_size 1536
architecture (as llama.cpp loads it)the GGUF header says general.architecture = deepseek2: 47 layers, 1 KV head, head_dim 576 (MLA). 99.9 KB/token of f16 KV, 25.0 at q4_0
native context202,752
vendor claims quoted at selection59.2% SWE-bench, 79.5% τ²-Bench, interleaved thinking before each tool call
runtimes used hereupstream llama.cpp (b10618 eb25b7263; b10893 c32d1dabe); mlx_lm 0.32.0 git main @ 7fb4be44 for conversion (glm4_moe_lite.py was not in the 0.31.3 PyPI release)

There was no MLX build of this model anywhere on 2026-09-07 (the assistant found zero MLX repos across all 12 Flash variants). Every MLX build in the tree below was made here.