NVIDIA cuML: GPU-Accelerated Machine Learning
Actively maintained. Last release 8 weeks ago, commits in 26 of the last 26 weeks. A safe choice.
pip install cuml-cu12NVIDIA cuML: GPU-Accelerated Machine Learning
NVIDIA cuML is an open-source CUDA-X Data Science library for GPU-accelerated machine learning. It provides two ways to run machine learning workloads on NVIDIA GPUs:
- The
cumlPython API provides GPU-native estimators with familiar scikit-learn-style APIs and direct control over machine learning workflows. cuml.accelaccelerates existing scikit-learn, UMAP, and HDBSCAN code without changing the Python code that uses those libraries.
On representative benchmarks, cuML can accelerate scikit-learn workflows by up to 50x. Performance depends on the algorithm, dataset, and hardware. See the cuML benchmarks for results and methodology.
Use the GPU-native cuml API
The cuml Python API follows the familiar scikit-learn fit-predict-transform pattern while keeping data and computation on the GPU. The following example generates sample data and computes DBSCAN clusters on the GPU:
from cuml.datasets import make_blobs
from cuml.cluster import DBSCAN
# Create sample data
X, y = make_blobs(n_samples=100, centers=3, n_features=2, random_state=42)
# Fit clustering model
dbscan = DBSCAN(eps=1.0, min_samples=5)
dbscan.fit(X)
print(dbscan.labels_)
cuml supports clustering, dimensionality reduction, regression,
classification, preprocessing, model selection, time series, model
explanation, and nearest-neighbor workflows. Browse the API
reference for the current list of
estimators and functions.
Accelerate existing code with cuml.accel
Run an existing Python script through the cuml.accel module:
python -m cuml.accel script.py
Or load the extension in a Jupyter notebook before importing scikit-learn, UMAP, or HDBSCAN:
%load_ext cuml.accel
Supported operations run on the GPU. When an estimator or configuration cannot
be accelerated, cuml.accel uses the original CPU implementation so the rest
of the workflow can continue. See the cuml.accel compatibility
documentation for
current coverage and fallback conditions. Use the to check
which operations ran on the GPU.