PanoramaVLDB commited on
Commit
d5c7c2d
·
verified ·
1 Parent(s): 37c50e4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pretty_name: Panorama ANN Benchmark Vectors (.fvec)
4
+ tags:
5
+ - vector-search
6
+ - nearest-neighbor-search
7
+ - ann-benchmark
8
+ - benchmark
9
+ - panorama
10
+ task_categories:
11
+ - feature-extraction
12
+ size_categories:
13
+ - 10M<n<100M
14
+ viewer: false
15
+ ---
16
+
17
+ # Panorama — ANN Benchmark Vectors (.fvec)
18
+
19
+ Raw binary vectors in **`.fvec`** format for approximate nearest neighbor (ANN) benchmarks used by the [Panorama](https://github.com/PanoramaVLDB) project.
20
+
21
+ The **Hugging Face Dataset Viewer is disabled** because `.fvec` is a binary format not supported by the Hub's preview. Download the files and load them with your own code.
22
+
23
+ ## Contents
24
+
25
+ Each benchmark has a **base** (index) set and a **query** set:
26
+
27
+ | Dataset | Base file | Query file |
28
+ |---|---|---|
29
+ | ada002 | `ada002_base.fvec` | `ada002_query.fvec` |
30
+ | CIFAR-10 | `cifar10_base.fvec` | `cifar10_query.fvec` |
31
+ | DEEP | `deep_base.fvec` | `deep_query.fvec` |
32
+ | Fashion-MNIST | `fashionmnist_base.fvec` | `fashionmnist_query.fvec` |
33
+ | GIST1M | `gist1m_base.fvec` | `gist1m_query.fvec` |
34
+ | GloVe 2M×300 | `glove2m300_base.fvec` | `glove2m300_query.fvec` |
35
+ | NYTimes | `nytimes_base.fvec` | `nytimes_query.fvec` |
36
+ | OpenAI | `openai_base.fvec` | `openai_query.fvec` |
37
+ | PubMed | `pubmed_base.fvec` | `pubmed_query.fvec` |
38
+ | SIFT10M | `sift10m_base.fvec` | `sift10m_query.fvec` |
39
+
40
+ ## `.fvec` binary format
41
+
42
+ Each vector is stored sequentially as:
43
+
44
+ 1. **`int32` (4 bytes, little-endian)** — dimension `d`
45
+ 2. **`d × float32` (4d bytes, little-endian)** — the vector components
46
+
47
+ Repeat until EOF. For example, 128-d SIFT vectors use 516 bytes per row (4 + 128×4).
48
+
49
+ ## Download
50
+
51
+ ### Using `install_datasets.py` (from the Panorama repo)
52
+
53
+ ```bash
54
+ pip install huggingface_hub
55
+ python3 install_datasets.py /path/to/destination
56
+ ```
57
+
58
+ ### Using the HuggingFace CLI
59
+
60
+ ```bash
61
+ huggingface-cli download PanoramaVLDB/data --repo-type dataset --local-dir ./datasets
62
+ ```
63
+
64
+ ### Reading `.fvec` in Python
65
+
66
+ ```python
67
+ import numpy as np
68
+ import struct
69
+
70
+ def read_fvec(path):
71
+ with open(path, "rb") as f:
72
+ d = struct.unpack("<i", f.read(4))[0]
73
+ return np.memmap(path, dtype="float32", mode="r").reshape(-1, d + 1)[:, 1:]
74
+ ```