MLS-C01 Question 327
Select 2You are designing a machine learning solution for a company that needs to train and deploy a deep learning model. The model requires a significant amount of GPU compute during training but minimal compute for inference. Cost optimization is a key priority for the company. Which combination of AWS services and instance types should you choose to minimize costs while meeting the requirements?
- A
Use Amazon SageMaker with a p3 instance for training and an ml.t2.medium instance for hosting the endpoint.
- B
Use Amazon EC2 with a g4dn instance for training and a t4g.small instance for inference.
- C
Use Amazon SageMaker with a p3 instance for training and an ml.g4dn.xlarge instance for hosting the endpoint.
- D
Use Amazon EC2 with a p4 instance for training and a c6g.medium instance for inference.
Show answer and explanation
Correct answers: A, C
Explanation
For deep learning workloads, training typically requires high-performance GPU instances like p3 or p4. However, p4 instances are usually more expensive and may not be necessary for most training tasks. For inference, using cost-effective instances like ml.t2.medium or ml.g4dn.xlarge in SageMaker ensures cost savings while meeting performance requirements. SageMaker also provides managed services for both training and deployment, further reducing operational overhead and costs.
- A. Correct.
This option is correct because Amazon SageMaker supports both training and hosting, and using a p3 instance for training provides GPU acceleration, while the ml.t2.medium instance is cost-effective for lightweight inference tasks.
- B. Incorrect.
This option is incorrect because t4g.small instances do not provide GPU acceleration, which may be required for even minimal inference workloads depending on the deep learning model.
- C. Correct.
This option is correct because using Amazon SageMaker with a p3 instance for training ensures optimal GPU usage for training, and the ml.g4dn.xlarge instance provides GPU support for inference at an optimized cost.
- D. Incorrect.
This option is incorrect because while a p4 instance offers high GPU performance, it is significantly more expensive than p3 instances, and a c6g.medium instance is not optimized for GPU-based inference tasks.