cuVS Documentation

repository·main·Indexed 21 days ago

https://github.com/nvidia/cuvs

A high-performance GPU library for approximate nearest neighbor (ANN) search and clustering algorithms, built on top of the RAPIDS RAFT library. It provides C++ and C shared libraries, as well as bindings for Go and Java, including support for CAGRA algorithms and balanced k-means partitioning.

Tokens
321.3K
Snippets
913
Records
1.3K
Agent score
72%

What's inside cuVS

  1. Overview of cuVS preprocessing APIs

    main

    cuVS provides a suite of preprocessing APIs designed to transform, compress, or project vectors before they are used in downstream search or analysis tasks. These tools help optimize storage requirements and computational efficiency.

    Available preprocessing techniques include:

    • Binary Quantizer: Compresses vectors into binary representations for compact storage and high-speed comparisons.
    • PCA (Principal Component Analysis): Reduces dimensionality using linear projection while attempting to preserve maximum variance.
    • Product Quantization (PQ): Splits vectors into subvectors and encodes each part using compact codebooks.
    • Scalar Quantizer: Compresses each vector dimension independently using scalar quantization.
    • Spectral Embedding: Generates lower-dimensional embeddings derived from graph structures.
  2. Overview of cuVS Bench

    main

    cuVS Bench is a reproducible benchmarking tool designed for Approximate Nearest Neighbor (ANN) search implementations. It allows developers to compare performance across different hardware configurations, including GPU-to-GPU and GPU-to-CPU comparisons.

    Key capabilities include:

    • Comparing build time, search throughput, latency, and recall.
    • Finding optimal parameter settings for recall buckets.
    • Generating consistent plots for performance analysis.
    • Identifying optimization opportunities across index parameters, build time, and search performance.
    • Capturing index configurations that are reproducible across on-prem and cloud hardware.
  3. Overview of cuVS Data Platform Integrations

    main

    When data locality, storage throughput, and RAG (Retrieval-Augmented Generation) pipeline architecture are critical, cuVS can be deployed within various enterprise data platforms. These platforms typically use the NVIDIA AI Data Platform reference design to bring accelerated computing closer to enterprise data.

    Key platform integrations include:

    • Cloudian HyperScale AI Data Platform: For on-premises AI factories, supporting agentic RAG and semantic search.
    • DDN Infinia: Paired with NVIDIA NIM and Milvus for RAG and vector search pipelines.
    • Dell AI Data Platform: Uses cuVS for vector indexing and search over unstructured data.
    • MinIO AIStor: Provides the durable object layer for embeddings and index artifacts, often used with Milvus and cuVS.
    • NetApp AIPod: Supports governed RAG and inference pipelines.
    • Everpure FlashBlade: High-throughput storage for NVIDIA accelerated compute.
    • WEKA Data Platform: High-performance storage foundation for agentic AI reasoning.
  4. Overview of the cuVS Bench Tool

    main
    The cuVS Bench tool is designed for benchmarking vector search and clustering performance. It allows users to run benchmark workloads, prepare datasets, and extend the tool with custom backend integrations. Use this tool to evaluate the performance of different algorithms and hardware configurations within the cuVS ecosystem.
  5. What is cuVS?

    main
    cuVS is a library providing state-of-the-art implementations of algorithms for approximate nearest neighbors (ANN) and clustering on the GPU. It is designed to simplify GPU-accelerated vector similarity search and clustering, which are critical for tasks like semantic search (RAG, recommenders, computer vision), data mining (clustering, visualization), and graph analysis (k-NN graph construction).
  6. Overview of NVIDIA cuVS

    main

    NVIDIA cuVS is a GPU-accelerated library designed for vector search, including approximate and exact nearest neighbors, vector compression, and clustering. It provides both high-level end-to-end algorithms and low-level building blocks for constructing new algorithms.

    Key capabilities include:

    • Vector Search: Finding semantically similar items in embedding spaces (used in RAG, Recommender systems, and Computer Vision).
    • Clustering & Visualization: Accelerating algorithms like K-means, UMAP, t-SNE, and HDBSCAN.
    • Graph Construction: Converting dense vectors into nearest neighbor graphs for use with libraries like cuGraph or GraphBLAS.

    The library is built on top of the RAPIDS RAFT library of high-performance machine learning primitives.

  7. Overview of cuVS

    main
    cuVS provides state-of-the-art GPU implementations for approximate nearest neighbor (ANN) search and clustering algorithms. Its primary purpose is to simplify the use of GPUs for vector similarity search and clustering tasks. Developers can use cuVS directly or via integrated databases and libraries.
  8. Use the Brute Force Package in Go

    main

    The brute_force Go package provides tools for building and searching a Brute Force K-Nearest Neighbors (KNN) index. This is useful for exact nearest neighbor searches on a dataset using a provided distance metric.

    Key components include:

    • BruteForceIndex: The core index type.
    • CreateIndex(): To initialize an empty index.
    • BuildIndex(): To populate an index with a dataset.
    • SearchIndex(): To perform queries against the index.
    • Close(): To release resources associated with the index.
  9. Model and Data Quality Workflows

    main

    cuVS can be used to inspect and maintain the quality of embedding models and datasets:

    • Embedding Quality Inspection: Use nearest-neighbor examples to verify if a model correctly groups related items or if it encodes unwanted shortcuts. Batch searches can identify mislabeled examples, outliers, or hard negatives.
    • Dataset Drift Tracking: Use clustering and graph analysis to monitor if new embeddings form new clusters or change neighbor relationships, which signals changes in data distribution or model behavior.
  10. Explore the cuVS Java API Common components

    main

    The cuVS Java API provides core abstractions for managing data on different memory locations and interacting with GPU resources. Key components include:

    • Matrix Abstractions: Use CuVSMatrix as a general interface, or specific implementations like CuVSDeviceMatrix for GPU-resident data and CuVSHostMatrix for CPU-resident data.
    • Resource Management: Manage GPU and library resources using CuVSResources and CuVSResourcesInfo.
    • GPU Information: Access hardware details via GPUInfo and GPUInfoProvider.
    • Service Providers: Interact with the cuVS ecosystem through CuVSProvider and CuVSServiceProvider.
    • Error Handling: Catch LibraryException for errors occurring within the cuVS library during execution.
  11. Explore the cuVS Rust API

    main
    The cuVS Rust API is organized into several functional modules. You can use these modules to perform clustering, distance calculations, and various nearest neighbor search algorithms on the GPU. The documentation for these modules is generated directly from the Rust crate sources located in rust/cuvs/src.
  12. Explore the cuVS C++ API modules

    main

    The cuVS C++ API is organized into several functional modules for vector search, clustering, and preprocessing. You can navigate the documentation by functional area:

    • Cluster: Implement clustering algorithms like Agglomerative, K-Means, and Spectral.
    • Distance: Access distance metrics including standard Distance and Grammian metrics.
    • Nearest Neighbors: High-performance approximate and exact nearest neighbor search algorithms, including HNSW, Cagra, IVF variants (Flat, PQ, RaBitQ, SQ), Vamana, Scann, and Brute Force.
    • Preprocessing: Quantization and dimensionality reduction tools such as Binary, PCA, PQ, Scalar, and Spectral Embedding.
    • Selection: Tools for selecting specific elements, such as Select K.
    • Statistics: Evaluation metrics like Silhouette Score and Trustworthiness Score.
    • Utilities: Low-level helpers including Cutlass Utils and File Io.