GLM · 2024-06 · Densa
GLM-4 9B
GLM-4 9B è un Transformer a attention grouped-query (GQA) pubblicato da GLM nel 2024-06, con 40 strati, dimensione nascosta 4096 e una finestra di contesto di 8,192 token.
Pila di strati
Attention ×40 · Strati 40
Dati chiave
| Laboratorio | GLM |
|---|---|
| Pubblicazione | 2024-06 |
| Parametri | 9.4 mld |
| Contesto | 8,192 tokens |
| Attention | GQA (32:2) |
| Strati | 40 |
| Dim. nascosta | 4,096 |
| Teste di attention | 32 |
| Vocabolario | — |
| Codifica posizionale | — |
| Normalizzazione | — |
| Attivazione | — |
| Precisione | bf16 |
| Classe architetturale | ChatGLMModel |
Panoramica dell'architettura
Attention
attention grouped-query (GQA) — 32 q-heads / 2 kv-heads.
FFN / MoE
È un modello denso: tutti i 9.4 milioni di parametri partecipano al calcolo di ogni token.
Confronto campo per campo
Confronto con il modello precedente dello stesso laboratorio; in assenza, col modello strutturalmente più vicino. La colonna rapporto = questo modello ÷ modello di confronto.
Confronto completo con il predecessore ChatGLM3 6B
| Modello | GLM-4 9B | ChatGLM3 6B | Rapporto |
|---|---|---|---|
| model_type | chatglm | chatglm | = |
| architectures | ChatGLMModel | ChatGLMModel | = |
| hidden_size | 4096 | 4096 | ≈1 |
| num_attention_heads | 32 | 32 | ≈1 |
| torch_dtype | bfloat16 | float16 | ≠ |
| _name_or_path | THUDM/glm-4-9b | THUDM/chatglm3-6b | ≠ |
| 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 | = |
| attn_implementation | sdpa | — | |
| 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 | 1.5625e-7 | 0.00001 | ×0.016 |
| multi_query_attention | true | true | = |
| multi_query_group_num | 2 | 2 | ≈1 |
| num_layers | 40 | 28 | ×1.43 |
| original_rope | true | true | = |
| padded_vocab_size | 151552 | 65024 | ×2.33 |
| post_layer_norm | true | true | = |
| rmsnorm | true | true | = |
Architetture più simili
- ChatGLM3 6B (GLM, 2023-10) 0.997
- Qwen3.5 27B (Qwen, 2026-02) 0.721
- Qwen3.5 9B (Qwen, 2026-02) 0.697
- Qwen3.5 9B Base (Qwen, 2026-02) 0.697
- Llama 2 70B (Meta, 2023-07) 0.696
- Llama 3.1 70B (Meta, 2024-07) 0.659
I valori di similarità vanno da 0 (nessuna caratteristica categoriale condivisa) a 1 (profili identici).
Campi grezzi del config.json
32 campi
| _name_or_path | THUDM/glm-4-9b |
|---|---|
| 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 |
| attn_implementation | sdpa |
| bias_dropout_fusion | true |
| ffn_hidden_size | 13696 |
| fp32_residual_connection | false |
| hidden_dropout | 0 |
| hidden_size | 4096 |
| kv_channels | 128 |
| layernorm_epsilon | 1.5625e-7 |
| multi_query_attention | true |
| multi_query_group_num | 2 |
| num_attention_heads | 32 |
| num_layers | 40 |
| original_rope | true |
| padded_vocab_size | 151552 |
| post_layer_norm | true |
| rmsnorm | true |
| seq_length | 8192 |
| use_cache | true |
| torch_dtype | bfloat16 |
| transformers_version | 4.44.0 |
| tie_word_embeddings | false |
| eos_token_id | 151329×1 + 151336×1 + 151338×1 |
| pad_token_id | 151329 |