archdb

LLM architectures and pretraining recipes, with sources.

Step-3

StepFun · reasoning checkpoint

No base checkpoint is public; facts describe the released post-trained checkpoint (stepfun-ai/step3, a VLM); architecture facts are for the language model.

Open in the comparison table Hugging Face ↗ Paper ↗

KV calculations use one sequence at 131,072 tokens and 16-bit cache elements. They include bounded sliding-window caches. This is retained cache payload, not peak prefill memory. The comparison table also offers sourced mixed-precision layouts, including quantization scales.

Release

Released

2025-07-25

Source: paper · p.1 arXiv stamp
arXiv:2507.19427v1 [cs.LG] 25 Jul 2025

Report predates the weights (release blog dated July 31, 2025).

Date the weights (or, if earlier, the technical report) were first made public, YYYY-MM-DD, as dated by the publisher. A Hugging Face repository creation date is used only when no dated publisher page exists, with a note.

License

apache-2.0

Source: model-card · README.md; front matter
license: apache-2.0

License of the released weights as declared by the publisher (model card metadata or license file), e.g. apache-2.0, mit, or the name of a custom license.

Input modalities

text + image

Source: blog · Step3 blog; Pretrain, multimodal pathway
our 5B-parameter vision encoder extracts dense image features

Input modalities of the released checkpoint as the publisher states them, from: text, image, video, audio, joined with ' + ' in that order ("text", "text + image + video").

Parameters

Total params

321B parameters

Source: model-card · README.md; Introduction
with 321B total parameters and 38B active

Total parameter count as reported by the publisher. See params.note for whether embeddings, MTP heads or vision towers are included.

Active params

38B parameters

Source: model-card · README.md; Introduction
with 321B total parameters and 38B active

Parameters used per token in the forward pass, as reported by the publisher.

Active non-embedding (stated)

Not disclosed

Active parameters excluding the input embedding and the output head (unembedding). Stated by the publisher, or computed from params.active by subtracting vocab × d_model for each of the embedding and output head that params.active is stated to include (basis inferred, note with the arithmetic). Not disclosed when the scope of params.active is not stated.

Counted total params

316.7B parameters

Calculated: embedding + output head + all experts + other weights, stepfun-ai/step3@e2d67fc safetensors headers; reproduces stated total (other modalities) and active (with output head)

Parameters of the text backbone counted from the released checkpoint's safetensors headers (embedding, output head, all experts and other weights; excluding MTP modules, vision/audio towers and n-gram lookup tables). Shown only when the counts reproduce the publisher's stated total and active parameters within 5% under some scope.

Counted embedding + head

1.847B parameters

Calculated: input embedding + output head, stepfun-ai/step3@e2d67fc safetensors headers

Input embedding plus output head (once if tied), counted from the checkpoint.

Non-emb. params (counted)

314.8B parameters

Calculated: dense + routed backbone weights; excludes input embedding, output head, lookup tables, MTP and other modalities, stepfun-ai/step3@e2d67fc safetensors headers; reproduces stated total (other modalities) and active (with output head)

Language backbone weights excluding input embeddings, output head, lookup/Engram tables, MTP modules and vision/audio towers. Equals params.counted_total minus params.counted_embedding. Same validation as params.counted_total.

Largest layer (counted)

5.565B parameters

Calculated: max(sum of dense and routed weights sharing a full layers.<index> tensor path), all experts included, stepfun-ai/step3@e2d67fc safetensors headers

Largest group of language-backbone weights sharing a full layers.<index> tensor path, including every routed expert. Excludes lookup/Engram tables, embeddings, output head, MTP and other modalities. Hybrid checkpoints may store mixers and FFNs as separate layers. All-gather volume also depends on wrapping, sharding and dtype.

Active non-emb. (counted)

37.38B parameters

Calculated: non-expert weights + routed experts × 3/48, excluding embedding and output head, stepfun-ai/step3@e2d67fc safetensors headers; reproduces stated total (other modalities) and active (with output head)

Active parameters per token excluding the input embedding and output head, counted from the checkpoint as all non-expert weights plus routed-expert weights × top_k / experts. Same validation as params.counted_total.

Counting scope

