Courseiva
ModelingmediumMultiple ChoiceObjective-mapped

MLS-C01 Modeling Practice Question

A machine learning engineer is deploying a sentiment analysis model using Amazon SageMaker. The model is a BERT-based transformer that takes up to 512 tokens. The engineer notices that inference latency is high (over 500 ms per request) on a single ml.c5.xlarge instance. The application requires latency under 100 ms. The model has already been optimized using half-precision (FP16). Which action should the engineer take to reduce latency?

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

Use a GPU instance such as ml.g4dn.xlarge

(Use a GPU instance such as ml.g4dn.xlarge) provides the parallel processing power needed to accelerate transformer inference, significantly reducing latency for BERT-based models even after FP16 optimization. Option B (Reduce max sequence length to 128) would lower computational cost and latency but at the risk of truncating input and degrading accuracy, so it is not the primary recommended action. Option C (Increase batch size) improves throughput for multiple requests but does not reduce the latency of a single request. Option D (SageMaker Neo) optimizes the model for the target instance, but with an already optimized model (FP16) and strict latency requirement under 100 ms, switching to a GPU instance is more effective.

Answer analysis

Option-by-option breakdown

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

  • Use a GPU instance such as ml.g4dn.xlarge

    Why this is correct

    GPUs accelerate transformer inference significantly.

  • Reduce the maximum sequence length to 128

    Why it's wrong here

    May truncate important text and reduce accuracy.

  • Increase the batch size for inference requests

    Why it's wrong here

    Larger batch improves throughput but not per-request latency.

  • Use SageMaker Neo to compile the model for the target instance

    Why it's wrong here

    Neo may help but likely insufficient to reach 100 ms on CPU.

About these practice questions

Courseiva writes every MLS-C01 question from scratch — 1,672 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.