maumueller commited on
Commit
ebc9e71
·
1 Parent(s): 256c09b

Update README.md to document new directory structure

Browse files

- Add repository structure diagram
- Update all file paths to reflect subdirectory organization
- Add download examples for subdirectories
- Document config.json files
- Update code examples with new paths

Files changed (1) hide show
  1. README.md +214 -61
README.md CHANGED
@@ -2,83 +2,207 @@
2
  license: mit
3
  ---
4
 
 
 
5
  This repository contains the development data files used in the SISAP2026 indexing challenge.
6
 
7
  Datasets for previous editions:
8
  - <https://huggingface.co/datasets/sadit/SISAP2025>
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ## Datasets
11
 
12
- - WIKIPEDIA (English articles):
13
- - repo: <https://huggingface.co/datasets/wikimedia/wikipedia>
14
- - BGE m3 model: https://huggingface.co/BAAI/bge-m3
15
- - File: benchmark-dev-wikipedia-bge-m3.h5
16
- - similarity: Cosine / dot product
17
- - Content of the h5 file:
18
- - dataset `train`: a 6.35 million vector database, i.e., a matrix of size $1024 \times 6350000$ (f16)
19
- - group `itrain`: collection of data related to in-distribution queries (articles removed from the English Wikipedia corpus):
20
- - `itest/queries`: a 10'000 vector database, i.e., a matrix of size $1024 \times 10000$ (f16)
21
- - `itest/knns`: the gold-standard identifiers for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (i32).
22
- - `itest/dists`: the gold-standard distances (1-dot) for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (f32).
23
- - group `otrain`: collection of data related to out-of-distribution queries (same model in random articles from the Spanish Wikipedia, i.e., cross-lingual retrieval):
24
- - `otest/queries`: a 10'000 vector database, i.e., a matrix of size $1024 \times 10000$ (f16)
25
- - `otest/knns`: the gold-standard identifiers for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (i32).
26
- - `otest/dists`: the gold-standard distances (1-dot) for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (f32).
27
- - group `allknn`:
28
- - `allknn/knns`: the gold-standard identifiers for the all-knn graph of `train` i.e., a matrix $32 \times 6350000$ (i32).
29
- - `allknn/dists`: the gold-standard distances (1-dot) for the all-knn graph of `train` i.e., a matrix $32 \times 6350000$ (f32).
30
-
31
- - WIKIPEDIA Small (English articles):
32
- - This is small version of WIKIPEDIA database for testing and developing purposes, more precisely, the `train` dataset is a 200k vector database.
33
- - File: benchmark-dev-wikipedia-bge-m3-small.h5
34
-
35
- - LLAMA (Llama-3-8B-262k):
36
- - repo: https://huggingface.co/datasets/vector-index-bench/vibe
37
- - Model: Llama-3.2-8B
38
- - File: llama-dev.h5
39
- - similarity: Dot product (vectors are not normalized)
40
- - Content of the h5 file:
41
- - dataset `train`: a 256k vector database, i.e., a matrix of size $128 \times 256921$ (f32)
42
- - group `test`: collection of development queries:
43
- - `test/queries`: a 1'000 vector database, i.e., a matrix of size $128 \times 1000$ (f32)
44
- - `test/knns`: the gold-standard identifiers for the 100 nearest neighbors of `test/queries` in `train`, i.e., a matrix $100 \times 1000$ (i64).
45
- - `test/dists`: the gold-standard distances (dot product) for the 100 nearest neighbors of `test/queries` in `train`, i.e., a matrix $100 \times 1000$ (f64).
46
-
47
- - NQ (Natural Questions):
48
- - repo: <https://github.com/beir-cellar/beir>
49
- - Model: SPLADE-v3 (sparse embeddings)
50
- - File: nq.h5
51
- - similarity: Dot product, vectors are not normalized
52
- - Content of the h5 file:
53
- - group `train`: a 2.68 million sparse vector database, i.e., a sparse matrix (CSR) of size $30522 \times 2681468$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
54
- - group `otest`: collection of development queries:
55
- - `otest/queries`: 3452 query embeddings, i.e., a sparse matrix (CSR) of size $30522 \times 3452$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
56
- - `otest/knns`: the gold-standard identifiers for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 3452$ (i32).
57
- - `otest/dists`: the gold-standard distances (dot product) for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 3452$ (f32).
 
 
 
 
 
 
 
 
 
 
58
  - See example below to know how to work with the file
59
 
