To self-host GLM-5.2 in production you realistically need ~8× NVIDIA H200 (1,128 GB) to fit the official zai-org/GLM-5.2-FP8 checkpoint at about 750 GB plus KV cache — a six-figure-class rig that only beats hosted access at very high, sustained volume. For almost everyone, Z.ai's direct API ($1.40 input / $4.40 output per 1M tokens), OpenRouter's current GLM-5.2 route ($0.95 / $3.00 per 1M), or the GLM Coding Plan (starting at $18/mo, limited to supported coding tools) is cheaper. A consumer 4×RTX 4090 box can technically run heavy GGUF/offload builds, but it is a hobby path, not serving infrastructure. GLM-5.2 is MIT-licensed open weights (753B params, ~40B active, 1M context), released June 16, 2026.
What are GLM-5.2’s GPU requirements to self-host?
To serve GLM-5.2 at full quality you need roughly 750 GB of GPU memory for the official FP8 weights, which in practice means a single node of 8× NVIDIA H200 SXM5 (1,128 GB total) once you leave headroom for the KV cache and activations. Hugging Face reports 753B parameters, while vLLM/Unsloth describe the deployment shape as a roughly 743–744B-class MoE with about 39–40B active per token. The model is far lighter to run than to store — but the weights still have to live in memory somewhere, and that is what sets the hardware floor. The full BF16 checkpoint is about 1.5 TB, which would push you to roughly 16 H200s or a multi-node setup; FP8 halves that to the 8-GPU node most people target.
The 1M-token context window (up from 200K in GLM-5.1) is the second budget line nobody warns you about. KV cache grows with context length, and at full 1M tokens it can rival the weights for memory. GLM-5.2’s IndexShare design — a shared indexer across every four sparse-attention layers, reported by Z.ai to cut per-token FLOPs ~2.9× at 1M context — is what makes the long window tractable at all, but you should still size for KV cache, not just weights. The table below maps each quantization level to a realistic GPU configuration and the speed you can actually expect.
| Precision / quant | Approx. weight size | Realistic config | Expected speed |
|---|---|---|---|
| BF16 (full) | ~1.5 TB | 16× H200 / multi-node | Production throughput |
| FP8 (official checkpoint) | ~750 GB | 8× H200 SXM5 (1,128 GB) | Production throughput |
| 4-bit GGUF | ~372–475 GB | Multi-GPU + RAM offload | Usable, reduced quality |
| 2-bit UD-IQ2_M (Unsloth) | ~239–245 GB | 1×24GB+ GPU with 256GB+ RAM minimum; 4×4090/3090 is more comfortable | Hobby/offload tier |
Serving is handled by vLLM (v0.23.0+) or SGLang (v0.5.13.post1+) for the GPU-resident FP8/BF16 path, and llama.cpp for local GGUF quants. If you are still choosing between serving engines, our breakdown of vLLM vs TensorRT-LLM vs SGLang in 2026 covers the throughput and prefix-caching trade-offs that matter once the model fits.
Can a 4x RTX 4090 rig actually run GLM-5.2?
Yes — but only as a hobbyist setup, not a server. Unsloth's dynamic 2-bit GGUF path puts the smallest practical build around 239–245 GB and documents CPU/GPU hybrid offload, even down to a 24 GB GPU plus 256 GB+ system RAM. A 4× RTX 4090 or 3090 box gives more VRAM to offload into, but throughput is community- and setup-dependent rather than a primary-sourced number. Treat it as useful for offline experimentation or privacy-sensitive one-off tasks, not concurrent users or low latency.
The reason is bandwidth, not capability. Once weights spill to system RAM, every token has to shuttle data across the PCIe bus, and that link is orders of magnitude slower than on-package HBM. So the 4×4090 answer to “can it run?” is a qualified yes, while the answer to “can it serve users?” is no. If you want local inference for a smaller flagship-class model on consumer or prosumer Blackwell silicon, the trade-offs in our DeepSeek V4 GPU requirements guide are a useful comparison point — different model, same physics.
A 2-bit quant that loads is not the same as a 2-bit quant that is worth using. Aggressive quantization degrades reasoning and code quality, and the degradation is hardest to see on easy prompts and most painful on the long-horizon coding tasks GLM-5.2 is actually marketed for. Treat sub-4-bit as a “does it boot” tier, not a production tier.
How much does the GLM-5.2 API and Coding Plan cost?
The cheapest reliable way to use GLM-5.2 depends on whether you are doing coding-agent work or general API work. Z.ai's direct API price is $1.40 per million input tokens and $4.40 per million output tokens. OpenRouter currently lists GLM-5.2 at $0.95 input / $3.00 output per million tokens. The GLM Coding Plan starts at $18/month, but it is not a general API substitute: Z.ai documents it as limited to officially supported coding tools/products and dedicated coding endpoints, with subscription benefits restricted outside that scope.
The plan quotas are generous but finite. Z.ai documents approximate 5-hour limits of 80 prompts on Lite, 400 on Pro and 1,600 on Max, with weekly limits of about 400 / 2,000 / 8,000 prompts. GLM-5.2 consumes quota faster than smaller models: 3× during peak hours and 2× off-peak, with a temporary 1× off-peak benefit through the end of September. For a daily coding assistant that fits those limits, the flat plan can be cheaper than metered billing; for a product API, use direct Z.ai or OpenRouter pricing instead.
But that sticker price hides a real cost driver: token burn. GLM-5.2 averages around 43,000 output tokens per Artificial Analysis Intelligence Index task (up from ~26k for GLM-5.1, as flagged by Simon Willison) — a verbose, reasoning-heavy model. That benchmark-suite average is a useful proxy for real workloads: at $4.40 per million output tokens, 43K tokens is roughly $0.19 of output per task before you count input. Run a few hundred agent tasks a day and the metered API stops looking cheap; the flat Coding Plan, if your usage fits its limits, becomes the rational choice. This is the single correction missing from almost every comparison: per-token price is meaningless without per-task token volume.
| Access path | Cost | Best for |
|---|---|---|
| GLM Coding Plan | Starts at $18/mo; supported coding tools only | Daily coding/agent use within plan limits |
| Z.ai direct API | $1.40 in / $4.40 out per 1M | General metered API access |
| OpenRouter route | $0.95 in / $3.00 out per 1M | Bursty, low-volume, or routing-flexible API access |
| Self-host (8×H200) | Cloud rent ~$34.5–50.44/hr, plus storage/egress | Very high sustained volume, data residency |
Self-host vs API: what is the break-even?
Self-hosting only wins at sustained, high-volume throughput — for individuals and most teams the API or Coding Plan is cheaper by a wide margin. Published H200 cloud prices put an 8×H200 setup around $34.5/hr on RunPod-class H200 pricing or $50.44/hr on CoreWeave on-demand H200 pricing, roughly $25k–$36k/month at 720 hours before storage, networking and operations. At Z.ai direct output pricing ($4.40/M), that is about 5.6B–8.3B output tokens/month before self-hosting wins on output-token price alone; at OpenRouter's current $3/M output price, it is about 8.3B–12.1B output tokens/month. That is a serious production workload, not a side project. The decision flow below routes you to the right answer.
One practical nuance: self-hosting buys more than cost control at scale. It buys data residency (your prompts never leave your infrastructure, which matters under the EU AI Act’s transparency and the GDPR’s data-handling obligations) and the freedom to fine-tune the MIT-licensed weights. If those constraints apply, the break-even math is secondary — you self-host because you have to, then optimize cost. For everyone else, treat self-hosting as the last resort it is.
How does GLM-5.2 actually benchmark vs GPT-5.5?
GLM-5.2 posts genuinely strong scores, but the head-to-head claims against GPT-5.5 are vendor- and leaderboard-reported, not independently audited — treat them as directional. The official Hugging Face FP8 card lists SWE-Bench Pro 62.1, GPQA-Diamond 91.2, AIME 2026 99.2, HLE 40.5 text-only, and HLE 54.7 with tools; the tool-enabled and competitor figures are starred/vendor-evaluation numbers, so do not read them as independent lab results. On independent aggregators, Artificial Analysis put its Intelligence Index v4.1 at 51, the leading open-weights model, and Code Arena ranked it #2 on WebDev, behind Claude Fable 5.
The widely repeated “beats GPT-5.5” headline rests on deltas like FrontierSWE 74.4% vs 72.6% and SWE-Bench Pro 62.1 vs 58.6. Those are real reported figures, but they are Z.ai’s framing on benchmarks the vendor selected, and a one-to-two-point lead on a single eval is well inside the noise of how these tests are run. The honest reading: GLM-5.2 is in the same tier as the top proprietary models on agentic coding, at open-weights cost — not categorically “better.” For where the closed frontier sits on this leaderboard, see our breakdown of Claude Fable 5 pricing and limits, the model currently ahead of it on WebDev.
Verified (HF model card / independent aggregators): MIT license, 753B params, 1M context, official FP8 checkpoint, SWE-Bench Pro 62.1, GPQA 91.2, Artificial Analysis Index 51, Code Arena WebDev #2. Vendor/leaderboard-reported, treat as directional: all head-to-head deltas vs GPT-5.5 (FrontierSWE 74.4% vs 72.6%, SWE-Bench Pro 62.1 vs 58.6), starred tool-enabled results such as HLE 54.7, and the “1/6th the cost” cost-comparison framing.
How do you access GLM-5.2 (download and endpoints)?
You have four concrete entry points, and the right one depends on whether you want weights, a flat plan, metered tokens, or a Claude-compatible drop-in. The weights are on Hugging Face under zai-org/GLM-5.2 (MIT license); the Z.ai API ships an Anthropic-compatible endpoint that works as a drop-in for existing Claude Code and Agent SDK setups; OpenRouter aggregates metered access; and 20+ third-party coding environments wired it in at launch. Pin your serving-engine versions — GLM-5.2 needs vLLM v0.23.0+ or SGLang v0.5.13.post1+; older builds will not load it.
# 1) Download the open weights (MIT) from Hugging Face
huggingface-cli download zai-org/GLM-5.2 --local-dir ./glm-5.2
# 2) Serve FP8 yourself (needs the version pins below)
pip install "vllm>=0.23.0" # or: pip install "sglang[all]>=0.5.13.post1"
vllm serve zai-org/GLM-5.2 --quantization fp8 --tensor-parallel-size 8
# 3) Drop-in for Claude Code / Agent SDK via Z.ai's
# Anthropic-compatible endpoint (point the base URL at Z.ai)
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_API_KEY="your-zai-key"
# 4) Or call it metered through OpenRouter (OpenAI-compatible)
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_KEY" \
-d '{"model":"z-ai/glm-5.2","messages":[{"role":"user","content":"hi"}]}'
When should you pick GLM-5.2 over an inference API, NIM, or DeepSeek V4?
Pick GLM-5.2 when you want top-tier open-weights coding quality with the option to self-host or use a cheap flat plan; pick a managed alternative when operational simplicity matters more than weight ownership. If you just want a reliable hosted endpoint and do not care which model is underneath, a broad comparison like our best inference APIs for 2026 is the better starting point. If you are an enterprise standardized on NVIDIA and want a supported, packaged microservice, NVIDIA NIM is the route — weigh it with our NIM pricing and limits guide and the broader NIM alternatives rundown.
Against DeepSeek V4 specifically, the split is licensing and hardware target: GLM-5.2 leads with MIT open weights and an Anthropic-compatible endpoint that suits Claude-tool migrants, while DeepSeek V4’s story is tightly coupled to Blackwell-class serving — the DeepSeek V4 GPU requirements guide covers that path. And if your actual goal is shipping code with an assistant rather than running a model, GLM-5.2 is a backend, not a product — our best AI coding assistants for 2026 covers the tools that call models like this one. (Note: GLM-5.2 is the flagship LLM; if you arrived looking for Z.ai’s document model, that is a different product covered in GLM-OCR explained.)
FAQ
How many GPUs do you need to run GLM-5.2?
For production-quality serving, about 8× NVIDIA H200 SXM5 (1,128 GB) to hold the ~744 GB FP8-quantized weights (FP8 via runtime quantization in vLLM/SGLang; the HF card ships BF16/F32) plus KV cache and activations. Full BF16 (~1.51 TB) needs roughly double that, around 16 H200s or a multi-node setup. Consumer multi-GPU rigs can only run heavily quantized GGUF builds via CPU/GPU offload, at single-digit tokens per second.
How much VRAM does GLM-5.2 need?
FP8-quantized weights are about 744 GB and the BF16 checkpoint shipped on Hugging Face is about 1,488 GB, so you size GPU memory to those numbers plus KV cache for the 1M-token context. (There is no official FP8 checkpoint — FP8 is produced at load time by vLLM/SGLang.) Unsloth’s 2-bit dynamic GGUF (UD-IQ2_M) drops the minimum to roughly 245 GB of combined VRAM plus system RAM, but at a steep quality and speed cost.
Can I run GLM-5.2 on RTX 4090s?
Yes, technically. A 4× RTX 4090 (or 3090) box with 256 GB+ of system RAM can load a 2-bit GGUF quant through CPU/GPU hybrid offload, but throughput is only about 3–6 tokens per second. That is acceptable for a single offline session or experimentation, but it cannot serve concurrent users or low-latency workloads.
How much does the GLM-5.2 API cost?
Aggregated metered pricing via OpenRouter is roughly $1.40 per million input tokens and $4.40 per million output tokens. The flat GLM Coding Plan runs about $3–6/mo (Lite), $15–19/mo (Pro), and $80/mo (Max). Because GLM-5.2 averages around 43,000 output tokens per Artificial Analysis Intelligence Index task (up from ~26k for GLM-5.1) and is similarly verbose on real work, heavy daily users usually find the flat Coding Plan cheaper than metered billing.
Is GLM-5.2 really better than GPT-5.5?
It is in the same top tier, but “better” is overstated. The lead claims (FrontierSWE 74.4% vs 72.6%, SWE-Bench Pro 62.1 vs 58.6) are vendor- and leaderboard-reported on benchmarks Z.ai selected, with margins inside normal eval noise. Independently, Artificial Analysis rates it the leading open-weights model (Index 51) and Code Arena puts it #2 on WebDev behind Claude Fable 5. Treat head-to-head deltas as directional, not audited.
Is GLM-5.2 open source, and what license?
GLM-5.2 is released as open weights under the MIT license, confirmed on the official Hugging Face card (zai-org/GLM-5.2). That permits commercial use, fine-tuning and self-hosting. It is a 753B-parameter Mixture-of-Experts model with ~40B active parameters and a 1M-token context window, publicly released June 16, 2026 (June 13 for GLM Coding Plan subscribers).
Can GLM-5.2 replace Claude in my existing tools?
Often yes. Z.ai exposes an Anthropic-compatible endpoint, so tools built for Claude Code or the Claude Agent SDK can point their base URL at Z.ai and use GLM-5.2 as a drop-in backend. You also get OpenAI-compatible access through OpenRouter, and the raw MIT weights on Hugging Face if you want to self-host behind your own API.
Bibliography (5 sources)
Sources prioritise the official Hugging Face model card and independent hands-on analysis as primary; quant sizes draw on Unsloth’s run guide; benchmark head-to-head deltas and cost-comparison framing are treated as vendor/leaderboard-reported, not independently audited. Links accessed June 2026.
- Z.ai / Zhipu AI — Hugging Face model card: zai-org/GLM-5.2 (June 2026). Primary canonical spec and license source: MIT, 753B params, 1M context, SWE-Bench Pro 62.1, GPQA-Diamond 91.2, BF16/F32 tensors, vLLM/SGLang deployment support. huggingface.co/zai-org/GLM-5.2
- Simon Willison — “GLM-5.2 is probably the most powerful text-only open weights LLM” (June 17, 2026). Independent hands-on: release timeline, ~1.51 TB size, Artificial Analysis Index 51, Code Arena WebDev #2, OpenRouter pricing, ~43k output tokens per Intelligence Index task (up from 26k). simonwillison.net
- Unsloth — How to Run GLM-5.2 Locally (2026). Official quant/run guide: dynamic GGUF quants and the ~245 GB 2-bit UD-IQ2_M minimum used in the VRAM table. unsloth.ai
- llm-stats.com — AI model release log (June 2026). Independent release tracker cross-confirming GLM-5.2 (Zhipu AI / Z.ai) as an open-source release dated June 16, 2026. llm-stats.com
- VentureBeat — Z.ai’s open-weights GLM-5.2 beats GPT-5.5 on multiple long-horizon coding benchmarks for 1/6th the cost (June 2026). Trade-press framing for the cost angle; benchmark deltas (SWE-Bench Pro 62.1 vs 58.6; FrontierSWE 74.4% vs 72.6%) treated as Z.ai-reported. venturebeat.com
