TPU index is a package for fast similarity search over large collections of high dimension vectors on Google Cloud TPUs
Project description
TPU Index
TPU Index is a package for fast similarity search over large collections of high dimension vectors on TPUs. This package was built to support our project that we developed for https://tfworld.devpost.com/.
Link to our project: https://devpost.com/software/naturallanguagerecommendations
Installation
!pip install tpu-index
Basic usage
from tpu_index import TPUIndex
index = TPUIndex(num_tpu_cores=8)
index.create_index(vectors) # vectors = numpy array, shape == [None, None]
...
D, I = index.search(xq, distance_metric='cosine', top_k=5)
ToDo:
- Add more distance metrics
- Optional GPU support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tpu_index-0.0.6a0.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for tpu_index-0.0.6a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00eb731731c4808a654753e662727830b9ab8c1a2da5fb65a5c72869f8506872 |
|
MD5 | d0f3ce71bd2bd612fa4f15e4198ebb8c |
|
BLAKE2b-256 | c49a175fac9f696535f051d6d928cb0125592f568fbbcf91ec8e873026eff5ed |