60
- - FIQA (Financial Question Answering):
61
- - repo: <https://github.com/beir-cellar/beir>
62
- - Model: SPLADE-v3 (sparse embeddings)
63
- - File: fiqa-dev.h5
64
- - similarity: Dot product, vectors are not normalized
65
- - Content of the h5 file:
66
- - group `train`: a 57k sparse vector database, i.e., a sparse matrix (CSR) of size $30522 \times 57638$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
67
- - group `otest`: collection of development queries:
68
- - `otest/queries`: 6648 query embeddings, i.e., a sparse matrix (CSR) of size $30522 \times 6648$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
69
- - `otest/knns`: the gold-standard identifiers for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 6648$ (i32).
70
- - `otest/dists`: the gold-standard distances (dot product) for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 6648$ (f32).
 
 
71
  - See example below to know how to work with the file
72
 
73
- Note: h5py/HDF5.jl packages read matrices in the expected platform order, so be careful since it could permute dimensions w.r.t what is here explained, however, the final order is what is expected anyway for fast implementations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
- ### Python Example (Loading Sparse Matrices)
 
 
 
 
 
 
 
 
 
 
76
 
77
- Here is a small example of how to load the sparse matrices from `nq.h5` and `fiqa-dev.h5` using `scipy`:
 
 
78
 
79
  ```python
80
  import h5py
81
  from scipy.sparse import csr_matrix
 
82
 
83
  def load_sparse_matrix(h5_group):
84
  indptr = h5_group['indptr'][:]
@@ -87,7 +211,14 @@ def load_sparse_matrix(h5_group):
87
  shape = tuple(h5_group.attrs['shape'])
88
  return csr_matrix((data, indices, indptr), shape=shape)
89
 
90
- with h5py.File('nq.h5', 'r') as f:
 
 
 
 
 
 
 
91
  train_matrix = load_sparse_matrix(f['train'])
92
  query_matrix = load_sparse_matrix(f['otest']['queries'])
93
 
@@ -95,3 +226,25 @@ with h5py.File('nq.h5', 'r') as f:
95
  print(f"Query shape: {query_matrix.shape}")
96
  ```
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: mit
3
  ---
4
 
5
+ # SISAP2026 Indexing Challenge - Development Datasets
6
+
7
  This repository contains the development data files used in the SISAP2026 indexing challenge.
8
 
9
  Datasets for previous editions:
10
  - <https://huggingface.co/datasets/sadit/SISAP2025>
11
 
12
+ ## Repository Structure
13
+
14
+ The datasets are organized into subdirectories by dataset type:
15
+
16
+ ```
17
+ SISAP2026/
18
+ ├── wikipedia/ # Large Wikipedia dataset
19
+ │ ├── benchmark-dev-wikipedia-bge-m3.h5
20
+ │ └── config.json
21
+ ├── wikipedia-small/ # Small Wikipedia dataset for testing
22
+ │ ├── benchmark-dev-wikipedia-bge-m3-small.h5
23
+ │ └── config.json
24
+ ├── llama-dev/ # Llama embeddings
25
+ │ ├── llama-dev.h5
26
+ │ └── config.json
27
+ ├── nq/ # Natural Questions (sparse)
28
+ │ ├── nq.h5
29
+ │ └── config.json
30
+ ├── fiqa-dev/ # Financial QA (sparse)
31
+ │ ├── fiqa-dev.h5
32
+ │ └── config.json
33
+ ├── task-1-spot-check/ # Task 1 validation dataset
34
+ │ ├── benchmark-dev-gooaq-small.h5
35
+ │ └── config.json
36
+ ├── task-2-spot-check/ # Task 2 validation dataset
37
+ │ ├── benchmark-dev-llama-small.h5
38
+ │ └── config.json
39
+ └── task-3-spot-check/ # Task 3 validation dataset
40
+ ├── benchmark-dev-fiqa-small.h5
41
+ └── config.json
42
+ ```
43
+
44
+ ## Downloading Files
45
+
46
+ ### Download a specific file
47
+
48
+ ```python
49
+ from huggingface_hub import hf_hub_download
50
+
51
+ # Download a specific dataset
52
+ file_path = hf_hub_download(
53
+ repo_id="SISAP-Challenges/SISAP2026",
54
+ filename="wikipedia/benchmark-dev-wikipedia-bge-m3.h5",
55
+ repo_type="dataset"
56
+ )
57
+
58
+ # Download a config file
59
+ config_path = hf_hub_download(
60
+ repo_id="SISAP-Challenges/SISAP2026",
61
+ filename="wikipedia/config.json",
62
+ repo_type="dataset"
63
+ )
64
+ ```
65
+
66
+ ### Download entire subdirectory
67
+
68
+ ```python
69
+ from huggingface_hub import snapshot_download
70
+
71
+ # Download all files from a specific dataset
72
+ local_dir = snapshot_download(
73
+ repo_id="SISAP-Challenges/SISAP2026",
74
+ repo_type="dataset",
75
+ allow_patterns="wikipedia/*"
76
+ )
77
+ ```
78
+
79
  ## Datasets
