<h2 dir="auto">Environment info</h2>

<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.11.0.dev0</li>
<li>Platform:  Linux-5.4.0-1055-azure-x86_64-with-glibc2.10</li>
<li>Python version: 3.8.1</li>
<li>PyTorch version (GPU?):</li>
<li>Tensorflow version (GPU?): 2.5.0 (Yes)</li>
<li>Using GPU in script?: Yes</li>
<li>Using distributed or parallel set-up in script?: Distributed</li>
</ul>
<h3 dir="auto">Who can help:</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patil-suraj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patil-suraj">@patil-suraj</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RocketKnight/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RocketKnight">@RocketKnight</a></p>
<p dir="auto">Models: facebook/bart<br>
datasets: xsum</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)<br>
run_summarization.py<br>
relative path: examples/tensorflow/summarization</li>
</ul>
<p dir="auto">Steps to reproduce the behavior: (Note that --max_train_samples is optional)<br>
python run_summarization.py  --model_name_or_path facebook/bart-base --dataset_name xsum --dataset_config "3.0.0" --output_dir /tmp/tst-summarization  --per_device_train_batch_size 4 --per_device_eval_batch_size 4 --num_train_epochs 3 --do_train --do_eval --max_train_samples 100</p>
<p dir="auto">Error message</p>
<ul dir="auto">
<li>INFO - <strong>main</strong> - Evaluation...<br>
0%|                                                                                                                                                    | 0/2833 [00:01&lt;?, ?it/s]<br>
Traceback (most recent call last):<br>
File "run_summarization.py", line 663, in <br>
main()<br>
File "run_summarization.py", line 639, in main<br>
generated_tokens = model.generate(**batch)<br>
File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/pbodigut1/code/Users/pbodigut/transformers/v-4.10/transformers/src/transformers/generation_tf_utils.py", line 736, in generate<br>
output = self._generate_beam_search(<br>
File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/pbodigut1/code/Users/pbodigut/transformers/v-4.10/transformers/src/transformers/generation_tf_utils.py", line 1102, in _generate_beam_search<br>
model_inputs = self.prepare_inputs_for_generation(<br>
TypeError: prepare_inputs_for_generation() got multiple values for argument 'decoder_input_ids'</li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Successfully run the evaluation step.</p>
<p dir="auto">I have finetuned a <code class="notranslate">facebook/bart-large</code> model following the example here: <a href="https://github.com/huggingface/transformers/blob/master/examples/summarization/finetune.py">https://github.com/huggingface/transformers/blob/master/examples/summarization/finetune.py</a></p>
<p dir="auto">As an output I got a <code class="notranslate">checkpointcheckpoint_ckpt_epoch_0.ckpt</code> file. How can I create a BartForConditionalGeneration instance with updated weights?</p>