Overview#

On-Device Training refers to the process of training a model on an edge device, such as mobile phones, embedded devices, gaming consoles, web browsers, etc. This is in contrast to training a model on a server or a cloud. Training on the edge is useful when the data is sensitive and cannot be shared with a server or a cloud. It is also useful for the task of personalization where the model needs to be trained on the user’s device.

onnxruntime-training offers an easy way to efficiently train and infer a wide range of ONNX models on edge devices. The training process is divided into two phases:

  • The offline phase: In this phase, training artifacts are prepared on a server, cloud or a desktop. These artifacts can be generated by using the onnxruntime-training’s artifact generation python tools.

  • The training phase: Once these artifacts are generated, they can be deployed on an edge device. The onnxruntime-training’s training API can be used to train a model on the edge device.

Once training on the edge device is complete, an inference-ready onnx model can be generated on the edge device itself. This model can then be used with ONNX Runtime for inferencing.