80
 
81
+ ### WIKIPEDIA (English articles)
82
+
83
+ **Location:** `wikipedia/benchmark-dev-wikipedia-bge-m3.h5`
84
+
85
+ - **Source repo:** <https://huggingface.co/datasets/wikimedia/wikipedia>
86
+ - **Model:** BGE-m3 - <https://huggingface.co/BAAI/bge-m3>
87
+ - **Similarity:** Cosine / dot product
88
+ - **Content of the h5 file:**
89
+ - dataset `train`: a 6.35 million vector database, i.e., a matrix of size $1024 \times 6350000$ (f16)
90
+ - group `itrain`: collection of data related to in-distribution queries (articles removed from the English Wikipedia corpus):
91
+ - `itest/queries`: a 10'000 vector database, i.e., a matrix of size $1024 \times 10000$ (f16)
92
+ - `itest/knns`: the gold-standard identifiers for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (i32).
93
+ - `itest/dists`: the gold-standard distances (1-dot) for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (f32).
94
+ - group `otrain`: collection of data related to out-of-distribution queries (same model in random articles from the Spanish Wikipedia, i.e., cross-lingual retrieval):
95
+ - `otest/queries`: a 10'000 vector database, i.e., a matrix of size $1024 \times 10000$ (f16)
96
+ - `otest/knns`: the gold-standard identifiers for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (i32).
97
+ - `otest/dists`: the gold-standard distances (1-dot) for the 1000 nearest neighbors of `itest/queries` in `train`, i.e., a matrix $1000 \times 10000$ (f32).
98
+ - group `allknn`:
99
+ - `allknn/knns`: the gold-standard identifiers for the all-knn graph of `train` i.e., a matrix $32 \times 6350000$ (i32).
100
+ - `allknn/dists`: the gold-standard distances (1-dot) for the all-knn graph of `train` i.e., a matrix $32 \times 6350000$ (f32).
101
+
102
+ ### WIKIPEDIA Small (English articles)
103
+
104
+ **Location:** `wikipedia-small/benchmark-dev-wikipedia-bge-m3-small.h5`
105
+
106
+ - This is small version of WIKIPEDIA database for testing and developing purposes
107
+ - The `train` dataset is a 200k vector database
108
+ - Same structure as the full WIKIPEDIA dataset
109
+
110
+ ### LLAMA (Llama-3-8B-262k)
111
+
112
+ **Location:** `llama-dev/llama-dev.h5`
113
+
114
+ - **Source repo:** <https://huggingface.co/datasets/vector-index-bench/vibe>
115
+ - **Model:** Llama-3.2-8B
116
+ - **Similarity:** Dot product (vectors are not normalized)
117
+ - **Content of the h5 file:**
118
+ - dataset `train`: a 256k vector database, i.e., a matrix of size $128 \times 256921$ (f32)
119
+ - group `test`: collection of development queries:
120
+ - `test/queries`: a 1'000 vector database, i.e., a matrix of size $128 \times 1000$ (f32)
121
+ - `test/knns`: the gold-standard identifiers for the 100 nearest neighbors of `test/queries` in `train`, i.e., a matrix $100 \times 1000$ (i64).
122
+ - `test/dists`: the gold-standard distances (dot product) for the 100 nearest neighbors of `test/queries` in `train`, i.e., a matrix $100 \times 1000$ (f64).
123
+
124
+ ### NQ (Natural Questions)
125
+
126
+ **Location:** `nq/nq.h5`
127
+
128
+ - **Source repo:** <https://github.com/beir-cellar/beir>
129
+ - **Model:** SPLADE-v3 (sparse embeddings)
130
+ - **Similarity:** Dot product (vectors are not normalized)
131
+ - **Content of the h5 file:**
132
+ - group `train`: a 2.68 million sparse vector database, i.e., a sparse matrix (CSR) of size $30522 \times 2681468$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
133
+ - group `otest`: collection of development queries:
134
+ - `otest/queries`: 3452 query embeddings, i.e., a sparse matrix (CSR) of size $30522 \times 3452$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
135
+ - `otest/knns`: the gold-standard identifiers for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 3452$ (i32).
136
+ - `otest/dists`: the gold-standard distances (dot product) for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 3452$ (f32).
137
  - See example below to know how to work with the file
138
 
