Blog

/

Guides

/

How to Run GLM Locally: A Complete Guide

How to Run GLM Locally: A Complete Guide

GLM models by Z.ai are among the most powerful open-weight language models you can run on your own machine. This guide covers choosing a GLM model for your hardware, installing a local AI app, and running GLM fully offline.

How to Run GLM Locally: A Complete Guide

Table of Contents

GLM models by Z.ai are among the most powerful open-weight language models that you can run locally. In this guide, you'll learn:

  • How to choose the right GLM model for your hardware
  • How to install a local AI app to run GLM
  • How to run a GLM model offline

What is GLM?

GLM stands for General Language Model — it's a model family developed by Z.ai, the Beijing-based AI lab formerly known as Zhipu AI. They're known for creating some of the most powerful open source models. You can browse the latest GLM releases on Hugging Face.

The current lineup of open-weight GLM models:

ModelArchitectureContextPrimary Use
GLM-4.7-FlashMoE, 30B total / ~3.6B active200KCoding and agentic tasks on consumer hardware
GLM-4.7MoE, 355B total / 32B active200KAdvanced coding and reasoning on workstations
GLM-5.1MoE, 753.9B total / ~40B active198KFrontier-class agentic coding
GLM-5.2MoE, 753.3B total / ~40B active1MFrontier-class reasoning and coding

GLM models use a Mixture-of-Experts (MoE) architecture, which activates only a subset of parameters per query. For example, GLM-4.7-Flash contains roughly 30 billion parameters, but only about 3.6 billion are active for each generated token. This makes bigger GLM models easier to run by reducing computational cost during inference — and, as we'll see in the hardware section, it also makes GLM models unusually good candidates for CPU offloading.

GLM models are also known for:

  • A strong reasoning ("thinking") mode
  • Robust tool-calling support — Z.ai trains them specifically for coding agents.

GLM model benchmarks

The table below shows how GLM models score on Artificial Analysis's Intelligence Index, which evaluates different models using a common scoring system.

We've included Gemini 3.6 Flash as a proprietary cloud control and Kimi K3, the only open-weight model scoring higher, for context. Scores are Intelligence Index v4.1; GLM-4.7-Flash's is Artificial Analysis's estimate rather than a full run.

ModelIntelligence Index
Kimi K357
GLM-5.2 (reasoning)51
Gemini 3.6 Flash50
GLM-4.7 (reasoning)34
GLM-5.2 (non-reasoning)34
GLM-4.7-Flash (reasoning)23

Z.ai also publishes evaluations that show that GLM-5.2 performance is close to that of Opus 4.8:

BenchmarkGLM-5.2GLM-5.1GLM-4.7Claude Opus 4.8
AIME 202699.295.3
GPQA-Diamond91.286.285.793.6
Terminal-Bench 2.181.063.585.0
FrontierSWE74.430.575.1
SWE-bench Pro62.158.469.2
HLE (with tools)54.752.342.857.9

How to Run GLM Locally

To run GLM (or any AI model family) locally, you'll need an application that downloads the model files and executes them on your machine — an inference app.

In this guide, we'll use Atomic Chat, a free and open-source local AI application we've built, as an example, but you can just as easily use Ollama, LM Studio, or another AI inference provider.

We'll be running GLM from a GGUF file — this is a standard format supported by popular inference engines and applications, including Ollama and LM Studio.

1. Install Atomic Chat

If you decide to follow along with Atomic Chat, here's how to install it. Go to atomic.chat and select the build for your platform.

  • macOS — a universal .dmg for Apple Silicon (M1 or later).
  • Windows — an .exe installer for x64.
  • Linux — a self-contained .AppImage for x86_64, which needs no root.
  • iOS — through the App Store.
  • Android — through Google Play.

Atomic Chat download options for all platforms

On Linux, mark the AppImage executable with chmod +x and run it directly. If the app asks about FUSE on first launch, install it with sudo apt install fuse libfuse2 on Debian or Ubuntu, or sudo dnf install fuse fuse-libs on Fedora.

2. Find a GLM Model

Once Atomic Chat is installed, open the application → Models. The Models catalog shows all open-weight models available on Hugging Face that you can run, making it easy to browse, download, and manage local LLMs.

