GLM-4.7-Flash

59.2% SWE-Bench Verified, 146.8 gen tok/s on one RTX 3090

GLM-4.7-Flash header plate: model name, tagline "Small-MoE speed pick", spec matrix with struck-through stock benchmark gen 131 tok/s and tuned benchmark gen 146.8 tok/s, context 200,000, GPU 1 x RTX 3090, VRAM ~21 GB at 200K, arch MoE ~3B active, slot chip glm-4-7-flash.

GLM-4.7-Flash carries the lineup’s benchmark headline: 59.2% on SWE-Bench Verified upstream, and it runs here at 146.8 tok/s with 200K context, prefilling at ~10k tok/s, second only to the coder model in the sweep.

Getting it to load was a GGUF detour worth knowing about: the first copy came from an Ollama blob (the glm4moelite architecture) and standalone llama-server flatly rejected it, Ollama only ran it because it ships a patched fork. The fix was a community deepseek2-architecture GGUF (Unsloth UD-Q4_K_XL, 17.5 GB) that loads unmodified. Same weights, different container: one loaded, one did not.

First measured run here: 131.4 tok/s at 4K context. Tuned, it sits at 146.8 with 50 times the working memory.

Specifications

FieldValue
ArchitectureMoE, ~3B active
Served byllama.cpp — the llama-server process behind the orchestrator
WeightsUnsloth UD-Q4_K_XL, 17.5 GB
Context200,000
GPU footprintSingle RTX 3090
VRAM on one RTX 3090~21 GB @ 200K
Role hereBest SWE score locally
Sourcezai-org/GLM-4.7-Flash · GGUF: unsloth/GLM-4.7-Flash-GGUF (UD-Q4_K_XL) · ollama.com/library/glm-4.7-flash
Architecture noteGGUF presents as deepseek2 arch with enable_thinking in the chat template
KV cacheq4_0 (~2.2 GB at 200K)
Samplingtemp 1.0 / top_p 0.95 / top_k 20 (thinking-mode sampling)
ReasoningServer-side thinking (deepseek format), budget 4,096
ToolsTool calling supported

Benchmarks

RunPrompt tok/sGen tok/s
First run here (198K model, 4K ctx)288131.4
Orchestrator sweep9,760.2 tok/s146.8 tok/s
First load @ 200K267 tok/s prompt eval142 tok/s gen

UD-Q4_K_XL chosen over plain Q4_K_M: better quality per byte at no decode-speed cost.

Stock vs tuned. First measured here: 131.4 tok/s at 4K context (published community estimate: ~100–142 tok/s). Tuning carries it to 146.8 at 200K context, faster and with 50× the working memory.

Memory & CPU

~21 GB VRAM at 200K on one card. Per-slot RSS ~1–2 GiB; CPU negligible.

Local config

Verbatim entry from /mnt/data/llama-models/registry.json:

{
  "gguf": "/mnt/data/llama-models/glm-4.7-flash/model.gguf",
  "ctx_size": 200000,
  "gpu_layers": 99,
  "flash_attention": true,
  "cache_type_k": "q4_0",
  "cache_type_v": "q4_0",
  "ubatch": 256,
  "batch": 2048,
  "temperature": 1.0,
  "top_p": 0.95,
  "top_k": 20,
  "reasoning": true,
  "reasoning_format": "deepseek",
  "chat_template_kwargs": "{"enable_thinking":true}",
  "fit_gpu": [
    0,
    1
  ],
  "family": "glm",
  "wide_slot": false,
  "n_cpu_moe": 0,
  "attachment": false,
  "tool_call": true,
  "output_limit": 32768,
  "reasoning_budget": 4096
}

Build it yourself

Hardware. Model runs on 1 x RTX 3090 24G. Any llama.cpp build that supports the deepseek2 architecture runs it.

  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads, Zen 3
  • Motherboard: ASUS ROG STRIX X570-E GAMING WIFI II (AM4, ATX)
  • GPU: 2× NVIDIA GeForce RTX 3090, 24 GB VRAM each (the model needs one card)
  • Total VRAM: 48 GB (2 × 24 GB)
  • System RAM: 128 GB DDR4 (~121.5 GiB usable)
  • Storage: 2 TB KIOXIA EXCERIA NVMe SSD
  • OS: Ubuntu 26.04.1 LTS, headless
  • CUDA: toolkit at /usr/local/cuda-13.1
  • PCIe topology: both GPUs on the CPU root complex. X8/x8 split when both slots populated (normal for this board); Gen1 at idle → PCIe 4.0 x8 under load. Nvidia-smi topo -m shows PHB between GPUs. No NVLink
  • Cooling/chassis: open mining rig (GPU spacing + rig fans, no case). GPU 0 peaks ~73–74 °C under dual load. Routine sw_thermal/sw_power_cap throttle to ~76 °C is normal
  • Kernel mitigations in place: pcie_aspm=off, LimitMEMLOCK=infinity, orchestrator MemoryMax=110G

Download.

hf download unsloth/GLM-4.7-Flash-GGUF 
  GLM-4.7-Flash-UD-Q4_K_XL.gguf --local-dir /mnt/data/llama-models/glm-4.7-flash

Verify the architecture in the GGUF (llama-gguf llm.architecture) before assuming any build can serve it, that was the whole blocker here.

Register & serve. Add an entry to your registry.json (schema in the orchestrator post), restart the service, then smoke-test:

curl -s http://127.0.0.1:8010/v1/chat/completions 
  -H "Content-Type: application/json" 
  -d '{"model":"glm-4.7-flash","messages":[{"role":"user","content":"What is 2+2? Answer with just the number."}],"max_tokens":64}'

A correct short answer with no errors means the model is live on the endpoint. Watch GET /health while a slot loads (~20–40 s warm for this size).

Gotchas

  • The failure mode to expect when migrating from Ollama blobs to standalone llama.cpp is architecture mismatch: Ollama’s patched fork hides incompatibilities.
  • Thinking-mode sampling (temp 1.0 / top_p 0.95) is deliberate. Instruct-style sampling degrades its reasoning.
  • If you are used to Ollama’s glm4moelite tag, expect a re-download, the GGUF containers differ.

Links. Model card (MIT) · Unsloth GGUF · Ollama library

Leave a Reply

Your email address will not be published. Required fields are marked *