AIF-C01 Fundamentals of AI and ML Practice Question
A company is training a large language model using Amazon SageMaker. The training job fails with the error 'OutOfMemory'. They are using a single ml.p3.2xlarge instance. The dataset is 50GB and the model is 2GB. The training script uses standard data loading. Which action should they take to resolve the issue?
⚠ Common exam trap
The AIF-C01 exam often tests the misconception that reducing batch size or using Pipe mode can solve out-of-memory errors caused by insufficient GPU memory, when the real fix is to use a larger instance with more GPU memory.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Increase the instance type to ml.p3.16xlarge
The error 'OutOfMemory' indicates that the ml.p3.2xlarge instance (with 16 GB GPU memory) cannot hold both the 2 GB model and the 50 GB dataset during training. Increasing the instance type to ml.p3.16xlarge provides 64 GB GPU memory, which is sufficient to accommodate the model and dataset without memory pressure. This directly resolves the resource constraint.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Increase the instance type to ml.p3.16xlarge
Why this is correct
The error indicates the instance memory is insufficient. Upgrading to a larger instance directly addresses the out-of-memory issue.
- ✗
Train the model using Spot instances
Why it's wrong here
Spot instances do not increase memory; they only reduce cost.
- ✗
Reduce the batch size
Why it's wrong here
Reducing batch size can lower memory usage per step, but if the dataset loading loads entire data into memory, the error persists. The dataset size (50GB) is likely the cause.
- ✗
Use SageMaker's Pipe mode for data loading
Why it's wrong here
Pipe mode streams data from S3, reducing memory footprint for dataset, but the model (2GB) plus pipeline may still cause OOM. The direct fix is larger instance.
Visual reference
Go deeper
Related to this question
About these practice questions
This AIF-C01 question is part of Courseiva's 619-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AIF-C01 exam.