Meta FAIR released e-means, a clustering method for dense vectors. It replaces k-means with a mini-batch update rule based on exponential moving averages. It achieves lower loss in about one-tenth the epochs. It works on CPU via faiss and on GPU via PyTorch with Triton or CuTe kernels. H100 and H200 GPUs need additional CuTe packages for the fastest performance. The code ships inside the faiss library. A paper and browser demo are available. GPU kernels compile on first run. The method supports fractional epoch counts. Default settings derive batch size and step size automatically.
What it unlocks
Replacing k-means with a faster, lower-loss clustering method for dense vectors.
- ~10× speedup in epochs and wall-clock
- 5 default training passes
- 2.5 fractional passes supported
What you need to act on it
- PyTorch with CUDA for GPU runs
- CuTe packages for H100/H200 GPUs
- faiss-cpu for CPU-only use
Sources