Skip to content

Conversation

@mayya-sharipova
Copy link
Contributor

Use IVF_PQ algorithm for GPU index building for large dataset (>= 1M vectors). Temporarily add a factory for calculating IVF_PQ params. Also skip estimation of needed memory when IVF_PQ is used.

Use IVF_PQ algorithm for GPU index building for large dataset (>= 1M vectors).
Temporarily add a factory for calculating IVF_PQ params.
Also skip estimation of needed memory when IVF_PQ is used.
@mayya-sharipova mayya-sharipova added >enhancement auto-backport Automatically create backport pull requests when merged :Search Relevance/Vectors Vector search v9.2.1 v9.3.0 labels Oct 24, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine
Copy link
Collaborator

Hi @mayya-sharipova, I've created a changelog YAML for you.

}

private long estimateRequiredMemory(int numVectors, int dims, CuVSMatrix.DataType dataType) {
// for large vector sets, we use IVF+PQ or similar, so we don't skip blocking based on memory usage
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ldematte What do you think we should do here? I made it very naively.

@mayya-sharipova mayya-sharipova marked this pull request as draft October 24, 2025 19:17
@mayya-sharipova
Copy link
Contributor Author

With this params (1M byte vectors):

@achirkin Notice how here when switching from NN_DESCENT, we got worse graph building time, and more dense graphs.

gist: 1_000_000 docs; 960 dims; euclidean metric

index_type force_merge_time (ms) QPS1 seg recall1 seg
cpu 130129 421 0.91
gpu NN_DESCENT 20643 467 0.92
gpu IVF_PQ 36536 149 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >enhancement :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants