Skip to content

How-ToRAM

How to Run GLM-4.7-Flash Locally: Hardware, Downloads and Setup on a Home PC

GLM-4.7-Flash is Z.ai's free 30B mixture-of-experts model with only about 3B parameters active per token, which makes it practical on a home PC. We explain how much memory you need, which download to choose, and how to run it with Ollama, LM Studio or llama.cpp, including on a 16GB graphics card.

By , Systems & Technical Editor

4 min read

How to Run GLM-4.7-Flash Locally: Hardware, Downloads and Setup on a Home PC

7-Flash on any of our own hardware. This guide is based on Z.ai's official GLM-4.7-Flash model card, Unsloth's GLM-4.7-Flash guide and GGUF files, Ollama's model library page and the llama.cpp server documentation, all read on 6 December 2026. Where we say a PC should handle a given setup, that's our estimate, not a measured result.

GLM-4.7-Flash is a free, open-weight language model from Z.ai,, the company behind the GLM family of models. Z.ai describes it as a "30B-A3B MoE model": about 30 billion parameters in total, of which only about 3 billion are active for each token. That mixture-of-experts design is why it's interesting for home PCs. The whole model still has to sit in memory, but each token only touches a small slice of it, so it can run at usable speeds even when part of it lives in system RAM rather than on the graphics card.

It's released under the MIT licence and was published on Hugging Face in January 2026. Z.ai pitches it at coding, agent-style tool use and chat, and its own benchmark table puts it ahead of Qwen3-30B-A3B-Thinking-2507 and GPT-OSS-20B on most tests, including 59.2 on SWE-bench Verified against 22.0 and 34.0. Those are Z.ai's figures, not ours.

Step 1: Check how much memory you have

The key number is total memory: graphics card VRAM plus system RAM, or unified memory on machines that share one pool. Unsloth says GLM-4.7-Flash runs on 24GB of RAM, VRAM or unified memory, or 32GB for full precision, and that its 4-bit guide needs around 18GB. It also advises that your total available memory should exceed the size of the file you download; if it doesn't, llama.cpp can still run from the SSD, but more slowly.

Here's how the main download sizes compare, from the file listings on Hugging Face and Ollama:

Version

Approximate file size

Where

UD-Q2_K_XL (2-bit)

11.9GB

Unsloth GGUF

UD-Q3_K_XL (3-bit)

13.8GB

Unsloth GGUF

Q4_K_M (4-bit)

18.3GB (Ollama lists 19GB)

Unsloth GGUF / Ollama

UD-Q4_K_XL (4-bit)

17.5GB

Unsloth GGUF

Q6_K (6-bit)

24.7GB

Unsloth GGUF

Q8_0 (8-bit)

31.8GB (Ollama lists 32GB)

Unsloth GGUF / Ollama

BF16 (full precision)

59.9GB (Ollama lists 60GB)

Unsloth GGUF / Ollama

In our estimate, that gives these rough tiers:

  • 32GB graphics card: a 4-bit file fits entirely in VRAM with plenty of room for context, and even the 6-bit file should fit.

  • 16GB graphics card plus 32GB of system RAM: a 4-bit file won't fit on the card alone, but you can keep some of the expert weights in system RAM (see Step 4).

  • No graphics card, 32GB of RAM: a 4-bit file will run on the CPU, slowly. 64GB gives more room for context.

Remember that context uses memory too. The model supports a context window of up to 202,752 tokens according to Unsloth (Ollama lists 198K), but you won't fit anything like that on a typical home PC. Start with 16K, which is what Unsloth's own examples use. Our LLM context length and VRAM explainer covers why.

Step 2: Choose your software

You have three realistic routes on Windows:

  • llama.cpp: the most control, and the route Unsloth's guide is written around. Our llama.cpp on Windows guide covers installing it.

  • LM Studio or Jan: desktop apps built on llama.cpp. Unsloth says its GGUF works well in both.

  • Ollama: the official Ollama library has its own glm-4.7-flash model in q4_K_M, q8_0 and bf16 versions. Its page says the model requires Ollama 0.14.3, so update Ollama first. Unsloth doesn't recommend loading its GGUF files into Ollama because of possible chat template issues, so if you use Ollama, pull Ollama's own version instead.

Z.ai's model card also lists vLLM, SGLang and Hugging Face Transformers. Those are mainly for Linux servers with plenty of VRAM, and on Windows you'd need WSL 2 with GPU support.

Step 3: Download and run it

With Ollama, one command downloads the default 4-bit version (about 19GB) and starts a chat:

