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

Models / jina_embeddings_v5

jina-embeddings-v5-text-small: GPU memory to fine-tune

Fine-tuning jina-embeddings-v5-text-small at batch 1 and 2048 tokens takes about 13.9 GB of GPU memory for a full fine-tune (fits one L4 24 GB), and 3.86 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. 276K 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
596M
596,041,728 parameters
In the published checkpoint
596M
596,049,920 scalars · safetensors.total, read 2026-04-15
Delta
-0.00%

custom-code This repository ships its own modeling code (`auto_map`, e.g. `configuration_jina_embeddings_v5.py`), 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
114
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$42.81

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
13.9 GB
LoRA r=16, batch 1 at 2048 tokens
3.86 GB
Serve: bf16 weights
1.19 GB
Serve: KV cache, 4096 tokens
0.47 GB
CardFull fine-tuneLoRA r=16Serve bf16, 4096 tokens
T4 16 GB2 cards at batch 1 (113 + 1 layers)batch 5batch 27
L4 24 GBbatch 3batch 7batch 41
A100 40 GBbatch 9batch 13batch 71
A100 / H100 80 GBbatch 23batch 27batch 145
H200 141 GBbatch 44batch 48batch 258

Training: 2048 tokens per sample (2048, or the model's context when shorter; the structure table is at the config's maximum, 32768), 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 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

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

