AI Models & Deployment
How language models generate text · model types and benchmarks · deployment types · temperature and max output tokens
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
How a generative AI model works
Generative AI is a branch of AI that enables software applications to generate new content, often natural language dialogs but also images, video, code and other formats. It is based on a language model trained with huge volumes of data.
- Tokenize. Training text is broken into tokens (words, sub-words, punctuation and other common character sequences), and each token gets a unique integer identifier.
- Vectors and position. Each token gets a vector (an array of numeric values), fed into the transformer with a positional encoding that shows where the token appears in the sequence.
- Encoder. The encoder block creates embeddings by applying attention, which determines how each token is influenced by the tokens around it.
- Decoder. The decoder block uses the embeddings to determine the next most probable token in a sequence started by a prompt. The predicted token is added to the sequence and the process repeats until the decoder predicts that the sequence has ended.
- Tokens used in similar contexts get vectors with similar directions; cosine similarity measures how close tokens are semantically.
- During training the decoder uses masked attention, in which the tokens after the current token are ignored.
- LLMs are trained to generate completions based on prompts.
Prompts, grounding and agents
| Term | Meaning |
|---|---|
| System prompt | Sets the behavior and tone of the model and any constraints; usually set by the application that uses the model |
| User prompt | Elicits a response to a specific question or instruction; may be typed by a person or generated by the application on the user's behalf |
| Conversation history | Apps track the history and include summarized versions of it in later prompts so the model has ongoing context |
| RAG (retrieval augmented generation) | Retrieved information, like documents or emails, augments the prompt, so the response is grounded in the information provided |
| Agent | Software built on generative AI with three key elements: a large language model, instructions (a system prompt that defines role and behavior) and tools (knowledge tools and action tools) |
Choose a model by capability
The Foundry model catalog is a central hub for discovering and comparing models. Each model card shows the provider, capabilities, benchmark metrics, responsible AI considerations and deployment options. You can filter by collection, capabilities, source, inference tasks, fine-tuning methods and industry.
| Need | Model type (examples from Learn) |
|---|---|
| Deep reasoning, complex content, long context | Large language model (LLM), such as GPT-5, Mistral Large, Llama 3 70B |
| Efficiency and low cost; lower-end hardware or edge devices | Small language model (SLM), such as Phi-4, Llama 3 8B |
| Conversation and text generation | Chat completion model (most models in the catalog) |
| Complex math, coding, science, strategy, logistics | Reasoning model, such as Claude Opus 4.6 |
| Semantic search, recommendations, RAG | Embedding model, such as text-embedding-3-small |
| Images from text descriptions | Image generation model, such as GPT-image-1 |
| Video from text descriptions | Video generation model, such as Sora 2 |
| Analyze images in a prompt | Image analysis (multimodal) model, such as GPT-4.1 |
| Text to spoken audio | Text to speech model, such as GPT-4o-tts |
| Audio to text transcript | Speech to text model, such as GPT-4o-transcribe |
- Models sold directly by Azure are hosted by Microsoft under Microsoft Product Terms, with enterprise-grade SLAs, preconfigured security and compliance alignment. Models from partners and the community include open-source and vendor-hosted models; they often need an Azure Marketplace subscription.
- When the use case is well defined, you may choose a Foundry tool instead of a catalog model. Foundry tools are powered by prebuilt models that provide predictable performance, built-in compliance and fast time-to-value without custom modeling.
Compare models with benchmarks
| Benchmark group | What it shows |
|---|---|
| Quality | The Quality index averages accuracy scores across benchmark datasets for reasoning, knowledge, question answering, math and coding. Scores run from zero to one; higher is better |
| Safety | Harmful behavior is measured with HarmBench as an Attack Success Rate; lower values indicate safer, more robust models |
| Cost | Cost per input tokens and per output tokens (per 1 million tokens); estimated cost uses a typical 3:1 input to output ratio; lower is more cost-effective |
| Performance | Latency (mean, P50, P90, P95, P99), time to first token and throughput such as generated tokens per second |
- The model leaderboard ranks models by quality, safety, estimated cost and throughput. Scenario leaderboards target use cases such as reasoning, coding, math, question answering or groundedness. Trade-off charts show two metrics at once; side-by-side comparison covers two or three models.
- Classic NLP quality metrics include accuracy, precision, recall and F1. AI-assisted metrics include groundedness, relevance, coherence and fluency, and GPT similarity.
Deployment types
Deploying a model makes it available for production through a stable, scalable and secure endpoint. The deployment type determines where your data is processed, how you pay, and the performance characteristics. Start with Global Standard for most workloads and move only for a specific reason such as data residency, reserved throughput or asynchronous batch processing.
| Deployment type | Data processing | Billing | Best for |
|---|---|---|---|
| Global Standard | Any Azure region | Pay-per-token | General workloads, highest quota |
| Global Provisioned | Any Azure region | Reserved PTU | Predictable high throughput |
| Global Batch | Any Azure region | 50% discount, 24-hour | Large asynchronous jobs |
| Data Zone Standard | Within a data zone (US, EU or APAC) | Pay-per-token | Data zone compliance |
| Data Zone Provisioned | Within a data zone | Reserved PTU | Data zone plus predictable throughput |
| Data Zone Batch | Within a data zone | 50% discount | Large asynchronous jobs within a data zone |
| Standard (regional) | Within an Azure geography | Pay-per-token | Geography compliance, low volume |
| Regional Provisioned | Within an Azure geography | Reserved PTU | Geography compliance plus throughput |
| Developer | Any Azure region | Pay-per-token | Fine-tuned model evaluation only |
- Provisioned types provide guaranteed throughput and lower latency variance. Standard types offer best-effort service. Developer deployments don't include an SLA.
- These deployment types apply to the Serverless API option. Open-source and custom models that use managed compute don't use them; for managed compute you also pick a virtual machine SKU and an instance count.
- Not all models support all deployment types; each model in the catalog indicates which it supports.
Configuration parameters and the client call
| Setting | Effect |
|---|---|
| Deployment type, model version, tokens per minute (TPM) | Deployment parameters you can customize. TPM sets the rate-limit boundary; larger prompts and higher max output token settings consume more TPM |
| Deployment name | Used in the model parameter of API requests to route to your deployment |
| Temperature | Controls creativity versus determinism |
| Max output tokens | Caps response length; affects token consumption and throttling |
| Top-p | Nucleus sampling |
| System instructions | Sets the behavior and role of the model |
If you see throttling, lower max tokens or reduce concurrent requests in code. To call a deployment you need the endpoint URL, an authentication key or a Microsoft Entra ID token (recommended for production), and the deployment name. The Foundry SDK exposes a Project client and an OpenAI-compatible client that calls models through the Responses API. The Learn example:
response = client.responses.create(model=os.environ["DEPLOYMENT_NAME"], input=[...], max_output_tokens=300, temperature=0.7)print(response.output_text)
Exam Tips
Tick each tip once you can answer it without looking.
“First step in training a language model on text” → Break the text into tokens and give each a unique integer ID. Trap: Embeddings come later; they are produced by the transformer from token vectors.
“Which transformer block creates embeddings by applying attention?” → Encoder. Trap: The decoder predicts the next token from the embeddings; it doesn't create them.
“Which block predicts the next most probable token from a prompt?” → Decoder. Trap: Encoder builds the embeddings; positional encoding only marks token position.
“Measure how close two tokens are in meaning” → Cosine similarity of their embeddings. Trap: Token IDs are just unique integers and carry no meaning by themselves.
“Sets the model's behavior, tone and constraints, usually set by the app” → System prompt. Trap: A user prompt is the specific question or instruction.
“Ground answers in your own documents” → RAG: retrieve information and add it to the prompt. Trap: Changing temperature changes creativity, not grounding.
“Semantic search or RAG needs text turned into numbers” → Embedding model. Trap: A chat completion model generates text; it is not built for semantic vector representations.
“Text in, picture out” → Image generation model (for example GPT-image-1). Trap: An image analysis model takes images in and returns natural language.
“Efficient and cheap, runs on edge devices, common NLP tasks” → Small language model (SLM). Trap: LLMs suit deep reasoning but need more compute.
“Find the best model for a coding or groundedness use case” → Scenario leaderboard. Trap: The overall Quality index averages across many datasets, not one scenario.
“Safety benchmark: Attack Success Rate” → Lower is safer. Trap: Higher ASR means the model is easier to push into unsafe output.
“Default deployment type for most workloads” → Global Standard. Trap: Provisioned types reserve capacity (PTUs); Learn says to start with Global Standard for most workloads.
“Data must be processed only inside the EU or US data zone” → Data Zone Standard (or Data Zone Provisioned). Trap: Global types may process in any Azure region.
“Reserved, predictable throughput billed in PTUs” → Provisioned deployment (Global, Data Zone or Regional). Trap: Standard types are pay-per-token, best-effort.
“Large asynchronous jobs, 50% discount, 24 hours” → Global Batch. Trap: Batch requests have no real-time SLA and target completion within 24 hours; it trades responsiveness for cost.
“Rate-limit errors from throttling” → Lower max output tokens or reduce concurrent requests. Trap: Raising max output tokens makes it worse; it consumes more TPM.
“The model argument in a client call” → The deployment name. Trap: It is not the key or the endpoint URL; those authenticate and locate the service.
“Creativity versus determinism setting” → Temperature. Trap: Max output tokens caps response length; it doesn't change creativity.
Sources
- Introduction to generative AI and agents: Large language models
- Introduction to generative AI and agents: Prompts
- Introduction to AI concepts: Generative AI and agents
- Get started with generative AI and agents: Generative AI models
- Get started with generative AI and agents: Using a generative AI model
- Select, deploy, and evaluate Foundry models: Explore the model catalog
- Select, deploy, and evaluate Foundry models: Select models using benchmarks
- Select, deploy, and evaluate Foundry models: Deploy models to endpoints
- Understanding deployment types in Microsoft Foundry Models
Checked against Microsoft Learn on November 13, 2026.