N Neurarch Architectures Models Checks Data Docs Open the app

Models / sarvam_moe

sarvam-30b

Reconstructed from its own config.json with no weights read. 177K 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
32.15B
32,152,907,776 parameters
In the published checkpoint
32.15B
32,152,650,368 scalars · safetensors.total, read 2026-03-23
Delta
+0.00%

custom-code This repository ships its own modeling code (`auto_map`, e.g. `configuration_sarvam_moe.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
118
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$66950.39
CardMemory
T4 (16GB)weights + activationsdoes not fit
A100 (40GB)weights + activationsdoes not fit
H100 (80GB)weights + activationsdoes not fit

Structure

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

LayerTypeOutput shape
1InputInput1 × 131072
2EmbeddingEmbedding1 × 131072 × 4096
3RoPERoPE1 × 131072 × 4096
4RMSNorm_1_1RMSNorm1 × 131072 × 4096
5Attention_1Grouped Query Attn1 × 131072 × 4096
6Add_1_attnAdd1 × 131072 × 4096
7RMSNorm_1_2RMSNorm1 × 131072 × 4096
8FFN_1SwiGLU1 × 131072 × 4096
9Add_1_ffnAdd1 × 131072 × 4096
10RMSNorm_2_1RMSNorm1 × 131072 × 4096
11Attention_2Grouped Query Attn1 × 131072 × 4096
12Add_2_attnAdd1 × 131072 × 4096
13RMSNorm_2_2RMSNorm1 × 131072 × 4096
14MoE_2Shared-Expert MoE1 × 131072 × 4096
15Add_2_ffnAdd1 × 131072 × 4096
16RMSNorm_3_1RMSNorm1 × 131072 × 4096
17Attention_3Grouped Query Attn1 × 131072 × 4096
18Add_3_attnAdd1 × 131072 × 4096
19RMSNorm_3_2RMSNorm1 × 131072 × 4096
20MoE_3Shared-Expert MoE1 × 131072 × 4096
21Add_3_ffnAdd1 × 131072 × 4096
22RMSNorm_4_1RMSNorm1 × 131072 × 4096
23Attention_4Grouped Query Attn1 × 131072 × 4096
24Add_4_attnAdd1 × 131072 × 4096
25RMSNorm_4_2RMSNorm1 × 131072 × 4096
26MoE_4Shared-Expert MoE1 × 131072 × 4096
27Add_4_ffnAdd1 × 131072 × 4096
28RMSNorm_5_1RMSNorm1 × 131072 × 4096
29Attention_5Grouped Query Attn1 × 131072 × 4096
30Add_5_attnAdd1 × 131072 × 4096
31RMSNorm_5_2RMSNorm1 × 131072 × 4096
32MoE_5Shared-Expert MoE1 × 131072 × 4096
33Add_5_ffnAdd1 × 131072 × 4096
34RMSNorm_6_1RMSNorm1 × 131072 × 4096
35Attention_6Grouped Query Attn1 × 131072 × 4096
36Add_6_attnAdd1 × 131072 × 4096
37RMSNorm_6_2RMSNorm1 × 131072 × 4096
38MoE_6Shared-Expert MoE1 × 131072 × 4096
39Add_6_ffnAdd1 × 131072 × 4096
40RMSNorm_7_1RMSNorm1 × 131072 × 4096
41Attention_7Grouped Query Attn1 × 131072 × 4096
42Add_7_attnAdd1 × 131072 × 4096
43RMSNorm_7_2RMSNorm1 × 131072 × 4096
44MoE_7Shared-Expert MoE1 × 131072 × 4096
45Add_7_ffnAdd1 × 131072 × 4096
46RMSNorm_8_1RMSNorm1 × 131072 × 4096
47Attention_8Grouped Query Attn1 × 131072 × 4096
48Add_8_attnAdd1 × 131072 × 4096
49RMSNorm_8_2RMSNorm1 × 131072 × 4096
50MoE_8Shared-Expert MoE1 × 131072 × 4096
51Add_8_ffnAdd1 × 131072 × 4096
52RMSNorm_9_1RMSNorm1 × 131072 × 4096
53Attention_9Grouped Query Attn1 × 131072 × 4096
54Add_9_attnAdd1 × 131072 × 4096
55RMSNorm_9_2RMSNorm1 × 131072 × 4096
56MoE_9Shared-Expert MoE1 × 131072 × 4096
57Add_9_ffnAdd1 × 131072 × 4096
58RMSNorm_10_1RMSNorm1 × 131072 × 4096
59Attention_10Grouped Query Attn1 × 131072 × 4096
60Add_10_attnAdd1 × 131072 × 4096
61RMSNorm_10_2RMSNorm1 × 131072 × 4096
62MoE_10Shared-Expert MoE1 × 131072 × 4096
63Add_10_ffnAdd1 × 131072 × 4096
64RMSNorm_11_1RMSNorm1 × 131072 × 4096
65Attention_11Grouped Query Attn1 × 131072 × 4096
66Add_11_attnAdd1 × 131072 × 4096
67RMSNorm_11_2RMSNorm1 × 131072 × 4096
68MoE_11Shared-Expert MoE1 × 131072 × 4096
69Add_11_ffnAdd1 × 131072 × 4096
70RMSNorm_12_1RMSNorm1 × 131072 × 4096
71Attention_12Grouped Query Attn1 × 131072 × 4096
72Add_12_attnAdd1 × 131072 × 4096
73RMSNorm_12_2RMSNorm1 × 131072 × 4096
74MoE_12Shared-Expert MoE1 × 131072 × 4096
75Add_12_ffnAdd1 × 131072 × 4096
76RMSNorm_13_1RMSNorm1 × 131072 × 4096
77Attention_13Grouped Query Attn1 × 131072 × 4096
78Add_13_attnAdd1 × 131072 × 4096
79RMSNorm_13_2RMSNorm1 × 131072 × 4096
80MoE_13Shared-Expert MoE1 × 131072 × 4096
81Add_13_ffnAdd1 × 131072 × 4096
82RMSNorm_14_1RMSNorm1 × 131072 × 4096
83Attention_14Grouped Query Attn1 × 131072 × 4096
84Add_14_attnAdd1 × 131072 × 4096
85RMSNorm_14_2RMSNorm1 × 131072 × 4096
86MoE_14Shared-Expert MoE1 × 131072 × 4096
87Add_14_ffnAdd1 × 131072 × 4096
88RMSNorm_15_1RMSNorm1 × 131072 × 4096
89Attention_15Grouped Query Attn1 × 131072 × 4096
90Add_15_attnAdd1 × 131072 × 4096
91RMSNorm_15_2RMSNorm1 × 131072 × 4096
92MoE_15Shared-Expert MoE1 × 131072 × 4096
93Add_15_ffnAdd1 × 131072 × 4096
94RMSNorm_16_1RMSNorm1 × 131072 × 4096
95Attention_16Grouped Query Attn1 × 131072 × 4096
96Add_16_attnAdd1 × 131072 × 4096
97RMSNorm_16_2RMSNorm1 × 131072 × 4096
98MoE_16Shared-Expert MoE1 × 131072 × 4096
99Add_16_ffnAdd1 × 131072 × 4096
100RMSNorm_17_1RMSNorm1 × 131072 × 4096
101Attention_17Grouped Query Attn1 × 131072 × 4096
102Add_17_attnAdd1 × 131072 × 4096
103RMSNorm_17_2RMSNorm1 × 131072 × 4096
104MoE_17Shared-Expert MoE1 × 131072 × 4096
105Add_17_ffnAdd1 × 131072 × 4096
106RMSNorm_18_1RMSNorm1 × 131072 × 4096
107Attention_18Grouped Query Attn1 × 131072 × 4096
108Add_18_attnAdd1 × 131072 × 4096
109RMSNorm_18_2RMSNorm1 × 131072 × 4096
110MoE_18Shared-Expert MoE1 × 131072 × 4096
111Add_18_ffnAdd1 × 131072 × 4096
112RMSNorm_19_1RMSNorm1 × 131072 × 4096
113Attention_19Grouped Query Attn1 × 131072 × 4096
114Add_19_attnAdd1 × 131072 × 4096
115RMSNorm_19_2RMSNorm1 × 131072 × 4096
116MoE_19Shared-Expert MoE1 × 131072 × 4096
117Add_19_ffnAdd1 × 131072 × 4096
118Final_RMSNormRMSNorm1 × 131072 × 4096
119LM_HeadLinear1 × 131072 × 262144
120OutputOutput1 × 131072 × 262144

What the verifier says

warnLinear "LM_Head" is 4096 × 262144 = 1074M parameters (~4.0 GB float32). A single dense layer this large usually means a feature map was flattened without pooling first; embedding / vocab-projection heads are the expected exception. Fix: Add a Global Average Pool or more downsampling before the Linear, or factorize it (low-rank / bottleneck projection).
huge-linear-params
infoAt 19 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 sarvamai/sarvam-30b --plan --share