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).
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 ..
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:
- PyTorch - a mix of licenses, including the Apache 2.0 License and the 3-Clause BSD License;
- TensorBoard - Apache 2.0 License;
- NetworkX - 3-Clause BSD License;
- GraphViz - MIT License;
- matplotlib - a custom license;
- NumPy - 3-Clause BSD License;
- SciPy - 3-Clause BSD License;
- Mako - MIT License;
- Jupyter - 3-Clause BSD License.
- Matteo Spallanzani <spmatteo@iis.ee.ethz.ch> (ETH Zurich, now at Axelera AI)
- Georg Rutishauser <georgr@iis.ee.ethz.ch> (ETH Zurich)
- Moritz Scherer <scheremo@iis.ee.ethz.ch> (ETH Zurich)
- Philip Wiese <wiesep@ethz.ch> (ETH Zurich)
- Francesco Conti <f.conti@unibo.it> (University of Bologna)