Courseiva
Machine Learning Implementation and OperationshardMultiple ChoiceObjective-mapped

MLS-C01 Practice Question: Machine Learning Implementation and Operations

A data scientist is training a deep learning model on Amazon SageMaker using a custom TensorFlow container. The training job fails with an OutOfMemory error. The instance type is ml.p3.2xlarge with 16 GB GPU memory and 61 GB system memory. The model uses mixed precision training. Which step should the data scientist take to resolve the issue without changing the instance type?

⚠ Common exam trap

Test-takers frequently confuse gradient accumulation (Option B) as a memory-saving technique, but it actually increases memory usage per step because it stores gradients across multiple micro-batches, whereas reducing batch size directly lowers peak memory consumption.

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

Reduce the batch size

Reducing the batch size directly decreases the memory footprint per training step, which is the most straightforward way to resolve an OutOfMemory error without changing the instance type. Since the model already uses mixed precision training (which reduces memory usage via FP16), the remaining memory pressure is likely from the batch size being too large for the 16 GB GPU memory on the ml.p3.2xlarge instance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Reduce the batch size

    Why this is correct

    Smaller batch size reduces memory usage.

  • Use gradient accumulation to simulate a larger batch size

    Why it's wrong here

    Gradient accumulation does not reduce memory per step.

  • Use model parallelism across multiple GPUs

    Why it's wrong here

    Model parallelism splits a model’s layers across multiple GPUs, but the ml.p3.2xlarge has only a single GPU; without multiple GPUs, model parallelism cannot distribute memory. This option is tempting because model parallelism is designed to reduce per-GPU memory footprint for large models, and it would be correct if the instance had multiple GPUs (e.g., ml.p3.16xlarge with 8 GPUs) where layer sharding could alleviate OOM.

  • Enable automatic mixed precision (AMP)

    Why it's wrong here

    AMP is already in use.

  • Increase the instance type to ml.p3.8xlarge

    Why it's wrong here

    This increases cost and is not the only solution.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This MLS-C01 question is part of Courseiva's 1,672-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-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 MLS-C01 exam.