GLM · 2023-10 · Dicht

ChatGLM3 6B

ChatGLM3 6B ist ein Grouped-Query-Attention (GQA)-Transformer, veröffentlicht von GLM im 2023-10, mit 28 Schichten, Hidden-Größe 4096 und einem Kontextfenster von 8,192 Tokens.

Schichtstapel

Attention ×28 · Schichten 28

Kernfakten

LaborGLM
Veröffentlicht2023-10
Parameter6.2 Mrd.
Kontext8,192 tokens
AttentionGQA (32:2)
Schichten28
Hidden-Dim.4,096
Attention-Köpfe32
Vokabular
Positionscodierung
Normierung
Aktivierung
Präzisionbf16
ArchitekturklasseChatGLMModel

Architekturüberblick

t₁ t₂ t₃ t₄ Eingabetokens Embedding · Vokabular — → Hidden-Dim. 4,096 Q1 Q2 Q3 Qn KV1 KV2 Attention-Köpfe 32 KV-Köpfe 2 head dim 128 · FFN · FFN-Dim. 13,696 × 28 Transformer-Block Attention FFN / MoE pre-norm Finale Norm · LM head → Vokabular — p p p → nächstes Token Positionscodierung Präzision BF16 Kontext 8K tok
Gezeichnet nach der mitgelieferten config.json · 28 Schichten / Breite 4,096 / Kontext 8,192. Originaldiagramm dieses Atlas.

Attention

Grouped-Query-Attention (GQA) — 32 q-heads / 2 kv-heads.

FFN / MoE

Es ist ein dichtes Modell: Alle 6.2 Mrd. Parameter sind an der Berechnung jedes Tokens beteiligt.

Feldweiser Vergleich

Verglichen mit dem vorherigen Modell desselben Labors; fehlt dieses, mit dem strukturell nächsten Modell. Die Spalte Ratio = dieses Modell ÷ Vergleichsmodell.

Vollfeldvergleich mit dem ähnlichsten Modell GLM-4 9B
ModellChatGLM3 6BGLM-4 9BRatio
model_typechatglmchatglm
architecturesChatGLMModelChatGLMModel
hidden_size40964096≈1
num_attention_heads3232≈1
torch_dtypefloat16bfloat16
_name_or_pathTHUDM/chatglm3-6bTHUDM/glm-4-9b
add_bias_linearfalsefalse
add_qkv_biastruetrue
apply_query_key_layer_scalingtruetrue
apply_residual_connection_post_layernormfalsefalse
attention_dropout00
attention_softmax_in_fp32truetrue
bias_dropout_fusiontruetrue
ffn_hidden_size1369613696≈1
fp32_residual_connectionfalsefalse
hidden_dropout00
kv_channels128128≈1
layernorm_epsilon0.000011.5625e-7×64.00
multi_query_attentiontruetrue
multi_query_group_num22≈1
num_layers2840×0.700
original_ropetruetrue
padded_vocab_size65024151552×0.429
post_layer_normtruetrue
rmsnormtruetrue
seq_length81928192≈1

Strukturell ähnlichste Modelle

Ähnlichkeitswerte reichen von 0 (keine gemeinsamen kategorialen Merkmale) bis 1 (identische Profile).

Rohe Config-Felder

31 Felder
_name_or_pathTHUDM/chatglm3-6b
model_typechatglm
architecturesChatGLMModel
add_bias_linearfalse
add_qkv_biastrue
apply_query_key_layer_scalingtrue
apply_residual_connection_post_layernormfalse
attention_dropout0
attention_softmax_in_fp32true
bias_dropout_fusiontrue
ffn_hidden_size13696
fp32_residual_connectionfalse
hidden_dropout0
hidden_size4096
kv_channels128
layernorm_epsilon0.00001
multi_query_attentiontrue
multi_query_group_num2
num_attention_heads32
num_layers28
original_ropetrue
padded_vocab_size65024
post_layer_normtrue
rmsnormtrue
seq_length8192
use_cachetrue
torch_dtypefloat16
transformers_version4.30.2
tie_word_embeddingsfalse
eos_token_id2
pad_token_id0