facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
30.43k stars 6.4k forks source link

Conformer repeats the same translation #4423

Open sarapapi opened 2 years ago

sarapapi commented 2 years ago

What is your question?

I have trained the newly added Conformer model on MuST-C En-Es and I noticed that sometimes it starts to repeat the same words or part of sentence, here is an example: Primero, documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta primero. Primero, documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta primero. Primero documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta documenta And I discovered that this happens when the inference is done in batch: if I set --max-sentences to 1, everything works. Have you ever experienced this issue? Do you have any idea on how to solve it? Thanks

What's your environment?

fengpeng-yue commented 2 years ago

I also had the same problem @sravyapopuri388 , can you give some advice please?

85631486 commented 2 years ago

I also had the same problem, can you give some advice please?

85631486 commented 2 years ago

I have trained a Englist to Chinese Model. I also had the same problem.

input: the platform truck can be used for transporting transport airplanes , such as Y-8 transport airplane , II-76MD transport airplane , etc

output: 可用于运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运运

This is unusual and sometimes recurring.

85631486 commented 2 years ago

Most have no problems, and it's strange that they happen in individual cases.

Tensor2Tensor is no problems.

85631486 commented 2 years ago

When input like below the result is normal. input: (the platform truck can be used for transporting transport airplanes , such as Y-8 transport airplane , II-76MD transport airplane , etc) output:(台车可用于运输运输机,如y-8运输机、ii-76md运输机等)

Why???