: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 easyann 2021.2.1.15.42.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easyann-2021.2.1.15.42.6.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easyann-2021.2.1.15.42.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.0 kB
Release files / easyann-2021.2.1.15.42.6.tar.gz
| Download URL | easyann-2021.2.1.15.42.6.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd3976b109adb6a9337c531489eec2202e93505db8f86908681816c6177ec0d5
|
|
BLAKE2b-256 checksum How to use checksums |
ed1e64351098f02c6dd3181f50bb979bdfc36294282c2a4838800076d63158a5
|
| 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.56.0 CPython/3.6.8
|
Release files / easyann-2021.2.1.15.42.6-py3-none-any.whl
| Download URL | easyann-2021.2.1.15.42.6-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36ad77df3141bf915cfe352b463c4e61aeba305886fc59cb89d235d588d02798
|
|
BLAKE2b-256 checksum How to use checksums |
d408b44997d6efeec1b85ad840d459472b68663afe256b7e0fe1eb28146de993
|
| 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.56.0 CPython/3.6.8
|