Parameters
9B
Context Length
128K
Modality
Text
Architecture
Dense
KV Cache Rate
40 KB/tok
License
MIT License
Release Date
30 Jun 2024
Knowledge Cutoff
Apr 2024
API Pricing (per 1M)
Self-hosted only
Precision
Context
Workload Memory: 7.00 GB
INT4 · 8K context
Base Weights: 4.19 GB
KV Cache: 0.31 GB
Runtime & Graphs: 2.50 GB
1x NVIDIA L4 24GB
7.0 / 21.6 GB
1x RTX 3060 12GB
7.0 / 11.2 GB
Apple M4 24GB
7.0 / 18.0 GB
Determine requirements for your specific workload:
Checkpoint format
FP16
CUDA
>= 11.8
PyTorch
>= 2.1
Transformers
>= 4.44.0
| Architecture | Precision | Attention kernel |
|---|---|---|
Blackwell, Hopper | Native FP16 | FlashAttention-3 |
Ada Lovelace, Ampere | Native FP16 | FlashAttention-2 |
Additional required packages
Install alongside standard runtime libraries:
pip install flash_attn
No evaluation benchmarks for GLM-4-9B available.
Overall Rank
-
Coding Rank
-
GLM-4-9B is an open-weights dense foundation model developed by Z.ai and Tsinghua University for multilingual understanding across 26 languages. Pretrained on 10T tokens, it supports length extrapolation up to 128K tokens via YaRN.
Attention
Attention Structure
Multi-Head Attention
Attention Heads
32
Key-Value Heads
2
Attention Head Dimension
128
Position Embedding
Absolute Position Embedding
Normalization
RMS Normalization
Activation Function
SwigLU
Dimensions
Base Precision
FP16
Hidden Dimension Size
4,096
Number of Layers
40
FFN Intermediate Size (Dense)
13,696
Tokenizer
Vocabulary Size
151,552
General Language Models from Z.ai