uxlfoundation/scikit-learn-intelex
Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application
scikit‑learn‑intelex – Faster scikit‑learn on CPUs & GPUs
What it is
- An open‑source extension that speeds up the popular Python library scikit‑learn by up to ~100× on supported hardware. It works by swapping scikit‑learn’s core algorithms with highly‑optimized implementations from Intel’s oneAPI Data Analytics Library (oneDAL).
Why it matters
- Scikit‑learn is the go‑to toolkit for tabular machine‑learning (logistic regression, random forests, SVMs, clustering, etc.). Many production pipelines use it, but the library is not hardware‑aware.
scikit‑learn‑intelexadds SIMD, multi‑threading, cache‑aware and GPU off‑load optimizations without requiring code changes.
Key features
- CPU acceleration – SIMD and multi‑core optimizations give an average 8.5× speed‑up for training and inference while preserving numerical results.
- GPU & multi‑GPU support – optional oneAPI‑based off‑loading for further gains (requires Intel oneAPI runtime).
- Zero‑code integration – either monkey‑patch the existing
sklearnimport (from sklearnex import patch_sklearn; patch_sklearn()) or import the drop‑in modulesklearnexdirectly. - Compatibility – works with scikit‑learn 1.6‑1.9 and Python 3.10‑3.14; available via PyPI and conda‑forge.
- Model‑builder compatibility – can accelerate decision‑tree models produced by XGBoost or LightGBM.
Typical use‑cases
- Large‑scale tabular data pipelines where training or scoring time is a bottleneck.
- Real‑time inference services that need low latency predictions.
- Distributed training on multi‑node clusters or GPU‑enabled workstations.
Getting started
# Install from PyPI (or use conda‑forge)
pip install scikit-learn-intelex
# CPU example – patch scikit‑learn
from sklearnex import patch_sklearn
patch_sklearn()
from sklearn.cluster import DBSCAN
clustering = DBSCAN(eps=3, min_samples=2).fit(X)
# GPU example – use config_context
from sklearnex import patch_sklearn, config_context
patch_sklearn()
with config_context(target_offload="gpu:0"):
clustering = DBSCAN(eps=3, min_samples=2).fit(X)
Documentation & resources
- Full docs: https://uxlfoundation.github.io/scikit-learn-intelex/
- Benchmarks & sample notebooks are linked from the repo.
- Community support via GitHub Discussions; contribution guide provided.
Bottom line
scikit-learn-intelex lets you keep the familiar scikit‑learn API while extracting the performance of Intel’s oneDAL, making it a practical accelerator for anyone building machine‑learning models on tabular data.
Related
- Project
- Project
- Project
- Dispatch
- Project