3.0 KiB
HOWTO: Fine-tune llama-2-7b in Azure AI Studio
⚠️ See the Azure RAFT Distillation Recipe repo (Azure-Samples/raft-distillation-recipe) for instructions, notebooks and infrastructure provisioning for Meta Llama 3.1 and 3.2 as well as GPT-4o.
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.Networkresource 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.
Enter a name and create a new resource

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

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

The resources should begin being created

Wait until all resources have been created

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

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

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

Enter the name of the fine-tuned model

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

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

The wizard will show you an overview of the top lines

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





