ApX logoApX logo
CalculatorCoursesPricing

ChatGLM2-6B

Open Source
Open Weights

Parameters

6B

Context Length

33K

Modality

Text

Architecture

Dense

KV Cache Rate

28 KB/tok

License

Custom License (ChatGLM2-6B License)

Release Date

25 Jun 2023

Knowledge Cutoff

-

API Pricing (per 1M)

Self-hosted only

Hardware & System Requirements

Precision

Context

Workload Memory: 5.51 GB

vLLM

INT4 · 8K context · 1 user

Base Weights: 2.79 GB

KV Cache: 0.22 GB

Runtime & Graphs: 2.50 GB

Minimum Required Hardware

1x NVIDIA L4 24GB

vLLM

5.5 / 21.6 GB

1x RTX 3060 12GB

llama.cpp

5.5 / 11.2 GB

Apple M4 24GB

llama.cpp

5.5 / 18.0 GB

Determine requirements for concurrent users or multi-node clusters:

Runtime compatibility

Verified on hardware and checkpoint files.

Checkpoint format

FP16

CUDA

>= 11.8

PyTorch

>= 2.1

Transformers

>= 4.27.1

ArchitecturePrecisionAttention kernel

Blackwell, Hopper

Native FP16

FlashAttention-3

Ada Lovelace, Ampere

Native FP16

FlashAttention-2

Architecture Diagram

Evaluation Benchmarks

Rank

#258

BenchmarkScoreRank

General Text

Text Arena

1024.89

#202

Rankings

Overall Rank

#258

Coding Rank

-

About ChatGLM2-6B

ChatGLM2-6B is the second-generation bilingual conversational model by THUDM featuring Multi-Query Attention and FlashAttention. It offers improved inference speed, low latency, and extended context retention on consumer hardware.

Specifications

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

28

FFN Intermediate Size (Dense)

13,696

Tokenizer

Vocabulary Size

65,024

About ChatGLM

ChatGLM series models from Z.ai, based on GLM architecture.


Other ChatGLM Models