Azure-Samples / locutus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

Quickstart

A detailed walkthrough of the entire process is available. Some instructions basic for getting everything kicked off:

  1. Clone the repo
  2. Azure Machine Learning Infrastructure Setup
./provision.ps1 -name <YOUR_APP_NAME> -location <LOCATION|i.e. westus2>
  1. Experimentation Notebooks
  2. AzureML Components and Pipelines for finetuning GPT-2
  3. Managed Inference
  4. GitHub Actions for ML Component CI/CD
  5. Responsible AI Dashboard

Resources

About

License:MIT License


Languages

Language:Jupyter Notebook 65.7%Language:Python 25.6%Language:Bicep 6.3%Language:Dockerfile 1.5%Language:PowerShell 0.9%