OpenAI · 2025-08 · Sparse MoE

GPT-OSS 20B

GPT-OSS 20B is a grouped-query attention (GQA) transformer released by OpenAI in 2025-08, with 24 layers, hidden size 2880 and a context window of 131,072 tokens.

Layer stack

Sliding window ×12 Attention ×12 · Layers 24

Key facts

FamilyOpenAI
Released2025-08
Params20.9 B
Active3.6 B
Context131,072 tokens
AttentionGQA (64:8)
Layers24
Hidden2,880
Heads64
Vocab201,088
PositionRoPE
NormRMSNorm
Activationsilu
DtypeMXFP4
Architecture classGptOssForCausalLM

Architecture overview

t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 201,088 → Hidden 2,880 Q1 Q2 Q3 Qn KV1 KV2 KV3 KVn Heads 64 KV heads 8 head dim 64 · RoPE Router E1 E2 E3 E4 E5 E6 E7 E8 +24… top-4 of 32 experts · ≈ 3.6B params active per token × 24 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 201,088 p p p → next token Position RoPE Dtype MXFP4 Context 128K tok
Drawn from the shipped config.json · 24 layers / width 2,880 / context 131,072. Original diagram by this atlas.

Attention

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

Feed-forward / MoE

It is a sparse mixture-of-experts with 32 routed experts and top-4 routing; about 3.6B 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 GPT-OSS 120B
ModelGPT-OSS 20BGPT-OSS 120BRatio
model_typegpt_ossgpt_oss
architecturesGptOssForCausalLMGptOssForCausalLM
hidden_size28802880≈1
num_hidden_layers2436×0.667
num_attention_heads6464≈1
num_key_value_heads88≈1
head_dim6464≈1
intermediate_size28802880≈1
hidden_actsilusilu
num_experts_per_tok44≈1
rope_theta150000150000≈1
max_position_embeddings131072131072≈1
sliding_window128128≈1
rms_norm_eps0.000010.00001≈1
vocab_size201088201088≈1
attention_biastruetrue
attention_dropout00
eos_token_id200002200002≈1
experts_per_token44≈1
initial_context_length40964096≈1
initializer_range0.020.02≈1
layer_typessliding_attention×12 + full_attention×12sliding_attention×18 + full_attention×18
num_local_experts32128×0.250
output_router_logitsfalsefalse
pad_token_id199999199999≈1
router_aux_loss_coef0.90.9≈1

Most similar architectures

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

Raw config fields

30 fields
architecturesGptOssForCausalLM
attention_biastrue
attention_dropout0
eos_token_id200002
experts_per_token4
head_dim64
hidden_actsilu
hidden_size2880
initial_context_length4096
initializer_range0.02
intermediate_size2880
layer_typessliding_attention×12 + full_attention×12
max_position_embeddings131072
model_typegpt_oss
num_attention_heads64
num_experts_per_tok4
num_hidden_layers24
num_key_value_heads8
num_local_experts32
output_router_logitsfalse
pad_token_id199999
rms_norm_eps0.00001
rope_theta150000
router_aux_loss_coef0.9
sliding_window128
swiglu_limit7
tie_word_embeddingsfalse
transformers_version4.55.0.dev0
use_cachetrue
vocab_size201088