@@ -63,8 +63,9 @@ enVector supports two types of benchmark cases:
6363├── README.md
6464├── scripts
6565│ ├── get_kmeans_centroids.py # create kmeans centroids
66+ │ ├── prepare_dataset.py # download and prepare ground truth neighbors for GAS dataset
67+ │ ├── prepare_random_dataset.py # download and prepare ground truth neighbors for random dataset
6668│ ├── requirements.txt # python requirements
67- │ ├── prepare_dataset.py # download and prepare ground truth neighbors for dataset
6869│ └── run_benchmark.sh # benchmark script
6970└── vectordb_bench/config-files # benchmark config file
7071 └── envector_{benchmark_case}_config.yml
@@ -116,7 +117,7 @@ Run the following commands to run enVector with VectorDBBench's built-in benchma
116117./scripts/run_benchmark.sh --index-type IVF_FLAT --config-file envector_{benchmark_case}_config.yml # IVF-FLAT
117118```
118119
119- For more details, please refer to ` envector_{benchmark_case}_config.yml ` in scripts directory for benchmarks with enVector, or you can use the following command:
120+ For more details, please refer to ` envector_{benchmark_case}_config.yml ` in ` vectordb_bench/config-files ` directory for benchmarks with enVector, or you can use the following command:
120121
121122``` bash
122123python -m vectordb_bench.cli.vectordbbench envectorflat \
@@ -147,10 +148,11 @@ Prepare the following artifacts for the ANN benchmark with `scripts/prepare_data
147148- prepare ground-truth neighbors
148149- download centroids for the GAS index for corresponding to the embedding model
149150
150- For the ANN benchmark, we provide two datasets via HuggingFace:
151- - ` PUBMED768D400K ` : [ cryptolab-playground/pubmed-arxiv-abstract-embedding-gemma-300m] ( https://huggingface.co/datasets/cryptolab-playground/pubmed-arxiv-abstract-embedding-gemma-300m )
152- - ` BLOOMBERG768D368K ` : [ cryptolab-playground/Bloomberg-Financial-News-embedding-gemma-300m] ( https://huggingface.co/datasets/cryptolab-playground/Bloomberg-Financial-News-embedding-gemma-300m )
153- - ` PRODUCTS512D400K ` : [ cryptolab-playground/amazon-products-clip-vit-b-32] ( https://huggingface.co/datasets/cryptolab-playground/amazon-products-clip-vit-b-32 )
151+ For the ANN benchmark, we provide four datasets via HuggingFace:
152+ - ` pubmed768d400k ` : [ cryptolab-playground/pubmed-arxiv-abstract-embedding-gemma-300m] ( https://huggingface.co/datasets/cryptolab-playground/pubmed-arxiv-abstract-embedding-gemma-300m )
153+ - ` bloomberg768d368k ` : [ cryptolab-playground/Bloomberg-Financial-News-embedding-gemma-300m] ( https://huggingface.co/datasets/cryptolab-playground/Bloomberg-Financial-News-embedding-gemma-300m )
154+ - ` products512d400k ` : [ cryptolab-playground/amazon-products-clip-vit-b-32] ( https://huggingface.co/datasets/cryptolab-playground/amazon-products-clip-vit-b-32 )
155+ - ` food512d101k ` : [ cryptolab-playground/food101-clip-vit-b-32] ( https://huggingface.co/datasets/cryptolab-playground/food101-clip-vit-b-32 )
154156
155157Also, we provide centroids for the corresponding embedding model used in the ANN benchmark:
156158- GAS Centroids: [ cryptolab-playground/gas-centroids] ( https://huggingface.co/datasets/cryptolab-playground/gas-centroids )
@@ -161,20 +163,9 @@ To prepare dataset, run the following command as example:
161163# Install dependencies for preparing dataset
162164pip install -r ./scripts/requirements.txt
163165
164- # Prepare GAS dataset: PUBMED768D400K
166+ # Prepare GAS dataset
165167python ./scripts/prepare_dataset.py \
166- -d cryptolab-playground/pubmed-arxiv-abstract-embedding-gemma-300m \
167- -e embeddinggemma-300m
168-
169- # Prepare GAS dataset: BLOOMBERG768D368K
170- python ./scripts/prepare_dataset.py \
171- -d cryptolab-playground/Bloomberg-Financial-News-embedding-gemma-300m \
172- -e embeddinggemma-300m
173-
174- # Prepare GAS dataset: PRODUCTS512D400K
175- python ./scripts/prepare_dataset.py \
176- -d playground/amazon-products-clip-vit-b-32 \
177- -e clip-vit-b-32
168+ -d pubmed768d400k
178169```
179170
180171Then, you can find the generated files as follows:
@@ -204,24 +195,21 @@ Run the provided shell scripts (`./scripts/run_benchmark.sh`) as the following:
204195For more details, please refer to ` run_benchmark.sh ` or ` envector_{benchmark_case}_config.yml ` in scripts directory for benchmarks with enVector with ANN (GAS), or you can use the following command:
205196
206197``` bash
207- python -m vectordb_bench.cli.vectordbbench envectorivfflat \
198+ python -m vectordb_bench.cli.vectordbbench envectorivfgas \
208199 --config-file envector_pubmed_config.yml
209200
210201# or
211202
212- python -m vectordb_bench.cli.vectordbbench envectorivfflat \
203+ python -m vectordb_bench.cli.vectordbbench envectorivfgas \
213204 --uri " localhost:50050" \
214205 --eval-mode mm \
215206 ... \
216207 --train-centroids True \
217208 --centroids-path " ./centroids/embeddinggemma-300m/centroids.npy" \
218- --nlist 1024 \
209+ --nlist 32768 \
219210 --nprobe 6
220211```
221212
222- Note that, ** ` NUM_PER_BATCH ` should be set to the database size** when using IVF-based ANN index for enVector currently.
223- We will support adjustable ` NUM_PER_BATCH ` for ANN soon.
224-
225213## 🎯 Advanced Usage
226214
227215### Prepare Other Datasets
0 commit comments