GLM · 2023-10 · Dense
ChatGLM3 6B
ChatGLM3 6B is a grouped-query attention (GQA) transformer released by GLM in 2023-10, with 28 layers, hidden size 4096 and a context window of 8,192 tokens.
Layer stack
Attention ×28 · Layers 28
Key facts
| Family | GLM |
|---|---|
| Released | 2023-10 |
| Params | 6.2 B |
| Context | 8,192 tokens |
| Attention | GQA (32:2) |
| Layers | 28 |
| Hidden | 4,096 |
| Heads | 32 |
| Vocab | — |
| Position | — |
| Norm | — |
| Activation | — |
| Dtype | bf16 |
| Architecture class | ChatGLMModel |
Architecture overview
Attention
grouped-query attention (GQA) — 32 q-heads / 2 kv-heads.
Feed-forward / MoE
It is a dense model: all 6.2B parameters participate in computing every token.
Field-level comparison
Compared against the previous model of the same lab; where none exists, against the structurally closest model. The ratio column is this model divided by the comparison model.
Full-field comparison vs most-similar GLM-4 9B
| Model | ChatGLM3 6B | GLM-4 9B | Ratio |
|---|---|---|---|
| model_type | chatglm | chatglm | = |
| architectures | ChatGLMModel | ChatGLMModel | = |
| hidden_size | 4096 | 4096 | ≈1 |
| num_attention_heads | 32 | 32 | ≈1 |
| torch_dtype | float16 | bfloat16 | ≠ |
| _name_or_path | THUDM/chatglm3-6b | THUDM/glm-4-9b | ≠ |
| add_bias_linear | false | false | = |
| add_qkv_bias | true | true | = |
| apply_query_key_layer_scaling | true | true | = |
| apply_residual_connection_post_layernorm | false | false | = |
| attention_dropout | 0 | 0 | = |
| attention_softmax_in_fp32 | true | true | = |
| bias_dropout_fusion | true | true | = |
| ffn_hidden_size | 13696 | 13696 | ≈1 |
| fp32_residual_connection | false | false | = |
| hidden_dropout | 0 | 0 | = |
| kv_channels | 128 | 128 | ≈1 |
| layernorm_epsilon | 0.00001 | 1.5625e-7 | ×64.00 |
| multi_query_attention | true | true | = |
| multi_query_group_num | 2 | 2 | ≈1 |
| num_layers | 28 | 40 | ×0.700 |
| original_rope | true | true | = |
| padded_vocab_size | 65024 | 151552 | ×0.429 |
| post_layer_norm | true | true | = |
| rmsnorm | true | true | = |
| seq_length | 8192 | 8192 | ≈1 |
Most similar architectures
- GLM-4 9B (GLM, 2024-06) 0.997
- Qwen3.5 27B (Qwen, 2026-02) 0.712
- Qwen3.5 9B (Qwen, 2026-02) 0.699
- Qwen3.5 9B Base (Qwen, 2026-02) 0.699
- Llama 2 70B (Meta, 2023-07) 0.679
- Llama 3.1 70B (Meta, 2024-07) 0.646
Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).
Raw config fields
31 fields
| _name_or_path | THUDM/chatglm3-6b |
|---|---|
| model_type | chatglm |
| architectures | ChatGLMModel |
| add_bias_linear | false |
| add_qkv_bias | true |
| apply_query_key_layer_scaling | true |
| apply_residual_connection_post_layernorm | false |
| attention_dropout | 0 |
| attention_softmax_in_fp32 | true |
| bias_dropout_fusion | true |
| ffn_hidden_size | 13696 |
| fp32_residual_connection | false |
| hidden_dropout | 0 |
| hidden_size | 4096 |
| kv_channels | 128 |
| layernorm_epsilon | 0.00001 |
| multi_query_attention | true |
| multi_query_group_num | 2 |
| num_attention_heads | 32 |
| num_layers | 28 |
| original_rope | true |
| padded_vocab_size | 65024 |
| post_layer_norm | true |
| rmsnorm | true |
| seq_length | 8192 |
| use_cache | true |
| torch_dtype | float16 |
| transformers_version | 4.30.2 |
| tie_word_embeddings | false |
| eos_token_id | 2 |
| pad_token_id | 0 |