LayerTypeOutput shape
1InputInput1 × 32768
2EmbeddingEmbedding1 × 32768 × 1024
3RoPERoPE1 × 32768 × 1024
4Attention_1Grouped Query Attn1 × 32768 × 1024
5Add_1Add1 × 32768 × 1024
6LayerNorm_1_1LayerNorm1 × 32768 × 1024
7FFN_1SwiGLU1 × 32768 × 1024
8Attention_2Grouped Query Attn1 × 32768 × 1024
9Add_2Add1 × 32768 × 1024
10LayerNorm_2_1LayerNorm1 × 32768 × 1024
11FFN_2SwiGLU1 × 32768 × 1024
12Attention_3Grouped Query Attn1 × 32768 × 1024
13Add_3Add1 × 32768 × 1024
14LayerNorm_3_1LayerNorm1 × 32768 × 1024
15FFN_3SwiGLU1 × 32768 × 1024
16Attention_4Grouped Query Attn1 × 32768 × 1024
17Add_4Add1 × 32768 × 1024
18LayerNorm_4_1LayerNorm1 × 32768 × 1024
19FFN_4SwiGLU1 × 32768 × 1024
20Attention_5Grouped Query Attn1 × 32768 × 1024
21Add_5Add1 × 32768 × 1024
22LayerNorm_5_1LayerNorm1 × 32768 × 1024
23FFN_5SwiGLU1 × 32768 × 1024
24Attention_6Grouped Query Attn1 × 32768 × 1024
25Add_6Add1 × 32768 × 1024
26LayerNorm_6_1LayerNorm1 × 32768 × 1024
27FFN_6SwiGLU1 × 32768 × 1024
28Attention_7Grouped Query Attn1 × 32768 × 1024
29Add_7Add1 × 32768 × 1024
30LayerNorm_7_1LayerNorm1 × 32768 × 1024
31FFN_7SwiGLU1 × 32768 × 1024
32Attention_8Grouped Query Attn1 × 32768 × 1024
33Add_8Add1 × 32768 × 1024
34LayerNorm_8_1LayerNorm1 × 32768 × 1024
35FFN_8SwiGLU1 × 32768 × 1024
36Attention_9Grouped Query Attn1 × 32768 × 1024
37Add_9Add1 × 32768 × 1024
38LayerNorm_9_1LayerNorm1 × 32768 × 1024
39FFN_9SwiGLU1 × 32768 × 1024
40Attention_10Grouped Query Attn1 × 32768 × 1024
41Add_10Add1 × 32768 × 1024
42LayerNorm_10_1LayerNorm1 × 32768 × 1024
43FFN_10SwiGLU1 × 32768 × 1024
44Attention_11Grouped Query Attn1 × 32768 × 1024
45Add_11Add1 × 32768 × 1024
46LayerNorm_11_1LayerNorm1 × 32768 × 1024
47FFN_11SwiGLU1 × 32768 × 1024
48Attention_12Grouped Query Attn1 × 32768 × 1024
49Add_12Add1 × 32768 × 1024
50LayerNorm_12_1LayerNorm1 × 32768 × 1024
51FFN_12SwiGLU1 × 32768 × 1024
52Attention_13Grouped Query Attn1 × 32768 × 1024
53Add_13Add1 × 32768 × 1024
54LayerNorm_13_1LayerNorm1 × 32768 × 1024
55FFN_13SwiGLU1 × 32768 × 1024
56Attention_14Grouped Query Attn1 × 32768 × 1024
57Add_14Add1 × 32768 × 1024
58LayerNorm_14_1LayerNorm1 × 32768 × 1024
59FFN_14SwiGLU1 × 32768 × 1024
60Attention_15Grouped Query Attn1 × 32768 × 1024
61Add_15Add1 × 32768 × 1024
62LayerNorm_15_1LayerNorm1 × 32768 × 1024
63FFN_15SwiGLU1 × 32768 × 1024
64Attention_16Grouped Query Attn1 × 32768 × 1024
65Add_16Add1 × 32768 × 1024
66LayerNorm_16_1LayerNorm1 × 32768 × 1024
67FFN_16SwiGLU1 × 32768 × 1024
68Attention_17Grouped Query Attn1 × 32768 × 1024
69Add_17Add1 × 32768 × 1024
70LayerNorm_17_1LayerNorm1 × 32768 × 1024
71FFN_17SwiGLU1 × 32768 × 1024
72Attention_18Grouped Query Attn1 × 32768 × 1024
73Add_18Add1 × 32768 × 1024
74LayerNorm_18_1LayerNorm1 × 32768 × 1024
75FFN_18SwiGLU1 × 32768 × 1024
76Attention_19Grouped Query Attn1 × 32768 × 1024
77Add_19Add1 × 32768 × 1024
78LayerNorm_19_1LayerNorm1 × 32768 × 1024
79FFN_19SwiGLU1 × 32768 × 1024
80Attention_20Grouped Query Attn1 × 32768 × 1024
81Add_20Add1 × 32768 × 1024
82LayerNorm_20_1LayerNorm1 × 32768 × 1024
83FFN_20SwiGLU1 × 32768 × 1024
84Attention_21Grouped Query Attn1 × 32768 × 1024
85Add_21Add1 × 32768 × 1024
86LayerNorm_21_1LayerNorm1 × 32768 × 1024
87FFN_21SwiGLU1 × 32768 × 1024
88Attention_22Grouped Query Attn1 × 32768 × 1024
89Add_22Add1 × 32768 × 1024
90LayerNorm_22_1LayerNorm1 × 32768 × 1024
91FFN_22SwiGLU1 × 32768 × 1024
92Attention_23Grouped Query Attn1 × 32768 × 1024
93Add_23Add1 × 32768 × 1024
94LayerNorm_23_1LayerNorm1 × 32768 × 1024
95FFN_23SwiGLU1 × 32768 × 1024
96Attention_24Grouped Query Attn1 × 32768 × 1024
97Add_24Add1 × 32768 × 1024
98LayerNorm_24_1LayerNorm1 × 32768 × 1024
99FFN_24SwiGLU1 × 32768 × 1024
100Attention_25Grouped Query Attn1 × 32768 × 1024
101Add_25Add1 × 32768 × 1024
102LayerNorm_25_1LayerNorm1 × 32768 × 1024
103FFN_25SwiGLU1 × 32768 × 1024
104Attention_26Grouped Query Attn1 × 32768 × 1024
105Add_26Add1 × 32768 × 1024
106LayerNorm_26_1LayerNorm1 × 32768 × 1024
107FFN_26SwiGLU1 × 32768 × 1024
108Attention_27Grouped Query Attn1 × 32768 × 1024
109Add_27Add1 × 32768 × 1024
110LayerNorm_27_1LayerNorm1 × 32768 × 1024
111FFN_27SwiGLU1 × 32768 × 1024
112Attention_28Grouped Query Attn1 × 32768 × 1024
113Add_28Add1 × 32768 × 1024
114LayerNorm_28_1LayerNorm1 × 32768 × 1024
115FFN_28SwiGLU1 × 32768 × 1024
116OutputOutput1 × 32768 × 1024

What the verifier says

infoAt 28 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-v5-text-small: 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-v5-text-small --plan --share

Other jina_embeddings_v5 checkpoints

jina-embeddings-v5-text-nano
212M derived · +0.02% against the checkpoint