Skip to content

xxworkspace/HierarchicalNSW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is the implementation of hnsw(https://arxiv.org/ftp/arxiv/papers/1603/1603.09320.pdf)
  which is graph based ANNS(Approximate Nearest Neighbor Search).
This project support int8/half/float and AVX/AVX512 instruction.
The dimension of data should be aligned with 32.
The dimension of data with int8 should be aligned with 64.

build:
  g++ version >= 5.5
  ubuntu version >= 16.04
  pip install pybind11
  bash mk.sh

usage:
  import hnswxx
  see more in test
api:
  class hnswxx
  methods:
    __init__(m=60,dim=128,max_elements=6000000,query_ef=120,construction_ef=360,
             space=u"l2",dtype=u"float",quatization=False,max_value=0.0)
    add_items(data,idx)
    knn_query(data,k)
    saveIndex(path)
    loadIndex(path)

note:
    m/query_ef/construction_ef is dependent on the size of max_elements,with larger number can achieve higher recall but cost more time
    when dtype = u"float" or u"half" only half is used for store and compute

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors