Skip to main content

TPU index is a package for fast similarity search over large collections of high dimension vectors on Google Cloud TPUs

Project description

HitCount

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


Download files

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

Files for tpu-index, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size tpu_index-0.0.6-py3-none-any.whl (3.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tpu_index-0.0.6.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page