N Neurarch Architectures Models Checks Data Docs Open the app

Models / internvl_chat

InternVL2-1B

Reconstructed from its own config.json with no weights read. 595K 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
935M
934,619,239 parameters
In the published checkpoint
938M
938,158,976 scalars · safetensors.total, read 2025-03-25
Delta
-0.38%

custom-code This repository ships its own modeling code (`auto_map`, e.g. `configuration_internvl_chat.py`), so `config.json` names a class in the repo rather than an architecture `transformers` defines. The graph below is what those config keys mean under `transformers` semantics, which is not necessarily what the repo's own file builds. A gap here is a statement about what we read, not about the checkpoint.

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
249
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$1556.31
CardMemory
T4 (16GB)weights + activationsdoes not fit
A100 (40GB)weights + activationsfits
H100 (80GB)weights + activationsfits

Structure

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

LayerTypeOutput shape
1InputInput1 × 32768
2EmbeddingEmbedding1 × 32768 × 896
3RoPERoPE1 × 32768 × 896
4Vision inputInput3 × 448 × 448
5PatchEmbedPatch Embed1024 × 1024
6Patch_Position_EmbeddingLearned Pos Embed1024 × 1024
7Vision_LN_1LayerNorm1024 × 1024
8Vision_Attn_1Multi-Head Attention1024 × 1024
9Vision_Add_1Add1024 × 1024
10Vision_FFN_1Feed Forward1024 × 1024
11Vision_LN_2LayerNorm1024 × 1024
12Vision_Attn_2Multi-Head Attention1024 × 1024
13Vision_Add_2Add1024 × 1024
14Vision_FFN_2Feed Forward1024 × 1024
15Vision_LN_3LayerNorm1024 × 1024
16Vision_Attn_3Multi-Head Attention1024 × 1024
17Vision_Add_3Add1024 × 1024
18Vision_FFN_3Feed Forward1024 × 1024
19Vision_LN_4LayerNorm1024 × 1024
20Vision_Attn_4Multi-Head Attention1024 × 1024
21Vision_Add_4Add1024 × 1024
22Vision_FFN_4Feed Forward1024 × 1024
23Vision_LN_5LayerNorm1024 × 1024
24Vision_Attn_5Multi-Head Attention1024 × 1024
25Vision_Add_5Add1024 × 1024
26Vision_FFN_5Feed Forward1024 × 1024
27Vision_LN_6LayerNorm1024 × 1024
28Vision_Attn_6Multi-Head Attention1024 × 1024
29Vision_Add_6Add1024 × 1024
30Vision_FFN_6Feed Forward1024 × 1024
31Vision_LN_7LayerNorm1024 × 1024
32Vision_Attn_7Multi-Head Attention1024 × 1024
33Vision_Add_7Add1024 × 1024
34Vision_FFN_7Feed Forward1024 × 1024
35Vision_LN_8LayerNorm1024 × 1024
36Vision_Attn_8Multi-Head Attention1024 × 1024
37Vision_Add_8Add1024 × 1024
38Vision_FFN_8Feed Forward1024 × 1024
39Vision_LN_9LayerNorm1024 × 1024
40Vision_Attn_9Multi-Head Attention1024 × 1024
41Vision_Add_9Add1024 × 1024
42Vision_FFN_9Feed Forward1024 × 1024
43Vision_LN_10LayerNorm1024 × 1024
44Vision_Attn_10Multi-Head Attention1024 × 1024
45Vision_Add_10Add1024 × 1024
46Vision_FFN_10Feed Forward1024 × 1024
47Vision_LN_11LayerNorm1024 × 1024
48Vision_Attn_11Multi-Head Attention1024 × 1024
49Vision_Add_11Add1024 × 1024
50Vision_FFN_11Feed Forward1024 × 1024
51Vision_LN_12LayerNorm1024 × 1024
52Vision_Attn_12Multi-Head Attention1024 × 1024
53Vision_Add_12Add1024 × 1024
54Vision_FFN_12Feed Forward1024 × 1024
55Vision_LN_13LayerNorm1024 × 1024
56Vision_Attn_13Multi-Head Attention1024 × 1024
57Vision_Add_13Add1024 × 1024
58Vision_FFN_13Feed Forward1024 × 1024
59Vision_LN_14LayerNorm1024 × 1024
60Vision_Attn_14Multi-Head Attention1024 × 1024
61Vision_Add_14Add1024 × 1024
62Vision_FFN_14Feed Forward1024 × 1024
63Vision_LN_15LayerNorm1024 × 1024
64Vision_Attn_15Multi-Head Attention1024 × 1024
65Vision_Add_15Add1024 × 1024
66Vision_FFN_15Feed Forward1024 × 1024
67Vision_LN_16LayerNorm1024 × 1024
68Vision_Attn_16Multi-Head Attention1024 × 1024
69Vision_Add_16Add1024 × 1024
70Vision_FFN_16Feed Forward1024 × 1024
71Vision_LN_17LayerNorm1024 × 1024
72Vision_Attn_17Multi-Head Attention1024 × 1024
73Vision_Add_17Add1024 × 1024
74Vision_FFN_17Feed Forward1024 × 1024
75Vision_LN_18LayerNorm1024 × 1024
76Vision_Attn_18Multi-Head Attention1024 × 1024
77Vision_Add_18Add1024 × 1024
78Vision_FFN_18Feed Forward1024 × 1024
79Vision_LN_19LayerNorm1024 × 1024
80Vision_Attn_19Multi-Head Attention1024 × 1024
81Vision_Add_19Add1024 × 1024
82Vision_FFN_19Feed Forward1024 × 1024
83Vision_LN_20LayerNorm1024 × 1024
84Vision_Attn_20Multi-Head Attention1024 × 1024
85Vision_Add_20Add1024 × 1024
86Vision_FFN_20Feed Forward1024 × 1024
87Vision_LN_21LayerNorm1024 × 1024
88Vision_Attn_21Multi-Head Attention1024 × 1024
89Vision_Add_21Add1024 × 1024
90Vision_FFN_21Feed Forward1024 × 1024
91Vision_LN_22LayerNorm1024 × 1024
92Vision_Attn_22Multi-Head Attention1024 × 1024
93Vision_Add_22Add1024 × 1024
94Vision_FFN_22Feed Forward1024 × 1024
95Vision_LN_23LayerNorm1024 × 1024
96Vision_Attn_23Multi-Head Attention1024 × 1024
97Vision_Add_23Add1024 × 1024
98Vision_FFN_23Feed Forward1024 × 1024
99Vision_LN_24LayerNorm1024 × 1024
100Vision_Attn_24Multi-Head Attention1024 × 1024
101Vision_Add_24Add1024 × 1024
102Vision_FFN_24Feed Forward1024 × 1024
103Vision projectorProjection1024 × 896
104Vision tokensReshape1 × 1024 × 896
105Multimodal fusion (concat tokens)Concatenate1 × 33792 × 896
106RMSNorm_1_1RMSNorm1 × 33792 × 896
107Attention_1Grouped Query Attn1 × 33792 × 896
108Add_1_attnAdd1 × 33792 × 896
109RMSNorm_1_2RMSNorm1 × 33792 × 896
110FFN_1SwiGLU1 × 33792 × 896
111Add_1_ffnAdd1 × 33792 × 896
112RMSNorm_2_1RMSNorm1 × 33792 × 896
113Attention_2Grouped Query Attn1 × 33792 × 896
114Add_2_attnAdd1 × 33792 × 896
115RMSNorm_2_2RMSNorm1 × 33792 × 896
116FFN_2SwiGLU1 × 33792 × 896
117Add_2_ffnAdd1 × 33792 × 896
118RMSNorm_3_1RMSNorm1 × 33792 × 896
119Attention_3Grouped Query Attn1 × 33792 × 896
120Add_3_attnAdd1 × 33792 × 896
121RMSNorm_3_2RMSNorm1 × 33792 × 896
122FFN_3SwiGLU1 × 33792 × 896
123Add_3_ffnAdd1 × 33792 × 896
124RMSNorm_4_1RMSNorm1 × 33792 × 896
125Attention_4Grouped Query Attn1 × 33792 × 896
126Add_4_attnAdd1 × 33792 × 896
127RMSNorm_4_2RMSNorm1 × 33792 × 896
128FFN_4SwiGLU1 × 33792 × 896
129Add_4_ffnAdd1 × 33792 × 896
130RMSNorm_5_1RMSNorm1 × 33792 × 896
131Attention_5Grouped Query Attn1 × 33792 × 896
132Add_5_attnAdd1 × 33792 × 896
133RMSNorm_5_2RMSNorm1 × 33792 × 896
134FFN_5SwiGLU1 × 33792 × 896
135Add_5_ffnAdd1 × 33792 × 896
136RMSNorm_6_1RMSNorm1 × 33792 × 896
137Attention_6Grouped Query Attn1 × 33792 × 896
138Add_6_attnAdd1 × 33792 × 896
139RMSNorm_6_2RMSNorm1 × 33792 × 896
140FFN_6SwiGLU1 × 33792 × 896
141Add_6_ffnAdd1 × 33792 × 896
142RMSNorm_7_1RMSNorm1 × 33792 × 896
143Attention_7Grouped Query Attn1 × 33792 × 896
144Add_7_attnAdd1 × 33792 × 896
145RMSNorm_7_2RMSNorm1 × 33792 × 896
146FFN_7SwiGLU1 × 33792 × 896
147Add_7_ffnAdd1 × 33792 × 896
148RMSNorm_8_1RMSNorm1 × 33792 × 896
149Attention_8Grouped Query Attn1 × 33792 × 896
150Add_8_attnAdd1 × 33792 × 896
151RMSNorm_8_2RMSNorm1 × 33792 × 896
152FFN_8SwiGLU1 × 33792 × 896
153Add_8_ffnAdd1 × 33792 × 896
154RMSNorm_9_1RMSNorm1 × 33792 × 896
155Attention_9Grouped Query Attn1 × 33792 × 896
156Add_9_attnAdd1 × 33792 × 896
157RMSNorm_9_2RMSNorm1 × 33792 × 896
158FFN_9SwiGLU1 × 33792 × 896
159Add_9_ffnAdd1 × 33792 × 896
160RMSNorm_10_1RMSNorm1 × 33792 × 896
161Attention_10Grouped Query Attn1 × 33792 × 896
162Add_10_attnAdd1 × 33792 × 896
163RMSNorm_10_2RMSNorm1 × 33792 × 896
164FFN_10SwiGLU1 × 33792 × 896
165Add_10_ffnAdd1 × 33792 × 896
166RMSNorm_11_1RMSNorm1 × 33792 × 896
167Attention_11Grouped Query Attn1 × 33792 × 896
168Add_11_attnAdd1 × 33792 × 896
169RMSNorm_11_2RMSNorm1 × 33792 × 896
170FFN_11SwiGLU1 × 33792 × 896
171Add_11_ffnAdd1 × 33792 × 896
172RMSNorm_12_1RMSNorm1 × 33792 × 896
173Attention_12Grouped Query Attn1 × 33792 × 896
174Add_12_attnAdd1 × 33792 × 896
175RMSNorm_12_2RMSNorm1 × 33792 × 896
176FFN_12SwiGLU1 × 33792 × 896
177Add_12_ffnAdd1 × 33792 × 896
178RMSNorm_13_1RMSNorm1 × 33792 × 896
179Attention_13Grouped Query Attn1 × 33792 × 896
180Add_13_attnAdd1 × 33792 × 896
181RMSNorm_13_2RMSNorm1 × 33792 × 896
182FFN_13SwiGLU1 × 33792 × 896
183Add_13_ffnAdd1 × 33792 × 896
184RMSNorm_14_1RMSNorm1 × 33792 × 896
185Attention_14Grouped Query Attn1 × 33792 × 896
186Add_14_attnAdd1 × 33792 × 896
187RMSNorm_14_2RMSNorm1 × 33792 × 896
188FFN_14SwiGLU1 × 33792 × 896
189Add_14_ffnAdd1 × 33792 × 896
190RMSNorm_15_1RMSNorm1 × 33792 × 896
191Attention_15Grouped Query Attn1 × 33792 × 896
192Add_15_attnAdd1 × 33792 × 896
193RMSNorm_15_2RMSNorm1 × 33792 × 896
194FFN_15SwiGLU1 × 33792 × 896
195Add_15_ffnAdd1 × 33792 × 896
196RMSNorm_16_1RMSNorm1 × 33792 × 896
197Attention_16Grouped Query Attn1 × 33792 × 896
198Add_16_attnAdd1 × 33792 × 896
199RMSNorm_16_2RMSNorm1 × 33792 × 896
200FFN_16SwiGLU1 × 33792 × 896
201Add_16_ffnAdd1 × 33792 × 896
202RMSNorm_17_1RMSNorm1 × 33792 × 896
203Attention_17Grouped Query Attn1 × 33792 × 896
204Add_17_attnAdd1 × 33792 × 896
205RMSNorm_17_2RMSNorm1 × 33792 × 896
206FFN_17SwiGLU1 × 33792 × 896
207Add_17_ffnAdd1 × 33792 × 896
208RMSNorm_18_1RMSNorm1 × 33792 × 896
209Attention_18Grouped Query Attn1 × 33792 × 896
210Add_18_attnAdd1 × 33792 × 896
211RMSNorm_18_2RMSNorm1 × 33792 × 896
212FFN_18SwiGLU1 × 33792 × 896
213Add_18_ffnAdd1 × 33792 × 896
214RMSNorm_19_1RMSNorm1 × 33792 × 896
215Attention_19Grouped Query Attn1 × 33792 × 896
216Add_19_attnAdd1 × 33792 × 896
217RMSNorm_19_2RMSNorm1 × 33792 × 896
218FFN_19SwiGLU1 × 33792 × 896
219Add_19_ffnAdd1 × 33792 × 896
220RMSNorm_20_1RMSNorm1 × 33792 × 896
221Attention_20Grouped Query Attn1 × 33792 × 896
222Add_20_attnAdd1 × 33792 × 896
223RMSNorm_20_2RMSNorm1 × 33792 × 896
224FFN_20SwiGLU1 × 33792 × 896
225Add_20_ffnAdd1 × 33792 × 896
226RMSNorm_21_1RMSNorm1 × 33792 × 896
227Attention_21Grouped Query Attn1 × 33792 × 896
228Add_21_attnAdd1 × 33792 × 896
229RMSNorm_21_2RMSNorm1 × 33792 × 896
230FFN_21SwiGLU1 × 33792 × 896
231Add_21_ffnAdd1 × 33792 × 896
232RMSNorm_22_1RMSNorm1 × 33792 × 896
233Attention_22Grouped Query Attn1 × 33792 × 896
234Add_22_attnAdd1 × 33792 × 896
235RMSNorm_22_2RMSNorm1 × 33792 × 896
236FFN_22SwiGLU1 × 33792 × 896
237Add_22_ffnAdd1 × 33792 × 896
238RMSNorm_23_1RMSNorm1 × 33792 × 896
239Attention_23Grouped Query Attn1 × 33792 × 896
240Add_23_attnAdd1 × 33792 × 896
241RMSNorm_23_2RMSNorm1 × 33792 × 896
242FFN_23SwiGLU1 × 33792 × 896
243Add_23_ffnAdd1 × 33792 × 896
244RMSNorm_24_1RMSNorm1 × 33792 × 896
245Attention_24Grouped Query Attn1 × 33792 × 896
246Add_24_attnAdd1 × 33792 × 896
247RMSNorm_24_2RMSNorm1 × 33792 × 896
248FFN_24SwiGLU1 × 33792 × 896
249Add_24_ffnAdd1 × 33792 × 896
250Final_RMSNormRMSNorm1 × 33792 × 896
251LM_HeadLinear1 × 33792 × 151655
252OutputOutput1 × 33792 × 151655

What the verifier says

warn"RoPE" receives input but its output is not connected. This layer will be unreachable in the forward pass. Fix: Connect the output forward, or add an Output node if this is the final layer.
dead-end
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 48 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 OpenGVLab/InternVL2-1B --plan --share

Other internvl_chat checkpoints

InternVL2-26B
25.42B derived · -0.38% against the checkpoint
InternVL2-2B
2.20B derived · -0.48% against the checkpoint
InternVL2_5-4B
3.70B derived · -0.28% against the checkpoint
InternVL3-1B
935M derived · -0.38% against the checkpoint