Opennmt-py: Translation quality worsen with big batch size

Created on 5 Oct 2017  路  2Comments  路  Source: OpenNMT/OpenNMT-py

Hi,

When translating long texts, you want to increase batch size. If you do, the sentences will be padded with trailing dots to the length of the longest sentence in the batch. The bigger the batch size, the more trailing dots there are. This completely destroy the translation quality for many sentences :/

For example, with batch size 256, I get 9 BLEU. With batch size 32, I got 24 BLEU on the same dataset and with the same model.

bug

Most helpful comment

Yes, this is a known bug. We have been slow to fix. I will prioritize it.

In the mean time, please use batch_size 1 for translation.

All 2 comments

Yes, this is a known bug. We have been slow to fix. I will prioritize it.

In the mean time, please use batch_size 1 for translation.

Should be fixed now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KelleyYin picture KelleyYin  路  6Comments

kakkartushar1 picture kakkartushar1  路  5Comments

mataney picture mataney  路  4Comments

1130310223 picture 1130310223  路  4Comments

nikhilweee picture nikhilweee  路  3Comments