K-Means is simple. Making it fast on GPU isn't.
Akshay 🚀
Auf X besuchen@akshay_pachaar263.891 Follower
36.317 Aufrufe
K-Means is simple. Making it fast on GPU isn't.
Flash-KMeans is an IO-aware implementation of exact k-means that rethinks the algorithm around modern GPU bottlenecks.
By attacking the memory bottlenecks directly, Flash-KMeans achieves:
- 30x speedup over cuML
- 200x speedup over FAISS
Using the same exact algorithm, just engineered for today’s hardware.
At the million-scale, Flash-KMeans can complete a k-means iteration in milliseconds.
Here's why this matters today:
K-means has always been an offline primitive. Something you run once to preprocess data and move on. These speedups change that.
↳ Vector databases like FAISS use k-means to build search indices. Faster k-means means you can re-index dynamically as data changes, not batch it overnight.
↳ LLM quantization methods need k-means to find optimal weight codebooks, per layer, repeatedly. What takes hours could now take minutes.
↳ MoE models need fast token routing at inference time. Millisecond k-means makes it viable to run this inside the inference loop, not just in preprocessing.
The 200x over FAISS is the number to internalize. FAISS is the industry standard. Most production vector search systems sit on top of it.
Link to the paper and code in next tweet!
Kommentare
Kommentare aus dem Originalbeitrag auf X (Twitter)
Noch keine Kommentare
