推广 热搜: 账号    魅力  十大  关键词  通过  设备  广告  项目  程序 

Faiss(4):索引(Index)

   日期:2024-12-21     作者:tx2jh    caijiyuan  
核心提示:MethodClass nameindex_factoryMain parametersBytes/vectorExhaustiveCommentsExact Search for L2IndexFlatL2"Flat"d4

Method

Class name

index_factory

Main parameters

Bytes/vector

Exhaustive

Comments

Exact Search for L2

IndexFlatL2

"Flat"

d

4*d

yes

brute-force

Exact Search for Inner Product

IndexFlatIP

"Flat"

d

4*d

yes

also for cosine (normalize vectors beforehand)

Hierarchical Navigable Small World graph exploration

IndexHNSWFlat

'HNSWx,Flat`

d, M

4*d + 8 * M

no

Inverted file with exact post-verification

IndexIVFFlat

"IVFx,Flat"

quantizer, d, nlists, metric

4*d

no

Take another index to assign vectors to inverted lists

Locality-Sensitive Hashing (binary flat index)

IndexLSH

-

d, nbits

nbits/8

yes

optimized by using random rotation instead of random projections

Scalar quantizer (SQ) in flat mode

IndexScalarQuantizer

"SQ8"

d

d

yes

4 bit per component is also implemented, but the impact on accuracy may be inacceptable

Product quantizer (PQ) in flat mode

IndexPQ

"PQx"

d, M, nbits

M (if nbits=8)

yes

IVF and scalar quantizer

IndexIVFScalarQuantizer

"IVFx,SQ4" "IVFx,SQ8"

quantizer, d, nlists, qtype

SQfp16: 2 * d, SQ8: d or SQ4: d/2

no

there are 2 encodings: 4 bit per dimension and 8 bit per dimension

IVFADC (coarse quantizer+PQ on residuals)

IndexIVFPQ

"IVFx,PQy"

quantizer, d, nlists, M, nbits

M+4 or M+8

no

the memory cost depends on the data type used to represent ids (int or long), currently supports only nbits <= 8

IVFADC+R (same as IVFADC with re-ranking based on codes)

IndexIVFPQR

"IVFx,PQy+z"

quantizer, d, nlists, M, nbits, M_refine, nbits_refine

M+M_refine+4 or M+M_refine+8

本文地址:http://mip.xhstdz.com/xwnews/656.html    物流园资讯网 http://mip.xhstdz.com/ , 查看更多

特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。

 
 
更多>同类生活信息

文章列表
相关文章
最新动态
推荐图文
生活信息
点击排行
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号