11.4 C
New York
Sunday, April 14, 2024

The way to migrate manufacturing prepared AI apps to Azure OpenAI Service

Open to anybody with an concept

Microsoft for Startups Founders Hub brings folks, data and advantages collectively to assist founders at each stage remedy startup challenges. Enroll in minutes with no funding required.

As a startup in Founders Hub, you will get began with $2,500 of OpenAI credit to start experimenting with highly effective AI fashions on day one. As you put together to roll out your answer into manufacturing, your out there Azure credit (as much as $150K) can then be utilized in direction of Azure OpenAI Service.

We’re typically requested tips on how to weigh the variations between these two choices. This put up goals to make clear the important thing advantages of transitioning to Azure OpenAI Service.

With Azure OpenAI Service, you continue to get entry to the identical outstanding OpenAI fashions like GPT-3, DALL-E 2, and Codex via easy API calls. However now these capabilities are enhanced by Microsoft Azure’s enterprise-grade safety, compliance, assist, availability, and accountable AI practices.

Whereas OpenAI supplies uncooked entry to fashions, Azure OpenAI Service empowers you to construct on high of them in smarter methods:

  • Pre-trained options permit prompt deployment so you possibly can give attention to customization slightly than implementation
  • Auto-scaling infrastructure allows fast prototyping and seamless transition to manufacturing
  • Greater efficiency handles extra requests per second and delivers sooner response instances
  • Larger scalability adjusts up or right down to your wants, so that you solely pay for what you utilize
  • Enhanced safety is backed by Azure’s safe cloud platform with encryption, compliance, and privateness
  • Greater reliability ensures 99.9% uptime to attenuate disruption
  • Strong assist supplies documentation and technical specialists to help you

By making the leap from OpenAI to Azure OpenAI Service, startups can speed up innovation, scale back threat, and get probably the most worth from their AI investments.

The way to transition to Azure OpenAI Service?

Part 1: Get Entry to Azure OpenAI

  1. Switching from OpenAI to Azure OpenAI is straightforward and easy. Listed below are the steps you might want to observe:
    Create an Azure account: If you happen to don’t have an Azure account but, you possibly can create one free of charge [here](https://azure.microsoft.com/en-us/free/). You’ll be able to be a part of the Microsoft for Startups program (Founder’s Hub) and get free credit score to make use of for any Azure service.
  2. Request entry to Azure OpenAI: After getting an Azure account, you possibly can request entry to Azure OpenAI [here](https://azure.microsoft.com/en-us/companies/openai/). You will have to offer some details about your self and your use case for GPT-3. Additionally, you will must comply with the phrases and situations of the service.
  3. Watch for approval: After you submit your request, you’ll obtain an e mail affirmation. You’ll then have to attend for Microsoft to evaluate your request and grant you entry to Azure OpenAI. This may occasionally take a number of days or perhaps weeks, relying on the demand and availability of the service.
  4. Create an Azure OpenAI useful resource: When you obtain an e mail notification that your request has been authorized, you possibly can create an Azure OpenAI useful resource [here](https://portal.azure.com/#create/Microsoft.OpenAIService). You will have to decide on a subscription, a useful resource group, a area, a pricing tier, and a useful resource title. Additionally, you will must allow the GPT-3 endpoint that you just need to use (beta or manufacturing).

Get your API key: After you create your Azure OpenAI useful resource, you will get your API key right here.  You will have this key to authenticate your requests to the GPT-3 endpoint, directions right here.

Part 2: Deploy GPT Mannequin on Azure OpenAI Studio

  1. Test the conditions for making a useful resource and deploying a mannequin utilizing Azure OpenAI. (Entry granted to Azure OpenAI within the desired Azure subscription)
  2. Create a useful resource utilizing the Azure portal or different strategies
  3. Deploy a mannequin utilizing Azure OpenAI Studio and choose a mannequin from the out there choices
  4. Alter the superior choices on your deployment resembling content material filter and tokens per minute charge restrict
  5. Test the standing of your deployment and await it to succeed
  6. Create a system immediate
  7. Add your information utilizing Azure OpenAI Studio:
  • Navigate to Azure OpenAI Studio and sign-in with credentials which have entry to your Azure OpenAI useful resource.
  • Choose the Chat playground tile.
  • On the Assistant setup tile, choose Add your information (preview) > + Add an information supply.
  • Within the panel that seems, choose Add information beneath Choose information supply. Choose Add information. Azure OpenAI wants each a storage useful resource and a search useful resource to entry and index your information.
  • For paperwork and datasets with lengthy textual content, it is suggested to make use of the out there information preparation script.
  • For Azure OpenAI to entry your storage account, you’ll need to activate Cross-origin useful resource sharing (CORS). If CORS isn’t already turned on for the Azure Blob storage useful resource, choose Activate CORS.
  • Choose your Azure Cognitive Search useful resource, and choose the acknowledgment that connecting it should incur utilization in your account. Then choose Subsequent.
  • On the Add information pane, choose Browse for a file and choose the information you need to add. Then choose Add information. Then choose Subsequent.
  • Assessment the small print you entered, and choose Save and Shut.
  • The mannequin will use info out of your information to assemble the response.

Part 3: Migrated and Refined Current OpenAI Endpoint to Azure OpenAI

OpenAI makes use of the mannequin key phrase argument to specify what mannequin to make use of. Azure OpenAI has the idea of deployments and makes use of the deployment_id key phrase argument to explain which mannequin deployment to make use of.

Right here is an instance code snippet:

Azure Openai
import openai
openai.api_key = “sk-…”
openai.group = “…”

Azure OpenAI.
import openai
openai.api_type = “azure”
openai.api_key = “…”
openai.api_base = “https://example-endpoint.openai.azure.com”
openai.api_version = “2023-05-15” # topic to alter

You should use Azure Energetic Listing authentication for Azure OpenAI.
import openai
from azure.identification import DefaultAzureCredential
credential = DefaultAzureCredential()
token = credential.get_token(“https://cognitiveservices.azure.com/.default”)
openai.api_type = “azuread”
openai.api_key = token.token
openai.api_base = “https://example-endpoint.openai.azure.com”
openai.api_version = “2023-05-15” # topic to alter

You’ll be able to study extra right here. Lastly, you might want to take a look at your code and ensure every little thing works as anticipated. You should use the identical strategies and parameters as earlier than, and it’s best to get the identical outcomes from the Azure OpenAI service as from the OpenAI service. Nonetheless, you may discover some enhancements in efficiency, reliability, safety, and scalability, in addition to entry to extra options and companies from Azure.

That’s it! You may have efficiently migrated from OpenAI to Azure OpenAI, and now you can get pleasure from the perfect of each worlds.

In abstract, migrating from OpenAI to Azure OpenAI gives an array of compelling advantages, empowering your AI purposes with higher efficiency, scalability, safety, reliability, and assist. By leveraging the highly effective GPT-4 mannequin and the in depth suite of AI instruments and companies offered by Azure, you possibly can unlock a brand new realm of prospects on your startup.


Microsoft for Startups Founders Hub members obtain Azure cloud credit that can be utilized towards Azure OpenAI Service or OpenAI to assist construct their product. Enroll now.

Tags: , , , ,

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles