DeepSeek · 2023-11 · Dense

DeepSeek-Coder 6.7B

DeepSeek-Coder 6.7B is a multi-head attention (MHA) transformer released by DeepSeek in 2023-11, with 32 layers, hidden size 4096 and a context window of 16,384 tokens.

Layer stack

Attention ×32 · Layers 32

Key facts

FamilyDeepSeek
Released2023-11
Params6.7 B
Context16,384 tokens
AttentionMHA (32:32)
Layers32
Hidden4,096
Heads32
Vocab32,256
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classLlamaForCausalLM

Architecture overview

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

Attention

multi-head attention (MHA) — 32 q-heads / 32 kv-heads. RoPE θ=100,000.

Feed-forward / MoE

It is a dense model: all 6.7B 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 Qwen1.5 7B
ModelDeepSeek-Coder 6.7BQwen1.5 7BRatio
model_typellamaqwen2
architecturesLlamaForCausalLMQwen2ForCausalLM
hidden_size40964096≈1
num_hidden_layers3232≈1
num_attention_heads3232≈1
num_key_value_heads3232≈1
intermediate_size1100811008≈1
hidden_actsilusilu
rope_theta1000001000000×0.100
max_position_embeddings1638432768×0.500
sliding_window32768
rms_norm_eps0.0000010.000001≈1
vocab_size32256151936×0.212
torch_dtypebfloat16bfloat16
bos_token_id32013151643×0.211
eos_token_id32014151643×0.211
initializer_range0.020.02≈1
pretraining_tp1
tie_word_embeddingsfalsefalse
transformers_version4.34.14.37.0
use_cachetruetrue

Most similar architectures

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

Raw config fields

20 fields
architecturesLlamaForCausalLM
bos_token_id32013
eos_token_id32014
hidden_actsilu
hidden_size4096
initializer_range0.02
intermediate_size11008
max_position_embeddings16384
model_typellama
num_attention_heads32
num_hidden_layers32
num_key_value_heads32
pretraining_tp1
rms_norm_eps0.000001
rope_theta100000
tie_word_embeddingsfalse
torch_dtypebfloat16
transformers_version4.34.1
use_cachetrue
vocab_size32256