To search for GLM, click into the search box → Enter glm. This displays available GLM models.

Searching for GLM in the Atomic Chat model catalog

Model cards show:

  • Parameter count — the size of the model, such as 29.9B for GLM-4.7-Flash.
  • Context length — the model's maximum supported context window.
  • Tags — metadata such as GGUF (the model format) and Vision (whether it offers multimodal processing).
  • Download size — the size of the selected model file on disk.

By default, results are sorted by the newest releases. You can also enable the Downloaded filter to show only models that are already available on your machine.

3. Download a GLM Model

To download the recommended version of a model, click Download.

If you'd like to choose a specific quantization instead, select Show variants to view every available GGUF release.

GLM-4.7-Flash quantization variants in Atomic Chat

A single model is typically available in multiple quantizations. For example, GLM-4.7-Flash is offered as variants such as:

  • Q2_K
  • Q3_K_M
  • Q4_K_M
  • IQ4_XS

These are quantization levels, and they refer to how the model weights were compressed. Smaller quantizations (like Q2) require less storage and memory, while larger ones (like Q8 or Q16) generally preserve more of the original model's accuracy. Learn what GGUF is and how quantization works.

Later in the article we'll explain how to select the right quant for your system.

4. Start Chatting with GLM

Once the download finishes, Atomic Chat automatically loads the model and opens it in the built-in chat interface.

Chatting with GLM-4.7-Flash in Atomic Chat

That's it!

GLM Hardware Requirements

Here's how much memory you'll need to run GLM at several common quantization levels — these are recommended totals, with headroom for the KV cache and system resources already included:

Model2-bit4-bit8-bitBF16
GLM-4.7-Flash~16 GB~24 GB~36 GB~64 GB
GLM-4.7~128 GB~210 GB~400 GB~750 GB
GLM-5.1~245 GB~490 GB~880 GB (FP8)>1.5 TB
GLM-5.2~245 GB~490 GB~880 GB (FP8)>1.5 TB

For example, the 4-bit build of GLM-4.7-Flash is a ~17 GB file — the ~24 GB in the table adds the 3–4 GB that the KV cache and system resources typically take on top of the weights.

Other GLM variants are essentially workstation-class or beyond, though you can still run them on rented GPUs. We explain that process in this article: How to run Kimi K3 on rented graphics cards.

And here are some recommendations by hardware for running GLM on your personal system or via rented GPUs:

HardwareModelQuantization
MacBook Air M2/M3 (16 GB)GLM-4.7-FlashIQ2 / Q3
MacBook Pro M4 Pro (24 GB)GLM-4.7-FlashQ4
RTX 3090 / RTX 4090 (24 GB VRAM)GLM-4.7-FlashQ4
MacBook Pro M4/M5 Max (36–48 GB)GLM-4.7-FlashQ4 or Q8
Mac Studio / workstation (64 GB+)GLM-4.7-FlashQ8 or BF16
MacBook Pro / Mac Studio (128 GB)GLM-4.72-bit dynamic
Mac Studio M3 Ultra (256 GB+)GLM-5.22-bit dynamic
24 GB GPU + 256 GB system RAMGLM-5.22-bit dynamic

As we already mentioned, GLM uses a Mixture-of-Experts (MoE) architecture, which makes GPU offloading more practical than with dense models. GLM-5.2, for example, uses around 40B of its 753B parameters per token. This allows inference engines to keep attention layers and shared weights on the GPU while moving expert layers to system RAM. A setup with a 24 GB GPU and 256 GB of RAM can run GLM-5.2 this way, although performance is limited. Expect around 3–9 tokens per second.

For comparison, GLM-4.7-Flash fits entirely in VRAM and can reach around 60–100 tokens per second on similar hardware.