321B includes the 5B vision encoder; the LLM alone is 316B. 38B active per text token.

Source: model-card · README.md; Step3 model card table
Total Parameters (LLM) | 316B

What the publisher's counts include or exclude (MTP modules, embeddings, vision encoder, n-gram tables).

Shape

Layers

61

Source: config · /text_config/num_hidden_layers

Number of transformer blocks in the main backbone (attention or token mixer plus FFN), excluding MTP modules.

d_model

7,168

Source: config · /text_config/hidden_size

Residual stream width.

Vocab

128,815

Source: config · /text_config/vocab_size

Embedding table rows (vocab_size in config, may include padding).

Tied embeddings

No

Inferred from the source; see the explanation below.

Source: config · model.safetensors.index.json; weight_map
"lm_head.weight": "model-00005.safetensors"

Inferred from the checkpoint: lm_head.weight (shard 5) and model.embed_tokens.weight (shard 1) are separate [128815, 7168] tensors with different bytes; no config key or code states tying (config.json has no tie_word_embeddings).

Input embedding and output head share weights.

Tokenizer

DeepSeek-V3 tokenizer

Source: model-card · README.md; Step3 model card table
Tokenizer | Deepseek V3

Tokenizer type and lineage as described by the publisher (e.g. byte-level BPE shared with an earlier model).

d_model / layers

117.508

Calculated: d_model / layers

Width-to-depth ratio, d_model divided by the number of blocks.

Attention

Token mixers

MFA

Source: model-card · README.md; Step3 model card table
Attention Mechanism | MFA

Multi-matrix Factorization Attention: query down-projected 7168 → 2048 (/text_config/share_q_dim), RMSNorm, up-projected to 64×256; one K and one V head shared by all query heads.

Token-mixing layer types in the backbone, e.g. GQA, MLA, SWA, Gated DeltaNet, Mamba-2, DSA (DeepSeek sparse attention).

Global-attention layers

61

Source: model-card · README.md; Step3 model card table
Number of Layers (Dense layer included)|61

Every layer uses full MFA attention (Step3vDecoderLayer).

Layers whose KV cache grows with full context (dense or sparse global attention, MLA). Excludes sliding-window and linear/recurrent layers.

Query heads

64

Source: config · /text_config/num_attention_heads

Query heads in the global-attention layers.

KV heads

1

Source: paper · p.2 §2
Key and a Value head, all with a dimension of 256.

Step3vAttention hardcodes num_key_value_heads = 1 (/text_config/num_attention_groups 1 is not read). The cache is 512 elements per token per layer, matching report Table 3 (1.02e9 bytes at 32K in FP8 = 32,768 × 61 × 512).

Key/value heads in the global-attention layers. Not applicable to MLA, whose cache is a shared latent.

Heads × head dim

16,384

Calculated: heads × head_dim

attn.heads × attn.head_dim, the query projection width of global layers.

Q heads / KV head

64

Calculated: heads / kv_heads

attn.heads divided by attn.kv_heads in global layers.

QK head dim

256

Source: config · /text_config/head_dim

Query/key dimension per head in global-attention layers (for MLA, nope + rope dims).

Positional encoding

RoPE

Source: code · modeling_step3.py; Step3vAttention.forward
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)

All 256 dims rotated; no rope_scaling in config.json.

Positional scheme in global layers: RoPE, partial RoPE, NoPE, or mixed per layer type.

RoPE base

500,000

Source: config · /text_config/rope_theta

RoPE base frequency of the global layers at release.

QK norm

No

Source: code · modeling_step3.py; Step3vAttention.forward
query_states = self.inter_norm(query_states)

The only attention norm is RMSNorm on the 2048-dim query latent before up-projection; per-head Q and K are not normalized.

Queries and keys are normalized per head before the dot product.

QKV bias

No

Source: code · modeling_step3.py; Step3vAttention.__init__
self.k_proj = nn.Linear(config.hidden_size, self.head_dim, bias=False)

q_proj, wq, v_proj and o_proj are also bias-free.

Query/key/value projections have bias terms.

Feed-forward

Activation

SwiGLU

Source: code · modeling_step3.py; Step3vMLP.forward
down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))

