Skip to content

[FEA] Document HNSW-to-CAGRA migration for Faiss Python and cuVS Bench #2879

Open

Description

@kshitizgupta21

Problem

Faiss Python users migrating from HNSW to CAGRA must reconstruct the cuVS C++ HNSW heuristics manually. The CAGRA cuVS guide shows from_hnsw_params in a C++ conversion example, but does not explain the effective settings or how to apply them in Faiss Python and cuVS Bench. HNSW M is not directly equivalent to CAGRA graph_degree.

Requested change

Add a Faiss Python migration example that:

  • Takes HNSW M and efConstruction, dataset size and dimension, and distance metric.
  • Explains SIMILAR_SEARCH_PERFORMANCE and SAME_GRAPH_FOOTPRINT and shows the resulting graph degree, intermediate graph degree, graph builder, and builder-specific settings.
  • Provides runnable Faiss Python and equivalent cuVS Bench YAML, identifying any settings the interfaces cannot represent.
  • Separates GPU-built CPU IndexHNSWCagra search from native GPU CAGRA search, including conversion options and the applicable search sweeps.
  • Explains that heuristics provide starting builds, requiring measurement of exact recall and latency or throughput at matched recall.

For M=64 and efConstruction=512, the current heuristics produce GD44/IGD192 and GD128/IGD192 respectively. The builder is NN-Descent below one million vectors and IVF-PQ otherwise. Include the full builder configuration, not just degrees, and document applicable versions.

References

Related broader workflow: #2730.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions