Courseiva
hardMultiple ChoiceObjective-mapped

MLA-C01 Practice Question: A machine learning engineer is deploying a…

A machine learning engineer is deploying a pre-trained NLP model on Amazon SageMaker for real-time inference. The model expects input sequences of variable length, and performance is critical. The engineer wants to minimize latency while handling the variable-length inputs efficiently. Which approach should the engineer choose?

⚠ Common exam trap

AWS often tests the misconception that padding to the maximum length is always necessary or efficient, but the trap here is that dynamic batching with length-based grouping is a more sophisticated technique that balances batching efficiency with minimal padding overhead.

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 dynamic batching with a custom inference script that groups requests by sequence length.

Dynamic batching with a custom inference script that groups requests by sequence length minimizes padding overhead and maximizes hardware utilization. By batching similar-length sequences together, the model avoids excessive padding to the maximum length in the batch, which reduces wasted computation and latency. This approach is particularly effective for variable-length NLP inputs on SageMaker, where the inference container can be customized to implement the grouping logic.

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 model size by pruning and quantization.

    Why it's wrong here

    This may affect accuracy.

  • Pad all input sequences to the maximum length in the batch.

    Why it's wrong here

    Padding to max length is inefficient.

  • Use dynamic batching with a custom inference script that groups requests by sequence length.

    Why this is correct

    Dynamic batching reduces padding and latency.

  • Process each request individually to avoid padding overhead.

    Why it's wrong here

    Single requests miss batching efficiency.

About these practice questions

One of 835 original MLA-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 MLA-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 MLA-C01 exam.