Back to rankings

uxlfoundation/scikit-learn-intelex

Pythonuxlfoundation.github.io/scikit-learn-intelex/

Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application

oneapiscikit-learnmachine-learning-algorithmsdata-analysismachine-learningpythonswrepoai-machine-learningbig-dataanalyticsai-trainingai-inference
Star Growth
Stars
1.4k
Forks
187
Weekly Growth
Issues
41
5001k
Aug 2018Mar 2021Nov 2023Jul 2026
ArtifactsPyPIpip install scikit-learn-intelex
README

Extension for scikit-learn*

Speed up your [scikit-learn](https://scikit-learn.org) applications for CPUs and GPUs across single- and multi-node configurations

Releases   |   Documentation   |   Examples   |   Support   |  License   

Build Status Coverity Scan Build Status OpenSSF Scorecard Join the community on GitHub Discussions PyPI Version Conda Version python version scikit-learn supported versions


Overview

Extension for scikit-learn is a free software AI accelerator designed to deliver over 10-100X acceleration to existing workflows from scikit-learn, which is the most widely-used Python library for machine learning on tabular data. This software acceleration is achieved with vector instructions, AI hardware-specific memory optimizations, threading, and optimizations.

With Extension for scikit-learn, you can:

  • Speed up training and inference by up to 100x with equivalent mathematical accuracy
  • Benefit from performance improvements across different hardware configurations, including GPUs and multi-GPU configurations
  • Integrate the extension into your existing scikit-learn applications without code modifications
  • Continue to use the open-source scikit-learn API
  • Enable and disable the extension with a couple of lines of code or at the command line

Acceleration

Benchmarks code

Optimizations

Easiest way to benefit from accelerations from the extension is by patching scikit-learn with it:

  • Enable CPU optimizations

    import numpy as np
    from sklearnex import patch_sklearn
    patch_sklearn()
    
    from sklearn.cluster import DBSCAN
    
    X = np.array([[1., 2.], [2., 2.], [2., 3.],
                  [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
    clustering = DBSCAN(eps=3, min_samples=2).fit(X)
    
  • Enable GPU optimizations

    Note: executing on GPU has additional system software requirements - see details.

    import numpy as np
    from sklearnex import patch_sklearn, config_context
    patch_sklearn()
    
    from sklearn.cluster import DBSCAN
    
    X = np.array([[1., 2.], [2., 2.], [2., 3.],
                  [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
    with config_context(target_offload="gpu:0"):
        clustering = DBSCAN(eps=3, min_samples=2).fit(X)
    

:eyes: Read about other ways to patch scikit-learn.

:eyes: Check out available notebooks for more examples.

Usage without patching

Alternatively, all functionalities are also available under a separate module which can be imported directly, without involving any patching.

  • To run on CPU:

    import numpy as np
    from sklearnex.cluster import DBSCAN
    
    X = np.array([[1., 2.], [2., 2.], [2., 3.],
                  [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
    clustering = DBSCAN(eps=3, min_samples=2).fit(X)
    
  • To run on GPU:

    import numpy as np
    from sklearnex import config_context
    from sklearnex.cluster import DBSCAN
    
    X = np.array([[1., 2.], [2., 2.], [2., 3.],
                  [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
    with config_context(target_offload="gpu:0"):
        clustering = DBSCAN(eps=3, min_samples=2).fit(X)
    

Installation

To install Extension for scikit-learn, run:

pip install scikit-learn-intelex

Package is also offered through other channels such as conda-forge. See all installation instructions in the Installation Guide.

Documentation

Extension and oneDAL

Acceleration in patched scikit-learn classes is achieved by replacing calls to scikit-learn with calls to oneDAL (oneAPI Data Analytics Library) behind the scenes:

Samples & Examples

How to Contribute

We welcome community contributions, check our Contributing Guidelines to learn more.


* The Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

Related repositories
uxlfoundation/oneTBB

oneAPI Threading Building Blocks (oneTBB)

C++Apache License 2.0tbbmallocthreading
uxlfoundation.github.io/oneTBB/
6.7k1.2k
uxlfoundation/oneDNN

oneAPI Deep Neural Network Library (oneDNN)

C++Apache License 2.0onednnoneapi
uxlfoundation.github.io/oneDNN/
4k1.2k
oneapi-src/oneDNN

oneAPI Deep Neural Network Library (oneDNN)

C++Apache License 2.0onednnoneapi
uxlfoundation.org
3.7k1k
intel/llvm

Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.

LLVMOtherintelllvm
1.5k845
millylee/anyrouter-check-in

支持 AnyRouter、AgentRouter 的多平台多账号签到,理论兼容所有基于 NewAPI、OneAPI 的平台。

PythonPyPIBSD 2-Clause "Simplified" Licensecheck-inclaude-code
anyrouter.top/register
1.2k2.7k
oneapi-src/oneAPI-samples

Samples for Intel® oneAPI Toolkits

C++MIT Licenseoneapiai
oneapi-src.github.io/oneAPI-samples/
1.2k743
aiprodcoder/MIXAPI

大模型API网关-全新AI大模型接口管理与API聚合分发系统 , 支持将多种大模型转换成统一的OpenAI兼容接口,Claude接口,Gemini接口,可供个人或者企业内部大模型API 统一管理和渠道分发使用(key管理与二次分发),支持国际国内所有主流大模型,gemini,claude,qwen3,kimi-k2,豆包等,提供单可执行文件, docker镜像,一键部署,开箱即用,完全开源,自主可控!本项目基于New-API和One-API,整合了NewAPI,OneAPI所有功能及众多第三方插件为一身,功能超强!

GoGo ModulesApache License 2.0newapioneapi
1k301