Skip to content

A library to train and deploy quantised Deep Neural Networks

License

Notifications You must be signed in to change notification settings

pulp-platform/quantlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuantLib

QuantLib is a library to train deploy quantised neural networks (QNNs). It was developed on top of the PyTorch deep learning framework.

QuantLib is a component of QuantLab, which also includes organising software to manage machine learning (ML) experiments (systems and manager packages, as well as the main.py façade script).

Installation and usage

Create an Anaconda environment and install quantlib

Use Anaconda or Miniconda to install QuantLab's prerequisites.

PyTorch 1.13.1 (Recommended)

$> conda create --name pytorch-1.13
$> conda activate pytorch-1.13
$> conda config --env --add channels conda-forge
$> conda config --env --add channels pytorch 
$> conda install python=3.8 pytorch=1.13.1 pytorch-gpu torchvision=0.14.1 torchtext=0.14.1 torchaudio-0.13.1 cudatoolkit=11.6 -c pytorch -c conda-forge
$> conda install ipython packaging parse setuptools tensorboard tqdm networkx python-graphviz scipy pandas ipdb onnx onnxruntime einops yapf tabulate
$> pip install setuptools==59.5.0 torchsummary parse coloredlogs netron

PyTorch 1.12.1

$> conda create --name pytorch-1.12
$> conda activate pytorch-1.12
$> conda config --env --add channels conda-forge
$> conda config --env --add channels pytorch 
$> conda install python=3.8 pytorch=1.12.1 torchvision=0.13.1 torchtext=0.13.1 torchaudio=0.12.1 -c pytorch -c conda-forge
$> conda install ipython packaging parse setuptools tensorboard tqdm networkx python-graphviz scipy pandas ipdb onnx onnxruntime einops yapf tabulate
$> pip install setuptools==59.5.0 torchsummary parse coloredlogs netron

After creating the conda environment, install the quantlib quantisation library in your Anaconda environment:

$ conda activate quantlab
(quantlab) $ cd quantlib
(quantlab) $ python setup.py install
(quantlab) $ cd ..

Notice

Licensing information

quantlib is distributed under the Apache 2.0 license.

In case you are planning to use QuantLab and quantlib in your projects, you might also want to consider the licenses under which the packages on which they depend are distributed:

Authors