GLM's large MoE models also handle aggressive quantization better than smaller dense models. While 2-bit quantization can significantly damage a compact model, frontier-scale MoE models have enough parameter redundancy to remain usable at lower bit depths. With that in mind, some of the most useful GLM builds are Unsloth's dynamic GGUF releases:

  • GLM-5.2 UD 2-bit — 238 GB, compared to 1.51 TB in BF16. According to Unsloth's tests, it retains around 82% of full-precision accuracy and requires roughly 245 GB of combined RAM, VRAM, or unified memory.
  • GLM-5.2 UD 1-bit — 217 GB. Provides the smallest memory footprint, with around 76% accuracy, making it suitable for 256 GB systems that need additional context space.
  • GLM-5.2 UD-Q4_K_XL / UD-Q5_K_XL — near-lossless quality, intended for multi-GPU systems with 500 GB or more memory.
  • GLM-4.7 2-bit dynamic — around 120 GB, allowing the 355B model to run on 128 GB unified-memory Macs.

Frequently Asked Questions

The questions that come up most often when people set out to run GLM locally.

How much RAM or VRAM do you need to run GLM locally?

You need about 24 GB of RAM, VRAM, or unified memory to run GLM-4.7-Flash at 4-bit quantization. Hardware requirements for other GLM models:

  • GLM-4.7: ~210 GB recommended at 4-bit quantization
  • GLM-5.1 and GLM-5.2: ~245 GB recommended at 2-bit dynamic quantization

These figures refer to VRAM requirements for GPU inference or unified memory on Apple Silicon Macs.

Can you run GLM-5.2 locally?

Theoretically yes, although you need workstation-grade graphics cards to run GLM-5.2 locally. For example, Unsloth's 2-bit dynamic GGUF release of GLM-5.2 requires a 256 GB unified-memory Mac Studio, or a Linux box pairing a 24 GB GPU with 256 GB of system RAM via MoE offloading, without accounting for KV cache. GLM-4.7-Flash is the best GLM model to run locally, as it can run on a single 24 GB GPU.

Is GLM 5.2 free?

Yes, GLM-5.2 is released under the MIT license, so downloading and running it locally is free — you only pay for electricity. Most apps that run GLM models are also free. This includes Ollama, LM Studio, and our own local AI app — Atomic Chat.

Which GLM model should I use?

If you're running GLM locally on consumer hardware, we recommend downloading GLM-4.7-Flash at 4-bit quantization — it's one of the best models in its class, and you can run it on a single 24 GB GPU or a Mac with that amount of unified memory.

Can GLM run offline?

Yes, GLM can run completely offline after the model has been downloaded. When used with a local inference application, prompts and responses are processed on your own device.

Is GLM free for commercial use?

Yes, GLM open-weight models are released under the MIT license — one of the most permissive licenses available. It allows:

  • Commercial use
  • Modification
  • Redistribution

Bottom line

GLM is one of the strongest open-weight model families available today. While the flagship GLM-5.2 can run locally with enough memory, GLM-4.7-Flash is the best GLM model to run on consumer hardware. Once you've picked a model, all you need is a local inference engine such as Atomic Chat, LM Studio, or Ollama. Download a GGUF build, load it into your preferred app, and you're ready to run GLM entirely offline.

Related guides

If you're comparing local AI models or setting up your first local LLM, these guides may also help:

How to Run Qwen Models Locally: A Complete Guide

How to Run Qwen Models Locally: A Complete Guide

Learn how to run Qwen locally: pick the right model for your hardware, download the best GGUF quantization, and chat offline using Atomic Chat.

7/30/26

12 min

How to Run Kimi K3 Locally: A Complete Setup Guide

How to Run Kimi K3 Locally: A Complete Setup Guide

Run Kimi K3 locally: hardware requirements, Atomic Chat setup, renting 8x B300 GPUs on Vast, real costs, and the errors I hit along the way.

7/29/26

14 min

How to Run Gemma 4 Locally: a step-by-step guide

How to Run Gemma 4 Locally: a step-by-step guide

Run Google’s Gemma 4 models on your own machine. Pick the right size for your RAM or VRAM, choose a GGUF quantization, and start chatting locally.

7/28/26

8 min

How to Run Hermes Agent Locally (via Atomic Chat)

How to Run Hermes Agent Locally (via Atomic Chat)

Run Nous Research’s Hermes Agent locally, powered by a local model served through Atomic Chat — no cloud account and no API key. A step-by-step guide.

7/27/26

9 min