Introduction to model serving
Translate workload behavior into governed runtime, endpoint, routing, hardware, and service requirements.
Before you start
Module prerequisites: SAI-210. Check the exercise-specific tools and environment before running commands.
Module outcomes: Match runtimes and hardware to workloads; Design governed model endpoints and routing; Plan capacity, reliability, and failure behavior. This lesson contributes to that sequence.
Purpose of model serving
A model file does not define availability, latency, access, isolation, capacity, policy, or recovery. Model serving combines a runtime, an API contract, scheduling, hardware, routing, configuration, security, telemetry, and operational ownership into something that can actually be depended on. SAI-220 treats "the model is deployed" as the start of the design work, not its conclusion.
Start from a workload profile
The minimum inputs are:
- The model and context distribution, request and concurrency patterns, and output needs the workload actually produces.
- User groups, data classes, and the deployment pattern selected in SAI-120 — see Deployment boundaries and patterns.
- Latency, availability, and isolation objectives, stated as testable numbers, not adjectives like "fast" or "reliable."
- Failure behavior expectations and cost constraints.
A runtime or hardware decision made before this profile exists is a guess, however confident it sounds.
What makes model serving different from typical application serving
Conventional service architecture already covers APIs, routing, and capacity. Model serving adds:
- Accelerator scheduling and memory constraints that behave differently from typical CPU and memory service sizing.
- Load time and model-swap costs that can dominate latency in ways a stateless web service never experiences.
- A tighter coupling between model version, prompt, and runtime configuration — changing any one can change served behavior.
- Failure modes such as context overflow, queue saturation, or policy unavailability that need application-visible, non-misleading signals rather than a generic error.
The SAI-220 method
- Separate model runtime, API contract, and workload responsibilities explicitly, even where one product combines them.
- Design routing as a policy decision, not just a load-balancing mechanism.
- Measure capacity under representative, declared conditions.
- Plan degradation and recovery before a failure occurs, not during one.
- Treat runtime, quantization, hardware, and routing changes as changes requiring evaluation.
- Preserve local observability without exposing sensitive prompt or response content.
Module outputs
- A serving workload profile.
- A runtime and API-contract decision.
- A routing and hardware-capacity design.
- A reliability and degradation plan.
- Measured serving and release evidence.
Tool commands and hardware compatibility claims belong in versioned adapters, not in this conceptual method.
Module worked example
A model loads successfully but requests fail when several users submit long prompts.
- Apply the control
- Measure peak cache demand, active sequences, queueing and tail latency on the declared hardware.
- Expected result
- The serving decision limits concurrency and context to an observed workload envelope.
- Troubleshooting
- Loading weights is not a capacity test. Separate weight memory, cache, runtime overhead and reserve.
Practice and completion check
Choose one control from this lesson. Identify its actor, target, enforcement point and expected result. Describe an allowed case and a denied or failed case. For a runnable exercise, retain observed output and separate it from expected output. Record unresolved limitations before marking the lesson complete.
Your lesson progress
Completion is self-reported learning progress; it does not certify practical competence.
Status: Not marked
Loading your learning record…