GithubHelp home page GithubHelp logo

test-mass-forker-org-1 / onnxruntime-training-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/onnxruntime-training-examples

0.0 0.0 0.0 7.7 MB

Examples for using ONNX Runtime for model training.

License: MIT License

Shell 5.14% Python 73.79% Jupyter Notebook 17.94% Dockerfile 1.89% Roff 1.23%

onnxruntime-training-examples's Introduction

New to Onnx

What is ONNX Runtime for PyTorch

ONNX Runtime for PyTorch gives you the ability to accelerate training of large transformer PyTorch models. The training time and cost are reduced with just a one line code change.

  • One line code change: ORT provides a one-line addition for existing PyTorch training scripts allowing easier experimentation and greater agility.
    from torch_ort import ORTModule
    model = ORTModule(model)
  • Flexible and extensible hardware support: The same model and API works with NVIDIA and AMD GPUs; the extensible "execution provider" architecture allow you to plug-in custom operators, optimizer and hardware accelerators.

  • Faster Training: Optimized kernels provide up to 1.4X speed up in training time.

  • Larger Models: Memory optimizations allow fitting a larger model such as GPT-2 on 16GB GPU, which runs out of memory with stock PyTorch.

  • Composable with other acceleration libraries such as Deepspeed, Fairscale, Megatron for even faster and more efficient training

  • Part of the PyTorch Ecosystem. It is available via the torch-ort python package.

  • Built on top of highly successful and proven technologies of ONNX Runtime and ONNX format.

ONNX Runtime Training Examples

This repo has examples for using ONNX Runtime (ORT) for accelerating training of Transformer models. These examples focus on large scale model training and achieving the best performance in Azure Machine Learning service. ONNX Runtime has the capability to train existing PyTorch models (implemented using torch.nn.Module) through its optimized backend. The examples in this repo demonstrate how ORTModule can be used to switch the training backend.

The old ORTTrainer API is no longer supported. Examples for ORTTrainer has been moved under /orttrainer.

Examples

Outline the examples in the repository.

Example Performance Comparison Model Change
HuggingFace BART See BART No model change required
HuggingFace BERT See BERT No model change required
HuggingFace DeBERTa See DeBERTa See this commit
HuggingFace DistilBERT See DistilBERT No model change required
HuggingFace GPT2 See GPT2 No model change required
HuggingFace RoBERTa See RoBERTa See this commit
t5-large See T5 See this PR

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

onnxruntime-training-examples's People

Contributors

manashgoswami avatar ashbhandare avatar harshithapv avatar jingyanwangms avatar natke avatar suffiank avatar skaarthik avatar microsoftopensource avatar edgchen1 avatar raviskolli avatar ytaous avatar thiagocrepaldi avatar gravityrail avatar roksanah avatar sherlocknomad avatar carzh avatar kshama-msft avatar microsoft-github-operations[bot] avatar shalvamist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.