N Neurarch Architectures Models Checks Data Docs Open the app

Models / qwen2

Qwen2.5-0.5B-Instruct

Reconstructed from its own config.json with no weights read. 6.4M downloads on Hugging Face.

Our count against the checkpoint

The left number comes from the graph. The right one is the number of scalars in the published weight files. Nothing on this page was tuned to make them agree.

Derived from structure
494M
494,004,224 parameters
In the published checkpoint
494M
494,032,768 scalars · safetensors.total, read 2024-09-25
Delta
-0.01%

What it costs to run

Cost is a roofline estimate on the priced GPU for 10 epochs at batch 32 over 50,000 samples (assumed; no dataset attached). GPU fit is fp32 weights plus gradients plus two Adam moments (16 bytes per parameter) with 1.3x headroom; activations are not included and grow with batch size.

Layers
146
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$1303.31
CardMemory
T4 (16GB)weights + activationsfits
A100 (40GB)weights + activationsfits
H100 (80GB)weights + activationsfits

Structure

148 nodes. Output shapes are propagated from the input shape, batch dimension excluded.

LayerTypeOutput shape
1InputInput1 × 32768
2EmbeddingEmbedding1 × 32768 × 896
3RoPERoPE1 × 32768 × 896
4RMSNorm_1_1RMSNorm1 × 32768 × 896
5Attention_1Grouped Query Attn1 × 32768 × 896
6Add_1_attnAdd1 × 32768 × 896
7RMSNorm_1_2RMSNorm1 × 32768 × 896
8FFN_1SwiGLU1 × 32768 × 896
9Add_1_ffnAdd1 × 32768 × 896
10RMSNorm_2_1RMSNorm1 × 32768 × 896
11Attention_2Grouped Query Attn1 × 32768 × 896
12Add_2_attnAdd1 × 32768 × 896
13RMSNorm_2_2RMSNorm1 × 32768 × 896
14FFN_2SwiGLU1 × 32768 × 896
15Add_2_ffnAdd1 × 32768 × 896
16RMSNorm_3_1RMSNorm1 × 32768 × 896
17Attention_3Grouped Query Attn1 × 32768 × 896
18Add_3_attnAdd1 × 32768 × 896
19RMSNorm_3_2RMSNorm1 × 32768 × 896
20FFN_3SwiGLU1 × 32768 × 896
21Add_3_ffnAdd1 × 32768 × 896
22RMSNorm_4_1RMSNorm1 × 32768 × 896
23Attention_4Grouped Query Attn1 × 32768 × 896
24Add_4_attnAdd1 × 32768 × 896
25RMSNorm_4_2RMSNorm1 × 32768 × 896
26FFN_4SwiGLU1 × 32768 × 896
27Add_4_ffnAdd1 × 32768 × 896
28RMSNorm_5_1RMSNorm1 × 32768 × 896
29Attention_5Grouped Query Attn1 × 32768 × 896
30Add_5_attnAdd1 × 32768 × 896
31RMSNorm_5_2RMSNorm1 × 32768 × 896
32FFN_5SwiGLU1 × 32768 × 896
33Add_5_ffnAdd1 × 32768 × 896
34RMSNorm_6_1RMSNorm1 × 32768 × 896
35Attention_6Grouped Query Attn1 × 32768 × 896
36Add_6_attnAdd1 × 32768 × 896
37RMSNorm_6_2RMSNorm1 × 32768 × 896
38FFN_6SwiGLU1 × 32768 × 896
39Add_6_ffnAdd1 × 32768 × 896
40RMSNorm_7_1RMSNorm1 × 32768 × 896
41Attention_7Grouped Query Attn1 × 32768 × 896
42Add_7_attnAdd1 × 32768 × 896
43RMSNorm_7_2RMSNorm1 × 32768 × 896
44FFN_7SwiGLU1 × 32768 × 896
45Add_7_ffnAdd1 × 32768 × 896
46RMSNorm_8_1RMSNorm1 × 32768 × 896
47Attention_8Grouped Query Attn1 × 32768 × 896
48Add_8_attnAdd1 × 32768 × 896
49RMSNorm_8_2RMSNorm1 × 32768 × 896
50FFN_8SwiGLU1 × 32768 × 896
51Add_8_ffnAdd1 × 32768 × 896
52RMSNorm_9_1RMSNorm1 × 32768 × 896
53Attention_9Grouped Query Attn1 × 32768 × 896
54Add_9_attnAdd1 × 32768 × 896
55RMSNorm_9_2RMSNorm1 × 32768 × 896
56FFN_9SwiGLU1 × 32768 × 896
57Add_9_ffnAdd1 × 32768 × 896
58RMSNorm_10_1RMSNorm1 × 32768 × 896
59Attention_10Grouped Query Attn1 × 32768 × 896
60Add_10_attnAdd1 × 32768 × 896
61RMSNorm_10_2RMSNorm1 × 32768 × 896
62FFN_10SwiGLU1 × 32768 × 896
63Add_10_ffnAdd1 × 32768 × 896
64RMSNorm_11_1RMSNorm1 × 32768 × 896
65Attention_11Grouped Query Attn1 × 32768 × 896
66Add_11_attnAdd1 × 32768 × 896
67RMSNorm_11_2RMSNorm1 × 32768 × 896
68FFN_11SwiGLU1 × 32768 × 896
69Add_11_ffnAdd1 × 32768 × 896
70RMSNorm_12_1RMSNorm1 × 32768 × 896
71Attention_12Grouped Query Attn1 × 32768 × 896
72Add_12_attnAdd1 × 32768 × 896
73RMSNorm_12_2RMSNorm1 × 32768 × 896
74FFN_12SwiGLU1 × 32768 × 896
75Add_12_ffnAdd1 × 32768 × 896
76RMSNorm_13_1RMSNorm1 × 32768 × 896
77Attention_13Grouped Query Attn1 × 32768 × 896
78Add_13_attnAdd1 × 32768 × 896
79RMSNorm_13_2RMSNorm1 × 32768 × 896
80FFN_13SwiGLU1 × 32768 × 896
81Add_13_ffnAdd1 × 32768 × 896
82RMSNorm_14_1RMSNorm1 × 32768 × 896
83Attention_14Grouped Query Attn1 × 32768 × 896
84Add_14_attnAdd1 × 32768 × 896
85RMSNorm_14_2RMSNorm1 × 32768 × 896
86FFN_14SwiGLU1 × 32768 × 896
87Add_14_ffnAdd1 × 32768 × 896
88RMSNorm_15_1RMSNorm1 × 32768 × 896
89Attention_15Grouped Query Attn1 × 32768 × 896
90Add_15_attnAdd1 × 32768 × 896
91RMSNorm_15_2RMSNorm1 × 32768 × 896
92FFN_15SwiGLU1 × 32768 × 896
93Add_15_ffnAdd1 × 32768 × 896
94RMSNorm_16_1RMSNorm1 × 32768 × 896
95Attention_16Grouped Query Attn1 × 32768 × 896
96Add_16_attnAdd1 × 32768 × 896
97RMSNorm_16_2RMSNorm1 × 32768 × 896
98FFN_16SwiGLU1 × 32768 × 896
99Add_16_ffnAdd1 × 32768 × 896
100RMSNorm_17_1RMSNorm1 × 32768 × 896
101Attention_17Grouped Query Attn1 × 32768 × 896
102Add_17_attnAdd1 × 32768 × 896
103RMSNorm_17_2RMSNorm1 × 32768 × 896
104FFN_17SwiGLU1 × 32768 × 896
105Add_17_ffnAdd1 × 32768 × 896
106RMSNorm_18_1RMSNorm1 × 32768 × 896
107Attention_18Grouped Query Attn1 × 32768 × 896
108Add_18_attnAdd1 × 32768 × 896
109RMSNorm_18_2RMSNorm1 × 32768 × 896
110FFN_18SwiGLU1 × 32768 × 896
111Add_18_ffnAdd1 × 32768 × 896
112RMSNorm_19_1RMSNorm1 × 32768 × 896
113Attention_19Grouped Query Attn1 × 32768 × 896
114Add_19_attnAdd1 × 32768 × 896
115RMSNorm_19_2RMSNorm1 × 32768 × 896
116FFN_19SwiGLU1 × 32768 × 896
117Add_19_ffnAdd1 × 32768 × 896
118RMSNorm_20_1RMSNorm1 × 32768 × 896
119Attention_20Grouped Query Attn1 × 32768 × 896
120Add_20_attnAdd1 × 32768 × 896
121RMSNorm_20_2RMSNorm1 × 32768 × 896
122FFN_20SwiGLU1 × 32768 × 896
123Add_20_ffnAdd1 × 32768 × 896
124RMSNorm_21_1RMSNorm1 × 32768 × 896
125Attention_21Grouped Query Attn1 × 32768 × 896
126Add_21_attnAdd1 × 32768 × 896
127RMSNorm_21_2RMSNorm1 × 32768 × 896
128FFN_21SwiGLU1 × 32768 × 896
129Add_21_ffnAdd1 × 32768 × 896
130RMSNorm_22_1RMSNorm1 × 32768 × 896
131Attention_22Grouped Query Attn1 × 32768 × 896
132Add_22_attnAdd1 × 32768 × 896
133RMSNorm_22_2RMSNorm1 × 32768 × 896
134FFN_22SwiGLU1 × 32768 × 896
135Add_22_ffnAdd1 × 32768 × 896
136RMSNorm_23_1RMSNorm1 × 32768 × 896
137Attention_23Grouped Query Attn1 × 32768 × 896
138Add_23_attnAdd1 × 32768 × 896
139RMSNorm_23_2RMSNorm1 × 32768 × 896
140FFN_23SwiGLU1 × 32768 × 896
141Add_23_ffnAdd1 × 32768 × 896
142RMSNorm_24_1RMSNorm1 × 32768 × 896
143Attention_24Grouped Query Attn1 × 32768 × 896
144Add_24_attnAdd1 × 32768 × 896
145RMSNorm_24_2RMSNorm1 × 32768 × 896
146FFN_24SwiGLU1 × 32768 × 896
147Add_24_ffnAdd1 × 32768 × 896
148OutputOutput1 × 32768 × 896

What the verifier says

infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoLLaMA uses intermediateSize ≈ ⌊(8/3 × D) / 256⌋ × 256. Current: 4864 (5.43× embedDim). Expected: ~2304. Fix: Set intermediateSize to 2304 for embedDim=896.
swiglu-dim-convention
infoAt 24 stacked attention layers, residual-branch outputs add up; unscaled init lets activation variance grow with depth. GPT-2/LLaMA-family models scale the residual projections by depth (N(0, 0.02 / √(2L))). Fix: Scale residual output projections by depth: nn.init.normal_(w, std=0.02 / math.sqrt(2 * n_layers))
deep-attention-default-init

Do this to your own model

Same numbers, on a model in your repo, in one command. No account.

pip install neurarch-trace
neurarch-trace Qwen/Qwen2.5-0.5B-Instruct --plan --share

Other qwen2 checkpoints

gte-Qwen2-1.5B-instruct
1.78B derived · +0.01% against the checkpoint
gte-Qwen2-7B-instruct
7.61B derived · +0.00% against the checkpoint
Qwen2.5-1.5B-Instruct
1.54B derived · -0.00% against the checkpoint
Qwen2.5-3B-Instruct
3.09B derived · -0.00% against the checkpoint