0xnyn / 0xnyn/comet

Support FlatIndex with Vector Quantization

Offen
#1 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
132
Forks
9
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Any plans on supporting FlatIndex (or even HNSW) with quantized vectors? (int8 for example)

Distance algorithms are largely the same, FlatIndex can use generics to detect the vector type, or explicitly pass the quantization option.

Vector quantization is great for speed and memory savings, but sometimes you just need the best recall possible.

Providing automatic quantization on add would be also possible if allowed, but mainly given how fast SIMD accelerated int8 dot product gets, just being able to use FlatIndex over int8 vectors will be great for a LOT of use cases. Int8 vectors retain almost all of the semantic coherence of float32 while providing 4x memory savings and I bet speed up gains on FlatIndex and HNSW would be substantial (specially is AVX512 is available for SIMD).

I have taken it way futher on tests, and binary quantization on large dimensionality vectors (2560 - 4096 dimensions for example, using Qwen3 embed) has 0.1 recall difference vs float32, with 32x space savings and 60-120x speed increases vs DotProduct/CosineSimilarity (HammingDistance over uint64). That alone makes FlatIndex a contender vs other algorithms while keeping perfect recall.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Untersuche die bestehenden FlatIndex- und HNSW-Implementierungen im Codebase, um die aktuellen Distanzalgorithmen und Vektorspeicher zu verstehen. Erforsche, wie int8-Quantisierung integriert werden kann, möglicherweise mit Generics oder einer Quantisierungsoption. Prüfe die SIMD-Beschleunigungsunterstützung in Go für AVX512. Das Ziel ist, den Index so zu modifizieren, dass er quantisierte Vektoren unterstützt, während eine hohe Recall-Rate beibehalten wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
databases, search
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.