Fine-Tuning Pre-Trained BERT Transformers to ONNX for Predictions in C#

Fine-Tuning Pre-Trained BERT Transformers to ONNX for Predictions in C#

23 Dec 2025

Apart from Microsoft's official ML.NET APIs, we can use different A.I. models leveraging the ONNX runtime. Now, I guide you through re-training such a model on our custom dataset to then use it as ONNX model in C#.

Find out how: Fine-Tuning Pre-Trained BERT Transformers to ONNX for Predictions in C#

Access the code:

Or:


Join the community

I continuously build, learn and experiment with innovative technology. Allow me to share what I learn, with you.

Newsletter

Allow me to share what I learn, with you.

Unlock

Unlock access to source code behind each article, here.

Share

Support

An error has occurred. 🗙