act_fn is SiLU; routed experts use the same form (Step3vMoEMLP.get_expert_output).

FFN activation (SwiGLU, GeGLU, ...).

Dense FFN dim

18,432

Source: config · /text_config/intermediate_size

Dense FFN of layers 0–3 and 60.

Intermediate width of the dense FFN layers that are actually executed.

FFN bias

No

Source: code · modeling_step3.py; Step3vMLP.__init__
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)

FFN projections have bias terms.

Dense FFN / d_model

2.57143

Calculated: ffn.dim / d_model

ffn.dim divided by shape.d_model.

Mixture of experts

Routed experts

48

Source: config · /text_config/moe_num_experts

Routed experts per MoE layer.

Experts per token

3

Source: config · /text_config/moe_top_k

Routed experts selected per token.

Shared experts

1

Source: model-card · README.md; Step3 model card table
Number of Shared Experts| 1

Always-on experts per MoE layer.

Expert dim

5,120

Source: config · /text_config/moe_intermediate_size

Intermediate width of one routed expert.

Shared expert dim

5,120

Source: config · /text_config/share_expert_dim

Total intermediate width of the shared expert(s).

Leading dense layers

4

Source: config · config.json text_config.moe_layers_enum
"moe_layers_enum": "4,5,6,7,

moe_layers_enum lists layers 4–59, so the last layer (60) is dense too: 5 dense layers in total (card).

Number of initial blocks that use a dense FFN instead of MoE.

Router score

softmax

Source: code · modeling_step3.py; Step3vMoEMLP.forward
routing_weights = F.softmax(router_logits, dim=1, dtype=torch.float)

Gating function over expert logits (softmax, sigmoid).

Load balancing

Not disclosed

Load-balancing method, with coefficients where disclosed.

Renormalize top-k

No

Source: code · modeling_step3.py; Step3vMoEMLP.forward
routing_weights, selected_experts = torch.topk(routing_weights, self.top_k, dim=-1) # we cast back to the input dtype

Top-k softmax weights are used without renormalization, consistent with /text_config/norm_expert_weight false (which the code does not read).

Selected expert weights are renormalized to sum to 1.

Expert dim / d_model

0.714286

Calculated: moe.expert_dim / d_model

moe.expert_dim divided by shape.d_model.

Sparsity (experts / top-k)

16

Calculated: experts / top_k

Routed experts divided by experts selected per token.

Active / total

0.11838

Calculated: params.active / params.total

params.active divided by params.total.

Multi-token prediction

MTP depth

Not disclosed

Additional future tokens predicted during pretraining (0 when the model was trained without MTP).

Normalization and stability

Norm

RMSNorm

Source: code · modeling_step3.py; Step3vDecoderLayer.__init__
self.input_layernorm = Step3vRMSNorm(config.hidden_size, eps=config.rms_norm_eps)

Normalization layer type in the blocks.

Norm placement

pre

Source: code · modeling_step3.py; Step3vDecoderLayer.forward
hidden_states = self.input_layernorm(hidden_states)

Pre-norm, post-norm, or sandwich (pre and post).

Norm epsilon

1e-05

Source: code · configuration_step3.py; Step3TextConfig.__init__
rms_norm_eps: float = 1e-5,

config.json sets no rms_norm_eps, so the Step3TextConfig default applies.

Epsilon of the block normalization layers.

Context length

Pretraining context

Not disclosed

Sequence length of the main pretraining stage.

Trained context

Not disclosed

Longest sequence length trained on after context extension.

Advertised context

65.54K tokens

Source: model-card · README.md; Step3 model card table
Max Context Length | 65536

/text_config/max_seq_len and /text_config/max_position_embedding (RoPE cache length) are also 65536.

Longest context the publisher says the model supports, possibly beyond trained length via RoPE scaling.

Pretraining recipe

Pretraining tokens

>20T

Source: blog · Pretrain Data
During pretraining, Step3 processes over 20T text tokens across more than ten languages

Text tokens; 4T image-text mixed tokens are counted separately.

Tokens seen in pretraining including annealing and context extension, as reported.

Optimizer

Not disclosed

Optimizer used for the bulk of parameters.

Peak LR

Not disclosed

Peak learning rate of the main pretraining stage.

