<p dir="auto">Hi!</p>
<p dir="auto">I translated all the English documents into Chinese.</p>
<p dir="auto">Let's bring the documentation to all the -speaking community <g-emoji class="g-emoji" alias="globe_with_meridians" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f310.png">🌐</g-emoji> (currently 0 out of 267 complete)</p>
<p dir="auto">Who would want to translate? Please follow the <g-emoji class="g-emoji" alias="hugs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f917.png">🤗</g-emoji> <a href="https://github.com/huggingface/transformers/blob/main/docs/TRANSLATING.md">TRANSLATING guide</a>. Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.</p>
<p dir="auto">Some notes:</p>
<ul dir="auto">
<li>Please translate using an informal tone (imagine you are talking with a friend about transformers <g-emoji class="g-emoji" alias="hugs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f917.png">🤗</g-emoji>).</li>
<li>Please translate in a gender-neutral way.</li>
<li>Add your translations to the folder called <code class="notranslate">&lt;languageCode&gt;</code> inside the <a href="https://github.com/huggingface/transformers/tree/main/docs/source">source folder</a>.</li>
<li>Register your translation in <code class="notranslate">&lt;languageCode&gt;/_toctree.yml</code>; please follow the order of the <a href="https://github.com/huggingface/transformers/blob/main/docs/source/en/_toctree.yml">English version</a>.</li>
<li>Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ArthurZucker/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ArthurZucker">@ArthurZucker</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a> for review.</li>
<li><g-emoji class="g-emoji" alias="raising_hand" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f64b.png">🙋</g-emoji> If you'd like others to help you with the translation, you can also post in the <g-emoji class="g-emoji" alias="hugs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f917.png">🤗</g-emoji> <a href="https://discuss.huggingface.co/" rel="nofollow">forums</a>.</li>
</ul>
<h2 dir="auto">Environment info</h2>

<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.4.2</li>
<li>Platform: linux</li>
<li>Python version: 3.7</li>
<li>PyTorch version (GPU?): 1.8</li>
<li>Tensorflow version (GPU?): -</li>
<li>Using GPU in script?: -</li>
<li>Using distributed or parallel set-up in script?: -</li>
</ul>
<h3 dir="auto">Who can help</h3>

<p dir="auto">t5: <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></p>
<h2 dir="auto">Information</h2>
<p dir="auto">I am using mt5-small model:</p>
<ul dir="auto">
<li>the problem arises when using fp16 with mt5</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul dir="auto">
<li>translation</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto"><code class="notranslate">python run_translation.py     --model_name_or_path google/mt5-small     --do_train     --do_eval     --source_lang en     --target_lang ro     --dataset_name wmt16     --dataset_config_name ro-en     --output_dir  test/tst-translation     --per_device_train_batch_size=4     --per_device_eval_batch_size=4     --overwrite_output_dir     --predict_with_generate --max_train_samples 100 --fp16</code></p>
<p dir="auto">outputs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="***** eval metrics *****
  epoch                     =     3.0
  eval_bleu                 =  0.0039
  eval_gen_len              =    2.95
  eval_loss                 =     nan
  eval_mem_cpu_alloc_delta  =     4MB
  eval_mem_cpu_peaked_delta =     5MB
  eval_mem_gpu_alloc_delta  =     0MB
  eval_mem_gpu_peaked_delta =  1080MB
  eval_runtime              = 72.1865
  eval_samples              =    1999
  eval_samples_per_second   =  27.692"><pre class="notranslate"><code class="notranslate">***** eval metrics *****
  epoch                     =     3.0
  eval_bleu                 =  0.0039
  eval_gen_len              =    2.95
  eval_loss                 =     nan
  eval_mem_cpu_alloc_delta  =     4MB
  eval_mem_cpu_peaked_delta =     5MB
  eval_mem_gpu_alloc_delta  =     0MB
  eval_mem_gpu_peaked_delta =  1080MB
  eval_runtime              = 72.1865
  eval_samples              =    1999
  eval_samples_per_second   =  27.692
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">being able to use fp16 with mt5 models. Thank you very much for your help, this is really crucial for me to be able to run these models with fp16 to be able to fit more data into old GPUs I have access to and I appreciate a lot your help.</p>