: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
Metadata
Release files for fast-ann 2020.4.27.15.5.40
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fast-ann-2020.4.27.15.5.40.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fast_ann-2020.4.27.15.5.40-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / fast-ann-2020.4.27.15.5.40.tar.gz
| Download URL | fast-ann-2020.4.27.15.5.40.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff7fc0dbdc7a3f1b766b24dbd137dbfa5f72bceb4d46d62ef3af2e82fe8ba4a8
|
|
BLAKE2b-256 checksum How to use checksums |
e1993ac1ce537b3db18d590847d8dbeffdb5b361fd184f8f6adb40deaba6c985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.42.0 CPython/3.6.8
|
Release files / fast_ann-2020.4.27.15.5.40-py3-none-any.whl
| Download URL | fast_ann-2020.4.27.15.5.40-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b59ba1251470b3108bd848702405082366ca454aae282b0645fdf1f19037d6e5
|
|
BLAKE2b-256 checksum How to use checksums |
23a7bc1895a37c1a0361a1df5ebd95e0d569fc387e05ab8bf8ebe9426dbf2d48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.42.0 CPython/3.6.8
|