OpenNMT / OpenNMT/CTranslate2

Quantization leads to performance degradation

Open
#1,273 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
4.7k
Forks
536
Avg merge
12h 12m
Merged PRs (30d)
4

Description

When converting the model, I enable the quantization to 'int8', but I noticed a decrease in performance of the converted model by 5 points in terms of BLEU.
Therefore, I would like to inquire if there are any specific considerations I should be aware of when performing quantization.

command: ct2-fairseq-converter --model_path . --quantization int8 -output_dir .

Environment:
ctranslate2=3.14.0
fairseq=0.10.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied ct2-fairseq-converter command with CTranslate2 3.14.0 and fairseq 0.10.2, comparing the quantized model's BLEU with the non-quantized model. Determine whether the reported 5-point degradation is expected for int8 quantization and document the relevant considerations or behavior that needs correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.