Awesome
locutus GPT-2 Text Generation
This sample takes folks through the end-to-end process of deploying the GPT-2 model from HuggingFace fine-tuned on the writings of Homer. These are the demos that were shown in the "Scaling responsible MLOps with Azure Machine Learning" session
Features
This repo has a number of things that can be tried in isolation or together as an end-to-end exercise. These include:
- Azure Machine Learning Infrastructure Setup
- Experimentation Notebooks
- AzureML Components and Pipelines for Finetuning GPT-2
- Managed Inference
- GitHub Actions for ML Component CI/CD
- Responsible AI Dashboard (Pending)
Getting Started
Prerequisites
Generally it is easier to run these exercises in the cloud (given that part of the exercise is creating custom environments). If you want to run these things locally you need to have either a virtual or conda environment that supports PyTorch.
Other requirements are:
- An Azure subscription that you have the
Owner
Role to create resources. - PowerShell v5.0+
- Azure Command-Line Interface (az-cli) v2.36.0+
Quickstart
A detailed walkthrough of the entire process is available. Some instructions basic for getting everything kicked off:
- Clone the repo
- Azure Machine Learning Infrastructure Setup
./provision.ps1 -name <YOUR_APP_NAME> -location <LOCATION|i.e. westus2>
- Experimentation Notebooks
- AzureML Components and Pipelines for finetuning GPT-2
- Managed Inference
- GitHub Actions for ML Component CI/CD
- Responsible AI Dashboard