Zhan-Lun commited on
Commit
e4e1ee5
·
verified ·
1 Parent(s): 5a6eef0

Update model card: SDPA scores, quick start, eval environment

Browse files
Files changed (1) hide show
  1. README.md +139 -47
README.md CHANGED
@@ -37,9 +37,9 @@ L2-normalized multi-vector embeddings for late-interaction retrieval.
37
 
38
  The model uses bidirectional attention in Qwen3.5's full-attention layers and
39
  a learned 640-dimensional projection head. The unused language-model head has
40
- been removed from the released checkpoint. Consequently, the released
41
- embedding model contains ~8.4B parameters, reflected by the
42
- `webAI-ColVec1.1-8b` repository name, while its original backbone is
43
  Qwen3.5-9B.
44
 
45
  ### Training data
@@ -63,7 +63,7 @@ as synthetically generated data.
63
  | **Method** | ColBERT-style late interaction with MaxSim scoring |
64
  | **Output** | L2-normalized multi-vector embeddings `(sequence_length, 640)` |
65
  | **Modalities** | Text queries and document images |
66
- | **Attention** | Bidirectional full-attention layers; selectable FlashAttention 2, FlashAttention 3, or SDPA kernel |
67
  | **Visual-token budget** | 1,792 tokens per image in the released processor |
68
  | **Training** | LoRA adapters and a fully trained projection layer, merged for release |
69
  | **Weights** | `bfloat16`; language-model head removed |
@@ -75,32 +75,42 @@ as synthetically generated data.
75
  layout and content signals that single-vector pooling can discard.
76
  - **Compact projection:** Hidden states are projected to 640 dimensions
77
  without an activation function.
78
- - **Bidirectional retrieval attention:** Selecting FlashAttention 2 or 3
79
- changes the execution kernel, not the model's bidirectional attention mode.
 
80
 
81
  ## 📊 Evaluation results
82
 
83
  The table reports NDCG@10 scores on the eight **public** ViDoRe V3 tasks as
84
  percentages rather than values between 0 and 1 (for example, 0.80 is shown as
85
- 80.00). Each task value is the mean of its six language subsets; the public average is the unweighted mean of the eight public task values.
86
-
87
- The result artifacts record MTEB 2.18.5, Transformers 5.14.1, PyTorch 2.9.0
88
- with CUDA 12.8, `bfloat16`, FlashAttention 2.8.3, and batch size 32. The release
89
- processor is configured with a 1,792 visual-token budget. Comparator values
90
- were read from the live
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  [ViDoRe V3 MTEB leaderboard](https://mteb-leaderboard.hf.space/benchmark/ViDoRe%28v3%29)
92
  on July 22, 2026.
93
 
94
- Model encoding runs in `bfloat16`. Before MaxSim scoring, query and document
95
- embeddings are moved to CPU and converted to `float32`. All reported ViDoRe
96
- results use this FP32 scoring path.
97
-
98
  | Model | Computer Science | Energy | FinanceEn | FinanceFr | HR | Industrial | Pharmaceuticals | Physics | **Avg. public** |
99
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
100
- | **webAI-ColVec1.1-8b (this model)** | 80.14 | 70.09 | **71.89** | **55.10** | 68.49 | **57.41** | 67.88 | 51.29 | **65.29** |
101
- | [VultronRetriever Prime](https://huggingface.co/vultr/VultronRetrieverPrime-Qwen3.5-8B) | 79.81 | **70.26** | 69.01 | 54.51 | 66.82 | **57.41** | **68.19** | **51.73** | 64.72 |
102
  | [webAI-ColVec1-9b](https://huggingface.co/webAI-Official/webAI-ColVec1-9b) | **80.92** | 69.77 | 68.28 | 53.72 | **70.04** | 57.18 | 67.32 | 48.38 | 64.45 |
103
- | **[webAI-ColVec1.1-4b](https://huggingface.co/webAI-Official/webAI-ColVec1.1-4b)** | 80.35 | 69.26 | 69.12 | 53.21 | 67.02 | 56.30 | 67.07 | 51.36 | 64.21 |
104
  | [VultronRetriever Core](https://huggingface.co/vultr/VultronRetrieverCore-Qwen3.5-4.5B) | 79.77 | 69.19 | 68.93 | 52.02 | 66.10 | 56.11 | 67.45 | 50.18 | 63.72 |
105
  | [Nemotron ColEmbed VL 8B V2](https://huggingface.co/nvidia/nemotron-colembed-vl-8b-v2) | 79.29 | 69.82 | 67.29 | 51.54 | 66.32 | 56.03 | 67.19 | 50.84 | 63.54 |
106
  | [webAI-ColVec1-4b](https://huggingface.co/webAI-Official/webAI-ColVec1-4b) | 79.84 | 68.70 | 68.49 | 51.11 | 67.40 | 55.73 | 65.68 | 50.15 | 63.39 |
@@ -119,31 +129,29 @@ The processor provides the current retrieval API:
119
  - `score_retrieval(query_embeddings, document_embeddings)` computes a MaxSim
120
  score matrix with shape `(number_of_queries, number_of_documents)`.
121
 
122
- ### Prerequisites and attention backends
123
 
124
- The public ViDoRe V3 numbers are reproducible with this pinned FlashAttention 2
125
- environment:
 
 
126
 
127
- ```text
128
- Python 3.12
129
- PyTorch 2.9.0 + CUDA 12.8
130
- Transformers 5.14.1
131
- MTEB 2.18.5
132
- Sentence Transformers 5.6.0
133
- FlashAttention 2.8.3
134
- ```
135
 
136
- The model also supports FlashAttention 3 on Hopper GPUs (H100/H200). See the
137
- [Dao-AILab FlashAttention repository](https://github.com/dao-ailab/flash-attention)
138
- for FlashAttention 3 installation instructions, then select
139
- `flash_attention_3` when loading in a compatible Hopper environment.
140
 
141
- FlashAttention 2 and FlashAttention 3 both preserve bidirectional attention.
142
- FlashAttention 3 can improve throughput on Hopper GPUs, but the published
143
- scores use FlashAttention 2; changing kernels can produce small floating-point
144
- differences. Use FlashAttention 2 when reproducing the table.
145
 
146
- ### Inference code
 
 
147
 
148
  ```python
149
  from io import BytesIO
@@ -155,11 +163,9 @@ from transformers import AutoModel, AutoProcessor
155
 
156
  MODEL_ID = "webAI-Official/webAI-ColVec1.1-8b"
157
  DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"
158
- ATTN_IMPLEMENTATION = (
159
- "flash_attention_2" if torch.cuda.is_available() else "sdpa"
160
- )
161
- # On an H100/H200 with FlashAttention 3 installed, use:
162
- # ATTN_IMPLEMENTATION = "flash_attention_3"
163
 
164
  processor = AutoProcessor.from_pretrained(
165
  MODEL_ID,
@@ -224,11 +230,97 @@ print(scores)
224
  print("Best document per query:", scores.argmax(dim=1))
225
  ```
226
 
227
- The processor loads the release's 1,792 visual-token budget by default. To
228
- reduce memory use, pass a lower `max_num_visual_tokens` value to
229
  `AutoProcessor.from_pretrained`; this changes document granularity and may
230
  change retrieval scores.
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  ## ⚖️ Strengths and limitations
233
 
234
  ### Strengths
@@ -243,7 +335,7 @@ change retrieval scores.
243
 
244
  ### Limitations
245
 
246
- - **Storage Cost:** Still larger than single-vector baselines despite the
247
  smaller token dimension.
248
 
249
  ## License
 
37
 
38
  The model uses bidirectional attention in Qwen3.5's full-attention layers and
39
  a learned 640-dimensional projection head. The unused language-model head has
40
+ been removed from the released checkpoint. As a result, the released
41
+ embedding model contains approximately 8.4B parameters, as reflected in the
42
+ `webAI-ColVec1.1-8b` repository name, even though its original backbone is
43
  Qwen3.5-9B.
44
 
45
  ### Training data
 
63
  | **Method** | ColBERT-style late interaction with MaxSim scoring |
64
  | **Output** | L2-normalized multi-vector embeddings `(sequence_length, 640)` |
65
  | **Modalities** | Text queries and document images |
66
+ | **Attention** | Bidirectional full-attention layers; selectable SDPA, FlashAttention 2, or FlashAttention 3 kernel |
67
  | **Visual-token budget** | 1,792 tokens per image in the released processor |
68
  | **Training** | LoRA adapters and a fully trained projection layer, merged for release |
69
  | **Weights** | `bfloat16`; language-model head removed |
 
75
  layout and content signals that single-vector pooling can discard.
76
  - **Compact projection:** Hidden states are projected to 640 dimensions
77
  without an activation function.
78
+ - **Bidirectional retrieval attention:** Selecting SDPA, FlashAttention 2, or
79
+ FlashAttention 3 changes the execution kernel, not the model's bidirectional
80
+ attention mode.
81
 
82
  ## 📊 Evaluation results
83
 
84
  The table reports NDCG@10 scores on the eight **public** ViDoRe V3 tasks as
85
  percentages rather than values between 0 and 1 (for example, 0.80 is shown as
86
+ 80.00). Each task value is the mean of its six language subsets; the public
87
+ average is the unweighted mean of the eight public task values.
88
+
89
+ The evaluation software versions and setup are documented under
90
+ [Reproducing the evaluation environment](#reproducing-the-evaluation-environment).
91
+ For the reported evaluation, SDPA was selected as the attention
92
+ implementation, the released processor used a 1,792 visual-token budget, and
93
+ the batch size was 32.
94
+
95
+ Model encoding used `bfloat16`. Before MaxSim scoring, query and document
96
+ embeddings were moved to CPU and converted to `float32`; all reported ViDoRe
97
+ results use this FP32 scoring path. Because floating-point calculations and
98
+ kernel execution can vary across accelerator hardware, independent
99
+ evaluations may produce slightly different results. The submitted MTEB
100
+ artifacts are the canonical source for the reported scores.
101
+
102
+ All table values are shown to two decimal places. ColVec1.1 values are rounded
103
+ from the submitted artifacts using round-half-up. Comparator values were read
104
+ from the live
105
  [ViDoRe V3 MTEB leaderboard](https://mteb-leaderboard.hf.space/benchmark/ViDoRe%28v3%29)
106
  on July 22, 2026.
107
 
 
 
 
 
108
  | Model | Computer Science | Energy | FinanceEn | FinanceFr | HR | Industrial | Pharmaceuticals | Physics | **Avg. public** |
109
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
110
+ | **webAI-ColVec1.1-8b (this model)** | 80.08 | 70.12 | **71.90** | **54.87** | 68.55 | **57.65** | 67.88 | 51.50 | **65.32** |
111
+ | [VultronRetriever Prime](https://huggingface.co/vultr/VultronRetrieverPrime-Qwen3.5-8B) | 79.81 | **70.26** | 69.01 | 54.51 | 66.82 | 57.41 | **68.19** | **51.73** | 64.72 |
112
  | [webAI-ColVec1-9b](https://huggingface.co/webAI-Official/webAI-ColVec1-9b) | **80.92** | 69.77 | 68.28 | 53.72 | **70.04** | 57.18 | 67.32 | 48.38 | 64.45 |
113
+ | **[webAI-ColVec1.1-4b](https://huggingface.co/webAI-Official/webAI-ColVec1.1-4b)** | 80.34 | 69.50 | 69.18 | 53.13 | 66.90 | 56.36 | 67.25 | 51.24 | 64.24 |
114
  | [VultronRetriever Core](https://huggingface.co/vultr/VultronRetrieverCore-Qwen3.5-4.5B) | 79.77 | 69.19 | 68.93 | 52.02 | 66.10 | 56.11 | 67.45 | 50.18 | 63.72 |
115
  | [Nemotron ColEmbed VL 8B V2](https://huggingface.co/nvidia/nemotron-colembed-vl-8b-v2) | 79.29 | 69.82 | 67.29 | 51.54 | 66.32 | 56.03 | 67.19 | 50.84 | 63.54 |
116
  | [webAI-ColVec1-4b](https://huggingface.co/webAI-Official/webAI-ColVec1-4b) | 79.84 | 68.70 | 68.49 | 51.11 | 67.40 | 55.73 | 65.68 | 50.15 | 63.39 |
 
129
  - `score_retrieval(query_embeddings, document_embeddings)` computes a MaxSim
130
  score matrix with shape `(number_of_queries, number_of_documents)`.
131
 
132
+ ### Quick start
133
 
134
+ Create and activate a Python 3.12 virtual environment, then install the
135
+ validated PyTorch CUDA 12.8 build and the minimal packages required for SDPA
136
+ inference. If you are already using an isolated Python environment, skip the
137
+ first two commands.
138
 
139
+ ```bash
140
+ python3.12 -m venv .venv
141
+ source .venv/bin/activate
 
 
 
 
 
142
 
143
+ python -m pip install \
144
+ torch==2.9.0 torchvision==0.24.0 \
145
+ --index-url https://download.pytorch.org/whl/cu128
 
146
 
147
+ python -m pip install \
148
+ "transformers>=5.14.1,<6.0.0" \
149
+ accelerate pillow requests safetensors
150
+ ```
151
 
152
+ The following example uses SDPA, the portable default and the attention
153
+ implementation used for the reported evaluation. It does not require
154
+ FlashAttention.
155
 
156
  ```python
157
  from io import BytesIO
 
163
 
164
  MODEL_ID = "webAI-Official/webAI-ColVec1.1-8b"
165
  DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"
166
+
167
+ # Portable default and the backend used by the published evaluation:
168
+ ATTN_IMPLEMENTATION = "sdpa"
 
 
169
 
170
  processor = AutoProcessor.from_pretrained(
171
  MODEL_ID,
 
230
  print("Best document per query:", scores.argmax(dim=1))
231
  ```
232
 
233
+ The released processor uses a 1,792 visual-token budget by default. To reduce
234
+ memory use, pass a lower `max_num_visual_tokens` value to
235
  `AutoProcessor.from_pretrained`; this changes document granularity and may
236
  change retrieval scores.
237
 
238
+ ### Optional acceleration
239
+
240
+ The model can run with compatible PyTorch and CUDA builds using SDPA,
241
+ FlashAttention 2, or FlashAttention 3. CPU execution is supported through
242
+ PyTorch's SDPA math fallback, but is generally impractical for a model of this
243
+ size.
244
+
245
+ Qwen3.5 uses a hybrid stack of full-attention and GatedDeltaNet
246
+ linear-attention layers. These kernels serve different parts of the model:
247
+
248
+ - `flash-attn` can accelerate the full-attention layers when selected.
249
+ - `causal-conv1d` and `flash-linear-attention` (`fla`) accelerate the
250
+ GatedDeltaNet layers. Transformers can fall back to PyTorch implementations
251
+ without them.
252
+ - `tilelang` provides optimized GPU kernels for some FLA operations. FLA uses
253
+ these kernels when the operation and hardware are supported and uses another
254
+ implementation otherwise. Pin `apache-tvm-ffi<0.1.10` alongside it to keep
255
+ TileLang's TVM dependency compatible.
256
+
257
+ [flash-attn](https://github.com/Dao-AILab/flash-attention) and
258
+ [causal-conv1d](https://github.com/Dao-AILab/causal-conv1d) ship as prebuilt
259
+ wheels tied to a specific Python, PyTorch, CUDA, and C++ ABI combination, so
260
+ install the build that matches your environment;
261
+ [flash-linear-attention](https://github.com/fla-org/flash-linear-attention) and
262
+ [TileLang](https://github.com/tile-ai/tilelang) install from PyPI. The exact
263
+ versions used for the reported scores are pinned in
264
+ [Reproducing the evaluation environment](#reproducing-the-evaluation-environment).
265
+
266
+ `causal-conv1d`, `flash-linear-attention`, and `tilelang` are detected
267
+ automatically once installed, so the GatedDeltaNet layers need no configuration
268
+ change. Only the full-attention backend is selected explicitly, as a one-line
269
+ change to the model loading code in [Quick start](#quick-start):
270
+
271
+ ```python
272
+ ATTN_IMPLEMENTATION = "flash_attention_2" # or "flash_attention_3"
273
+ ```
274
+
275
+ FlashAttention 2 and FlashAttention 3 both preserve the model's bidirectional
276
+ attention, and FlashAttention 3 can improve throughput on Hopper GPUs
277
+ (H100/H200). PyTorch's built-in SDPA remains the more portable choice because
278
+ it does not require a separate FlashAttention package or ABI-compatible wheel.
279
+ Changing the full-attention implementation may introduce small floating-point
280
+ differences and affect only those layers, not the GatedDeltaNet layers.
281
+
282
+ ### Reproducing the evaluation environment
283
+
284
+ The complete pinned Python environment is provided in
285
+ [`evaluation-requirements-cu128.txt`](./evaluation-requirements-cu128.txt),
286
+ which reproduces the recorded Linux x86-64, CPython 3.12, CUDA 12.8, and
287
+ PyTorch 2.9 environment used for evaluation. Its pinned wheel URLs are specific
288
+ to that platform, so a different environment needs matching wheels or a source
289
+ build.
290
+
291
+ Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/), ensure
292
+ Git is available, and then run:
293
+
294
+ ```bash
295
+ uv venv --python 3.12 .venv
296
+ source .venv/bin/activate
297
+
298
+ uv pip install \
299
+ torch==2.9.0 torchvision==0.24.0 \
300
+ --index-url https://download.pytorch.org/whl/cu128
301
+
302
+ uv pip install -r evaluation-requirements-cu128.txt
303
+ uv pip check
304
+ ```
305
+
306
+ The requirements include FlashAttention 2 as an optional supported backend;
307
+ its presence does not change the SDPA configuration used for the reported
308
+ scores.
309
+
310
+ The public ViDoRe V3 scores used the following core software versions:
311
+
312
+ ```text
313
+ Python 3.12
314
+ PyTorch 2.9.0 + CUDA 12.8
315
+ Transformers 5.14.1
316
+ MTEB 2.18.6 (commit d56a414b45ebad0d03495de000b4880d8b028d4a)
317
+ Sentence Transformers 5.6.0
318
+ causal-conv1d 1.6.2.post1
319
+ flash-linear-attention 0.5.1
320
+ TileLang 0.1.9
321
+ Attention implementation: SDPA
322
+ ```
323
+
324
  ## ⚖️ Strengths and limitations
325
 
326
  ### Strengths
 
335
 
336
  ### Limitations
337
 
338
+ - **Storage cost:** Still larger than single-vector baselines despite the
339
  smaller token dimension.
340
 
341
  ## License