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

Models / vit

vit-base-patch16-224: GPU memory to fine-tune

Fine-tuning vit-base-patch16-224 at batch 1 takes about 1.72 GB of GPU memory for a full fine-tune (fits one T4 16 GB), and 0.29 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. 5.1M 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
85.8M
85,797,120 parameters
In the published checkpoint
86.6M
86,567,656 scalars · safetensors.total, read 2026-09-06
Delta
-0.89%

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).

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

Memory: what fits on which card

Largest batch per card. Training is sized at the input shape below per sample.

Full fine-tune, batch 1
1.72 GB
LoRA r=16, batch 1
0.29 GB
CardFull fine-tuneLoRA r=16
T4 16 GBbatch 177batch 198
L4 24 GBbatch 278batch 299
A100 40 GBbatch 480batch 500
A100 / H100 80 GBbatch 983batch 1004
H200 141 GBbatch 1752batch 1772

Training: the input shape in the structure table, 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.

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

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

LayerTypeOutput shape
1InputInput3 × 224 × 224
2PatchEmbeddingPatch Embed197 × 768
3Patch_Position_EmbeddingLearned Pos Embed197 × 768
4Attention_1Multi-Head Attention197 × 768
5Add_1Add197 × 768
6LayerNorm_1_1LayerNorm197 × 768
7FFN_1Feed Forward197 × 768
8Add_1_2Add197 × 768
9LayerNorm_1_2LayerNorm197 × 768
10Attention_2Multi-Head Attention197 × 768
11Add_2Add197 × 768
12LayerNorm_2_1LayerNorm197 × 768
13FFN_2Feed Forward197 × 768
14Add_2_2Add197 × 768
15LayerNorm_2_2LayerNorm197 × 768
16Attention_3Multi-Head Attention197 × 768
17Add_3Add197 × 768
18LayerNorm_3_1LayerNorm197 × 768
19FFN_3Feed Forward197 × 768
20Add_3_2Add197 × 768
21LayerNorm_3_2LayerNorm197 × 768
22Attention_4Multi-Head Attention197 × 768
23Add_4Add197 × 768
24LayerNorm_4_1LayerNorm197 × 768
25FFN_4Feed Forward197 × 768
26Add_4_2Add197 × 768
27LayerNorm_4_2LayerNorm197 × 768
28Attention_5Multi-Head Attention197 × 768
29Add_5Add197 × 768
30LayerNorm_5_1LayerNorm197 × 768
31FFN_5Feed Forward197 × 768
32Add_5_2Add197 × 768
33LayerNorm_5_2LayerNorm197 × 768
34Attention_6Multi-Head Attention197 × 768
35Add_6Add197 × 768
36LayerNorm_6_1LayerNorm197 × 768
37FFN_6Feed Forward197 × 768
38Add_6_2Add197 × 768
39LayerNorm_6_2LayerNorm197 × 768
40Attention_7Multi-Head Attention197 × 768
41Add_7Add197 × 768
42LayerNorm_7_1LayerNorm197 × 768
43FFN_7Feed Forward197 × 768
44Add_7_2Add197 × 768
45LayerNorm_7_2LayerNorm197 × 768
46Attention_8Multi-Head Attention197 × 768
47Add_8Add197 × 768
48LayerNorm_8_1LayerNorm197 × 768
49FFN_8Feed Forward197 × 768
50Add_8_2Add197 × 768
51LayerNorm_8_2LayerNorm197 × 768
52Attention_9Multi-Head Attention197 × 768
53Add_9Add197 × 768
54LayerNorm_9_1LayerNorm197 × 768
55FFN_9Feed Forward197 × 768
56Add_9_2Add197 × 768
57LayerNorm_9_2LayerNorm197 × 768
58Attention_10Multi-Head Attention197 × 768
59Add_10Add197 × 768
60LayerNorm_10_1LayerNorm197 × 768
61FFN_10Feed Forward197 × 768
62Add_10_2Add197 × 768
63LayerNorm_10_2LayerNorm197 × 768
64Attention_11Multi-Head Attention197 × 768
65Add_11Add197 × 768
66LayerNorm_11_1LayerNorm197 × 768
67FFN_11Feed Forward197 × 768
68Add_11_2Add197 × 768
69LayerNorm_11_2LayerNorm197 × 768
70Attention_12Multi-Head Attention197 × 768
71Add_12Add197 × 768
72LayerNorm_12_1LayerNorm197 × 768
73FFN_12Feed Forward197 × 768
74Add_12_2Add197 × 768
75LayerNorm_12_2LayerNorm197 × 768
76OutputOutput197 × 768

What the verifier says

warn"LayerNorm_12_2" (layerNorm) is the last layer before Output. Normalizing the raw logits constrains the output range and breaks standard loss functions. Fix: Move normalization before the final Linear/Conv layer.
bn-at-output
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 google/vit-base-patch16-224: 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 google/vit-base-patch16-224 --plan --share

Other vit checkpoints

nsfw_image_detection
124M derived · +45.0% against the checkpoint
vit-base-oxford-iiit-pets
85.8M derived · -0.03% against the checkpoint