Model stops translating on encountering “-” character

#3
by Guzik - opened

I’m trying to translate simple text from Polish to English:

“Życie nigdy się nie kończy – przygotuj się zatem na ciąg dalszy. Zasilany twoją energią zegarek z widocznym mechanizmem Mads Dante dopasuje się do ciebie, tempo do tempa. Zrób dziś to, czego inni nie zrobią. Dzięki temu jutro będziesz mógł zrobić to, czego inni nie mogą.”

The model behaves strangely, when it encounters the - it stops translating only returning the translation of what precedes the - char.
When I move this char the translation always ends before it.

After further investigation, the model returns the generated ids: tensor([[63429, 7157, 522, 10126, 15, 0]])

when decoded: ' Life never ends '.

Surprisingly, when I use num_beams set to 2 instead of 1 I get a good result. The problem is that because of time constraints I can't use num_beams=2

Does anyone know what is happening?

Sign up or log in to comment