Home

Awesome

GitHub contributors GitHub issues GitHub pull-requests PRs Welcome

GitHub watchers GitHub forks GitHub stars Azure AI Community Discord

Unlocking NLP Potential: Fine-Tuning with Microsoft Olive PRE016

Slide Deck

Fine-Tuning Workshop

This repository is for the Ignite 2024 PreDay Workshop on Fine Tuning Large Language Models

session banner

Session Description

Abstract: Join us for an exclusive workshop on fine-tuning pre-trained language models using Microsoft Olive. Optimizes the fine-tuning process both in the cloud and locally. Deep dive into advanced techniques, gain hands-on experience, and practical insights to elevate your NLP projects. Achieve state-of-the-art performance and unlock new possibilities in NLP. Enhance your skills and stay ahead in the rapidly evolving field of NLP.

Session Overview

Introduction and Overview (15 minutes)

0. Setting Up the Environment (15 minutes)

Lab #TitleDescription
0Set upLearn how to set-up your Azure resources for this lab.

1. Login to Azure AI and Setup Compute Node (15 minutes)

Lab #TitleDescription
1Set upLogin to your AI Hub and Project and deploy a GPU Compute resource.

2. Data Preperation (15 minutes)

Lab #TitleDescription
2Data PrepLearn how to prepare data for Finetuning and evaluation.

3. Fine-Tuning Basics (40 minutes)

Lab #TitleDescription
3Finetuning with Azure AI StudioLearn how to finetune with Azure AI Studio

4. Deployment of a Model (45 minutes)

Lab #TitleDescription
4Deploying models to a cloud endpointLearn how to deploy models to a cloud endpoint for inference using Azure AI Studio.

5. Optimizing Performance (30 minutes)

Lab #TitleDescription
5Optimize your model for Inference using Microsoft OliveLearn to optimize your model for on-device inference using Olive. This will include quantization methods and ONNX runtime optimizations.

6. Evaluation of Fine-Tuned Models (45 minutes)

Lab #TitleDescription
6How to evaluate AI modelsIn this lab we show you how to evaluate your models to ensure they give trustworthy and safe responses.

7. Consumption of the Model (30 minutes)

Lab #TitleDescription
7Bring it all together in an appIn this lab we build an application that consumes the AI models you trained and optimized in previous labs. The application will call 2 different models: 1 model will be in the cloud and the other will be on-device.

8. Clean Up

Lab #TitleDescription
8Clean upIn this lab, we clean up all the resources.

9. Q&A and Wrap-Up (15 minutes)

Duration

4 hours

Slide Deck

Learning Outcomes

Technology Used

Additional Resources and Continued Learning

ResourcesLinksDescription
Session SlidesViewReview the slides presented during the workshop at your own pace

Content Owners

<!-- TODO: Add yourself as a content owner 1. Change the src in the image tag to {your github url}.png 2. Change INSERT NAME HERE to your name 3. Change the github url in the final href to your url. --> <table> <tr> <td align="center"><a href="http://learnanalytics.microsoft.com"> <img src="https://github.com/leestott.png" width="100px;" alt="Lee Stott"/><br /> <sub><b> Lee Stott </b></sub></a><br /> <a href="https://github.com/leestott" title="talk">📢</a> </td> <td align="center"><a href="http://learnanalytics.microsoft.com"> <img src="https://github.com/kinfey.png" width="100px;" alt="Kinfey Lo"/><br /> <sub><b>Kinfey Lo </b></sub></a><br /> </td> <td align="center"><a href="http://learnanalytics.microsoft.com"> <img src="https://github.com/samuel100.png" width="100px;" alt="Sam Kemp"/><br /> <sub><b>Sam Kemp </b></sub></a><br /> <a href="https://github.com/bethanyjep" title="talk">📢</a> </td> </tr></table>

Responsible AI

Microsoft is committed to helping our customers use our AI products responsibly, sharing our learnings, and building trust-based partnerships through tools like Transparency Notes and Impact Assessments. Many of these resources can be found at https://aka.ms/RAI. Microsoft’s approach to responsible AI is grounded in our AI principles of fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability.

Large-scale natural language, image, and speech models - like the ones used in this sample - can potentially behave in ways that are unfair, unreliable, or offensive, in turn causing harms. Please consult the Azure OpenAI service Transparency note to be informed about risks and limitations.

The recommended approach to mitigating these risks is to include a safety system in your architecture that can detect and prevent harmful behavior. Azure AI Content Safety provides an independent layer of protection, able to detect harmful user-generated and AI-generated content in applications and services. Azure AI Content Safety includes text and image APIs that allow you to detect material that is harmful. We also have an interactive Content Safety Studio that allows you to view, explore and try out sample code for detecting harmful content across different modalities. The following quickstart documentation guides you through making requests to the service.

Another aspect to take into account is the overall application performance. With multi-modal and multi-models applications, we consider performance to mean that the system performs as you and your users expect, including not generating harmful outputs. It's important to assess the performance of your overall application using generation quality and risk and safety metrics.

You can evaluate your AI application in your development environment using the prompt flow SDK. Given either a test dataset or a target, your generative AI application generations are quantitatively measured with built-in evaluators or custom evaluators of your choice. To get started with the prompt flow sdk to evaluate your system, you can follow the quickstart guide. Once you execute an evaluation run, you can visualize the results in Azure AI Studio.