|
1 | 1 | ---
|
2 |
| -title: Fine-tune models using a user-managed compute with Azure AI Studio |
3 |
| -titleSuffix: Azure AI Studio |
4 |
| -description: Learn how to fine-tune models using a user-managed compute with Azure AI Studio. |
| 2 | +title: Fine-tune models using a managed compute with Azure AI Foundry portal (preview) |
| 3 | +titleSuffix: Azure AI Foundry |
| 4 | +description: Learn how to fine-tune models using a managed compute with Azure AI Foundry. |
5 | 5 | manager: scottpolly
|
6 | 6 | ms.service: azure-ai-studio
|
7 | 7 | ms.topic: how-to
|
8 |
| -ms.date: 10/25/2024 |
| 8 | +ms.date: 11/22/2024 |
9 | 9 | ms.reviewer: vkann
|
10 | 10 | reviewer: kvijaykannan
|
11 | 11 | ms.author: mopeakande
|
12 | 12 | author: msakande
|
13 | 13 | ms.custom: references_regions
|
14 | 14 |
|
15 |
| -#customer intent: As a data scientist using a user-managed compute, I want to learn how to fine-tune models to improve model performance for specific tasks. |
| 15 | +#customer intent: As a data scientist using a managed compute, I want to learn how to fine-tune models to improve model performance for specific tasks. |
16 | 16 | ---
|
17 | 17 |
|
18 |
| -# Fine-tune models using user-managed compute |
| 18 | +# Fine-tune models using managed compute (preview) |
19 | 19 |
|
20 |
| -This article explains how to use a user-managed compute to fine-tune a foundation model in Azure AI Studio. Fine-tuning involves adapting a pretrained model to a new, related task or domain. When you use a managed compute for fine-tuning, you use your computational resources to adjust training parameters such as learning rate, batch size, and number of training epochs to optimize the model's performance for a specific task. Fine-tuning a pretrained model to use for a related task is more efficient than building a new model, as it builds upon the pretrained model's existing knowledge and reduces the time and data needed for training. |
| 20 | +[!INCLUDE [feature-preview](../includes/feature-preview.md)] |
21 | 21 |
|
22 |
| -To improve model performance, you might consider fine-tuning a foundation model with your training data. You can easily fine-tune foundation models by using either the fine-tune settings in AI Studio or by using code-based samples. |
| 22 | +This article explains how to use a managed compute to fine-tune a foundation model in the Azure AI Foundry portal. Fine-tuning involves adapting a pretrained model to a new, related task or domain. When you use a managed compute for fine-tuning, you use your computational resources to adjust training parameters such as learning rate, batch size, and number of training epochs to optimize the model's performance for a specific task. |
| 23 | + |
| 24 | +Fine-tuning a pretrained model to use for a related task is more efficient than building a new model, as fine-tuning builds upon the pretrained model's existing knowledge and reduces the time and data needed for training. |
| 25 | + |
| 26 | +To improve model performance, you might consider fine-tuning a foundation model with your training data. You can easily fine-tune foundation models by using either the fine-tune settings in Azure AI Foundry portal or by using code-based samples. |
23 | 27 |
|
24 | 28 | __Todo: link to the code-based samples__
|
25 | 29 |
|
26 | 30 | ## Prerequisites
|
27 | 31 |
|
28 | 32 | - An Azure subscription with a valid payment method. Free or trial Azure subscriptions won't work. If you don't have an Azure subscription, create a [paid Azure account](https://azure.microsoft.com/pricing/purchase-options/pay-as-you-go) to begin.
|
29 | 33 |
|
30 |
| -- An [Azure AI Studio hub](create-azure-ai-resource.md). |
31 |
| - |
32 |
| -- An [Azure AI Studio project](create-projects.md). |
| 34 | +- An [Azure AI Foundry project](create-projects.md). |
33 | 35 |
|
34 |
| -- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Studio. To perform the steps in this article, your user account must be assigned the __owner__ or __contributor__ role for the Azure subscription. For more information on permissions, see [Role-based access control in Azure AI Studio](../concepts/rbac-ai-studio.md). |
| 36 | +- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Foundry portal. To perform the steps in this article, your user account must be assigned the __owner__ or __contributor__ role for the Azure subscription. For more information on permissions, see [Role-based access control in Azure AI Foundry portal](../concepts/rbac-ai-studio.md). |
35 | 37 |
|
36 | 38 | ## Fine-tune a foundation model using managed compute
|
37 | 39 |
|
38 |
| -1. Sign in to [Azure AI Studio](https://ai.azure.com). |
39 |
| -1. Select **Fine-tuning** from the left sidebar and add the foundation model that you want to finetune. |
40 |
| -1. Alternatively, you could select **Model catalog** from the left sidebar and find the model card of the foundation model that you want to finetune. |
41 |
| -1. Select __Fine-tune__ on the model card to see the available fine-tune options. Some foundation models support only the __User-managed compute__ option. |
42 |
| -1. Select the __User-managed compute__ option to use your personal compute resources. This action opens up a window where you can specify the fine-tuning settings. |
| 40 | +1. Sign in to [Azure AI Foundry](https://ai.azure.com). |
43 | 41 |
|
44 |
| - :::image type="content" source="../media/how-to/fine-tune-managed-compute/fine-tune-options.png" alt-text="Screenshot showing fine-tuning options for a foundation model in AI Studio." lightbox="../media/how-to/fine-tune-managed-compute/fine-tune-options.png"::: |
| 42 | +1. If you're not already in your project, select it. |
| 43 | +1. Select **Fine-tuning** from the left navigation pane. |
45 | 44 |
|
46 |
| -### Configure fine-tune settings |
47 |
| - |
48 |
| -In this section, you go through the steps to configure fine-tuning for your model, using a managed compute. |
| 45 | + 1. Select **Fine-tune model** and add the model that you want to fine-tune. This article uses _Phi-3-mini-4k-instruct_ for illustration. |
| 46 | + 1. Select **Next** to see the available fine-tune options. Some foundation models support only the __Managed compute__ option. |
49 | 47 |
|
50 |
| -#### Basic settings |
| 48 | +1. Alternatively, you could select **Model catalog** from the left sidebar of your project and find the model card of the foundation model that you want to fine-tune. |
51 | 49 |
|
52 |
| -1. Provide a name for the fine-tuned model on the "Basic settings" page. |
| 50 | + 1. Select __Fine-tune__ on the model card to see the available fine-tune options. Some foundation models support only the __Managed compute__ option. |
53 | 51 |
|
54 |
| -#### Compute |
| 52 | + :::image type="content" source="../media/how-to/fine-tune-managed-compute/fine-tune-options.png" alt-text="Screenshot showing fine-tuning options for a foundation model in Azure AI Foundry." lightbox="../media/how-to/fine-tune-managed-compute/fine-tune-options.png"::: |
55 | 53 |
|
56 |
| -1. Provide the Azure Machine Learning compute cluster to use for fine-tuning the model. Fine-tuning runs on GPU compute. Ensure that you have sufficient compute quota for the compute SKUs you plan to use. |
| 54 | +1. Select __Managed compute__ to use your personal compute resources. This action opens up the "Basic settings" page of a window for specifying the fine-tuning settings. |
57 | 55 |
|
58 |
| - :::image type="content" source="../media/how-to/fine-tune-managed-compute/fine-tune-compute.png" alt-text="Screenshot showing settings for the compute to use for fine-tuning." lightbox="../media/how-to/fine-tune-managed-compute/fine-tune-compute.png"::: |
| 56 | +### Configure fine-tune settings |
59 | 57 |
|
60 |
| -#### Training data |
| 58 | +In this section, you go through the steps to configure fine-tuning for your model, using a managed compute. |
61 | 59 |
|
62 |
| -1. Provide the training data to use to fine-tune your model. You can choose to either upload a local file (in JSONL, CSV or TSV format) or select an existing registered dataset from your workspace. |
| 60 | +1. Provide a name for the fine-tuned model on the "Basic settings" page, and select **Next** to go to the "Compute" page. |
63 | 61 |
|
64 |
| -1. Map the columns from your input data, based on the schema needed for the task. For example, map the column names that correspond to the _sentence_ and _label_ keys for text classification. |
| 62 | +1. Select the Azure Machine Learning compute cluster to use for fine-tuning the model. Fine-tuning runs on GPU compute. Ensure that you have sufficient compute quota for the compute SKUs you plan to use. |
65 | 63 |
|
66 |
| -:::image type="content" source="../media/how-to/fine-tune-managed-compute/fine-tune-training-data.png" alt-text="Screenshot showing settings for the training data to use for fine-tuning." lightbox="../media/how-to/fine-tune-managed-compute/fine-tune-training-data.png"::: |
| 64 | + :::image type="content" source="../media/how-to/fine-tune-managed-compute/fine-tune-compute.png" alt-text="Screenshot showing settings for the compute to use for fine-tuning." lightbox="../media/how-to/fine-tune-managed-compute/fine-tune-compute.png"::: |
67 | 65 |
|
68 |
| -#### Validation data |
| 66 | +1. Select **Next** to go to the "Training data" page. On this page, the "Task type" is preselected as **Chat completion**. |
69 | 67 |
|
70 |
| -1. Provide the data to use to validate your model. Selecting __Automatic split__ reserves an automatic split of training data for validation. Alternatively, you can provide a different validation dataset. |
| 68 | +1. Provide the training data to use to fine-tune your model. You can choose to either upload a local file (in JSONL, CSV or TSV format) or select an existing registered dataset from your project. |
71 | 69 |
|
72 |
| -#### Task parameters |
| 70 | +1. Select **Next** to go to the "Validation data" page. Keep the **Automatic split of training data** selection to reserve an automatic split of training data for validation. Alternatively, you could provide a different validation dataset by uploading a local file (in JSONL, CSV or TSV format) or selecting an existing registered dataset from your project. |
73 | 71 |
|
74 |
| -1. Tuning hyperparameter is essential for optimizing large language models (LLMs) in real-world applications. It allows for improved performance and efficient resource usage. You can choose to keep the default settings or customize parameters like epochs or learning rate. |
| 72 | +1. Select **Next** to go to the "Task parameters" page. Tuning hyperparameters is essential for optimizing large language models (LLMs) in real-world applications. It allows for improved performance and efficient resource usage. You can choose to keep the default settings or customize parameters like epochs or learning rate. |
75 | 73 |
|
76 |
| -#### Review |
| 74 | +1. Select **Next** to go to the "Review" page and check that all the settings look good. |
77 | 75 |
|
78 |
| -1. Select __Finish__ in the fine-tune form to submit your fine-tuning job. Once the job completes, you can view evaluation metrics for the fine-tuned model. You can then deploy this model to an endpoint for inferencing. |
| 76 | +1. Select **Submit** to submit your fine-tuning job. Once the job completes, you can view evaluation metrics for the fine-tuned model. You can then deploy this model to an endpoint for inferencing. |
79 | 77 |
|
80 | 78 | ## Related Contents
|
81 |
| -- [Fine-tuning in Azure AI Studio - Azure AI Studio | Microsoft Learn](../concepts/fine-tuning-overview.md) |
82 |
| -- [Deploy Phi-3 family of small language models with Azure AI Studio](../how-to/deploy-models-phi-3.md) |
| 79 | + |
| 80 | +- [Fine-tune models with Azure AI Foundry](../concepts/fine-tuning-overview.md) |
| 81 | +- [How to use Phi-3 family chat models](deploy-models-phi-3.md) |
0 commit comments