Categories
Misc

Hora 0.1.1, an blazingly fast AI Similarity search algorithm library

Hora 0.1.1, an blazingly fast AI Similarity search algorithm library

โ€‹

https://preview.redd.it/67wjqqmjc5g71.png?width=1280&format=png&auto=webp&s=506739a7bfa92497ccadd9c68219eeeaa8fca68c

Hora is an approximate nearest neighbor search algorithm (wiki) library. We implement all code in Rust๐Ÿฆ€ for reliability, high level abstraction and high speeds comparable to C++.

Hora, ใ€Œใปใ‚‰ใ€in Japanese, sounds like [hลlษ™], and means Wow, You see!or Look at that!. The name is inspired by a famous Japanese song ใ€Œๅฐใ•ใชๆ‹ใฎใ†ใŸใ€ .

github: https://github.com/hora-search/hora

homepage: https://horasearch.com/

Python library: https://github.com/hora-search/horapy

Javascript library: https://github.com/hora-search/hora-wasm

you can easily install horapy:

pip install -U horapy 

here is our online demo (you can find it on our homepage)

๐Ÿ‘ฉ Face-Match [online demo] (have a try!)

https://i.redd.it/sx33o7nrc5g71.gif

๐Ÿท Dream wine comments search [online demo] (have a try!)

https://i.redd.it/dljouf3tc5g71.gif

Hora is blazingly fast, benchmark (compare with Faiss and Annoy)

https://preview.redd.it/xxfrikouc5g71.png?width=1190&format=png&auto=webp&s=1b2564cb276d6023b2f6d4c9db15d5125d6b22e5

usage is also very simple:

import numpy as np from horapy import HNSWIndex dimension = 50 n = 1000 # init index instance index = HNSWIndex(dimension, "usize") samples = np.float32(np.random.rand(n, dimension)) for i in range(0, len(samples)): # add node index.add(np.float32(samples[i]), i) index.build("euclidean") # build index target = np.random.randint(0, n) # 410 in Hora ANNIndex <HNSWIndexUsize> (dimension: 50, dtype: usize, max_item: 1000000, n_neigh: 32, n_neigh0: 64, ef_build: 20, ef_search: 500, has_deletion: False) # has neighbors: [410, 736, 65, 36, 631, 83, 111, 254, 990, 161] print("{} in {} nhas neighbors: {}".format( target, index, index.search(samples[target], 10))) # search 

we are pretty glad to have you participate, any contributions are welcome, including the documentation and tests. We use GitHub issues for tracking suggestions and bugs, you can do the Pull Requests, Issue on the github, and we will review it as soon as possible.

github: https://github.com/hora-search/hora

submitted by /u/aljun_invictus
[visit reddit] [comments]

Leave a Reply

Your email address will not be published.