TorchPQ
Approximate nearest neighbor search with product quantization on GPU in pytorch and cuda (by DeMoriarty)
DOKSparse
sparse DOK tensors on GPU, pytorch (by DeMoriarty)
Our great sponsors
TorchPQ | DOKSparse | |
---|---|---|
3 | 2 | |
202 | 2 | |
- | - | |
3.5 | 4.2 | |
5 months ago | 10 months ago | |
Cuda | Cuda | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
TorchPQ
Posts with mentions or reviews of TorchPQ.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-01-15.
-
[D] Is there an open-source implementation of the Retrieval-Enhanced Transformer (RETRO)?
if you're decided to run nearest neighbor search on GPU, you might wanna give TorchPQTorchPQ a try
-
[P] TorchPQ: Efficient Nearest Neighbor Search and Clustering on GPUs
TorchPQ is a python library for approximate nearest neighbor search on GPUs. It has efficient implementations of IVFPQ algorithm as well as some of its variants (e.g IVFPQ+R). The project is written mostly in python using pytorch library, with some custom CUDA kernels to accelerate clustering, searching and indexing.
-
Are there more practical tools for KNN searches and storing documents/embeddings?
If you're using GPU for search, You can give TorchPQ a try, it's an ANN search library implemented with PyTorch and CUDA. with TorchPQ, you can freely add / remove vectors with IDs, you can save/load them just like a regular PyTorch model. TorchPQ is still in development, and I'd love to hear any suggestion or feedback.
DOKSparse
Posts with mentions or reviews of DOKSparse.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-03.
- GDlog: A GPU-Accelerated Deductive Engine
-
tensor.to_sparse() Memory Allocation
If using sparse tensors is a must, you can look into DOK sparse format, which is supported for 2d matrices in scipy. it kinda allows you to access any element of the sparse tensor in constant time, which makes it possible to create your tensor directly in sparse format, skipping the need to create a dense numpy array first. In case you need a GPU version of this, I have a library that implements sparse dok tensor in pytorch and cuda. currently it's GPU only.
What are some alternatives?
When comparing TorchPQ and DOKSparse you can also consider the following projects:
faiss - A library for efficient similarity search and clustering of dense vectors.
CUDA-Guide - CUDA Guide
RETRO-pytorch - Implementation of RETRO, Deepmind's Retrieval based Attention net, in Pytorch
cub - [ARCHIVED] Cooperative primitives for CUDA C++. See https://github.com/NVIDIA/cccl