mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-15 18:23:41 +00:00
### Description This PR re-arranges documentation of ORT web. Current doc: https://onnxruntime.ai/docs/ Change preview: https://fs-eire.github.io/onnxruntime/docs/ - split `Doc -> Get Started -> JavaScript` from single page into multiple pages, to make it easier to split from web, node and react-native - remove `Doc -> Get Started -> with Web`. The page was a few links and now they are moved to other places - add a few contents into `Doc -> Get Started -> JavaScript -> Web`. Now this is the main page for ORT web doc. - rename `Tutorials -> deploy on Web` to `Tutorials -> Web`. "deploy" is confusing as it's not the accurate term to describe the content. ================================================================= ### Discussions: TBD ================================================================= ### ORT web documentation work item list: - [ ] Update `Get Started` page for ORT web at onnxruntime.ai **( this PR )** - to make it easier for users to navigate - [ ] Update `Tutorials` page for ORT web at onnxruntime.ai - The purpose of this page is unclear. It contains descriptive information and step-by-step instructions on an E2E examples. It can be a good Blog, but not good for documentation, which usually has a well-structured content. - The [index page](https://fs-eire.github.io/onnxruntime/docs/tutorials/web/) has duplicated contents with its child page ["Build a web application with ONNX Runtime"](https://fs-eire.github.io/onnxruntime/docs/tutorials/web/build-web-app.html) - Some contents are out-of-dated. - [ ] Update [`API Usage - SessionOptions`](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/api-usage_session-options) on onnxruntime-inference-examples repo. - Add explaination and examples if necessary for all new WebGPU session options. - [ ] Update [`API usage - ort.env flags`](https://github.com/microsoft/onnxruntime-inference-examples/blob/main/js/api-usage_ort-env-flags) on onnxruntime-inference-examples repo. - Add all newly introduced flags.
48 lines
2.8 KiB
Markdown
48 lines
2.8 KiB
Markdown
---
|
|
title: On-Device Training
|
|
parent: Get Started
|
|
nav_order: 11
|
|
---
|
|
|
|
# On-Device Training with ONNX Runtime
|
|
{: .no_toc }
|
|
`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 device can be used for:
|
|
|
|
- Personalization tasks, where the model needs to be trained on the user's data.
|
|
- Federated learning tasks, where the model is locally trained on data that is distributed across multiple devices in an effort to build a more robust aggregated global model.
|
|
- Improving data privacy and security, especially when working with sensitive data that cannot be shared with a server or a cloud.
|
|
- Training locally (without impacting application functionality) when network connectivity is unreliable or limited.
|
|
|
|
|
|
`ONNX Runtime Training` offers an easy way to efficiently train and infer ONNX models on edge devices. The training process is divided into two phases:
|
|
- [the offline phase](#the-offline-phase)
|
|
- [the training phase](#the-training-phase).
|
|
|
|
## The Offline Phase
|
|
In this phase, training artifacts are prepared on a server, cloud or a desktop that does not have access to user data. These artifacts can be generated by using the `ONNX Runtime Training`'s [artifact generation Python tools](./../api/python/on_device_training/training_artifacts.html) available in the Python package.
|
|
|
|
Refer to the [installation instructions](./../install/index.md#offline-phase---prepare-for-training)
|
|
|
|
## The Training Phase
|
|
Once these artifacts are generated, they can be deployed to production scenarios on edge devices. `ONNX Runtime` offers a wide range of packages in multiple language bindings.
|
|
|
|
Refer to the [installation instructions](./../install/index.md#training-phase---on-device-training) for a complete list of all language bindings.
|
|
|
|
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.
|
|
|
|
[comment]: <> (Learn more from the blogs. Links to the blogs go here.)
|
|
|
|
## Installation
|
|
|
|
Refer to the [installation instructions](./../install/index.md#install-for-on-device-training) for details on how to install for your scenario.
|
|
|
|
## Building from Source
|
|
|
|
Refer to the [build instructions](./../build/training.md#build-for-on-device-training) for details on how to build for your custom scenario.
|
|
|
|
[comment]: <> (Learn more from the tutorials. Links to the demo and website tutorial go here.)
|
|
[comment]: <> (Also link to the onnxruntime-training-examples repo goes here.)
|
|
|
|
## Feature Request, Bug Report or Help Needed
|
|
|
|
In case you need help, please open an [issue](https://github.com/microsoft/onnxruntime/issues/new?assignees=&labels=training&projects=&template=06-training.yml&title=%5BTraining%5D+).
|