mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-21 19:18:55 +00:00
Manashgoswami gh pages (#8091)
* Update ort-training.md * Update index.md * Update index.md * Update ort-training.md * Update index.md * Update install.md * Update index.md
This commit is contained in:
parent
412bf31cf3
commit
8b62250fcd
4 changed files with 36 additions and 4 deletions
|
|
@ -59,12 +59,22 @@ by running `locale-gen en_US.UTF-8` and `update-locale LANG=en_US.UTF-8`
|
|||
|
||||
|
||||
## Training
|
||||
|
||||
||Official build|Nightly build|
|
||||
|
||||
ONNX Runtime Training packages are available for different versions of PyTorch, CUDA and ROCm versions.
|
||||
|
||||
The install command is:
|
||||
```cmd
|
||||
pip3 install torch-ort [-f location]
|
||||
python 3 -m torch_ort.configure
|
||||
```
|
||||
|
||||
The _location_ needs to be specified for any specific version other than the default combination. The location for the different configurations are below:
|
||||
|
||||
||Official build (location)|Nightly build (location)|
|
||||
|---|---|---|
|
||||
|PyTorch 1.8.1 (CUDA 10.2)|[**onnxruntime_stable_torch181.cu102**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_torch181.cu102.html)|[onnxruntime_nightly_torch181.cu102](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch181.cu102.html)|
|
||||
|PyTorch 1.8.1 (CUDA 11.1)|[**onnxruntime_stable_torch181.cu111**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_torch181.cu111.html )|[onnxruntime_nightly_torch181.cu111](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch181.cu111.html)|
|
||||
|PyTorch 1.9 (CUDA 10.2)|[**onnxruntime-training**](https://pypi.org/project/onnxruntime-training/)|[onnxruntime_nightly_torch190.cu102](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch190.cu102.html)|
|
||||
|PyTorch 1.9 (CUDA 10.2) **Default**|[**onnxruntime-training**](https://pypi.org/project/onnxruntime-training/)|[onnxruntime_nightly_torch190.cu102](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch190.cu102.html)|
|
||||
|PyTorch 1.9 (CUDA 11.1)|[**onnxruntime_stable_torch190.cu111**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_torch190.cu111.html)|[onnxruntime_nightly_torch190.cu111](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch190.cu111.html)|
|
||||
|[*Preview*] PyTorch 1.8.1 (ROCm 4.2)|[**onnxruntime_stable_torch181.rocm42**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_torch181.rocm42.html)|[onnxruntime_nightly_torch181.rocm42](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch181.rocm42.html)|
|
||||
|[*Preview*] PyTorch 1.9 (ROCm 4.2)|[**onnxruntime_stable_torch190.rocm42**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_torch190.rocm42.html)|[onnxruntime_nightly_torch190.rocm42](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch190.rocm42.html)|
|
||||
|[*Preview*] PyTorch 1.9 (ROCm 4.2)|[**onnxruntime_stable_torch190.rocm42**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_torch190.rocm42.html)|[onnxruntime_nightly_torch190.rocm42](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_torch190.rocm42.html)|
|
||||
|
|
@ -55,6 +55,26 @@ Released in April 2021, ONNX Runtime Training provides a one-line addition for e
|
|||
|
||||
Using the ORTModule class wrapper, ONNX Runtime for PyTorch runs the forward and backward passes of the training script using an optimized automatically-exported ONNX computation graph. ORT Training uses the same graph optimizations as ORT Inferencing, allowing for model training acceleration.
|
||||
|
||||
The ORTModule is instantiated from [`torch-ort`](https://github.com/pytorch/ort) backend in PyTorch. This new interface enables a seamless integration for ONNX Runtime training in a PyTorch training code with minimal changes to the existing code.
|
||||
|
||||
### Install ONNX Runtime Training package
|
||||
|
||||
`pip install torch-ort
|
||||
python -m torch_ort.configure`
|
||||
|
||||
**Note**: This installs the default version of the `torch-ort` and `onnxruntime-training` packages that are mapped to specific versions of the CUDA libraries. Refer to the install options in [ONNXRUNTIME.ai](https://onnxruntime.ai).
|
||||
|
||||
### Add ORTModule in the `train.py`
|
||||
|
||||
```python
|
||||
from torch_ort import ORTModule
|
||||
.
|
||||
.
|
||||
.
|
||||
model = ORTModule(model)
|
||||
```
|
||||
|
||||
**Note**: the `model` where ORTModule is wrapped needs to be a derived from the `torch.nn.Module` class.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ nav_order: 2
|
|||
---
|
||||
# Tutorials: ORT Training
|
||||
|
||||
## [Finetuning acceleration for Hugging Face Transformers with ONNX Runtime](https://github.com/microsoft/onnxruntime-training-examples/tree/master/huggingface).
|
||||
|
|
@ -16,4 +16,5 @@ nav_order: 1
|
|||
|
||||
* [Accelerate fine tuning of Huggingface GPT2 model](https://github.com/microsoft/onnxruntime-training-examples/tree/master/orttrainer/huggingface-gpt2)
|
||||
|
||||
|
||||
* *More coming soon!*
|
||||
|
|
|
|||
Loading…
Reference in a new issue