Hunyuan · 2025-08 · Dense · Multimodal

Hunyuan 7B

Hunyuan 7B is a grouped-query attention (GQA) transformer released by Hunyuan in 2025-08, with 32 layers, hidden size 4096 and a context window of 32,768 tokens.

Layer stack

Attention ×32 · Layers 32

Key facts

FamilyHunyuan
Released2025-08
Params7.8 B
Context32,768 tokens
AttentionGQA (32:8)
Layers32
Hidden4,096
Heads32
Vocab128,167
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classHunYuanDenseV1ForCausalLM

Architecture overview

Vision input → tokens t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 128,167 → Hidden 4,096 Q1 Q2 Q3 Qn KV1 KV2 KV3 KVn Heads 32 KV heads 8 head dim 128 · RoPE FFN · SwiGLU FFN dim 14,336 × 32 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 128,167 p p p → next token Position RoPE Dtype BF16 Context 32K tok Vision ⇢ token
Drawn from the shipped config.json · 32 layers / width 4,096 / context 32,768. Original diagram by this atlas.

Attention

grouped-query attention (GQA) — 32 q-heads / 8 kv-heads. RoPE θ=10,000.

Feed-forward / MoE

It is a dense model: all 7.8B 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 Mistral 7B
ModelHunyuan 7BMistral 7BRatio
model_typehunyuan_v1_densemistral
architecturesHunYuanDenseV1ForCausalLMMistralForCausalLM
hidden_size40964096≈1
num_hidden_layers3232≈1
num_attention_heads3232≈1
num_key_value_heads88≈1
head_dim128
intermediate_size1433614336≈1
hidden_actsilusilu
rope_theta1000010000≈1
max_position_embeddings3276832768≈1
sliding_window4096
rms_norm_eps0.000010.00001≈1
vocab_size12816732000×4.01
torch_dtypebfloat16bfloat16
add_classification_headfalse
attention_biasfalse
attention_dropout0.1
attention_head_dim128
bos_token_id11≈1
cla_share_factor2
class_num0
dense_list4096×1 + 0×1
eod_token_id127967
eos_token_id1279602×63980.00
im_end_id5

Most similar architectures

Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).

Raw config fields

45 fields
add_classification_headfalse
architecturesHunYuanDenseV1ForCausalLM
attention_biasfalse
attention_dropout0.1
attention_head_dim128
bos_token_id1
cla_share_factor2
class_num0
dense_list4096×1 + 0×1
eod_token_id127967
eos_token_id127960
head_dim128
hidden_actsilu
hidden_size4096
im_end_id5
im_newline_id11
im_start_id4
initializer_range0.02
intermediate_size14336
mask_init_id12
max_position_embeddings32768
mlp_biasfalse
model_typehunyuan_v1_dense
norm_typerms
num_attention_heads32
num_hidden_layers32
num_key_value_heads8
org_vocab_size128167
pad_id127961
pad_token_id127961
pool_typelast
pretraining_tp1
rms_norm_eps0.00001
rope_theta10000
sep_token_id127962
text_end_id7
text_start_id6
tie_word_embeddingstrue
torch_dtypebfloat16
transformers_version4.41.2
use_cachetrue
use_clafalse
use_qk_normtrue
use_rotary_pos_embtrue
vocab_size128167