INT8 quantization for HiFi-GAN vocoder -- performance issue
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Hello!
My goal is to run trt engine for Hi-Fi GAN on H100 as efficiently as possible with small or none drop in quality. I have decided that the simplest path to achieve this would be as follows:
- To quantize the model to int8 via TensorRT-Model-Optimizer (
modelopt) library. - To finetune the quantized model (as per instructions).
- To convert the quantized model into trt using the
--stronglyTypedoption oftrtexec, so that no unpredictable additional quantization is done bytrtexec.
If I skip the first two steps and quantize the model using --int8 flag of trtexec, the model runs 2 times faster. In contrast, after quantization with modelopt library, there is no speedup at all for the resulting trt engine. Please see the detailed times in the corresponding issue at the modelopt repo.
Could you please give me some recommendations regarding quantization of the model?
- Is there any other way for finetuning the int8 version of the model before deploying it as a trt-engine?
- What would be the proper QDQ placement for the model for achieving speedup after quantization?
- If I convert the model to trtexec right away, the difference between
--fp16and--int8flags is small. Shouldn't in theory--fp16give the 2x speedup, while--int8-- 4x?
Here is the link to the unquantized onnx model: https://drive.google.com/file/d/1qVotIH-0K73rXUlZ6yoPgIvOjlEOnvGY/view?usp=sharing
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked TensorRT-Model-Optimizer issue and the timing details referenced there. Reproduce the HiFi-GAN ONNX engine builds on H100 using the stated modelopt, --stronglyTyped, --int8, and --fp16 paths, then compare performance and quality. Done means documenting a supported quantization path and explaining the QDQ placement or missing speedup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100