DeepSeek · 2024-05 · Sparse MoE

DeepSeek-V2 Lite

DeepSeek-V2 Lite is a multi-head latent attention (MLA) transformer released by DeepSeek in 2024-05, with 27 layers, hidden size 2048 and a context window of 163,840 tokens.

Layer stack

Attention ×27 · Layers 27

Key facts

FamilyDeepSeek
Released2024-05
Params15.6 B
Active2.5 B
Context163,840 tokens
AttentionMLA · kv_lora_rank 512
Layers27
Hidden2,048
Heads16
Vocab102,400
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classDeepseekV2ForCausalLM

Architecture overview

t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 102,400 → Hidden 2,048 Q · 16 Wᴰᴷⱽ ↓ c_KV · 512 kᴿ · RoPE 64 Wᵁᴷ/Wᵁⱽ ↑ ⊕kᴿ Attention KV cache/token ≈ 512+64 vs dense 2·2,048 → ≈ 1/7.1 Router E1 E2 E3 E4 E5 E6 E7 E8 +56… Shared expert ×2 top-6 of 64 experts · ≈ 2.5B params active per token × 27 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 102,400 p p p → next token Position RoPE Dtype BF16 Context 160K tok
Drawn from the shipped config.json · 27 layers / width 2,048 / context 163,840. Original diagram by this atlas.

Attention

multi-head latent attention (MLA). kv_lora_rank=512. RoPE θ=10,000.

Feed-forward / MoE

It is a sparse mixture-of-experts with 64 routed experts and top-6 routing; about 2.5B parameters are active per 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 predecessor DeepSeek-V2
ModelDeepSeek-V2 LiteDeepSeek-V2Ratio
model_typedeepseek_v2deepseek_v2
architecturesDeepseekV2ForCausalLMDeepseekV2ForCausalLM
hidden_size20485120×0.400
num_hidden_layers2760×0.450
num_attention_heads16128×0.125
num_key_value_heads16128×0.125
intermediate_size1094412288×0.891
hidden_actsilusilu
n_routed_experts64160×0.400
num_experts_per_tok66≈1
n_shared_experts22≈1
moe_intermediate_size14081536×0.917
kv_lora_rank512512≈1
qk_rope_head_dim6464≈1
q_lora_rank1536
rope_theta1000010000≈1
max_position_embeddings163840163840≈1
rms_norm_eps0.0000010.000001≈1
vocab_size102400102400≈1
torch_dtypebfloat16bfloat16
attention_biasfalsefalse
attention_dropout00
aux_loss_alpha0.0010.001≈1
bos_token_id100000100000≈1
eos_token_id100001100001≈1
first_k_dense_replace11≈1

Most similar architectures

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

Raw config fields

40 fields
architecturesDeepseekV2ForCausalLM
attention_biasfalse
attention_dropout0
aux_loss_alpha0.001
bos_token_id100000
eos_token_id100001
first_k_dense_replace1
hidden_actsilu
hidden_size2048
initializer_range0.02
intermediate_size10944
kv_lora_rank512
max_position_embeddings163840
model_typedeepseek_v2
moe_intermediate_size1408
moe_layer_freq1
n_group1
n_routed_experts64
n_shared_experts2
norm_topk_probfalse
num_attention_heads16
num_experts_per_tok6
num_hidden_layers27
num_key_value_heads16
pretraining_tp1
qk_nope_head_dim128
qk_rope_head_dim64
rms_norm_eps0.000001
rope_theta10000
routed_scaling_factor1
scoring_funcsoftmax
seq_auxtrue
tie_word_embeddingsfalse
topk_group1
topk_methodgreedy
torch_dtypebfloat16
transformers_version4.33.1
use_cachetrue
v_head_dim128
vocab_size102400