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

Models / XLMRobertaModel

jina-embeddings-v3: GPU memory to fine-tune

Fine-tuning jina-embeddings-v3 at batch 1 and 2048 tokens takes about 12.6 GB of GPU memory for a full fine-tune (borderline on one T4 16 GB), and 2.99 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. 2.3M 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
567M
566,652,928 parameters
In the published checkpoint
572M
572,310,396 scalars · safetensors.total, read 2026-09-06
Delta
-0.99%

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, 2048 tokens over 50,000 samples (assumed; no dataset attached).

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

Memory: what fits on which card

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

Full fine-tune, batch 1 at 2048 tokens
12.6 GB
LoRA r=16, batch 1 at 2048 tokens
2.99 GB
Serve: bf16 weights
1.13 GB
Serve: KV cache, 4096 tokens
0.40 GB
CardFull fine-tuneLoRA r=16Serve bf16, 4096 tokens
T4 16 GBbatch 1, borderlinebatch 7batch 31
L4 24 GBbatch 5batch 11batch 49
A100 40 GBbatch 13batch 19batch 83
A100 / H100 80 GBbatch 34batch 39batch 169
H200 141 GBbatch 64batch 70batch 301

Training: 2048 tokens per sample (2048, or the model's context when shorter; the structure table is at the config's maximum, 8194), 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. Serving: bf16 weights plus the KV cache of 4096 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

100 nodes. Output shapes are propagated from the input shape, batch dimension excluded, at 8194 tokens: the config's maximum context, not the 2048 the memory above is sized at.

