Quick Start

Get ready to elevate your scikit-learn code with Extension for Scikit-learn* and experience the benefits of accelerated performance in just a few simple steps.

Compatibility with Scikit-learn*

Extension for Scikit-learn* is compatible with the latest stable releases of scikit-learn - see Software Requirements for more details.

Integrate Extension for Scikit-learn*

The easiest way to call optimized routines from the Extension for Scikit-learn* is by patching the sklearn module from scikit-learn, which can be achieved with just a call to sklearnex.patch_sklearn:

from sklearnex import patch_sklearn
from sklearnex import is_patched_instance
from sklearn.linear_model import LinearRegression

is_patched_instance(LinearRegression()) == False

patch_sklearn()
from sklearn.linear_model import LinearRegression # now calls sklearnex
is_patched_instance(LinearRegression()) == True

See Patching Utilities for more details about patching mechanisms.

Alternatively, functions and classes from the Extension for Scikit-learn* can be imported directly from the sklearnex module without patching:

from sklearnex.linear_model import LinearRegression

Installation

Tip

To prevent version conflicts, we recommend creating and activating a new environment for Extension for Scikit-learn*.

Install from PyPI

Recommended by default.

To install Extension for Scikit-learn*, run:

pip install scikit-learn-intelex

Tip

Wheels are also available through Intel’s index: https://software.repos.intel.com/python/pypi

Supported Configurations

Operating systems

Windows*, Linux*

Python versions

3.10, 3.11, 3.12, 3.13, 3.14

Devices

CPU, GPU

Modes

Single, SPMD (Linux* only)

Tip

Running on GPU involves additional dependencies, see GPU support. SPMD mode has additional requirements on top of GPU ones, see SPMD (multi-GPU distributed mode) for details.

Note

Wheels are only available for x86-64 architecture.

Install through Conda

To prevent version conflicts, we recommend installing scikit-learn-intelex into a new conda environment.

Note

The main Anaconda channel also provides distributions of scikit-learn-intelex, but it does not provide the latest versions, nor does it provide GPU-enabled builds. It is highly recommended to install scikit-learn-intelex from either Intel’s channel or from conda-forge instead.

Recommended for the Intel® Distribution for Python users.

To install in a fresh environment:

conda create -n sklex -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels scikit-learn-intelex
conda activate sklex

To install in an existing environment:

conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels scikit-learn-intelex

Warning

Packages from the Intel channel are meant to be used together with dependencies from the conda-forge channel, and might not work correctly when used in an environment where packages from the anaconda default channel have been installed. It is advisable to use the miniforge installer for conda/mamba, as it comes with conda-forge as the only default channel.

Supported Configurations

Operating systems

Windows*, Linux*

Python versions

3.10, 3.11, 3.12, 3.13, 3.14

Devices

CPU, GPU

Modes

Single, SPMD (Linux* only)

Tip

Running on GPU involves additional dependencies, see GPU support. SPMD mode has additional requirements on top of GPU ones, see SPMD (multi-GPU distributed mode) for details.

Note

Packages are only available for x86-64 architecture.

Build from Sources

See Building from Source for details.

Install Intel*(R) AI Tools

Download the Intel AI Tools here. The extension is already included.

Release Notes

See the Release Notes for each version of Extension for Scikit-learn*.

System Requirements

Hardware Requirements

Any processor with x86-64 architecture with at least one of the following instruction sets:

  • SSE2

  • SSE4.2

  • AVX2

  • AVX512

Note

Note: pre-built packages are not provided for other CPU architectures. See Build from Sources for ARM.

Tip

Read more about hardware comparison in our blogs.

Software Requirements

  • Linux* OS: Ubuntu* 18.04 or newer

  • Windows* OS 10 or newer

  • Windows* Server 2019 or newer

Extension for Scikit-learn* is compatible with the latest stable releases of scikit-learn:

  • 1.0.X

  • 1.5.X

  • 1.6.X

  • 1.7.X

  • 1.8.X

Memory Requirements

By default, algorithms in Extension for Scikit-learn* run in the multi-thread mode. This mode uses all available threads. Optimized scikit-learn estimators can consume more RAM than their corresponding unoptimized versions.

Algorithm

Single-thread mode

Multi-thread mode

SVM

Both scikit-learn and Extension for Scikit-learn* consume approximately the same amount of RAM.

In Extension for Scikit-learn*, an algorithm with N threads consumes N times more RAM.

In all Extension for Scikit-learn* algorithms with GPU support, computations run on device memory. The device memory must be large enough to store a copy of the entire dataset. You may also require additional device memory for internal arrays that are used in computation.

See also

Samples