You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-studio/how-to/deploy-models-serverless.md
+40-20Lines changed: 40 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn to deploy models as serverless APIs, using Azure AI Studio.
5
5
manager: scottpolly
6
6
ms.service: azure-ai-studio
7
7
ms.topic: how-to
8
-
ms.date: 5/21/2024
8
+
ms.date: 07/18/2024
9
9
ms.author: mopeakande
10
10
author: msakande
11
11
ms.reviewer: fasantia
@@ -84,16 +84,13 @@ In this article, you learn how to deploy a model from the model catalog as a ser
84
84
You can use any compatible web browser to [deploy ARM templates](../../azure-resource-manager/templates/deploy-portal.md) in the Microsoft Azure portal or use any of the deployment tools. This tutorial uses the [Azure CLI](/cli/azure/).
85
85
86
86
87
-
## Subscribe your project to the model offering
88
-
89
-
For models offered through the Azure Marketplace, you can deploy them to serverless API endpoints to consume their predictions. If it's your first time deploying the model in the project, you have to subscribe your project for the particular model offering from the Azure Marketplace. Each project has its own subscription to the particular Azure Marketplace offering of the model, which allows you to control and monitor spending.
90
-
91
-
> [!NOTE]
92
-
> Models offered through the Azure Marketplace are available for deployment to serverless API endpoints in specific regions. Check [Model and region availability for Serverless API deployments](deploy-models-serverless-availability.md) to verify which models and regions are available. If the one you need is not listed, you can deploy to a workspace in a supported region and then [consume serverless API endpoints from a different workspace](deploy-models-serverless-connect.md).
87
+
## Find your model and model ID in the model catalog
93
88
94
89
1. Sign in to [Azure AI Studio](https://ai.azure.com).
95
90
96
-
1. Ensure your account has the **Azure AI Developer** role permissions on the resource group, or that you meet the [permissions required to subscribe to model offerings](#permissions-required-to-subscribe-to-model-offerings).
91
+
1. For models offered through the Azure Marketplace, ensure that your account has the **Azure AI Developer** role permissions on the resource group, or that you meet the [permissions required to subscribe to model offerings](#permissions-required-to-subscribe-to-model-offerings).
92
+
93
+
Models that are offered by non-Microsoft providers (for example, Llama and Mistral models) are billed through the Azure Marketplace. For such models, you're required to subscribe your project to the particular model offering. Models that are offered by Microsoft (for example, Phi-3 models) don't have this requirement, as billing is done differently. For details about billing for serverless deployment of models in the model catalog, see [Billing for serverless APIs](model-catalog-overview.md#billing).
97
94
98
95
1. Select **Model catalog** from the left sidebar and find the model card of the model you want to deploy. In this article, you select a **Meta-Llama-3-8B-Instruct** model.
99
96
@@ -104,13 +101,23 @@ For models offered through the Azure Marketplace, you can deploy them to serverl
The next section covers the steps for subscribing your project to a model offering. You can skip this section and go to [Deploy the model to a serverless API endpoint](#deploy-the-model-to-a-serverless-api-endpoint), if you're deploying a Microsoft model.
106
+
107
+
## Subscribe your project to the model offering
108
+
109
+
For non-Microsoft models offered through the Azure Marketplace, you can deploy them to serverless API endpoints to consume their predictions. If it's your first time deploying the model in the project, you have to subscribe your project for the particular model offering from the Azure Marketplace. Each project has its own subscription to the particular Azure Marketplace offering of the model, which allows you to control and monitor spending.
110
+
111
+
> [!NOTE]
112
+
> Models offered through the Azure Marketplace are available for deployment to serverless API endpoints in specific regions. Check [Model and region availability for Serverless API deployments](deploy-models-serverless-availability.md) to verify which models and regions are available. If the one you need is not listed, you can deploy to a workspace in a supported region and then [consume serverless API endpoints from a different workspace](deploy-models-serverless-connect.md).
113
+
107
114
1. Create the model's marketplace subscription. When you create a subscription, you accept the terms and conditions associated with the model offer.
108
115
109
116
# [AI Studio](#tab/azure-ai-studio)
110
117
111
-
1. On the model's **Details** page, select **Deploy** and then select **Serverless API** to open the deployment wizard.
118
+
1. On the model's **Details** page, select **Deploy** and then select **Serverless API with Azure AI Content Safety (preview)** to open the deployment wizard.
112
119
113
-
1. Select the project in which you want to deploy your models. Notice that not all the regions are supported.
120
+
1. Select the project in which you want to deploy your models. To use the serverless API model deployment offering, your project must belong to one of the [regions that are supported for serverless deployment](deploy-models-serverless-availability.md) for the particular model.
114
121
115
122
:::image type="content" source="../media/deploy-monitor/serverless/deploy-pay-as-you-go.png" alt-text="A screenshot showing how to deploy a model with the serverless API option." lightbox="../media/deploy-monitor/serverless/deploy-pay-as-you-go.png":::
116
123
@@ -189,7 +196,7 @@ For models offered through the Azure Marketplace, you can deploy them to serverl
189
196
}
190
197
```
191
198
192
-
1. Once you sign up the project for the particular Azure Marketplace offering, subsequent deployments of the same offering in the same project don't require subscribing again.
199
+
1. Once you subscribe the project for the particular Azure Marketplace offering, subsequent deployments of the same offering in the same project don't require subscribing again.
193
200
194
201
1. At any point, you can see the model offers to which your project is currently subscribed:
195
202
@@ -231,15 +238,21 @@ For models offered through the Azure Marketplace, you can deploy them to serverl
231
238
232
239
## Deploy the model to a serverless API endpoint
233
240
234
-
Once you've created a model's subscription, you can deploy the associated model to a serverless API endpoint. The serverless API endpoint provides a way to consume models as an API without hosting them on your subscription, while keeping the enterprise security and compliance organizations need. This deployment option doesn't require quota from your subscription.
241
+
Once you've created a subscription for a non-Microsoft model, you can deploy the associated model to a serverless API endpoint. For Microsoft models (such as Phi-3 models), you don't need to create a subscription.
242
+
243
+
The serverless API endpoint provides a way to consume models as an API without hosting them on your subscription, while keeping the enterprise security and compliance organizations need. This deployment option doesn't require quota from your subscription.
235
244
236
-
In this article, you create an endpoint with name **meta-llama3-8b-qwerty**.
245
+
In this section, you create an endpoint with the name **meta-llama3-8b-qwerty**.
237
246
238
247
1. Create the serverless endpoint
239
248
240
249
# [AI Studio](#tab/azure-ai-studio)
241
250
242
-
1. From the previous wizard, select **Deploy** (if you've just subscribed the project to the model offer in the previous section), or select **Continue to deploy** (if your deployment wizard had the note *You already have an Azure Marketplace subscription for this project*).
251
+
1. To deploy a Microsoft model that doesn't require subscribing to a model offering:
252
+
1. Select **Deploy** and then select **Serverless API with Azure AI Content Safety (preview)** to open the deployment wizard.
253
+
1. Select the project in which you want to deploy your model. Notice that not all the regions are supported.
254
+
255
+
1. Alternatively, for a non-Microsoft model that requires a model subscription, if you've just subscribed your project to the model offer in the previous section, continue to select **Deploy**. Alternatively, select **Continue to deploy** (if your deployment wizard had the note *You already have an Azure Marketplace subscription for this project*).
243
256
244
257
:::image type="content" source="../media/deploy-monitor/serverless/deploy-pay-as-you-go-subscribed-project.png" alt-text="A screenshot showing a project that is already subscribed to the offering." lightbox="../media/deploy-monitor/serverless/deploy-pay-as-you-go-subscribed-project.png":::
245
258
@@ -416,11 +429,11 @@ In this article, you create an endpoint with name **meta-llama3-8b-qwerty**.
416
429
> [!TIP]
417
430
> If you're using prompt flow in the same project or hub where the deployment was deployed, you still need to create the connection.
418
431
419
-
## Using the serverless API endpoint
432
+
## Use the serverless API endpoint
420
433
421
434
Models deployed in Azure Machine Learning and Azure AI studio in Serverless API endpoints support the [Azure AI Model Inference API](../reference/reference-model-inference-api.md) that exposes a common set of capabilities for foundational models and that can be used by developers to consume predictions from a diverse set of models in a uniform and consistent way.
422
435
423
-
Read more about the [capabilities of this API](../reference/reference-model-inference-api.md#capabilities) and how [you can leverage it when building applications](../reference/reference-model-inference-api.md#getting-started).
436
+
Read more about the [capabilities of this API](../reference/reference-model-inference-api.md#capabilities) and how [you can use it when building applications](../reference/reference-model-inference-api.md#getting-started).
424
437
425
438
## Delete endpoints and subscriptions
426
439
@@ -493,7 +506,15 @@ az resource delete --name <resource-name>
493
506
494
507
## Cost and quota considerations for models deployed as serverless API endpoints
495
508
496
-
Models deployed as serverless API endpoints are offered through the Azure Marketplace and integrated with Azure AI Studio for use. You can find the Azure Marketplace pricing when deploying or fine-tuning the models.
509
+
Quota is managed per deployment. Each deployment has a rate limit of 200,000 tokens per minute and 1,000 API requests per minute. However, we currently limit one deployment per model per project. Contact Microsoft Azure Support if the current rate limits aren't sufficient for your scenarios.
510
+
511
+
#### Cost for Microsoft models
512
+
513
+
You can find the pricing information on the __Pricing and terms__ tab of the deployment wizard when deploying Microsoft models (such as Phi-3 models) as serverless API endpoints.
514
+
515
+
#### Cost for non-Microsoft models
516
+
517
+
Non-Microsoft models deployed as serverless API endpoints are offered through the Azure Marketplace and integrated with Azure AI Studio for use. You can find the Azure Marketplace pricing when deploying or fine-tuning these models.
497
518
498
519
Each time a project subscribes to a given offer from the Azure Marketplace, a new resource is created to track the costs associated with its consumption. The same resource is used to track costs associated with inference and fine-tuning; however, multiple meters are available to track each scenario independently.
499
520
@@ -502,8 +523,6 @@ For more information on how to track costs, see [Monitor costs for models offere
502
523
:::image type="content" source="../media/deploy-monitor/serverless/costs-model-as-service-cost-details.png" alt-text="A screenshot showing different resources corresponding to different model offers and their associated meters." lightbox="../media/deploy-monitor/serverless/costs-model-as-service-cost-details.png":::
503
524
504
525
505
-
Quota is managed per deployment. Each deployment has a rate limit of 200,000 tokens per minute and 1,000 API requests per minute. However, we currently limit one deployment per model per project. Contact Microsoft Azure Support if the current rate limits aren't sufficient for your scenarios.
506
-
507
526
## Permissions required to subscribe to model offerings
508
527
509
528
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__, __Contributor__, or __Azure AI Developer__ role for the Azure subscription. Alternatively, your account can be assigned a custom role that has the following permissions:
@@ -525,6 +544,7 @@ Azure role-based access controls (Azure RBAC) are used to grant access to operat
525
544
526
545
For more information on permissions, see [Role-based access control in Azure AI Studio](../concepts/rbac-ai-studio.md).
527
546
528
-
## Next step
547
+
## Related content
529
548
549
+
*[Region availability for models in serverless API endpoints](deploy-models-serverless-availability.md)
530
550
*[Fine-tune a Meta Llama 2 model in Azure AI Studio](fine-tune-model-llama.md)
0 commit comments