A team self-hosts a large open model on SageMaker AI, and the endpoint fails to load because the model does not fit in one GPU's memory. What should it use?
- Exam domain
- Implementation and Integration26% of the exam
- Difficulty
- Hard
- In this mock
- 19 questions on this domainPractise this domain
Why the exam asks this
Task 2.2: Implement model deployment strategies.
Objective in the exam guide: Skill 2.2.2: Deploy FM solutions by addressing unique challenges of LLMs that differ from traditional ML deployments (for example, by implementing container-based deployment patterns optimized for memory requirements, GPU utilization).
Self-hosting LLMs fails in ways classic ML deployments never did: out-of-memory at load, idle GPUs, slow token throughput. Knowing the AWS tooling for this is a professional-level skill.
Why A is the answer
SageMaker AI large model inference with model parallelism across GPUs
Large model inference containers split a model too big for one GPU across several, which is a deployment need specific to LLMs.
Remember: A model too big for one GPU needs model parallelism: large model inference.
How it works
Large language models can exceed the memory of a single GPU, so they cannot be loaded the way small models are.
SageMaker AI large model inference uses containers that support model parallelism, splitting the model across several GPUs on an instance.
These containers also include optimizations for GPU use and token throughput.
Clues in the question
The words that point to the answer, and what each one tells you.
- Does not fit in one GPU's memory
- Split the model across GPUs.
In detail
- LLM deployment differs from traditional ML: memory, GPU utilization and token throughput dominate.
- Model parallelism places parts of the model on different GPUs.
Side by side with look-alikes
| Option | Solves the memory limit? |
|---|---|
| Large model inference with model parallelism | Yes |
| CPU instance | No, far too slow |
| Batch transform on one GPU | No |
| Lambda memory | Unrelated |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. SageMaker AI large model inference with model parallelism across GPUsRight
A model too big for one GPU needs model parallelism: large model inference.
B. A smaller Lambda function memory settingWrong
Lambda memory is unrelated to a SageMaker endpoint's GPU.
C. A CPU-only instance with more diskWrong
CPUs are far too slow for a large model, and disk is not the constraint.
D. Batch transform with the same single GPUWrongMost tempting
Batch transform still loads the model onto the same GPU, so it still does not fit.
Why it tempts: Batch transform is a familiar SageMaker inference option, so it feels like a different path. But it loads the same model onto the same GPU, which still does not fit.
In practice
- Estimate model memory from its parameter count and precision before choosing an instance.
- Consider a managed API if self-hosting is not required.
Use case
An illustrative scenario, not a real incident.
A team deploys a 70-billion-parameter model across four GPUs with a large model inference container, and the endpoint starts.
See how it works
flowchart LR M["Large model"] --> G1["GPU 1: layers 1 to 20"] M --> G2["GPU 2: layers 21 to 40"] M --> G3["GPU 3: layers 41 to 60"] M --> G4["GPU 4: layers 61 to 80"]
How to read this chart
- "Large model" leads to "GPU 1: layers 1 to 20" and "GPU 2: layers 21 to 40" and "GPU 3: layers 41 to 60" and "GPU 4: layers 61 to 80".