139
+ ### FIQA (Financial Question Answering)
140
+
141
+ **Location:** `fiqa-dev/fiqa-dev.h5`
142
+
143
+ - **Source repo:** <https://github.com/beir-cellar/beir>
144
+ - **Model:** SPLADE-v3 (sparse embeddings)
145
+ - **Similarity:** Dot product (vectors are not normalized)
146
+ - **Content of the h5 file:**
147
+ - group `train`: a 57k sparse vector database, i.e., a sparse matrix (CSR) of size $30522 \times 57638$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
148
+ - group `otest`: collection of development queries:
149
+ - `otest/queries`: 6648 query embeddings, i.e., a sparse matrix (CSR) of size $30522 \times 6648$ (f32). It contains `data`, `indices`, `indptr` datasets and a `shape` attribute.
150
+ - `otest/knns`: the gold-standard identifiers for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 6648$ (i32).
151
+ - `otest/dists`: the gold-standard distances (dot product) for the 100 nearest neighbors of `otest/queries` in `train`, i.e., a matrix $100 \times 6648$ (f32).
152
  - See example below to know how to work with the file
153
 
154
+ ### Spot-Check Datasets
155
+
156
+ **Locations:**
157
+ - `task-1-spot-check/benchmark-dev-gooaq-small.h5`
158
+ - `task-2-spot-check/benchmark-dev-llama-small.h5`
159
+ - `task-3-spot-check/benchmark-dev-fiqa-small.h5`
160
+
161
+ These are smaller validation datasets used for spot-checking implementations before running on the full datasets.
162
+
163
+ ## Configuration Files
164
+
165
+ Each dataset directory contains a `config.json` file with metadata about the dataset:
166
+
167
+ ```json
168
+ {
169
+ "task": "task1",
170
+ "data": "train",
171
+ "gt_I": ["allknn", "knns"],
172
+ "k": 15,
173
+ "dataset_name": "wikipedia",
174
+ "filename": "benchmark-dev-wikipedia-bge-m3.h5"
175
+ }
176
+ ```
177
+
178
+ ## Python Examples
179
+
180
+ ### Loading Datasets
181
+
182
+ ```python
183
+ import h5py
184
+ from huggingface_hub import hf_hub_download
185
 
186
+ # Download and load a dataset
187
+ file_path = hf_hub_download(
188
+ repo_id="SISAP-Challenges/SISAP2026",
189
+ filename="wikipedia/benchmark-dev-wikipedia-bge-m3.h5",
190
+ repo_type="dataset"
191
+ )
192
+
193
+ with h5py.File(file_path, 'r') as f:
194
+ train = f['train'][:]
195
+ print(f"Train shape: {train.shape}")
196
+ ```
197
 
198
+ ### Loading Sparse Matrices
199
+
200
+ Here is a small example of how to load the sparse matrices from `nq/nq.h5` and `fiqa-dev/fiqa-dev.h5` using `scipy`:
201
 
202
  ```python
203
  import h5py
204
  from scipy.sparse import csr_matrix
205
+ from huggingface_hub import hf_hub_download
206
 
207
  def load_sparse_matrix(h5_group):
208
  indptr = h5_group['indptr'][:]
 
211
  shape = tuple(h5_group.attrs['shape'])
212
  return csr_matrix((data, indices, indptr), shape=shape)
213
 
214
+ # Download the file
215
+ file_path = hf_hub_download(
216
+ repo_id="SISAP-Challenges/SISAP2026",
217
+ filename="nq/nq.h5",
218
+ repo_type="dataset"
219
+ )
220
+
221
+ with h5py.File(file_path, 'r') as f:
222
  train_matrix = load_sparse_matrix(f['train'])
223
  query_matrix = load_sparse_matrix(f['otest']['queries'])
224
 
 
226
  print(f"Query shape: {query_matrix.shape}")
227
  ```
228
 
229
+ ### Loading Configuration
230
+
231
+ ```python
232
+ import json
233
+ from huggingface_hub import hf_hub_download
234
+
235
+ config_path = hf_hub_download(
236
+ repo_id="SISAP-Challenges/SISAP2026",
237
+ filename="wikipedia/config.json",
238
+ repo_type="dataset"
239
+ )
240
+
241
+ with open(config_path, 'r') as f:
242
+ config = json.load(f)
243
+ print(config)
244
+ ```
245
+
246
+ ## Notes
247
+
248
+ - h5py/HDF5.jl packages read matrices in the expected platform order, so be careful since it could permute dimensions w.r.t what is here explained, however, the final order is what is expected anyway for fast implementations.
249
+ - All large `.h5` files are stored using Git LFS (Large File Storage)
250
+ - Config files provide metadata and parameters for each dataset