Translate LLM translates to random language

I’ve been preparing changing the translation model from NMT to TLLM.

However, today in my tests I saw that TLLM mostly ignored the requested language, and translates to Spanish, Chinese, English etc instead.

This didn’t happen before, about 2 weeks ago.

This was fixed a while ago, now started again. Very disappointed.

I figured out what the problem was.

I was passing target language code in upper case, while the API expects lower case (failing to tell the user so).

For example:

With input text “This text is in English”, and target language code “EN” (upper case), TLLM returned Spanish today. A few weeks ago it returned something else.

With the same input text and target language code “en” (lower case), TLLM gives the error “Detected language code is the same as the target language”.

NMT returns the English input text with “EN” and “en”.