text: 
  
  TITLE
  Problem about using mBART50 for Russian to Chinese translation
  
  COMMENTS
  6
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  ## Environment info
  <!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
       Don't forget to fill out the missing fields in that output! -->
  
  - `transformers` version: 4.9.1
  - Platform: ubuntu 18.04 
  - Python version: 3.6.9. 
  - PyTorch version (GPU?): 1.8.0 
  - Tensorflow version (GPU?): 2.3.0 
  - Using GPU in script?: yes
  - Using distributed or parallel set-up in script?: no 
  
  ### Who can help
  
  mbart-large-50-many-to-many-mmt：@LysandreJik @patrickvonplaten  
  
  ## Information
  
  Model I am using: mbart-large-50-many-to-many-mmt
  
  The problem arises when using:  
    
  * my own modified scripts: (give details below)  
  
  We originally wanted to do a Russian-Chinese translation task, but our translation results showed a lot of English. We used a script to test.
  
  ## To reproduce
  
  Steps to reproduce the behavior:
  
  1.The code is as follow:  
  ```python
  from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
  
  text_list = ['Это позволит облегчить транспортировку грузов для Китая и Германии.',
               'Россия останется одним из лидеров, возможности для наращивания экспорта есть.',
               'Это позволит оптимизировать торговые отношения.']
  
  src_lang = 'ru_RU'
  tgt_lang = 'zh_CN'
  model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")
  tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")
  
  
  for text in text_list:
      tokenizer.src_lang = src_lang
      encoded_hi = tokenizer(text, return_tensors="pt")
      generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.lang_code_to_id[tgt_lang])
      translated = tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)
      print(translated)
  ```  
  when the src_lang was ‘ru_RU’ and the tgt_lang was ‘zh_CN’, the results were: 
  ```
  ['This will facilitate the transport of goods for China and Germany.']
  ['Russia will remain one of the leaders, there are opportunities to increase export.']
  ['This will allow to optimize trade relations.']
  ```
  
  
  <!-- If you have code snippets, error messages, stack traces please provide them here as well.
       Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
       Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->
  
  ## Expected behavior
  
  <!-- A clear and concise description of what you would expect to happen. -->
  We wanted to obtain a set of Chinese translations. Here are the Chinese translations for reference.
  ```
  ['这将使中国和德国更容易运输货物。']
  ['俄罗斯仍将是一个领导者，有机会增加出口。']
  ['这将有助于改善贸易关系。']
  ```
  
  