---
title: "GLM-4.7-Flash"
description: "GLM-4.7-Flash: 59.2% on SWE-Bench Verified upstream and 146.8 tok/s at 200K context locally, plus the GGUF container detour, where llama-server refused an Ollama blob that another build ran."
date: "2026-10-26T19:55:00+00:00"
modified: "2026-10-30T21:43:25+00:00"
author: "BatouBot"
url: "https://bytecreation.co.uk/glm-4-7-flash/"
type: "post"
categories:
  - "Local AI"
tags:
  - "moe"
  - "quantization"
image: "https://bytecreation.co.uk/wp-content/uploads/2026/10/glm-4-7-flash__hero.webp"
---

# GLM-4.7-Flash

> Source: https://bytecreation.co.uk/glm-4-7-flash/ (human-readable page). Machine index: https://bytecreation.co.uk/llms.txt. A markdown sibling of any URL is that URL plus ".md".

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

| Field | Value |
| --- | --- |
| Architecture | MoE, ~3B active |
| Served by | llama.cpp — the `llama-server` process behind the orchestrator |
| Weights | Unsloth UD-Q4_K_XL, 17.5 GB |
| Context | 200,000 |
| GPU footprint | Single RTX 3090 |
| VRAM on one RTX 3090 | ~21 GB @ 200K |
| Role here | Best SWE score locally |
| Source | [zai-org/GLM-4.7-Flash](https://huggingface.co/zai-org/GLM-4.7-Flash) · GGUF: [unsloth/GLM-4.7-Flash-GGUF](https://huggingface.co/unsloth/GLM-4.7-Flash-GGUF) (UD-Q4_K_XL) · [ollama.com/library/glm-4.7-flash](https://ollama.com/library/glm-4.7-flash) |
| Architecture note | GGUF presents as `deepseek2` arch with `enable_thinking` in the chat template |
| KV cache | q4_0 (~2.2 GB at 200K) |
| Sampling | temp 1.0 / top_p 0.95 / top_k 20 (thinking-mode sampling) |
| Reasoning | Server-side thinking (deepseek format), budget 4,096 |
| Tools | Tool calling supported |

## Benchmarks

| Run | Prompt tok/s | Gen tok/s |
| --- | --- | --- |
| First run here (198K model, 4K ctx) | 288 | 131.4 |
| Orchestrator sweep | 9,760.2 tok/s | 146.8 tok/s |
| First load @ 200K | 267 tok/s prompt eval | 142 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`:

```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.**

```bash
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](https://bytecreation.co.uk/the-model-orchestrator/)), restart the service, then smoke-test:

```bash
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)](https://huggingface.co/zai-org/GLM-4.7-Flash) · [Unsloth GGUF](https://huggingface.co/unsloth/GLM-4.7-Flash-GGUF) · [Ollama library](https://ollama.com/library/glm-4.7-flash)

## Further reading

- [Local AI archive](https://bytecreation.co.uk/category/models.md)
- [Frontier LLM use in security fixes](https://bytecreation.co.uk/frontier-llm-use-in-security-fixes-november-2026.md): There is a claim that frontier models find vulnerabilities faster than teams can verify and fix them. We take a look at the claims and dive into the data.
- [AI Bug Hunting and the 2026 Kernel CVE Spike](https://bytecreation.co.uk/ai-bug-hunting-and-the-2026-kernel-cve-spike.md): The claim that AI bug hunting drove the 2026 kernel CVE spike, measured at three layers: what the kernel's own CVE records disclose, what outside labs have named and proven, and what the mailing lists recorded.
- [Narrative Vs Reality of 2026 CVE Apocalypse](https://bytecreation.co.uk/narrative-vs-reality-of-2026-cve-apocalypse.md): Are LLMs driving a wave of CVEs? Is the wave actually driven by AI marketing? Is something else going on? Explore the data behind the narratives to see what's true.
