Hugging Face

Optimum+ONNX Runtime - Easier, Faster training for your Hugging Face models

Jan 24, 2023
Optimum+ONNX Runtime - Easier, Faster training for your Hugging Face models
SummaryAI, from the source post

This post details the integration of ONNX Runtime for training within Hugging Face's Optimum library. It introduces the `ORTTrainer` and `ORTTrainingArguments` APIs as replacements for the standard `Trainer` and `TrainingArguments`, enabling users to leverage ONNX Runtime's training optimizations with minimal code changes. Performance benchmarks demonstrate significant training speedups (39%-130%) when using ONNX Runtime with DeepSpeed ZeRO Stage 1 compared to PyTorch baseline. The post also outlines ONNX Runtime's underlying memory and compute optimizations, such as fused Adam optimizer and mixed-precision training, and discusses future plans for optimizing larger models and edge training.

More from the IPU-Ready Transformers Optimization trail