Neural Magic LogoNeural Magic Logo
Products
menu-icon
Products
DeepSparse EngineSparseMLSparseZoo
Get Started
Installation
SparseML

SparseML Installation

SparseML enables you to create sparse models trained on your data. It supports transfer learning from sparse models to new data and sparsifying dense models from scratch with state-of-the-art algorithms for pruning and quantization.

Currently, SparseML is tested on Python 3.7-3.9 and is limited to Linux and MacOS systems.

General Install

Use the following command to install with pip:

pip install sparseml

PyTorch Install

SparseML supports integrations with PyTorch versions >=1.1.0 and <=1.9.0. Later PyTorch versions are untested and have a known issue for exporting quantized models to ONNX graphs. To install, use the following extra option:

pip install sparseml[torch]

To install torchvision, use the following extra options:

pip install sparseml[torch,torchvision]

Keras Install

SparseML supports integrations with Keras versions ~=2.2.0. Later Keras versions are untested and have known issues with exporting to ONNX. To install, use the following extra option:

pip install sparseml[tf_keras]

TensorFlow Install

SparseML supports integrations with TensorFlow versions >=1.8.0 and <=1.15.3. Note, TensorFlow V1 is no longer being built for newer operating systems such as Ubuntu 20.04. Therefore, SparseML with TensorFlow V1 is also unsupported on these operating systems. To install, use the following extra option:

pip install sparseml[tf_v1]

To install a GPU-compatible version, use the following extra option:

pip install sparseml[tf_v1_gpu]

Depending on your device and CUDA version, you may need to install additional dependencies for using TensorFlow V1 with GPU operations. You can find these steps here.

DeepSparse Enterprise Installation
SparseZoo Installation