Code to reproduce the experiments of Optimal Formats for Weight Quantisation.
We recommend starting with Demo.ipynb
for an introduction to the main results of the paper.
Index:
weight_formats
- module containing core implementation for quantisation and Fisher estimationweight_formats.experiments
- module containing runners for various types of experiment (token_prediction
(main),fisher
,weight_stats
)scripts
- generic scripts for launching experiments and testingpaper
- scripts for reproducing experiments and notebooks for analysing resultsDemo.ipynb
- demo of main resultsUsage.ipynb
- tutorial for using the package directly
python3 -m venv .venv
echo 'export PYTHONPATH="${PYTHONPATH}:$(dirname ${VIRTUAL_ENV})"' >> .venv/bin/activate
source .venv/bin/activate
pip install -r requirements.txt
./scripts/check.sh
Copyright (c) 2025 Graphcore Ltd. Licensed under the MIT License.