title: How to use BERT trained model from Jupyter Notebook to another Ubuntu 20.04 server
body: <p>We have finetuned our BERT model for text2text generation. It is working fine on the Jupyter notebook. But when I use the same trained model on another server of Ubuntu, then it shows the issue. This is my first post, so please bear with me. The issue I'm facing is that when I generate output on small sentences, it works fine. But on long sentences, it shows the following error:</p>
  <blockquote>
  <p>At most 4 tokens in tensor([    2,     2,     2,     2, 44763, 44763,     2, 44763]) can be equal to <code>eos_token_id: 2</code>. Make sure tensor([    2,     2,     2,     2, 44763, 44763,     2, 44763]) are corrected.</p>
  </blockquote>
  <p>My output generation code is:</p>
  <pre><code>from simpletransformers.seq2seq import Seq2SeqModel
  #logging.basicConfig(level=logging.INFO)
  #transformers_logger = logging.getLogger(&quot;transformers&quot;)
  #transformers_logger.setLevel(logging.ERROR)
  model = Seq2SeqModel(
      encoder_decoder_type=&quot;bart&quot;, encoder_decoder_name=&quot;PATHOFMODEL&quot;,use_cuda=False,
  )
  while True:
      original = input(&quot;Enter text to paraphrase: &quot;)
      to_predict = [original]
  
      preds = model.predict(to_predict)
  
      print(&quot;---------------------------------------------------------&quot;)
      print(original)
  
      print()
      print(&quot;Predictions &gt;&gt;&gt;&quot;)
      for pred in preds[0]:
          print(pred)
  
      print(&quot;---------------------------------------------------------&quot;)
      print()
  </code></pre>