Skip to content
Updated minutes ago
Zhipu

GLM-4 9B

Zhipu AI · dense · 9.4B parameters · 131,072 context

Quality
50.0

Parameters

9.4B

Context Window

128K tokens

Architecture

Dense

Best GPU

A100 40GB SXM

Cheapest API

$0.15/M

Intelligence Brief

GLM-4 9B is a 9.4B parameter DENSE model from Zhipu AI, featuring Grouped Query Attention (GQA) with 40 layers and 4,096 hidden dimensions. With a 131,072 token context window, it supports tools, structured output, code, math, multilingual. The most cost-effective API deployment is via zhipu at $0.15/M output tokens. For self-hosted inference, A100 40GB SXM delivers optimal throughput at $807/month.

Architecture Details

TypeDENSE
Total Parameters9.4B
Active Parameters9.4B
Layers40
Hidden Dimension4,096
Attention Heads32
KV Heads2
Head Dimension128
Vocab Size151,552

Memory Requirements

BF16 Weights

18.8 GB

FP8 Weights

9.4 GB

INT4 Weights

4.7 GB

KV-Cache per Token40960 bytes
Activation Estimate1.00 GB

GPU Compatibility Matrix

GLM-4 9B is compatible with 90% of GPU configurations across 41 GPUs at 3 precision levels.

BF16 (Full)
FP8 (Half)
INT4 (Quarter)
Blackwell(7 GPUs)
B200 NVL (pair)360GB
B300288GB
B100 SXM192GB
GB200 NVL72 (per GPU)192GB
Hopper(7 GPUs)
H100 NVL 94GB (per GPU pair)188GB
H200 SXM141GB
H2096GB
GH20096GB
Ada Lovelace(11 GPUs)
L40S48GB
L4048GB
RTX 6000 Ada48GB
L2048GB
Ampere(16 GPUs)
A100 80GB SXM80GB
A100 80GB PCIe80GB
A1664GB
RTX A600048GB
Legend:No fitVery tightTightModerateGoodExcellent

GPU Recommendations

A100 40GB SXMoptimal

BF16 · 1 GPU · vllm

95/100

score

Throughput

446.6 tok/s

Latency (ITL)

2.2ms

Est. TTFT

0ms

Cost/Month

$807

Cost/M Tokens

$0.69

Use this config →
RTX 5090optimal

BF16 · 1 GPU · vllm

95/100

score

Throughput

514.7 tok/s

Latency (ITL)

1.9ms

Est. TTFT

0ms

Cost/Month

$845

Cost/M Tokens

$0.62

Use this config →
A100 40GB PCIeoptimal

BF16 · 1 GPU · vllm

95/100

score

Throughput

446.6 tok/s

Latency (ITL)

2.2ms

Est. TTFT

0ms

Cost/Month

$655

Cost/M Tokens

$0.56

Use this config →

Deployment Options

API

API Deployment

zhipu

$0.15/M

output tokens

Self-Hosted

Single GPU

A100 40GB SXM

$807/mo

Min VRAM: 9 GB

Scale

Multi-GPU

A4000 x2

205.1 tok/s

TP· $323/mo

API Pricing Comparison

ProviderInput $/MOutput $/MBadges
zhipu$0.15$0.15
Cheapest

Cost Analysis

ProviderInput $/MOutput $/M~Monthly Cost
zhipuBest Value$0.15$0.15$2

Cost per 1,000 Requests

Short (500 tok)

$0.10

via zhipu

Medium (2K tok)

$0.42

via zhipu

Long (8K tok)

$1.50

via zhipu

Performance Estimates

Throughput by GPU

A100 40GB SXM
446.6 tok/s
RTX 5090
514.7 tok/s
A100 40GB PCIe
446.6 tok/s

VRAM Breakdown (A100 40GB SXM, BF16)

Weights
Act
Weights 18.8 GBKV-Cache 0.7 GBActivations 8.0 GBOverhead 1.5 GB

Precision Impact

bf16

18.8 GB

weights/GPU

~446.6 tok/s

fp8

9.4 GB

weights/GPU

int4

4.7 GB

weights/GPU

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllmsglangtgiollama

Supported Precisions

BF16 (default)FP8INT4

Where to Deploy GLM-4 9B

Similar Models

Gemma 2 9B

9.2B params · dense

Quality: 68

from $0.10/M

Smaller context, Higher quality, CheaperCompare →
Smaller context, Higher qualityCompare →

Yi 1.5 9B

8.83B params · dense

Quality: 62

from $0.20/M

Smaller context, Higher qualityCompare →

Frequently Asked Questions

How much VRAM does GLM-4 9B need for inference?

GLM-4 9B requires approximately 18.8 GB of VRAM at BF16 precision, 9.4 GB at FP8, or 4.7 GB at INT4 quantization. Additional VRAM is needed for KV-cache (40960 bytes per token) and activations (~1.00 GB).

What is the best GPU for GLM-4 9B?

The top recommended GPU for GLM-4 9B is the A100 40GB SXM using BF16 precision. It achieves approximately 446.6 tokens/sec at an estimated cost of $807/month ($0.69/M tokens). Score: 95/100.

How much does GLM-4 9B inference cost?

GLM-4 9B API inference starts from $0.15/M input tokens and $0.15/M output tokens. Self-hosted inference costs depend on your GPU configuration — use our ROI calculator for a detailed breakdown.