mlxvs
by mikepapadim · Framework · Text & code
A Python library that searches for nearest neighbours among vectors and builds graph indexes on the Apple Silicon GPU, on your own Mac.
Latest · Nov 12Released pip-installable library with exact k-NN, k-means, NN-Descent k-NN graphs and CAGRA, all as runtime-compiled mx.fast.metal_kernel kernels
AccessOpen codeLicenseApache 2.0
Seen running on
| Machine | Speed | How | Seen by |
|---|---|---|---|
| 1 run, memory not given | |||
| MLX | |||
Evidence
- Nov 12Ports GPU nearest-neighbor algorithms from NVIDIA cuVS; NN-Descent kernels come from JVector's Metal backend, the rest is newMaker's claim
MLX: Show and tell - Nov 12SIFT1M, 10k-query batches: builds in 10.8 s vs 91.8 s, recall@10 0.976 vs 0.964, 76,400 vs 28,100 queries/s versus hnswlib on 12 CPU coresMaker's claim
MLX: Show and tell - Nov 12ada-002 1M (1536-d), 10k-query batches: builds in 125 s vs 732 s, recall@10 0.979 vs 0.974, 10,000 vs 5,100 queries/s versus hnswlibMaker's claim
MLX: Show and tell - Nov 12Single-query latency is about 0.95 ms on the GPU versus 0.21 ms for single-threaded hnswlib; batches up to ~64 cost about the same as one queryMaker's claim
MLX: Show and tell