Models / qwen3_vl
Qwen3-VL-Embedding-2B: GPU memory to fine-tune
Fine-tuning Qwen3-VL-Embedding-2B at batch 1 and 2048 tokens takes about 37.9 GB of GPU memory for a full fine-tune (fits one A100 / H100 80 GB), and 8.63 GB with LoRA r=16 on a bf16 base (fits one T4 16 GB). Estimated from the model's structure, for the towers the graph reconstructs, not measured. What fits on which card.
Reconstructed from its own config.json
with no weights read. 1.4M 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.
multi-tower The config declares 2 sub-models (text_config, vision_config). The published checkpoint carries all of them; the graph below carries the towers the reader reconstructs. 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).
Memory: what fits on which card
Largest batch per card. Training is sized at 2048 tokens per sample, serving at 4096 tokens per sequence.
| Card | Full fine-tune | LoRA r=16 | Serve bf16, 4096 tokens |
|---|---|---|---|
| T4 16 GB | does not fit at batch 1 | batch 2 | batch 22 |
| L4 24 GB | 2 cards at batch 1 (84 + 91 layers) | batch 3 | batch 37 |
| A100 40 GB | 2 cards at batch 1 (158 + 17 layers) | batch 6 | batch 66 |
| A100 / H100 80 GB | batch 7 | batch 13 | batch 140 |
| H200 141 GB | batch 18 | batch 24 | batch 253 |
Training: 2048 tokens per sample (2048, or the model's context when shorter; the structure table is at the config's maximum, 262144), 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
178 nodes. Output shapes are propagated from the input shape, batch dimension excluded, at 262144 tokens: the config's maximum context, not the 2048 the memory above is sized at.
| Layer | Type | Output shape | |
|---|---|---|---|
| 1 | Input | Input | 1 × 262144 |
| 2 | Embedding | Embedding | 1 × 262144 × 2048 |
| 3 | RoPE | RoPE | 1 × 262144 × 2048 |
| 4 | Vision input | Input | 3 × 224 × 224 |
| 5 | PatchEmbed | Patch Embed | 196 × 1024 |
| 6 | Patch_Position_Embedding | Learned Pos Embed | 196 × 1024 |
| 7 | Vision encoder (internals not in config) | Projection | 196 × 2048 |
| 8 | Vision tokens | Reshape | 1 × 196 × 2048 |
| 9 | Multimodal fusion (concat tokens) | Concatenate | 1 × 262340 × 2048 |
| 10 | RMSNorm_1_1 | RMSNorm | 1 × 262340 × 2048 |
| 11 | Attention_1 | Grouped Query Attn | 1 × 262340 × 2048 |
| 12 | Add_1_attn | Add | 1 × 262340 × 2048 |
| 13 | RMSNorm_1_2 | RMSNorm | 1 × 262340 × 2048 |
| 14 | FFN_1 | SwiGLU | 1 × 262340 × 2048 |
| 15 | Add_1_ffn | Add | 1 × 262340 × 2048 |
| 16 | RMSNorm_2_1 | RMSNorm | 1 × 262340 × 2048 |
| 17 | Attention_2 | Grouped Query Attn | 1 × 262340 × 2048 |
| 18 | Add_2_attn | Add | 1 × 262340 × 2048 |
| 19 | RMSNorm_2_2 | RMSNorm | 1 × 262340 × 2048 |
| 20 | FFN_2 | SwiGLU | 1 × 262340 × 2048 |
| 21 | Add_2_ffn | Add | 1 × 262340 × 2048 |
| 22 | RMSNorm_3_1 | RMSNorm | 1 × 262340 × 2048 |
| 23 | Attention_3 | Grouped Query Attn | 1 × 262340 × 2048 |
| 24 | Add_3_attn | Add | 1 × 262340 × 2048 |
| 25 | RMSNorm_3_2 | RMSNorm | 1 × 262340 × 2048 |
| 26 | FFN_3 | SwiGLU | 1 × 262340 × 2048 |
| 27 | Add_3_ffn | Add | 1 × 262340 × 2048 |
| 28 | RMSNorm_4_1 | RMSNorm | 1 × 262340 × 2048 |
| 29 | Attention_4 | Grouped Query Attn | 1 × 262340 × 2048 |
| 30 | Add_4_attn | Add | 1 × 262340 × 2048 |
| 31 | RMSNorm_4_2 | RMSNorm | 1 × 262340 × 2048 |
| 32 | FFN_4 | SwiGLU | 1 × 262340 × 2048 |
| 33 | Add_4_ffn | Add | 1 × 262340 × 2048 |
| 34 | RMSNorm_5_1 | RMSNorm | 1 × 262340 × 2048 |
| 35 | Attention_5 | Grouped Query Attn | 1 × 262340 × 2048 |
| 36 | Add_5_attn | Add | 1 × 262340 × 2048 |
| 37 | RMSNorm_5_2 | RMSNorm | 1 × 262340 × 2048 |
| 38 | FFN_5 | SwiGLU | 1 × 262340 × 2048 |
| 39 | Add_5_ffn | Add | 1 × 262340 × 2048 |
| 40 | RMSNorm_6_1 | RMSNorm | 1 × 262340 × 2048 |
| 41 | Attention_6 | Grouped Query Attn | 1 × 262340 × 2048 |
| 42 | Add_6_attn | Add | 1 × 262340 × 2048 |
| 43 | RMSNorm_6_2 | RMSNorm | 1 × 262340 × 2048 |
| 44 | FFN_6 | SwiGLU | 1 × 262340 × 2048 |
| 45 | Add_6_ffn | Add | 1 × 262340 × 2048 |
| 46 | RMSNorm_7_1 | RMSNorm | 1 × 262340 × 2048 |
| 47 | Attention_7 | Grouped Query Attn | 1 × 262340 × 2048 |
| 48 | Add_7_attn | Add | 1 × 262340 × 2048 |
| 49 | RMSNorm_7_2 | RMSNorm | 1 × 262340 × 2048 |
| 50 | FFN_7 | SwiGLU | 1 × 262340 × 2048 |
| 51 | Add_7_ffn | Add | 1 × 262340 × 2048 |
| 52 | RMSNorm_8_1 | RMSNorm | 1 × 262340 × 2048 |
| 53 | Attention_8 | Grouped Query Attn | 1 × 262340 × 2048 |
| 54 | Add_8_attn | Add | 1 × 262340 × 2048 |
| 55 | RMSNorm_8_2 | RMSNorm | 1 × 262340 × 2048 |
| 56 | FFN_8 | SwiGLU | 1 × 262340 × 2048 |
| 57 | Add_8_ffn | Add | 1 × 262340 × 2048 |
| 58 | RMSNorm_9_1 | RMSNorm | 1 × 262340 × 2048 |
| 59 | Attention_9 | Grouped Query Attn | 1 × 262340 × 2048 |
| 60 | Add_9_attn | Add | 1 × 262340 × 2048 |
| 61 | RMSNorm_9_2 | RMSNorm | 1 × 262340 × 2048 |
| 62 | FFN_9 | SwiGLU | 1 × 262340 × 2048 |
| 63 | Add_9_ffn | Add | 1 × 262340 × 2048 |
| 64 | RMSNorm_10_1 | RMSNorm | 1 × 262340 × 2048 |
| 65 | Attention_10 | Grouped Query Attn | 1 × 262340 × 2048 |
| 66 | Add_10_attn | Add | 1 × 262340 × 2048 |
| 67 | RMSNorm_10_2 | RMSNorm | 1 × 262340 × 2048 |
| 68 | FFN_10 | SwiGLU | 1 × 262340 × 2048 |
| 69 | Add_10_ffn | Add | 1 × 262340 × 2048 |
| 70 | RMSNorm_11_1 | RMSNorm | 1 × 262340 × 2048 |
| 71 | Attention_11 | Grouped Query Attn | 1 × 262340 × 2048 |
| 72 | Add_11_attn | Add | 1 × 262340 × 2048 |
| 73 | RMSNorm_11_2 | RMSNorm | 1 × 262340 × 2048 |
| 74 | FFN_11 | SwiGLU | 1 × 262340 × 2048 |
| 75 | Add_11_ffn | Add | 1 × 262340 × 2048 |
| 76 | RMSNorm_12_1 | RMSNorm | 1 × 262340 × 2048 |
| 77 | Attention_12 | Grouped Query Attn | 1 × 262340 × 2048 |
| 78 | Add_12_attn | Add | 1 × 262340 × 2048 |
| 79 | RMSNorm_12_2 | RMSNorm | 1 × 262340 × 2048 |
| 80 | FFN_12 | SwiGLU | 1 × 262340 × 2048 |
| 81 | Add_12_ffn | Add | 1 × 262340 × 2048 |
| 82 | RMSNorm_13_1 | RMSNorm | 1 × 262340 × 2048 |
| 83 | Attention_13 | Grouped Query Attn | 1 × 262340 × 2048 |
| 84 | Add_13_attn | Add | 1 × 262340 × 2048 |
| 85 | RMSNorm_13_2 | RMSNorm | 1 × 262340 × 2048 |
| 86 | FFN_13 | SwiGLU | 1 × 262340 × 2048 |
| 87 | Add_13_ffn | Add | 1 × 262340 × 2048 |
| 88 | RMSNorm_14_1 | RMSNorm | 1 × 262340 × 2048 |
| 89 | Attention_14 | Grouped Query Attn | 1 × 262340 × 2048 |
| 90 | Add_14_attn | Add | 1 × 262340 × 2048 |
| 91 | RMSNorm_14_2 | RMSNorm | 1 × 262340 × 2048 |
| 92 | FFN_14 | SwiGLU | 1 × 262340 × 2048 |
| 93 | Add_14_ffn | Add | 1 × 262340 × 2048 |
| 94 | RMSNorm_15_1 | RMSNorm | 1 × 262340 × 2048 |
| 95 | Attention_15 | Grouped Query Attn | 1 × 262340 × 2048 |
| 96 | Add_15_attn | Add | 1 × 262340 × 2048 |
| 97 | RMSNorm_15_2 | RMSNorm | 1 × 262340 × 2048 |
| 98 | FFN_15 | SwiGLU | 1 × 262340 × 2048 |
| 99 | Add_15_ffn | Add | 1 × 262340 × 2048 |
| 100 | RMSNorm_16_1 | RMSNorm | 1 × 262340 × 2048 |
| 101 | Attention_16 | Grouped Query Attn | 1 × 262340 × 2048 |
| 102 | Add_16_attn | Add | 1 × 262340 × 2048 |
| 103 | RMSNorm_16_2 | RMSNorm | 1 × 262340 × 2048 |
| 104 | FFN_16 | SwiGLU | 1 × 262340 × 2048 |
| 105 | Add_16_ffn | Add | 1 × 262340 × 2048 |
| 106 | RMSNorm_17_1 | RMSNorm | 1 × 262340 × 2048 |
| 107 | Attention_17 | Grouped Query Attn | 1 × 262340 × 2048 |
| 108 | Add_17_attn | Add | 1 × 262340 × 2048 |
| 109 | RMSNorm_17_2 | RMSNorm | 1 × 262340 × 2048 |
| 110 | FFN_17 | SwiGLU | 1 × 262340 × 2048 |
| 111 | Add_17_ffn | Add | 1 × 262340 × 2048 |
| 112 | RMSNorm_18_1 | RMSNorm | 1 × 262340 × 2048 |
| 113 | Attention_18 | Grouped Query Attn | 1 × 262340 × 2048 |
| 114 | Add_18_attn | Add | 1 × 262340 × 2048 |
| 115 | RMSNorm_18_2 | RMSNorm | 1 × 262340 × 2048 |
| 116 | FFN_18 | SwiGLU | 1 × 262340 × 2048 |
| 117 | Add_18_ffn | Add | 1 × 262340 × 2048 |
| 118 | RMSNorm_19_1 | RMSNorm | 1 × 262340 × 2048 |
| 119 | Attention_19 | Grouped Query Attn | 1 × 262340 × 2048 |
| 120 | Add_19_attn | Add | 1 × 262340 × 2048 |
| 121 | RMSNorm_19_2 | RMSNorm | 1 × 262340 × 2048 |
| 122 | FFN_19 | SwiGLU | 1 × 262340 × 2048 |
| 123 | Add_19_ffn | Add | 1 × 262340 × 2048 |
| 124 | RMSNorm_20_1 | RMSNorm | 1 × 262340 × 2048 |
| 125 | Attention_20 | Grouped Query Attn | 1 × 262340 × 2048 |
| 126 | Add_20_attn | Add | 1 × 262340 × 2048 |
| 127 | RMSNorm_20_2 | RMSNorm | 1 × 262340 × 2048 |
| 128 | FFN_20 | SwiGLU | 1 × 262340 × 2048 |
| 129 | Add_20_ffn | Add | 1 × 262340 × 2048 |
| 130 | RMSNorm_21_1 | RMSNorm | 1 × 262340 × 2048 |
| 131 | Attention_21 | Grouped Query Attn | 1 × 262340 × 2048 |
| 132 | Add_21_attn | Add | 1 × 262340 × 2048 |
| 133 | RMSNorm_21_2 | RMSNorm | 1 × 262340 × 2048 |
| 134 | FFN_21 | SwiGLU | 1 × 262340 × 2048 |
| 135 | Add_21_ffn | Add | 1 × 262340 × 2048 |
| 136 | RMSNorm_22_1 | RMSNorm | 1 × 262340 × 2048 |
| 137 | Attention_22 | Grouped Query Attn | 1 × 262340 × 2048 |
| 138 | Add_22_attn | Add | 1 × 262340 × 2048 |
| 139 | RMSNorm_22_2 | RMSNorm | 1 × 262340 × 2048 |
| 140 | FFN_22 | SwiGLU | 1 × 262340 × 2048 |
| 141 | Add_22_ffn | Add | 1 × 262340 × 2048 |
| 142 | RMSNorm_23_1 | RMSNorm | 1 × 262340 × 2048 |
| 143 | Attention_23 | Grouped Query Attn | 1 × 262340 × 2048 |
| 144 | Add_23_attn | Add | 1 × 262340 × 2048 |
| 145 | RMSNorm_23_2 | RMSNorm | 1 × 262340 × 2048 |
| 146 | FFN_23 | SwiGLU | 1 × 262340 × 2048 |
| 147 | Add_23_ffn | Add | 1 × 262340 × 2048 |
| 148 | RMSNorm_24_1 | RMSNorm | 1 × 262340 × 2048 |
| 149 | Attention_24 | Grouped Query Attn | 1 × 262340 × 2048 |
| 150 | Add_24_attn | Add | 1 × 262340 × 2048 |
| 151 | RMSNorm_24_2 | RMSNorm | 1 × 262340 × 2048 |
| 152 | FFN_24 | SwiGLU | 1 × 262340 × 2048 |
| 153 | Add_24_ffn | Add | 1 × 262340 × 2048 |
| 154 | RMSNorm_25_1 | RMSNorm | 1 × 262340 × 2048 |
| 155 | Attention_25 | Grouped Query Attn | 1 × 262340 × 2048 |
| 156 | Add_25_attn | Add | 1 × 262340 × 2048 |
| 157 | RMSNorm_25_2 | RMSNorm | 1 × 262340 × 2048 |
| 158 | FFN_25 | SwiGLU | 1 × 262340 × 2048 |
| 159 | Add_25_ffn | Add | 1 × 262340 × 2048 |
| 160 | RMSNorm_26_1 | RMSNorm | 1 × 262340 × 2048 |
| 161 | Attention_26 | Grouped Query Attn | 1 × 262340 × 2048 |
| 162 | Add_26_attn | Add | 1 × 262340 × 2048 |
| 163 | RMSNorm_26_2 | RMSNorm | 1 × 262340 × 2048 |
| 164 | FFN_26 | SwiGLU | 1 × 262340 × 2048 |
| 165 | Add_26_ffn | Add | 1 × 262340 × 2048 |
| 166 | RMSNorm_27_1 | RMSNorm | 1 × 262340 × 2048 |
| 167 | Attention_27 | Grouped Query Attn | 1 × 262340 × 2048 |
| 168 | Add_27_attn | Add | 1 × 262340 × 2048 |
| 169 | RMSNorm_27_2 | RMSNorm | 1 × 262340 × 2048 |
| 170 | FFN_27 | SwiGLU | 1 × 262340 × 2048 |
| 171 | Add_27_ffn | Add | 1 × 262340 × 2048 |
| 172 | RMSNorm_28_1 | RMSNorm | 1 × 262340 × 2048 |
| 173 | Attention_28 | Grouped Query Attn | 1 × 262340 × 2048 |
| 174 | Add_28_attn | Add | 1 × 262340 × 2048 |
| 175 | RMSNorm_28_2 | RMSNorm | 1 × 262340 × 2048 |
| 176 | FFN_28 | SwiGLU | 1 × 262340 × 2048 |
| 177 | Add_28_ffn | Add | 1 × 262340 × 2048 |
| 178 | Output | Output | 1 × 262340 × 2048 |
What the verifier says
dead-end
deep-attention-default-init
What changed upstream
The change tracker follows Qwen/Qwen3-VL-Embedding-2B: 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 Qwen/Qwen3-VL-Embedding-2B --plan --share