创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

mlxVS 将 cuVS 风格 GPU 检索带到 Apple Silicon

AI 总结

开发者发布了基于 MLX 的 Apache-2.0 开源库 mlxVS,通过 Python 和 C++ 接口将 NVIDIA cuVS 风格的精确 k-NN、k-means、NN-Descent 与 CAGRA 算法移植到 Apple Silicon。开发者自测称,在 SIFT1M 数据集和搭载 M3 Pro 的 MacBook Pro 上,CAGRA 在 itopk 64 时达到 0.976 的 recall@10 和每秒 69,500 次查询,在 itopk 128 时则达到 0.993 和每秒 37,800 次查询。这些数据针对批量查询,尚未经独立复现,也没有与 CUDA 版 cuVS 进行同等条件比较。

深度见解

mlxVS 为 Apple Silicon 开发者提供了基于 MLX、借鉴 NVIDIA cuVS 的开源 GPU 向量检索方案,但现有证据仅来自单一数据集上的开发者自测,且该库仍有一些使用限制。

I've released mlxVS, an open-source (Apache-2.0) library that runs the main GPU nearest-neighbor algorithms from NVIDIA's cuVS on Apple Silicon, built on MLX. It covers exact k-NN, k-means, NN-Descent k-NN graphs and CAGRA (graph pruning plus GPU graph search), with cuVS's parameter names, from Python (NumPy in) or C++. Results (SIFT1M, 985k x 128, L2, MacBook Pro M3 Pro: 18-core GPU, 12-core CPU) | Index | Build | Search setting | Recall@10 | Queries/s | |---|---:|---|---:|---:| | mlxVS CAGRA, degree 32 (from a 64-NN graph) | 10.4 s | itopk 64 | 0.976 | 69,500 | | | | itopk 128 | 0.993 | 37,800 | | mlxVS CAGRA, degree 64 (from a 128-NN graph) | 19.6 s | itopk 64 | 0.994 | 43,600 | | mlxVS unpruned NN-Descent graph, degree 32 | 8.8 s | itopk 128 | 0.939 | 42,400 | | hnswlib, M=16, efC=200, 12 threads | 88.1 s | ef 64 | 0.964 | 32,200 | | | | ef 128 | 0.990 | 17,600 | 10,000 queries in one batch, recall@10 against exact neighbors (computed on the GPU with brute_force_knn), best of 3 runs, on AC power. Chart: https://github.com/mikepapadim/mlxvs#benchmarks How it works Limitations Code python import mlxvs graph = mlxvs.cagra_build(vectors, graph_degree=32, metric="cosine") ids, dist = mlxvs.graph_search(vectors, graph, queries, k=10, metric="cosine", itopk_size=64) pip install mlxvs, macOS 14+ on Apple Silicon. Benchmarks are reproducible with bench/bench_search.py (it also runs the hnswlib baseline). GitHub: https://github.com/mikepapadim/mlxvs Happy to answer questions about the Metal kernels or the cuVS port. submitted by /u/mikebmx1 [link] [comments]

#mlxVS#MLX#NVIDIA cuVS#CAGRA#NN-Descent#Apple Silicon#hnswlib

原文约 1 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。