N Neurarch Try it See it Changes Bot Pricing API Open app

Models / gpt_neox

pythia-160m: GPU memory to fine-tune

Fine-tuning pythia-160m at batch 1 and 2048 tokens takes about 4.46 GB of GPU memory for a full fine-tune (fits one T4 16 GB), and 1.69 GB with LoRA r=16 on a bf16 base (fits one T4 16 GB). Estimated from the model's structure, not measured. What fits on which card.

Reconstructed from its own config.json with no weights read. 3.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
164M
163,946,112 parameters
In the published checkpoint
213M
212,654,688 scalars · safetensors.total, read 2026-09-06
Delta
-22.9%

What it costs to run

Cost is a roofline estimate on the priced GPU for 10 epochs at batch 32, 2048 tokens over 50,000 samples (assumed; no dataset attached).

Layers
76
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$10.96

Memory: what fits on which card

Largest batch per card. Training is sized at 2048 tokens per sample, serving at 2048 tokens per sequence.

Full fine-tune, batch 1 at 2048 tokens
4.46 GB
LoRA r=16, batch 1 at 2048 tokens
1.69 GB
Serve: bf16 weights
0.33 GB
Serve: KV cache, 2048 tokens
75 MB
CardFull fine-tuneLoRA r=16Serve bf16, 2048 tokens
T4 16 GBbatch 8batch 10batch 179
L4 24 GBbatch 13batch 15batch 272
A100 40 GBbatch 24batch 26batch 456
A100 / H100 80 GBbatch 50batch 52batch 917
H200 141 GBbatch 91batch 93batch 1619

Training: 2048 tokens per sample (2048, or the model's context when shorter), AdamW with bf16 autocast, SDPA attention (no score matrix stored), 1.15x headroom on every card. Full fine-tune holds weights, gradients and optimizer state (1.2 x 16 bytes per parameter) plus activations. LoRA is r=16 on every linear layer but the head, base frozen in bf16 (2 bytes per parameter), adapters at full AdamW state, same activations. A two-card split is a contiguous layer cut (pipeline parallel), computed only where one card cannot hold batch 1. Serving: bf16 weights plus the KV cache of 2048 tokens per sequence; prefill working set, CUDA context and framework reserve not counted.

These are estimates from the graph, not measurements. Against measured runs, held out by architecture, the estimate flagged 113 of the 131 jobs that did not fit their card and said "fits" on the other 18. Every measured run.

Structure

78 nodes. Output shapes are propagated from the input shape, batch dimension excluded, at 2048 tokens: the config's maximum context.

LayerTypeOutput shape
1InputInput1 × 2048
2EmbeddingEmbedding1 × 2048 × 768
3Positional_EmbeddingLearned Pos Embed1 × 2048 × 768
4LayerNorm_1_1LayerNorm1 × 2048 × 768
5Attention_1Multi-Head Attention1 × 2048 × 768
6Add_1_attnAdd1 × 2048 × 768
7LayerNorm_1_2LayerNorm1 × 2048 × 768
8FFN_1Feed Forward1 × 2048 × 768
9Add_1_ffnAdd1 × 2048 × 768
10LayerNorm_2_1LayerNorm1 × 2048 × 768
11Attention_2Multi-Head Attention1 × 2048 × 768
12Add_2_attnAdd1 × 2048 × 768
13LayerNorm_2_2LayerNorm1 × 2048 × 768
14FFN_2Feed Forward1 × 2048 × 768
15Add_2_ffnAdd1 × 2048 × 768
16LayerNorm_3_1LayerNorm1 × 2048 × 768
17Attention_3Multi-Head Attention1 × 2048 × 768
18Add_3_attnAdd1 × 2048 × 768
19LayerNorm_3_2LayerNorm1 × 2048 × 768
20FFN_3Feed Forward1 × 2048 × 768
21Add_3_ffnAdd1 × 2048 × 768
22LayerNorm_4_1LayerNorm1 × 2048 × 768
23Attention_4Multi-Head Attention1 × 2048 × 768
24Add_4_attnAdd1 × 2048 × 768
25LayerNorm_4_2LayerNorm1 × 2048 × 768
26FFN_4Feed Forward1 × 2048 × 768
27Add_4_ffnAdd1 × 2048 × 768
28LayerNorm_5_1LayerNorm1 × 2048 × 768
29Attention_5Multi-Head Attention1 × 2048 × 768
30Add_5_attnAdd1 × 2048 × 768
31LayerNorm_5_2LayerNorm1 × 2048 × 768
32FFN_5Feed Forward1 × 2048 × 768
33Add_5_ffnAdd1 × 2048 × 768
34LayerNorm_6_1LayerNorm1 × 2048 × 768
35Attention_6Multi-Head Attention1 × 2048 × 768
36Add_6_attnAdd1 × 2048 × 768
37LayerNorm_6_2LayerNorm1 × 2048 × 768
38FFN_6Feed Forward1 × 2048 × 768
39Add_6_ffnAdd1 × 2048 × 768
40LayerNorm_7_1LayerNorm1 × 2048 × 768
41Attention_7Multi-Head Attention1 × 2048 × 768
42Add_7_attnAdd1 × 2048 × 768
43LayerNorm_7_2LayerNorm1 × 2048 × 768
44FFN_7Feed Forward1 × 2048 × 768
45Add_7_ffnAdd1 × 2048 × 768
46LayerNorm_8_1LayerNorm1 × 2048 × 768
47Attention_8Multi-Head Attention1 × 2048 × 768
48Add_8_attnAdd1 × 2048 × 768
49LayerNorm_8_2LayerNorm1 × 2048 × 768
50FFN_8Feed Forward1 × 2048 × 768
51Add_8_ffnAdd1 × 2048 × 768
52LayerNorm_9_1LayerNorm1 × 2048 × 768
53Attention_9Multi-Head Attention1 × 2048 × 768
54Add_9_attnAdd1 × 2048 × 768
55LayerNorm_9_2LayerNorm1 × 2048 × 768
56FFN_9Feed Forward1 × 2048 × 768
57Add_9_ffnAdd1 × 2048 × 768
58LayerNorm_10_1LayerNorm1 × 2048 × 768
59Attention_10Multi-Head Attention1 × 2048 × 768
60Add_10_attnAdd1 × 2048 × 768
61LayerNorm_10_2LayerNorm1 × 2048 × 768
62FFN_10Feed Forward1 × 2048 × 768
63Add_10_ffnAdd1 × 2048 × 768
64LayerNorm_11_1LayerNorm1 × 2048 × 768
65Attention_11Multi-Head Attention1 × 2048 × 768
66Add_11_attnAdd1 × 2048 × 768
67LayerNorm_11_2LayerNorm1 × 2048 × 768
68FFN_11Feed Forward1 × 2048 × 768
69Add_11_ffnAdd1 × 2048 × 768
70LayerNorm_12_1LayerNorm1 × 2048 × 768
71Attention_12Multi-Head Attention1 × 2048 × 768
72Add_12_attnAdd1 × 2048 × 768
73LayerNorm_12_2LayerNorm1 × 2048 × 768
74FFN_12Feed Forward1 × 2048 × 768
75Add_12_ffnAdd1 × 2048 × 768
76Final_LayerNormLayerNorm1 × 2048 × 768
77LM_HeadLinear1 × 2048 × 50304
78OutputOutput1 × 2048 × 50304

What the verifier says

infoAt 12 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

What changed upstream

The change tracker follows EleutherAI/pythia-160m: every revision it has read, what changed in the config, tokenizer, chat template or weights between them, and an OSV advisory per change.

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 EleutherAI/pythia-160m --plan --share