# LongT5 fine-tunning

**URL:** <https://discuss.huggingface.co/t/longt5-fine-tunning/22650>\
**Category:** Beginners\
**Created:** [September 6, 2022, 9:46pm UTC](https://discuss.huggingface.co/t/longt5-fine-tunning/22650 "2022-09-06T21:46:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nbroad](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nbroad/32/26465_2.png) [@nbroad](https://discuss.huggingface.co/u/nbroad)\
**Post date:** [September 28, 2022, 9:02pm UTC](https://discuss.huggingface.co/t/longt5-fine-tunning/22650/3 "2022-09-28T21:02:21Z")

</div>

See here for why it failed: [Mixed precision for bfloat16-pretrained models](https://discuss.huggingface.co/t/mixed-precision-for-bfloat16-pretrained-models/5315)

tldr: t5 was trained with bf16 and you fine tuned in fp16. bf16 has a much larger range than fp16 so those large values (bf16) turned into nan (fp16)

---

_[View the full topic](https://discuss.huggingface.co/t/longt5-fine-tunning/22650)._
