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

Models / jina_clip

jina-clip-v2: GPU memory to fine-tune

Fine-tuning jina-clip-v2 at batch 1 takes about 2.12 GB of GPU memory for a full fine-tune (fits one T4 16 GB), and 0.68 GB with LoRA r=16 on a bf16 base (fits one T4 16 GB). Estimated from the model's structure, reading the config under transformers semantics, not measured. What fits on which card.

Reconstructed from its own config.json with no weights read. 121K 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
86.5M
86,535,168 parameters
In the published checkpoint
865M
865,278,476 scalars · safetensors.total, read 2026-04-08
Delta
-90.0%

custom-code This repository ships its own modeling code (`auto_map`), 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).

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

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
2.12 GB
LoRA r=16, batch 1
0.68 GB
CardFull fine-tuneLoRA r=16
T4 16 GBbatch 26batch 30
L4 24 GBbatch 42batch 45
A100 40 GBbatch 72batch 76
A100 / H100 80 GBbatch 149batch 152
H200 141 GBbatch 266batch 269

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 × 512 × 512
2PatchEmbeddingPatch Embed1297 × 768
3Patch_Position_EmbeddingLearned Pos Embed1297 × 768
4Attention_1Multi-Head Attention1297 × 768
5Add_1Add1297 × 768
6LayerNorm_1_1LayerNorm1297 × 768
7FFN_1Feed Forward1297 × 768
8Add_1_2Add1297 × 768
9LayerNorm_1_2LayerNorm1297 × 768
10Attention_2Multi-Head Attention1297 × 768
11Add_2Add1297 × 768
12LayerNorm_2_1LayerNorm1297 × 768
13FFN_2Feed Forward1297 × 768
14Add_2_2Add1297 × 768
15LayerNorm_2_2LayerNorm1297 × 768
16Attention_3Multi-Head Attention1297 × 768
17Add_3Add1297 × 768
18LayerNorm_3_1LayerNorm1297 × 768
19FFN_3Feed Forward1297 × 768
20Add_3_2Add1297 × 768
21LayerNorm_3_2LayerNorm1297 × 768
22Attention_4Multi-Head Attention1297 × 768
23Add_4Add1297 × 768
24LayerNorm_4_1LayerNorm1297 × 768
25FFN_4Feed Forward1297 × 768
26Add_4_2Add1297 × 768
27LayerNorm_4_2LayerNorm1297 × 768
28Attention_5Multi-Head Attention1297 × 768
29Add_5Add1297 × 768
30LayerNorm_5_1LayerNorm1297 × 768
31FFN_5Feed Forward1297 × 768
32Add_5_2Add1297 × 768
33LayerNorm_5_2LayerNorm1297 × 768
34Attention_6Multi-Head Attention1297 × 768
35Add_6Add1297 × 768
36LayerNorm_6_1LayerNorm1297 × 768
37FFN_6Feed Forward1297 × 768
38Add_6_2Add1297 × 768
39LayerNorm_6_2LayerNorm1297 × 768
40Attention_7Multi-Head Attention1297 × 768
41Add_7Add1297 × 768
42LayerNorm_7_1LayerNorm1297 × 768
43FFN_7Feed Forward1297 × 768
44Add_7_2Add1297 × 768
45LayerNorm_7_2LayerNorm1297 × 768
46Attention_8Multi-Head Attention1297 × 768
47Add_8Add1297 × 768
48LayerNorm_8_1LayerNorm1297 × 768
49FFN_8Feed Forward1297 × 768
50Add_8_2Add1297 × 768
51LayerNorm_8_2LayerNorm1297 × 768
52Attention_9Multi-Head Attention1297 × 768
53Add_9Add1297 × 768
54LayerNorm_9_1LayerNorm1297 × 768
55FFN_9Feed Forward1297 × 768
56Add_9_2Add1297 × 768
57LayerNorm_9_2LayerNorm1297 × 768
58Attention_10Multi-Head Attention1297 × 768
59Add_10Add1297 × 768
60LayerNorm_10_1LayerNorm1297 × 768
61FFN_10Feed Forward1297 × 768
62Add_10_2Add1297 × 768
63LayerNorm_10_2LayerNorm1297 × 768
64Attention_11Multi-Head Attention1297 × 768
65Add_11Add1297 × 768
66LayerNorm_11_1LayerNorm1297 × 768
67FFN_11Feed Forward1297 × 768
68Add_11_2Add1297 × 768
69LayerNorm_11_2LayerNorm1297 × 768
70Attention_12Multi-Head Attention1297 × 768
71Add_12Add1297 × 768
72LayerNorm_12_1LayerNorm1297 × 768
73FFN_12Feed Forward1297 × 768
74Add_12_2Add1297 × 768
75LayerNorm_12_2LayerNorm1297 × 768
76OutputOutput1297 × 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 jinaai/jina-clip-v2: 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 jinaai/jina-clip-v2 --plan --share

Other jina_clip checkpoints

jina-clip-v1
85.8M derived · -61.5% against the checkpoint