# Mixed Precision training (fp16), how to use in production?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmixed-precision-training-fp16-how-to-use-in-production%2F20096%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 7, 2022, 10:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmixed-precision-training-fp16-how-to-use-in-production%2F20096 "2022-07-07T10:39:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harrystamenl](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@harrystamenl](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fharrystamenl)%5C
**Post date:** [July 7, 2022, 10:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmixed-precision-training-fp16-how-to-use-in-production%2F20096%2F1 "2022-07-07T10:39:03Z")

</div>

I’ve fine-tuned a roberta model and a deberta model both in fp16. The deberta was pre-trained in fp16.

But I want to use the model for production.

Is it possible to convert the fp16 model to onnx precision 16 and use in production?

---

<div class="post-metadata">

**Author:** ![harrystamenl](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@harrystamenl](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fharrystamenl)%5C
**Post date:** [July 7, 2022, 10:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmixed-precision-training-fp16-how-to-use-in-production%2F20096%2F2 "2022-07-07T10:40:00Z")

</div>

When I try i have to use floating point 32 even though it makes no difference. Should I be looking into bf16?
