MLA-C01 Question 417
Select 1You are training a deep learning model for image classification using a large dataset on Amazon SageMaker. The model requires a high number of GPU computations and minimal inference latency during production. Which instance types should you choose for training and inference to optimize both performance and cost?
- A
Use GPU instances, such as p3 or g5, for training and inference
- B
Use compute optimized instances, such as c5, for training and inference
- C
Use GPU instances, such as p3 or g5, for training and inference optimized instances, such as inf1, for inference
- D
Use memory optimized instances, such as r5, for both training and inference
- E
Use general purpose instances, such as m5, for training and inference
Show answer and explanation
Correct answer: C
Explanation
Deep learning training requires significant GPU resources, so using GPU instances like p3 or g5 ensures high performance. For inference, inference optimized instances (e.g., inf1) are purpose-built to provide low-latency and cost-efficient solutions for production workloads. Combining the right instance types for training and inference ensures performance and cost-effectiveness.
- A. Incorrect.
GPU instances like p3 or g5 are ideal for training deep learning models, but they are not cost-effective for inference workloads. They are designed for high-performance computations but may lead to unnecessary costs during production inference.
- B. Incorrect.
Compute optimized instances (e.g., c5) are suitable for compute-intensive tasks but are not specialized for deep learning training or inference. These instances lack GPU acceleration, which is critical for your use case.
- C. Correct.
This is the optimal solution. GPU instances (e.g., p3 or g5) are well-suited for training deep learning models, while inference optimized instances (e.g., inf1) are specifically designed to reduce latency and cost for inference workloads.
- D. Incorrect.
Memory optimized instances (e.g., r5) are designed for applications requiring high memory but are not optimized for GPU-based workloads like deep learning training and inference.
- E. Incorrect.
General purpose instances (e.g., m5) are versatile but not specialized for deep learning workloads. They lack the performance benefits of GPUs for training and inference optimized hardware for production.