NVIDIA / NVIDIA/cuvs

How to do batches of vector search?

Open
#553 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

How to do batches of vector search? Each batch contains multiple queries and multiple databases, and queries only search for corresponding database in the batch. For example:

import cupy as cp

batch_size = 16
n_samples = 5000
n_features = 50
n_queries = 1000
dataset = cp.random.random_sample((batch_size, n_samples, n_features),
                                  dtype=cp.float32)
# Build index
index = cagra.build(cagra.IndexParams(), dataset)
# Search using the built index
queries = cp.random.random_sample((batch_size, n_queries, n_features),
                                  dtype=cp.float32)
# doing some indexing and searchs, queries only search for corresponding database

I've searched whole doc and issues. Really appreciate your answer!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides no file or test to start from. Begin by checking the cuVS CAGRA and CuPy documentation for batched datasets and queries, then determine whether corresponding database/query searches are supported; done means providing a documented way to perform the requested batched search or clearly identifying the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.