ollama run glm-4.7-flash

With llama.cpp, you can pull Unsloth's GGUF straight from Hugging Face. A command along the lines of Unsloth's example:

llama-cli -hf unsloth/GLM-4.7-Flash-GGUF:UD-Q4_K_XL --ctx-size 16384 --temp 1.0 --top-p 0.95 --min-p 0.01

Unsloth notes that llama.cpp fixed a bug in January 2026 that caused looping and poor output, and that it updated its GGUF files afterwards. If you downloaded the model early in 2026, download it again and update llama.cpp.

Step 4: Squeeze it onto a 16GB card

Because GLM-4.7-Flash is a mixture-of-experts model, llama.cpp can keep the expert weights of some layers in system RAM while the rest stays on the GPU. The llama.cpp server documentation describes the --n-cpu-moe N option, which keeps the MoE weights of the first N layers on the CPU. Raise N until the model loads without running out of VRAM. You'll trade some speed for fitting a bigger file, but in our estimate it's usually better than dropping to a 2-bit file. Our guide to running MoE models on low VRAM with llama.cpp walks through the process.

Unsloth passes on Z.ai's recommended sampling settings:

  • General use: temperature 1.0, top-p 0.95

  • Tool calling and coding agents: temperature 0.7, top-p 1.0

  • Repeat penalty: off, or set to 1.0

  • In llama.cpp: set min-p to 0.01, because llama.cpp's default is 0.05

Which GLM model should you run?

GLM-4.7-Flash is the GLM model that suits a normal desktop. Z.ai's newer GLM-5.3-Flash is a much bigger 320B model that needs at least 100GB of memory, even at 1-bit. Our GLM-4.7-Flash vs GLM-5.3-Flash comparison explains the differences, and our best GPUs for GLM-4.7-Flash guide covers which graphics card to buy. For other models that fit similar hardware, see our best local LLMs for 24GB of VRAM.

The bottom line

GLM-4.7-Flash is one of the easier capable open models to run at home, because its mixture-of-experts design keeps only about 3 billion of its roughly 30 billion parameters active per token. Plan for about 18 to 24GB of total memory for a 4-bit version: a 32GB graphics card holds it outright, while a 16GB card with 32GB of system RAM can run it by offloading expert weights with llama.cpp's --n-cpu-moe option. Use Ollama's own glm-4.7-flash model or Unsloth's GGUF in llama.cpp, LM Studio or Jan, and start with a 16K context.

Sources

  1. 01Z.ai, GLM-4.7-Flash model card (Hugging Face)
  2. 02Unsloth, GLM-4.7-Flash: How To Run Locally
  3. 03Unsloth, GLM-4.7-Flash GGUF files (Hugging Face)
  4. 04Ollama, glm-4.7-flash model library page
  5. 05llama.cpp, server documentation (GitHub)
  6. 06Unsloth, GLM-5.3-Flash local guide

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best GPUs for Running Microsoft Phi-4 Locally in 2026

Best Picks

Best GPUs for Running Microsoft Phi-4 Locally in 2026

Phi-4 is a dense 14B model, so VRAM decides how well it runs. We pick the best graphics cards for running Microsoft's Phi-4 locally, from 16GB RTX 5060 Ti and RX 9060 XT cards to the 12GB RTX 5070, the 32GB RTX 5090 and an 8GB card for Phi-4-mini, based on official specs and file sizes.

Hannah Vance4 min

Phi-4 vs Phi-4-mini for Local AI: Which Microsoft Model Suits Your PC?

Versus

Phi-4 vs Phi-4-mini for Local AI: Which Microsoft Model Suits Your PC?

Microsoft's Phi-4 and Phi-4-mini share a name but suit very different PCs. We compare the 14B Phi-4 with the 3.8B Phi-4-mini on Microsoft's benchmark scores, context window, languages, function calling, download sizes and the VRAM each needs, to help you pick the one your hardware can run.

Callum Reid3 min

How to Run Microsoft Phi-4 Locally: Hardware, Downloads and Setup on a Home PC

How-To

How to Run Microsoft Phi-4 Locally: Hardware, Downloads and Setup on a Home PC

Microsoft's Phi-4 is a free, MIT-licensed 14B model whose 4-bit version is only about 9GB, so it suits ordinary gaming PCs. We explain which Phi-4 model to pick, how much VRAM each needs, and how to run it with Ollama, LM Studio or llama.cpp, including the settings Microsoft recommends for Phi-4-reasoning.

Marcus Thorne4 min