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

Models / vit

nsfw_image_detection: GPU memory to fine-tune

Fine-tuning nsfw_image_detection at batch 1 takes about 98.5 GB of GPU memory for a full fine-tune (borderline on one H200 141 GB), and 96.5 GB with LoRA r=16 on a bf16 base (borderline on one H200 141 GB). Estimated from the model's structure, not measured. What fits on which card.

Reconstructed from its own config.json with no weights read. 4.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
124M
124,438,272 parameters
In the published checkpoint
85.8M
85,800,194 scalars · safetensors.total, read 2026-09-07
Delta
+45.0%

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

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
98.5 GB
LoRA r=16, batch 1
96.5 GB
CardFull fine-tuneLoRA r=16
T4 16 GBdoes not fit at batch 1does not fit at batch 1
L4 24 GBdoes not fit at batch 1does not fit at batch 1
A100 40 GBdoes not fit at batch 1does not fit at batch 1
A100 / H100 80 GBdoes not fit at batch 1does not fit at batch 1
H200 141 GBbatch 1, borderlinebatch 1, borderline

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. "Borderline" means the card holds batch 1 on the estimate but not on the conservative peak (the estimate x 1.43, at or above the measured peak on 95% of held-out runs): measure one step before reserving it.

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
2EmbeddingEmbedding3 × 224 × 224 × 768
3Positional_EmbeddingLearned Pos Embed3 × 224 × 224 × 768
4LayerNorm_1_1LayerNorm3 × 224 × 224 × 768
5Attention_1Multi-Head Attention3 × 224 × 224 × 768
6Add_1_attnAdd3 × 224 × 224 × 768
7LayerNorm_1_2LayerNorm3 × 224 × 224 × 768
8FFN_1Feed Forward3 × 224 × 224 × 768
9Add_1_ffnAdd3 × 224 × 224 × 768
10LayerNorm_2_1LayerNorm3 × 224 × 224 × 768
11Attention_2Multi-Head Attention3 × 224 × 224 × 768
12Add_2_attnAdd3 × 224 × 224 × 768
13LayerNorm_2_2LayerNorm3 × 224 × 224 × 768
14FFN_2Feed Forward3 × 224 × 224 × 768
15Add_2_ffnAdd3 × 224 × 224 × 768
16LayerNorm_3_1LayerNorm3 × 224 × 224 × 768
17Attention_3Multi-Head Attention3 × 224 × 224 × 768
18Add_3_attnAdd3 × 224 × 224 × 768
19LayerNorm_3_2LayerNorm3 × 224 × 224 × 768
20FFN_3Feed Forward3 × 224 × 224 × 768
21Add_3_ffnAdd3 × 224 × 224 × 768
22LayerNorm_4_1LayerNorm3 × 224 × 224 × 768
23Attention_4Multi-Head Attention3 × 224 × 224 × 768
24Add_4_attnAdd3 × 224 × 224 × 768
25LayerNorm_4_2LayerNorm3 × 224 × 224 × 768
26FFN_4Feed Forward3 × 224 × 224 × 768
27Add_4_ffnAdd3 × 224 × 224 × 768
28LayerNorm_5_1LayerNorm3 × 224 × 224 × 768
29Attention_5Multi-Head Attention3 × 224 × 224 × 768
30Add_5_attnAdd3 × 224 × 224 × 768
31LayerNorm_5_2LayerNorm3 × 224 × 224 × 768
32FFN_5Feed Forward3 × 224 × 224 × 768
33Add_5_ffnAdd3 × 224 × 224 × 768
34LayerNorm_6_1LayerNorm3 × 224 × 224 × 768
35Attention_6Multi-Head Attention3 × 224 × 224 × 768
36Add_6_attnAdd3 × 224 × 224 × 768
37LayerNorm_6_2LayerNorm3 × 224 × 224 × 768
38FFN_6Feed Forward3 × 224 × 224 × 768
39Add_6_ffnAdd3 × 224 × 224 × 768
40LayerNorm_7_1LayerNorm3 × 224 × 224 × 768
41Attention_7Multi-Head Attention3 × 224 × 224 × 768
42Add_7_attnAdd3 × 224 × 224 × 768
43LayerNorm_7_2LayerNorm3 × 224 × 224 × 768
44FFN_7Feed Forward3 × 224 × 224 × 768
45Add_7_ffnAdd3 × 224 × 224 × 768
46LayerNorm_8_1LayerNorm3 × 224 × 224 × 768
47Attention_8Multi-Head Attention3 × 224 × 224 × 768
48Add_8_attnAdd3 × 224 × 224 × 768
49LayerNorm_8_2LayerNorm3 × 224 × 224 × 768
50FFN_8Feed Forward3 × 224 × 224 × 768
51Add_8_ffnAdd3 × 224 × 224 × 768
52LayerNorm_9_1LayerNorm3 × 224 × 224 × 768
53Attention_9Multi-Head Attention3 × 224 × 224 × 768
54Add_9_attnAdd3 × 224 × 224 × 768
55LayerNorm_9_2LayerNorm3 × 224 × 224 × 768
56FFN_9Feed Forward3 × 224 × 224 × 768
57Add_9_ffnAdd3 × 224 × 224 × 768
58LayerNorm_10_1LayerNorm3 × 224 × 224 × 768
59Attention_10Multi-Head Attention3 × 224 × 224 × 768
60Add_10_attnAdd3 × 224 × 224 × 768
61LayerNorm_10_2LayerNorm3 × 224 × 224 × 768
62FFN_10Feed Forward3 × 224 × 224 × 768
63Add_10_ffnAdd3 × 224 × 224 × 768
64LayerNorm_11_1LayerNorm3 × 224 × 224 × 768
65Attention_11Multi-Head Attention3 × 224 × 224 × 768
66Add_11_attnAdd3 × 224 × 224 × 768
67LayerNorm_11_2LayerNorm3 × 224 × 224 × 768
68FFN_11Feed Forward3 × 224 × 224 × 768
69Add_11_ffnAdd3 × 224 × 224 × 768
70LayerNorm_12_1LayerNorm3 × 224 × 224 × 768
71Attention_12Multi-Head Attention3 × 224 × 224 × 768
72Add_12_attnAdd3 × 224 × 224 × 768
73LayerNorm_12_2LayerNorm3 × 224 × 224 × 768
74FFN_12Feed Forward3 × 224 × 224 × 768
75Add_12_ffnAdd3 × 224 × 224 × 768
76OutputOutput3 × 224 × 224 × 768

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 Falconsai/nsfw_image_detection: 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 Falconsai/nsfw_image_detection --plan --share

Other vit checkpoints

vit-base-oxford-iiit-pets
85.8M derived · -0.03% against the checkpoint
vit-base-patch16-224
85.8M derived · -0.89% against the checkpoint