LayerTypeOutput shape
1InputInput1 × 8194
2EmbeddingEmbedding1 × 8194 × 1024
3Positional_EmbeddingLearned Pos Embed1 × 8194 × 1024
4Attention_1Multi-Head Attention1 × 8194 × 1024
5Add_1Add1 × 8194 × 1024
6LayerNorm_1_1LayerNorm1 × 8194 × 1024
7FFN_1Feed Forward1 × 8194 × 1024
8Attention_2Multi-Head Attention1 × 8194 × 1024
9Add_2Add1 × 8194 × 1024
10LayerNorm_2_1LayerNorm1 × 8194 × 1024
11FFN_2Feed Forward1 × 8194 × 1024
12Attention_3Multi-Head Attention1 × 8194 × 1024
13Add_3Add1 × 8194 × 1024
14LayerNorm_3_1LayerNorm1 × 8194 × 1024
15FFN_3Feed Forward1 × 8194 × 1024
16Attention_4Multi-Head Attention1 × 8194 × 1024
17Add_4Add1 × 8194 × 1024
18LayerNorm_4_1LayerNorm1 × 8194 × 1024
19FFN_4Feed Forward1 × 8194 × 1024
20Attention_5Multi-Head Attention1 × 8194 × 1024
21Add_5Add1 × 8194 × 1024
22LayerNorm_5_1LayerNorm1 × 8194 × 1024
23FFN_5Feed Forward1 × 8194 × 1024
24Attention_6Multi-Head Attention1 × 8194 × 1024
25Add_6Add1 × 8194 × 1024
26LayerNorm_6_1LayerNorm1 × 8194 × 1024
27FFN_6Feed Forward1 × 8194 × 1024
28Attention_7Multi-Head Attention1 × 8194 × 1024
29Add_7Add1 × 8194 × 1024
30LayerNorm_7_1LayerNorm1 × 8194 × 1024
31FFN_7Feed Forward1 × 8194 × 1024
32Attention_8Multi-Head Attention1 × 8194 × 1024
33Add_8Add1 × 8194 × 1024
34LayerNorm_8_1LayerNorm1 × 8194 × 1024
35FFN_8Feed Forward1 × 8194 × 1024
36Attention_9Multi-Head Attention1 × 8194 × 1024
37Add_9Add1 × 8194 × 1024
38LayerNorm_9_1LayerNorm1 × 8194 × 1024
39FFN_9Feed Forward1 × 8194 × 1024
40Attention_10Multi-Head Attention1 × 8194 × 1024
41Add_10Add1 × 8194 × 1024
42LayerNorm_10_1LayerNorm1 × 8194 × 1024
43FFN_10Feed Forward1 × 8194 × 1024
44Attention_11Multi-Head Attention1 × 8194 × 1024
45Add_11Add1 × 8194 × 1024
46LayerNorm_11_1LayerNorm1 × 8194 × 1024
47FFN_11Feed Forward1 × 8194 × 1024
48Attention_12Multi-Head Attention1 × 8194 × 1024
49Add_12Add1 × 8194 × 1024
50LayerNorm_12_1LayerNorm1 × 8194 × 1024
51FFN_12Feed Forward1 × 8194 × 1024
52Attention_13Multi-Head Attention1 × 8194 × 1024
53Add_13Add1 × 8194 × 1024
54LayerNorm_13_1LayerNorm1 × 8194 × 1024
55FFN_13Feed Forward1 × 8194 × 1024
56Attention_14Multi-Head Attention1 × 8194 × 1024
57Add_14Add1 × 8194 × 1024
58LayerNorm_14_1LayerNorm1 × 8194 × 1024
59FFN_14Feed Forward1 × 8194 × 1024
60Attention_15Multi-Head Attention1 × 8194 × 1024
61Add_15Add1 × 8194 × 1024
62LayerNorm_15_1LayerNorm1 × 8194 × 1024
63FFN_15Feed Forward1 × 8194 × 1024
64Attention_16Multi-Head Attention1 × 8194 × 1024
65Add_16Add1 × 8194 × 1024
66LayerNorm_16_1LayerNorm1 × 8194 × 1024
67FFN_16Feed Forward1 × 8194 × 1024
68Attention_17Multi-Head Attention1 × 8194 × 1024
69Add_17Add1 × 8194 × 1024
70LayerNorm_17_1LayerNorm1 × 8194 × 1024
71FFN_17Feed Forward1 × 8194 × 1024
72Attention_18Multi-Head Attention1 × 8194 × 1024
73Add_18Add1 × 8194 × 1024
74LayerNorm_18_1LayerNorm1 × 8194 × 1024
75FFN_18Feed Forward1 × 8194 × 1024
76Attention_19Multi-Head Attention1 × 8194 × 1024
77Add_19Add1 × 8194 × 1024
78LayerNorm_19_1LayerNorm1 × 8194 × 1024
79FFN_19Feed Forward1 × 8194 × 1024
80Attention_20Multi-Head Attention1 × 8194 × 1024
81Add_20Add1 × 8194 × 1024
82LayerNorm_20_1LayerNorm1 × 8194 × 1024
83FFN_20Feed Forward1 × 8194 × 1024
84Attention_21Multi-Head Attention1 × 8194 × 1024
85Add_21Add1 × 8194 × 1024
86LayerNorm_21_1LayerNorm1 × 8194 × 1024
87FFN_21Feed Forward1 × 8194 × 1024
88Attention_22Multi-Head Attention1 × 8194 × 1024
89Add_22Add1 × 8194 × 1024
90LayerNorm_22_1LayerNorm1 × 8194 × 1024
91FFN_22Feed Forward1 × 8194 × 1024
92Attention_23Multi-Head Attention1 × 8194 × 1024
93Add_23Add1 × 8194 × 1024
94LayerNorm_23_1LayerNorm1 × 8194 × 1024
95FFN_23Feed Forward1 × 8194 × 1024
96Attention_24Multi-Head Attention1 × 8194 × 1024
97Add_24Add1 × 8194 × 1024
98LayerNorm_24_1LayerNorm1 × 8194 × 1024
99FFN_24Feed Forward1 × 8194 × 1024
100OutputOutput1 × 8194 × 1024

What the verifier says

infoAt 24 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-embeddings-v3: 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-embeddings-v3 --plan --share