GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - uxlfoundation/scikit-learn-intelex: Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application

BranchesTags
Open more actions menu

Latest commit

 

History

2,932 Commits
2,932 Commits

Folders and files

NameName
Last commit message
Last commit date
.ci
.ci
 
 
.circleci
.circleci
 
 
.github
.github
 
 
conda-recipe
conda-recipe
 
 
daal4py
daal4py
 
 
doc
doc
 
 
examples
examples
 
 
generator
generator
 
 
onedal
onedal
 
 
scripts
scripts
 
 
sklearnex
sklearnex
 
 
src
src
 
 
tests
tests
 
 
.clang-format
.clang-format
 
 
.coveragerc
.coveragerc
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
dependencies-dev
dependencies-dev
 
 
deselected_tests.yaml
deselected_tests.yaml
 
 
pyproject.toml
pyproject.toml
 
 
requirements-doc.txt
requirements-doc.txt
 
 
requirements-test-free-threaded.txt
requirements-test-free-threaded.txt
 
 
requirements-test.txt
requirements-test.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

Extension for scikit-learn*

Speed up your scikit-learn 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 up to 100X acceleration to existing workflows from scikit-learn (e.g. logistic regression models, random forests, support vector machines, among others), the most widely-used Python library for machine learning on tabular data.

This software acceleration is achieved through SIMD instructions, multi-threading, hardware-specific cache optimizations, and algorithmic optimizations.

Features:

  • Average speed up of 8.5x on both training and inference over scikit-learn, with equivalent mathematical accuracy.
  • Support for different hardware configurations, including GPUs and multi-GPU setups.
  • Easy to integrate into existing scikit-learn workflows without code modifications through monkeypatching, or as an API-compatible module sklearnex.
  • Can produce much faster predictions from decision-tree models generated by other libraries such as XGBoost or LightGBM.

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)

👀 Read about other ways to patch scikit-learn.

👀 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

  • Technical documentation
  • Release Notes
  • Medium Blog Posts

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:

  • oneAPI Data Analytics Library

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.

About

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

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

Topics

ai-inferenceai-machine-learningai-traininganalyticsbig-datadata-analysisgpuhacktoberfestmachine-learningmachine-learning-algorithmsoneapipythonscikit-learnswrepo

Resources

Readme
Apache-2.0 license

Security policy

Security policy
Activity
Custom properties

Stars

1.4k stars

Watchers

24 watching

Forks

199 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.