Lesson 6 of 26 · see all lessons
Start here: the exam, Python basics and responsible AI (skill area 1, 40-45%)
AI models: how they work, choosing and deploying (skill area 1)
AI workloads: text, speech, vision and extraction (skill area 1)
Generative AI apps and agents in Foundry (skill area 2, 55-60%)
Text, speech, vision and extraction apps in Foundry (skill area 2)
- 17. Building a text analysis app
- 18. Building speech apps: spoken prompts and Azure Speech
- 19. Building vision apps: images in prompts and generated images
- 20. Extracting information with Content Understanding: documents and forms
- 21. Content Understanding for images, audio and video, and a small extraction app
Final review and four mock exams
18 min
Deploying a model: deployment options and configuration parameters
Learn how models are deployed in Foundry and what parameters like temperature and max tokens change.
By the end of this lesson you can
- Explain what a deployment is and why code calls it by deployment name
- Choose a deployment type from data residency, traffic pattern and latency needs
- Explain tokens-per-minute quotas and what a 429 error means
- Set temperature, top_p, max tokens, stop sequences and penalties for a requirement
From earlier lessons · 1 of 2
Fernhill needs a model to plan multi-city tours under many constraints. Speed matters less than getting it right. Which model type fits?
Pick one answer.
From earlier lessons · 2 of 2
Where in Foundry can you rank models on quality, safety, cost and throughput?
Pick one answer.
Fernhill has two plans for its chosen model. Every night, summarize the day's 3,000 reviews. All day, answer customers in chat, and the answers must sound the same every time. Fernhill's European customers also want their data kept in the EU. Same model, very different needs. The difference lives in two places: the deployment and its settings.
What a deployment is
Exam depth: know it cold.
A deployment makes a model available for requests at an endpoint. Picking a model in the catalog isn't enough; you deploy it first.
When you deploy, you give the deployment a name. Your code passes that name as model=. You can deploy the same model twice under different names with different settings, such as one for chat and one for batch jobs.
Foundry also offers instant access (preview): you call some supported models by name to try them, with no deployment. For real workloads, you deploy.
Deployment types
Exam depth: know it cold.
A deployment type decides three things: where your prompts are processed, how you pay, and how steady performance is.
How you pay has three main options:
- Standard: pay per token. Good for variable, bursty traffic. Best-effort performance.
- Provisioned: reserve capacity in provisioned throughput units (PTUs). Predictable throughput and lower, steadier latency for consistent high volume.
- Batch: send a large file of requests and get results within a 24-hour target, at 50% less than Global Standard. No real-time answers.
Where data is processed also has three options:
- Global: any Azure region. Newest models first, highest default quota.
- Data Zone: only inside a Microsoft-defined zone: US, EU or Asia Pacific.
- Geography (Standard, Regional Provisioned): only inside the Azure geography you choose.
Data stored at rest stays in your geography for every type.
Decision rule: start with Global Standard. Change only for a specific reason.
| If the scenario says... | Choose |
|---|---|
| No special needs, lowest price, newest models. | Global Standard. |
| Keep processing in the EU, US or Asia Pacific. | Data Zone Standard (or Data Zone Provisioned). |
| Keep processing in one Azure geography. | Standard or Regional Provisioned. |
| Consistent high volume, steady low latency. | A provisioned type. |
| Large jobs that aren't time-sensitive, lowest cost. | Global Batch or Data Zone Batch. |
| Test a fine-tuned model briefly. | Developer. |
Fernhill's chat app has bursty traffic. Its legal team says customer prompts must be processed only within the EU. Which deployment type fits best?
Pick one answer.
Every night, Fernhill summarizes 3,000 reviews. Results are needed by the next afternoon, and cost must be as low as possible. Which deployment type fits?
Pick one answer.
Serverless API vs managed compute
Exam depth: recognize it.
The deployment types above belong to one deployment option. There are two main ones:
| Serverless API | Managed compute | |
|---|---|---|
| Which models. | Foundry Models sold by Azure and select partner models. | Open-source, partner and custom models. |
| Where it runs. | Microsoft-hosted endpoints. | Dedicated GPUs that Foundry manages for you. |
| Billing. | Per token, or reserved PTUs. | Per hour, per GPU type. |
| Content filtering. | Built in. | Not available. |
Microsoft calls Serverless API the preferred option. Use it whenever the model supports it.
Quotas and rate limits
Exam depth: recognize it.
Your subscription gets a quota for each model, region and deployment type, measured in tokens per minute (TPM). When you deploy, you assign part of that quota to the deployment. That sets its TPM limit and a matching requests per minute (RPM) limit.
Go over either limit and the deployment returns HTTP 429 (Too Many Requests) until capacity frees up. The fix is to retry after a short wait, assign more TPM to the deployment, or request more quota.
Configuration parameters
Exam depth: know it cold.
You set these in the playground or in code, per request:
| Parameter | What it does | Turn it... |
|---|---|---|
| System message (instructions) | Sets the model's role, tone and rules for every reply. | Use it to define behavior. Lesson 12 covers prompts. |
| Temperature | Controls randomness. Range 0-2. | Down for consistent, focused answers. Up for varied, creative ones. |
| Top_p | Also controls randomness, by limiting choices to the most likely tokens. | Down for safer word choices. Change temperature or top_p, not both. |
| Max tokens (max output tokens) | Caps how many tokens the reply can use. | Down for shorter, cheaper replies. |
| Stop sequences | Text that makes the model stop. Up to four. The stop text isn't included. | Use to end output at a set point. |
| Frequency penalty | Lowers the chance of repeating the same tokens, the more they've appeared. | Up to cut repeated phrases. |
| Presence penalty | Lowers the chance of reusing any token already used. | Up to encourage new topics. |
Fernhill's support bot gives noticeably different answers to the same policy question. The answers must be more consistent. Which parameter should you change?
Pick one answer.
Exam depth: recognize it.
Reasoning models are different. Most don't accept temperature, top_p, presence_penalty or frequency_penalty. To cap their output, you use max_output_tokens in the Responses API, or max_completion_tokens in the older Chat Completions API. That cap covers the hidden reasoning tokens too.
Instead of temperature, many reasoning models offer reasoning effort: how long the model thinks before it answers.
What does line 4 do?
response = openai.responses.create(
model="fernhill-chat",
input="Write a two-line welcome for Lisbon.",
max_output_tokens=60,
)
response = openai.responses.create(
model="fernhill-chat",
input="Write a two-line welcome for Lisbon.",
max_output_tokens=60,
)
Pick one answer.
Exam-style practice
For this statement, select Yes if it is true. Otherwise, select No. "When the model reaches a stop sequence, the reply ends and the stop sequence text isn't included."
Pick one answer.
An airline's booking assistant handles high, steady traffic all day. It needs predictable throughput and low, consistent latency. Which kind of deployment fits?
Pick one answer.
Fernhill's brochure writer keeps repeating the phrase "stunning views" in every paragraph. Which parameter change helps most?
Pick one answer.
Worth keeping
- A deployment puts a model behind an endpoint; code calls it by deployment name.
- Start with Global Standard. Data Zone or geography for residency, provisioned for steady volume, batch for cheap async jobs.
- Quota is TPM per deployment; going over returns HTTP 429.
- Temperature and top_p control variety, not accuracy. Max tokens caps length; stop sequences end output.
- Penalties reduce repetition. Most reasoning models don't accept temperature, top_p or the penalties.
Fernhill's model is deployed and tuned. But is a chat model even the right tool for reading invoices, transcribing calls or spotting landmarks in photos? Lesson 7 maps every AI workload on the exam to the scenario it solves.
Leaderboard
Loading…
50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.
Embed this practice on your site
Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.
Report a copyright problem with this lesson
Sources for this lesson (12)
Each fact in the lesson is marked with the number of the page it comes from.
- [2]Microsoft Learn: Study guide for Exam AI-901: Microsoft Azure AI Fundamentals
- [17]Microsoft Learn: Quickstart: Set up Microsoft Foundry resources
- [19]Microsoft Learn: Azure AI Projects client library for Python
- [41]Microsoft Learn: Azure OpenAI reasoning models
- [42]Microsoft Learn: Model leaderboards in Microsoft Foundry portal (preview)
- [43]Microsoft Learn: Deployment overview for Microsoft Foundry Models
- [44]Microsoft Learn: Deployment types for Microsoft Foundry Models
- [45]Microsoft Learn: Manage Azure OpenAI in Microsoft Foundry Models quota
- [46]Microsoft Learn: Azure OpenAI 429: token and request rate limits explained
- [47]Microsoft Learn: Quickstart: Get started using chat completions with Azure OpenAI
- [48]Microsoft Learn: Azure OpenAI in Microsoft Foundry Models REST API reference
- [49]Microsoft Learn: Microsoft Foundry Playgrounds