Final LR

Not disclosed

Learning rate at the end of the decay.

LR schedule

Not disclosed

Learning-rate schedule shape with phase boundaries.

Warmup

Not disclosed

Warmup length in steps or tokens.

Batch size

Not disclosed

Global batch size, including any batch-size ramp: sequences × sequence length (token total), or the token total alone when only that is stated.

Weight decay

Not disclosed

Decoupled weight decay coefficient.

Adam betas

Not disclosed

(beta1, beta2) of the Adam-family optimizer or its AdamW fallback.

Grad clip

Not disclosed

Global gradient-norm clipping threshold.

Training precision

Not disclosed

Matmul precision of pretraining (BF16, FP8 recipe, NVFP4 recipe) with the scaling granularity where disclosed. Never inferred from the released checkpoint dtype.

Extra objectives

multimodal: 4T image-text mixed tokens in pretraining; connector and LLM trained on 1.4T multimodal tokens with the 5B vision encoder frozen

Source: blog · Multimodal
In the second stage, the vision encoder is frozen, and the Connector and the LLM are trained on the full dataset, totaling 1.4T tokens.

Objectives beyond next-token prediction and MTP (fill-in-the-middle rate, distillation, multimodal tokens from the start).

Data mix

>20T text tokens in >10 languages, 3.7T high-quality tokens reserved for annealing; web and licensed publisher data, MinHash-deduplicated; 4T image-text mixed tokens

Source: blog · Pretrain Data
of which 3.7T high-quality tokens are reserved for the annealing phases, while incorporating 4T image-text mixed tokens

Pretraining data composition as disclosed (domain shares, synthetic fraction, repetition).

Stages
  • pretraining

    Source: blog · Pretrain Data
    During pretraining, Step3 processes over 20T text tokens

    >20T text tokens in total, including annealing.

  • annealing

    Tokens
    3700000000000
    Source: blog · Pretrain Data
    of which 3.7T high-quality tokens are reserved for the annealing phases

    Several annealing phases on high-quality data.

Source: blog · Pretrain Data

Ordered pretraining stages. Each item: name, tokens, seq_len, lr, batch_tokens, batch_sequences, steps, note, quote, and source when it differs from the fact's source.

KV cache

KV bytes / token

62,464 bytes

Calculated: kv.bytes_at_context / 131072 tokens; uniform BF16, payload only; quantization overhead excluded. Global KV: 61 × (512 × 16/8) B/entry

Retained KV cache divided by context length, including bounded SWA caches and indexer keys. Exports use uniform BF16 at 131,072 tokens. The website can select uniform payload precision (no quantization overhead) or sourced component formats (including scales and documented padding). This is cache payload, not peak prefill memory or persistent prefix storage.

Global KV bytes / token

62,464 bytes

Calculated: 62464 B / 1 tokens (Global KV); uniform BF16, payload only; quantization overhead excluded. Global KV: 61 × (512 × 16/8) B/entry

Long-context global KV bytes per token, including indexer keys; excludes bounded SWA caches. Compression rates and cross-layer cache reuse are included. Exports use uniform BF16; the website's storage selector also applies here. This is the field to compare with global-KV figures in reports, using the matching storage recipe.

KV bytes / token / B active

1,644 bytes

Calculated: kv.bytes_per_token (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. Global KV: 61 × (512 × 16/8) B/entry

kv.bytes_per_token divided by active parameters in billions (131,072 tokens in exports).

KV at context / B active

215,454,774 bytes

Calculated: kv.bytes_at_context (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. Global KV: 61 × (512 × 16/8) B/entry

kv.bytes_at_context divided by active parameters in billions (131,072 tokens in exports).

KV at context

8,187,281,408 bytes

Calculated: 62464 B × 131072 (Global KV); uniform BF16, payload only; quantization overhead excluded. Global KV: 61 × (512 × 16/8) B/entry

Retained KV cache for one sequence at the selected context, including SWA windows and indexer keys. Exports use uniform BF16 at 131,072 tokens. Excludes recurrent state, compressor tail state, draft/MTP caches, temporary prefill tensors, allocator metadata and persistent prefix snapshots. Does not estimate peak prefill or total serving memory.

All models · Link to this model