Skip to content

[Enhance]: Support the DiskANN index compute distances through turbo Quantizer #707

Description

@richyreachy

Affected Component

DiskANN builder, searcher, streamer, and Turbo quantizer framework.

Current Behavior

DiskANN maintains a dedicated PQ implementation, resulting in duplicated training, serialization, and distance-calculation logic. It also lacks a standard mechanism for injecting external quantizers.

Desired Improvement

Refactor DiskANN to use the Turbo quantizer framework:

  • Replace the legacy DiskANN PQ trainer/table with PqInt8Quantizer.
  • Persist self-describing quantizer metadata with the index.
  • Restore quantizers through the common initialization/deserialization contract.
  • Support external quantizer injection in builders, searchers, and streamers.
  • Support FP16 and FP32 input with L2, cosine, and inner-product policies.
  • Use SIMD-optimized full-precision distance calculations during graph construction and reranking.
  • Add tests covering general search, filtering, grouping, node cache, vector fetching, RNN search, and FP16 entry points.

Impact

This consolidates quantization under one framework, reduces duplicated code, and makes future quantizer integration easier.

Benchmark results show:

  • Search QPS is 0.5–2.9% higher than the main branch.
  • FP32 recall remains within ±0.1 percentage points of main.
  • FP16 Turbo PQ introduces an expected 1.6–2.1 percentage-point R@1 trade-off.

Metadata

Metadata

Assignees

Labels

enhancementImprove an existing feature or component

Type

No type

Projects

Status
Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions