text: Title: kernel keeps dying on Jupiter notebook and inference is slow / no such problem if ran on gradio
  Body: I am trying out and validating translations from Bulgarian to English. The problem is that on Jupyter, the kernel keeps dying and is rather slow when translating. However, if ran on gradio, things happen very quickly.
  
  This is the code I am using, where `article` is some article from a dataframe.
  
  ```
  start_time = time.time()
  
  model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M")
  tokenizer = NllbTokenizerFast.from_pretrained("facebook/nllb-200-distilled-600M")
  
  translator = pipeline('translation', 
                        model=model, 
                        tokenizer=tokenizer, 
                        src_lang='bul_Cyrl', 
                        tgt_lang='eng_Latn')
  
  article = df.truncated[3]
  output = translator(article, max_length=512)
  
  end_time = time.time()
  
  output = output[0]['translation_text']
  result = {'inference_time': end_time - start_time,
            'result': output}
  
  result
  ```
  
  I am on an M1 Mac. Translations on Jupyter range from 15 to 35 seconds, whereas on gradio from 4-10 seconds max. What could be the case as I am even using NllbTokenizerFast? Is there a way to improve this?