// the find
benfred/implicit
Fast Python Collaborative Filtering for Implicit Feedback Datasets
A Python library for collaborative filtering on implicit feedback data — think play counts, clicks, and purchases rather than star ratings. It implements ALS, BPR, and LMF with Cython/OpenMP for CPU parallelism and CUDA kernels for GPU training. Aimed at ML engineers who need a production-grade recommender without building the math from scratch.
ALS GPU training via custom CUDA kernels is genuinely fast — the benchmarks against Spark show meaningful wall-clock wins on large datasets. The approximate nearest-neighbour integrations (Annoy, Faiss, NMSLIB) are first-class, not bolted on. The API is stable and consistent across models: fit, recommend, similar_items work the same way regardless of which algorithm you pick. Prebuilt wheels for x86_64 Linux/Windows/macOS with GPU support included mean you rarely need a working CUDA build environment just to install.
GPU support requires CUDA 13 and RMM, which is a surprisingly heavy dependency chain for what is otherwise a lightweight library — if your GPU is even one major version behind you are out of luck. The library is fundamentally offline-batch: there is no incremental update path, so adding new users or items means retraining from scratch. The examples folder has two scripts and a notebook from 2016-era datasets (Last.fm, MovieLens), which is thin for a library at this maturity. No built-in support for feature-enriched models (side information on users or items), so if you need that you will be gluing in LightFM or building it yourself.