This project implements dynamic and, to some extend, static quantization (with and without QAT) of the diart framework.
Note that the latency speed-ups which occur due to our quantization are rather negligible.
The files you will be most interested in are quantize_models.py and diart_benchmark.py.
The former file is responsible for running the quantization and performing single-inference latency benchmarks on the dynamically quantized models.
The latter file implements a script to run benchmarks on all implmented models.
This script can be widely configured by the usage of CLI arguments.
Accept the terms and conditions of the following models
Create a huggingface access token: https://hf.co/settings/tokens. Then use huggingface-cli to log into huggingface.
On some devices you might have to run:
sudo apt-get install libportaudio2
pip install sounddevice
Run one of the two commands
conda env create --file="environment.yml"
pip install -r requirements.txt
Download the AMI dataset
git submodule update --init --recursive
cd AMI-diarization-setup/pyannote
sh download_ami.sh
Use the following script to copy the AMI files into a custom directory such that they can be used within diart (diart does not support the default file structure from pyannote)
sh create_diart_ami_dataset.sh
6 commits
Python
97.6%
Shell
2.4%
This project implements dynamic and, to some extend, static quantization (with and without QAT) of the diart framework.
Note that the latency speed-ups which occur due to our quantization are rather negligible.
The files you will be most interested in are quantize_models.py and diart_benchmark.py.
The former file is responsible for running the quantization and performing single-inference latency benchmarks on the dynamically quantized models.
The latter file implements a script to run benchmarks on all implmented models.
This script can be widely configured by the usage of CLI arguments.
Accept the terms and conditions of the following models
Create a huggingface access token: https://hf.co/settings/tokens. Then use huggingface-cli to log into huggingface.
On some devices you might have to run:
sudo apt-get install libportaudio2
pip install sounddevice
Run one of the two commands
conda env create --file="environment.yml"
pip install -r requirements.txt
Download the AMI dataset
git submodule update --init --recursive
cd AMI-diarization-setup/pyannote
sh download_ami.sh
Use the following script to copy the AMI files into a custom directory such that they can be used within diart (diart does not support the default file structure from pyannote)
sh create_diart_ami_dataset.sh
6 commits
Python
97.6%
Shell
2.4%