Open to anybody with an concept
Microsoft for Startups Founders Hub brings individuals, information and advantages collectively to assist founders at each stage clear up startup challenges. Join in minutes with no funding required.
As a startup in Founders Hub, you will get began with $2,500 of OpenAI credits to start experimenting with highly effective AI fashions on day one. As you put together to roll out your answer into manufacturing, your accessible Azure credit (as much as $150K) can then be utilized in direction of Azure OpenAI Service.
We’re usually requested the way 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 by means of easy API calls. However now these capabilities are enhanced by Microsoft Azure’s enterprise-grade safety, compliance, help, 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’ll be able to give attention to customization slightly than implementation
- Auto-scaling infrastructure permits fast prototyping and seamless transition to manufacturing
- Larger efficiency handles extra requests per second and delivers sooner response occasions
- Larger scalability adjusts up or all the way 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
- Larger reliability ensures 99.9% uptime to reduce disruption
- Strong help 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.
Methods to transition to Azure OpenAI Service?
—
Part 1: Get Entry to Azure OpenAI
- Switching from OpenAI to Azure OpenAI is straightforward and simple. Listed here are the steps it’s good to comply with:
Create an Azure account: In case you don’t have an Azure account but, you’ll be able to create one totally free [here](https://azure.microsoft.com/en-us/free/). You may be part of the Microsoft for Startups program (Founder’s Hub) and get free credit score to make use of for any Azure service. - Request entry to Azure OpenAI: After getting an Azure account, you’ll be able to request entry to Azure OpenAI [here](https://azure.microsoft.com/en-us/providers/openai/). You’ll need to offer some details about your self and your use case for GPT-3. Additionally, you will have to comply with the phrases and situations of the service.
- Anticipate approval: After you submit your request, you’ll obtain an electronic mail affirmation. You’ll then have to attend for Microsoft to assessment your request and grant you entry to Azure OpenAI. This will likely take just a few days or perhaps weeks, relying on the demand and availability of the service.
- Create an Azure OpenAI useful resource: When you obtain an electronic mail notification that your request has been accredited, you’ll be able to create an Azure OpenAI useful resource [here](https://portal.azure.com/#create/Microsoft.OpenAIService). You’ll need to decide on a subscription, a useful resource group, a area, a pricing tier, and a useful resource title. Additionally, you will have to allow the GPT-3 endpoint that you simply need to use (beta or manufacturing).
Get your API key: After you create your Azure OpenAI useful resource, you will get your API key here. You’ll need this key to authenticate your requests to the GPT-3 endpoint, directions here.
Part 2: Deploy GPT Mannequin on Azure OpenAI Studio
- Examine the conditions for making a useful resource and deploying a mannequin utilizing Azure OpenAI. (Entry granted to Azure OpenAI within the desired Azure subscription)
- Create a useful resource utilizing the Azure portal or different strategies
- Deploy a mannequin utilizing Azure OpenAI Studio and choose a mannequin from the accessible choices
- Regulate the superior choices in your deployment comparable to content material filter and tokens per minute price restrict
- Examine the standing of your deployment and look forward to it to succeed
- Create a system immediate
- 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 a knowledge supply.
- Within the panel that seems, choose Add recordsdata below Choose information supply. Choose Add recordsdata. 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 accessible 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 is going to incur utilization in your account. Then choose Subsequent.
- On the Add recordsdata pane, choose Browse for a file and choose the recordsdata you need to add. Then choose Add recordsdata. Then choose Subsequent.
- Evaluation the small print you entered, and choose Save and Shut.
- The mannequin will use data 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 utilize Azure Lively 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 may be taught extra here. Lastly, it’s good to take a look at your code and ensure all the things works as anticipated. You should utilize the identical strategies and parameters as earlier than, and you need to get the identical outcomes from the Azure OpenAI service as from the OpenAI service. Nevertheless, you may discover some enhancements in efficiency, reliability, safety, and scalability, in addition to entry to extra options and providers from Azure.
That’s it! You will have efficiently migrated from OpenAI to Azure OpenAI, and now you can get pleasure from the very best of each worlds.
In abstract, migrating from OpenAI to Azure OpenAI affords an array of compelling advantages, empowering your AI purposes with higher efficiency, scalability, safety, reliability, and help. By leveraging the highly effective GPT-4 mannequin and the intensive suite of AI instruments and providers offered by Azure, you’ll be able to unlock a brand new realm of prospects in your startup.