File size: 7,540 Bytes
cd9018c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560b590
cd9018c
 
 
 
 
 
 
 
 
 
 
 
 
479cdae
 
560b590
479cdae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560b590
 
 
 
 
 
 
cd9018c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
---
pretty_name: Multimodal Embedding 100M
license: cc-by-4.0
size_categories:
- 100M<n<1B
task_categories:
- feature-extraction
- sentence-similarity
tags:
- multimodal
- embeddings
- vector-search
- nearest-neighbors
- ann-benchmark
- laion
- parquet
- xet
---

# Multimodal Embedding 100M

This dataset contains a 100M-row multimodal embedding corpus generated from LAION-style image-text data exported with `img2dataset` as WebDataset shards. Images were resized to 256 during the WebDataset creation step before embedding generation. The dataset is intended for large-scale vector database ingestion, ANN index construction, nearest-neighbor search, and retrieval benchmark experiments.

The dataset is stored as Parquet files and organized to keep each directory below Hugging Face's per-directory file-count limit.

## Dataset Summary

| Split | Rows | Files | Path |
| --- | ---: | ---: | --- |
| `train` | 100,000,000 | 16,824 | `train/shard-00/*.parquet` ... `train/shard-09/*.parquet` |
| `test` | 10,000 | 2 | `test/*.parquet` |
| `neighbors` | 10,000 | 1 | `neighbors/neighbors.parquet` |

Total: 100,020,000 rows across 16,827 Parquet files.

## Embedding Generation

The embeddings were generated from image-caption pairs in the `laion-400m-256` WebDataset shard format. The WebDataset shards were produced with `img2dataset`, with images resized to 256 before being written to the shards. Each input sample was decoded as a PIL image plus caption text, then encoded into one vector with `Qwen/Qwen3-VL-Embedding-8B`.

Generation configuration:

| Property | Value |
| --- | --- |
| Embedding model | `Qwen/Qwen3-VL-Embedding-8B` |
| Inference engine | vLLM, `runner="pooling"` |
| Inference dtype | `bfloat16` |
| Batch size | 16 samples per embedding batch |
| Output dimension | 4096 |
| Stored dtype | `float32` in Parquet |
| Normalization | L2 normalized after model inference |
| Search metric | Inner Product; because vectors are L2-normalized, IP ranking is equivalent to cosine-similarity ranking |

Prompt template:

```python
[
    {
        "role": "system",
        "content": [{"type": "text", "text": "Represent the user's input."}],
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": caption},
        ],
    },
]
```

The prompt was rendered with the model tokenizer's chat template and passed to vLLM together with `multi_modal_data={"image": image}` through the embedding API. Each full image-caption pair produces exactly one 4096-dimensional vector; there is no text chunking or multi-vector output per sample.

Source-field handling:

- Caption text is read from the WebDataset `txt` field when present, otherwise from `json.caption`.
- Sample key is read from `json.key` when present, otherwise from WebDataset `__key__`.
- If image preparation fails, the sample falls back to text-only embedding using the same system instruction.
- If a batch embedding call fails, the batch is retried one sample at a time.
- If a single-sample embedding call still fails, a zero vector is emitted for that sample before normalization-safe storage.

Split assignment:

- Raw shard outputs are first written as `key:string, emb:fixed_size_list<float32>[4096]`.
- Final `train` and `test` files add continuous zero-based `id:int64` values.
- `train` contains the first 100,000,000 rows in deterministic shard order.
- `test` contains the following 10,000 rows and is disjoint from `train`.
- The Hugging Face `train/shard-*` directories are only repository-layout shards; they do not change vector ids or row contents.

Ground-truth generation:

- The `neighbors` split contains brute-force top-100 nearest neighbors for all 10,000 test vectors against the 100,000,000 train vectors.
- Scores are inner products over the L2-normalized vectors.
- `neighbors[i]` and `scores[i]` are aligned and sorted by descending score.

Integrity check:

- The published `train` and `test` Parquet files were scanned for all-zero and non-finite embeddings.
- Result: `train` has 0 all-zero rows and 0 non-finite rows across 100,000,000 vectors.
- Result: `test` has 0 all-zero rows and 0 non-finite rows across 10,000 vectors.
- The minimum observed vector norm was approximately `0.99999988`, consistent with L2-normalized vectors.

## Directory Layout

```text
.
├── train/
│   ├── shard-00/
│   ├── shard-01/
│   ├── shard-02/
│   ├── shard-03/
│   ├── shard-04/
│   ├── shard-05/
│   ├── shard-06/
│   ├── shard-07/
│   ├── shard-08/
│   └── shard-09/
├── test/
└── neighbors/
```

Train shard file distribution:

| Shard | Files |
| --- | ---: |
| `shard-00` | 1,683 |
| `shard-01` | 1,683 |
| `shard-02` | 1,683 |
| `shard-03` | 1,683 |
| `shard-04` | 1,683 |
| `shard-05` | 1,683 |
| `shard-06` | 1,683 |
| `shard-07` | 1,683 |
| `shard-08` | 1,683 |
| `shard-09` | 1,677 |

## Schema

### `train` and `test`

| Column | Type | Description |
| --- | --- | --- |
| `id` | `int64` | Numeric sample id. |
| `key` | `string` | Original sample key. |
| `emb` | `fixed_size_list<float>[4096]` | 4096-dimensional embedding vector. |

### `neighbors`

| Column | Type | Description |
| --- | --- | --- |
| `id` | `int64` | Query/sample id. |
| `neighbors` | `list<int64>` | 100 nearest-neighbor ids for the query/sample. |
| `scores` | `list<float>` | 100 similarity scores aligned with `neighbors`. |

## Loading

For large-scale use, streaming mode is recommended:

```python
from datasets import load_dataset

data_files = {
    "train": "train/shard-*/*.parquet",
    "test": "test/*.parquet",
    "neighbors": "neighbors/*.parquet",
}

ds = load_dataset(
    "WenxingZhu/multimodal-embedding-100M",
    data_files=data_files,
    streaming=True,
)

row = next(iter(ds["train"]))
print(row["id"], row["key"], len(row["emb"]))
```

To load a small evaluation split without streaming:

```python
from datasets import load_dataset

test = load_dataset(
    "WenxingZhu/multimodal-embedding-100M",
    data_files={"test": "test/*.parquet"},
    split="test",
)

print(test)
```

## Intended Uses

- Large-scale vector database ingestion and indexing tests.
- ANN search and recall evaluation.
- Embedding storage and retrieval system benchmarking.
- Multimodal embedding pipeline validation.

## Limitations

- This repository contains embeddings and nearest-neighbor metadata, not original images or captions.
- The embeddings are provided as precomputed vectors; the model and preprocessing pipeline used to generate them should be validated before comparing results across datasets.
- Users should verify that the dataset is suitable for their benchmark methodology, especially when using the `neighbors` split as retrieval ground truth.

## License and Attribution

The original LAION-400M metadata dataset is distributed under CC-BY 4.0. Users are responsible for complying with the applicable license terms and for validating downstream usage requirements.

If you use this dataset in a benchmark or experiment, please cite the original LAION-400M work:

```bibtex
@article{schuhmann2021laion400m,
  title={LAION-400M: Open Dataset of CLIP-Filtered 400 Million Image-Text Pairs},
  author={Schuhmann, Christoph and Vencu, Richard and Beaumont, Romain and Kaczmarczyk, Robert and Mullis, Clayton and Katta, Aarush and Coombes, Theo and Jitsev, Jenia and Komatsuzaki, Aran},
  journal={arXiv preprint arXiv:2111.02114},
  year={2021}
}
```