howto.md 2.8 KB

HOWTO: Fine-tune llama-2-7b in Azure AI Studio

Prerequisites

Prerequisites in MS Learn article "Fine-tune a Llama 2 model in Azure AI Studio"

Key things to get right for everything to work

  • Select the West US 3 location
  • Use a Pay As You go Subscription with a credit card linked
  • Make sure the subscription is registered to the Microsoft.Network resource provider

Detailed step by step

This builds on the "Fine-tune a Llama 2 model in Azure AI Studio" MS Learn tutorial and adds a few details here and there.

Open https://ai.azure.com/

Create a new AI Project Step 01

Enter a name and create a new resource Step 02

Enter an AI Hub resource name, select the PAYG (Pay As You Go) Subscription and West US 3 location Step 03

Note: It's important to use a PAYG subscription with a credit card linked to the account. Grant based subscriptions and credits will not work.

Review that the location is correctly set to West US 3 and that the subscription is correct Step 04

The resources should begin being created Step 05

Wait until all resources have been created Step 06

Once in the AI Studio project, open the Fine-tuning tab and click on the Fine-tune model button Step 07

Select the model to fine-tune, for example Llama 2 7b Step 08

Subscribe if necessary to the Meta subscription and start the fine-tuning Step 09

Enter the name of the fine-tuned model Step 10

Select the task type, currently, only text generation is supported Step 11

Select the upload data option and upload your file, it must be in JSONL format Step 12

The wizard will show you an overview of the top lines Step 13

Select which columns is the prompt and which one is the completion column Step 14

Select the task parameters Step 15

Review the settings Step 16

The job should be in running state Step 17

Wait until the job is completed Step 18