0xnyn / 0xnyn/comet

Support FlatIndex with Vector Quantization

未關閉
#1 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
132
分支
9
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

查看程式碼庫中現有的 FlatIndex 和 HNSW 實作,以了解目前的距離演算法和向量儲存。研究如何整合 int8 量化,可能使用泛型或量化選項。檢查 Go 中對 AVX512 的 SIMD 加速支援。目標是修改索引以支援量化向量,同時保持高召回率。

由索引模型根據 Issue 內容生成。

評估

領域
databases, search
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。