How to improve low BLEU score
See original GitHub issueI was trying to perform a Language Translation task . I was working using the German- English model , however i had replaced the architecture to fconv
(pure conv.) I replaced the train.de
, test.de
, train.de
and their corresponding train.en
, and … files with my new version of 2 separate languages .
For Pre-process:
python preprocess.py --source-lang de --target-lang en --trainpref $TEXT/train --validpref $TEXT/valid --testpref $TEXT/test --destdir/home/others/17EC30042/fairseq/examples/translation/iwslt14.tokenized.de-en/tr
where ~/tr will store the binarized files.
For train:
python train.py /home/others/17EC30042/fairseq/examples/translation/iwslt14.tokenized.de-en/tr --lr 0.25 --clip-norm 0.1 --dropout 0.1 --max-tokens 4000 --arch fconv --save-dir checkpoints/fconv
For Scoring:
python score.py --r /home/others/17EC30042/fairseq/examples/translation/iwslt14.tokenized.de-en/test.de --s /home/others/17EC30042/fairseq/examples/translation/iwslt14.tokenized.de-en/test.en
AND OUTPUT: Namespace(ignore_case=False, order=4, ref=‘/home/others/17EC30042/fairseq/examples/translation/iwslt14.tokenized.de-en/test.de’, sys=‘/home/others/17EC30042/fairseq/examples/translation/iwslt14.tokenized.de-en/test.en’) BLEU4 = 12.80, 59.3/17.6/7.1/3.6 (BP=1.000, ratio=1.017, syslen=82627, reflen=81268)
MAX Sentence Length is also around 15 words
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Closing this task, I hope the advice above was helpful. Please re-open if you have specific issues with the codebase. Thanks!
Hi- it’s a tiny hard to read (you could try --log-output X to print every X updates, or use the json output format, or just turn off the progress bar --no-progress-bar), but it looks like the model is not converging (the PPL at least does not seem to decrease well).
Your model seems to only have 6083 training examples? Is that correct? This is a small number of data points compared to the architecture you are using- you should tune the parameters, for example the learning rate.