Skip to main content

description

Project description

:rocket: ANN :facepunch:


Install

pip install fast-ann

Usage

from ann import ANN
import numpy as np

data = np.random.random((1000, 128)).astype('float32')

ann = ANN()
ann.train(data, index_factory='IVF4000, Flat', noramlize=True)

dis, idx = ann.search(data[:10])

print(dis)
print(idx)

  • faiss不同量级对应的训练时间及内存测试

  • 压缩方式测试

  • 四种组合:默认是查向量返回 distance与index

    • id => id/vector
    • vector => id/vector
    • push场景需要 docid => title_vector => docid
  • 线上服务

    • id2word
    • id2vector

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fast-ann, version 2020.4.27.15.5.40
Filename, size File type Python version Upload date Hashes
Filename, size fast_ann-2020.4.27.15.5.40-py3-none-any.whl (10.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size fast-ann-2020.4.27.15.5.40.tar.gz (7.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page