ML Model and Foundation Model (FM) Development
Explore the development and deployment of machine learning and foundation models on AWS. Understand selecting appropriate SageMaker algorithms, managing large language model training, deploying models for production, hyperparameter tuning strategies, and leveraging Amazon Bedrock for inference. This lesson equips you to architect efficient, cost-effective ML solutions and implement best practices for operationalizing AI workloads on AWS.
Question 19
A retail company wants to build a product recommendation system. They have millions of user-item interaction records stored in Amazon S3, represented as a sparse interaction matrix. The ML engineer needs to choose the most appropriate Amazon SageMaker AI built-in algorithm to power the recommendation engine.
Which SageMaker built-in algorithm should the ML engineer select?
A. Amazon SageMaker AI BlazingText, because it can process product description text to generate recommendations
B. Amazon SageMaker AI Factorization Machines, because it is purpose-built for recommendation tasks involving sparse interaction data
C. Amazon SageMaker AI k-nearest neighbors (k-NN), because it can find similar users based on interaction history
D. A custom deep learning neural collaborative filtering model trained on SageMaker AI using a custom training script
Question 20
An ML engineer is training a 130-billion-parameter large language model and needs to minimize training costs on AWS. They are evaluating different instance types in Amazon SageMaker AI for this training workload. The model requires distributed training across multiple accelerators.
Which approach should the ML engineer choose to minimize training costs while maintaining comparable training performance?
A. Use ml.trn1.32xlarge instances powered by AWS Trainium accelerators for the distributed training job
B. Use ml.m5.xlarge instances with SageMaker distributed training to reduce per-instance costs
C. Use ml.p5.48xlarge GPU instances with SageMaker managed spot training to reduce costs
D. Reduce the model size to fit on a single ml.p4d.24xlarge GPU instance to avoid distributed training overhead
Question 21
A financial services company has built a fraud detection model using XGBoost in a local Jupyter environment outside of Amazon SageMaker AI. The model has been validated and performs well. The ML engineer now needs to deploy this externally trained model to SageMaker AI for production inference and register it for model versioning.
What is the correct approach to bring this externally trained model into SageMaker AI?
A. Retrain the model from scratch using the SageMaker built-in XGBoost algorithm to ensure compatibility with SageMaker AI infrastructure
B. Package the model artifact as a model.tar.gz file, upload it to Amazon S3, create a SageMaker model object with a compatible XGBoost inference container, and register it in SageMaker Model Registry
C. Use SageMaker Autopilot to automatically recreate and optimize the fraud detection model from the original training data
D. Directly upload the serialized pickle file to a SageMaker real-time endpoint without any containerization or model packaging
Question 22
An ML engineer is performing hyperparameter tuning for an image classification model on Amazon SageMaker AI. The engineer has a limited compute budget that allows for a maximum of 20 training jobs. They need to find optimal hyperparameters as efficiently as possible using SageMaker Automatic Model Tuning (AMT).
Which hyperparameter optimization strategy should the ML engineer select?
A. Grid search to exhaustively evaluate all possible hyperparameter combinations ... ...