Practice Free MLA-C01 Exam Online Questions
Which of the following is correct regarding the techniques used to improve the performance of a Foundation Model (FM)?
- A . Neither Fine-tuning nor Retrieval-augmented generation (RAG) changes the weights of the FM
- B . Both Fine-tuning and Retrieval-augmented generation (RAG) change the weights of the FM
- C . Fine-tuning does not change the weights of the FM whereas Retrieval-augmented generation (RAG) changes the weights of the FM
- D . Fine-tuning changes the weights of the FM whereas Retrieval-augmented generation (RAG) does
not change the weights of the FM
D
Explanation:
Correct option:
Fine-tuning changes the weights of the FM whereas Retrieval-augmented generation (RAG) does not change the weights of the FM
Retrieval-Augmented Generation (RAG) is the process of optimizing the output of a large language model, so it references an authoritative knowledge base outside of its training data sources before generating a response. Large Language Models (LLMs) are trained on vast volumes of data and use billions of parameters to generate original output for tasks like answering questions, translating languages, and completing sentences. RAG extends the already powerful capabilities of LLMs to specific Another recommended way to first customize a foundation model to a specific use case is through prompt engineering. Providing your foundation model with well-engineered, context-rich prompts can help achieve desired results without any fine-tuning or changing of model weights.
Lastly, fine-tuning is a customization method for FMs that involves further training and does change the weights of your model.
Retrieval Augmented Generation (RAG) allows you to customize a model’s responses when you want the model to consider new knowledge or up-to-date information. When your data changes frequently, like inventory or pricing, it’s not practical to fine-tune and update the model while it’s serving user queries.
via –
https://aws.amazon.com/blogs/machine-learning/best-practices-to-build-generative-ai-applications-on-
aws/
via – https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-fine-tuning.html
Exam Alert:
Note the following regarding the techniques to improve the performance of a Foundation Model (FM): Prompt engineering does NOT change the weights of the FM. Retrieval-Augmented Generation (RAG) does NOT change the weights of the FM. Fine-tuning DOES change the weights of the FM.
Incorrect options:
Neither Fine-tuning nor Retrieval-augmented generation (RAG) changes the weights of the FM Both Fine-tuning and Retrieval-augmented generation (RAG) change the weights of the FM Fine-tuning does not change the weights of the FM whereas Retrieval-augmented generation (RAG) changes the weights of the FM
These three options contradict the explanation provided above, so these options are incorrect.
References:
https://aws.amazon.com/blogs/machine-learning/best-practices-to-build-generative-ai-applications-on-
aws/
https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-fine-tuning.html
You are a machine learning engineer responsible for optimizing the cost and performance of an ML model deployed on Amazon SageMaker. The model serves real-time predictions for an e-commerce platform, and the current instance type is providing reliable performance but at a higher cost than anticipated. Your goal is to determine the most cost-effective instance type that still meets the performance requirements for low-latency predictions.
Which approach is the MOST EFFECTIVE for rightsizing the instance family and size for your SageMaker endpoint?
- A . Use SageMaker Inference Recommender to run load tests across various instance types and configurations, compare the performance and cost of each, and select the instance type that offers the
best balance between cost and performance - B . Manually review the performance metrics from Amazon CloudWatch for the current instance and experiment with different instance types by redeploying the model on each until you find the optimal one
- C . Use AWS Compute Optimizer to analyze the current instance’s CPU and memory usage, and automatically switch to the smallest recommended instance type that matches the utilization metrics
- D . Use SageMaker Inference Recommender to select the lowest-cost instance type, regardless of
performance, and configure autoscaling to handle any additional load during peak times
A
Explanation:
Correct option:
Use SageMaker Inference Recommender to run load tests across various instance types and configurations, compare the performance and cost of each, and select the instance type that offers the best balance between cost and performance
SageMaker Inference Recommender is specifically designed to help you select the best instance type for your model by running load tests across various configurations. It provides detailed insights into how different instance types perform under real-world conditions, allowing you to make an informed decision that balances cost and performance. This approach ensures that you rightsize your instance while meeting both cost and performance requirements.
via – https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender-prospective.html
via – https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender-load-test.html
Incorrect options:
Use AWS Compute Optimizer to analyze the current instance’s CPU and memory usage, and automatically switch to the smallest recommended instance type that matches the utilization metrics – AWS Compute Optimizer is effective for analyzing general-purpose EC2 instances, but it doesn’t provide the ML-specific insights needed for optimizing SageMaker endpoints. Simply switching to the smallest recommended instance could lead to insufficient performance for real-time predictions.
Manually review the performance metrics from Amazon CloudWatch for the current instance and experiment with different instance types by redeploying the model on each until you find the optimal one
– Manually experimenting with instance types is time-consuming and may lead to suboptimal choices. SageMaker Inference Recommender automates this process and provides more precise recommendations based on your model’s actual performance.
Use SageMaker Inference Recommender to select the lowest-cost instance type, regardless of performance, and configure autoscaling to handle any additional load during peak times – While cost is important, selecting the lowest-cost instance without considering performance issues could degrade the user experience. SageMaker Inference Recommender provides a more balanced approach by considering both cost and performance.
References:
https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender-prospective.html
https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender-load-test.html
https://aws.amazon.com/compute-optimizer/
You are the senior project manager at a global e-commerce company that runs multiple machine learning projects, including recommendation systems, fraud detection, and demand forecasting. The company has a cloud budget that is tightly monitored, and you are required to provide detailed reports on the costs associated with each ML project. To do this effectively, you need to track and allocate costs across different teams and projects, ensuring that each project stays within its allocated budget.
Which of the following approaches is the MOST EFFECTIVE for tracking and allocating costs across your ML projects using AWS services?
- A . Use Amazon CloudWatch to monitor usage metrics for each resource and manually calculate the associated costs based on the metrics. Allocate costs by assigning each resource to a specific project or team
- B . Implement resource tagging across all AWS resources used by your ML projects, including SageMaker instances, S3 buckets, and Lambda functions. Use AWS Cost Explorer to filter costs by tags such as project, team, and environment to generate detailed cost reports
- C . Set up AWS Budgets for each project and rely on the alerts when the budget threshold is exceeded. Use these alerts to monitor costs and manually adjust resource usage as needed
- D . Create separate AWS accounts for each ML project, allowing costs to be isolated and tracked at the account level. Manually aggregate the costs for reporting purposes using monthly billing statements
B
Explanation:
Correct option:
Implement resource tagging across all AWS resources used by your ML projects, including SageMaker instances, S3 buckets, and Lambda functions. Use AWS Cost Explorer to filter costs by tags such as project, team, and environment to generate detailed cost reports
Resource tagging is a best practice for cost tracking and allocation in AWS.
AWS Cost Explorer allows you to analyze your past AWS spending, identify cost trends, and forecast future costs based on historical data. This tool is valuable for budgeting and financial planning, helping you make informed decisions about resource allocation and cost management. By tagging resources with metadata such as project name, team, and environment, you can use AWS Cost Explorer to break down costs by these tags, providing detailed insights into where your budget is being spent.
This approach allows for automated, granular tracking and reporting of costs across multiple ML projects, making it easier to stay within budget.
via – https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html
Incorrect options:
Create separate AWS accounts for each ML project, allowing costs to be isolated and tracked at the account level. Manually aggregate the costs for reporting purposes using monthly billing statements – Creating separate AWS accounts for each project provides isolation but can lead to higher management overhead and complexity. Aggregating costs manually across accounts is time-consuming and less efficient than using resource tags within a single account or consolidated billing setup.
Use Amazon CloudWatch to monitor usage metrics for each resource and manually calculate the associated costs based on the metrics. Allocate costs by assigning each resource to a specific project or team – While CloudWatch provides valuable usage metrics, manually calculating costs from these metrics is cumbersome and error-prone. This approach does not offer the same level of automation or granularity as tagging and using Cost Explorer.
Set up AWS Budgets for each project and rely on the alerts when the budget threshold is exceeded. Use these alerts to monitor costs and manually adjust resource usage as needed – AWS Budgets is useful for setting and monitoring budget thresholds, but it is reactive rather than proactive. It provides alerts but lacks the detailed cost breakdowns needed for effective tracking and allocation across multiple projects.
References:
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html
https://aws.amazon.com/aws-cost-management/aws-cost-explorer/
You are a machine learning engineer tasked with building a deep learning model to classify images for an autonomous vehicle project. The dataset is massive, consisting of millions of labeled images. Initial training runs on a single GPU instance in Amazon SageMaker are taking too long, and the training costs are rising. You need to reduce the model training time without compromising performance significantly.
Which of the following approaches is the MOST LIKELY to effectively reduce the training time while maintaining model performance?
- A . Implement distributed training using multiple GPU instances to parallelize the training process, reducing the overall time
- B . Reduce the size of the training dataset to speed up training, even if it means using fewer examples per class
- C . Switch to a smaller instance type to reduce computational costs, accepting a longer training time as a trade-off
- D . Enable early stopping to halt training when the model’s performance on the validation set stops improving, thereby avoiding overfitting
A
Explanation:
Correct option:
Implement distributed training using multiple GPU instances to parallelize the training process, reducing the overall time
Distributed training allows you to split the workload across multiple GPU instances, significantly reducing training time by processing more data in parallel. Amazon SageMaker supports distributed training, making this an effective approach for large datasets and complex models.
SageMaker provides distributed training libraries and supports various distributed training options for deep learning tasks such as computer vision (CV) and natural language processing (NLP). With SageMaker’s distributed training libraries, you can run highly scalable and cost-effective custom data parallel and model parallel deep learning training jobs.
via – https://docs.aws.amazon.com/sagemaker/latest/dg/distributed-training.html
Incorrect options:
Enable early stopping to halt training when the model’s performance on the validation set stops improving, thereby avoiding overfitting – Early stopping is a useful technique to prevent overfitting by stopping training once the validation performance plateaus. While this can reduce training time, its effectiveness depends on the model’s behavior and may not significantly shorten training time if the model converges slowly, as exemplified by the long training runs on a single GPU instance for the given use case.
Switch to a smaller instance type to reduce computational costs, accepting a longer training time as a trade-off – Switching to a smaller instance type might reduce costs, but it will likely increase training time, which is counterproductive to the goal of reducing overall training time.
Reduce the size of the training dataset to speed up training, even if it means using fewer examples per class – Reducing the dataset size could speed up training, but it would likely compromise model performance by reducing the amount of data the model can learn from, especially in a scenario where data diversity is critical, such as image classification for autonomous vehicles.
References:
https://docs.aws.amazon.com/sagemaker/latest/dg/distributed-training.html
https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-early-stopping.html
You are a data scientist at an e-commerce company working to develop a recommendation system for customers. After building several models, including collaborative filtering, content-based filtering, and a deep learning model, you find that each model excels in different scenarios. For example, the collaborative filtering model works well for returning customers with rich interaction data, while the content-based filtering model performs better for new customers with little interaction history. Your goal is to combine these models to create a recommendation system that provides more accurate and personalized recommendations across all customer segments.
Which of the following strategies is the MOST LIKELY to achieve this goal?
- A . Implement a hybrid model that combines the predictions of collaborative filtering, content-based filtering, and deep learning using a weighted average, where weights are based on model performance for different customer segments
- B . Apply boosting by sequentially training the collaborative filtering, content-based filtering, and deep learning models, where each model corrects the errors of the previous one
- C . Use stacking, where the predictions from the collaborative filtering and content-based filtering models are fed into a deep learning model as inputs, allowing the deep learning model to make the final recommendation
- D . Use a bagging approach to train multiple instances of the deep learning model on different subsets of the data and average their predictions to improve overall performance
A
Explanation:
Correct option:
Implement a hybrid model that combines the predictions of collaborative filtering, content-based filtering, and deep learning using a weighted average, where weights are based on model performance for different customer segments
via –
https://aws.amazon.com/blogs/machine-learning/efficiently-train-tune-and-deploy-custom-ensembles-using-amazon-sagemaker/
In bagging, data scientists improve the accuracy of weak learners by training several of them at once on multiple datasets. In contrast, boosting trains weak learners one after another. Stacking involves training a meta-model on the predictions of several base models. This approach can significantly improve performance because the meta-model learns to leverage the strengths of each base model while compensating for their weaknesses.
For the given use case, a hybrid model that combines the predictions of different models using a weighted average is the most appropriate approach. By assigning weights based on each model’s performance for specific customer segments, you can ensure that the recommendation system leverages the strengths of each model, providing more accurate and personalized recommendations across all customer segments.
Incorrect options:
Use a bagging approach to train multiple instances of the deep learning model on different subsets of the data and average their predictions to improve overall performance – Bagging is typically used to reduce variance and improve stability for a single type of model, like decision trees. However, it does not directly address the need to combine different models that perform well in different scenarios, which is key for your recommendation system.
Apply boosting by sequentially training the collaborative filtering, content-based filtering, and deep learning models, where each model corrects the errors of the previous one – Boosting is useful for improving the performance of weak learners by training them sequentially, but it is not designed to combine different types of models like collaborative filtering, content-based filtering, and deep learning, each of which has strengths in different areas.
Use stacking, where the predictions from the collaborative filtering and content-based filtering models are fed into a deep learning model as inputs, allowing the deep learning model to make the final recommendation – Stacking is a powerful technique for combining models, but in this case, the deep learning model is not necessarily better suited as a meta-model for making the final recommendation. A weighted hybrid model is more effective when different models excel in different contexts, as it allows you to balance their contributions based on performance.
References:
https://aws.amazon.com/blogs/machine-learning/efficiently-train-tune-and-deploy-custom-ensembles-using-amazon-sagemaker/
https://aws.amazon.com/what-is/boosting/
Which benefits might persuade a developer to choose a transparent and explainable machine learning model? (Select two)
- A . They foster trust and confidence in model predictions
- B . They enhance security by concealing model logic
- C . They simplify the integration process with other systems
- D . They facilitate easier debugging and optimization
- E . They require less computational power and storage
A, D
Explanation:
Correct options:
They facilitate easier debugging and optimization
Transparent models allow developers to understand how inputs are transformed into outputs, making it easier to identify and correct errors or inefficiencies in the model. This capability is crucial for optimizing the model’s performance and ensuring it behaves as expected.
They foster trust and confidence in model predictions
When stakeholders can understand the decision-making process of a model, it builds trust in its predictions. Transparency is key in high-stakes scenarios, such as healthcare or finance, where understanding the rationale behind predictions is critical for acceptance and trust.
Incorrect options:
They require less computational power and storage – The computational and storage requirements of a model depend on its complexity and the amount of data it processes, not necessarily on its transparency. Both transparent and opaque models can vary widely in their resource needs.
They enhance security by concealing model logic – Opaque models, not transparent ones, are typically associated with enhanced security through obscurity. Transparent models, by definition, reveal their internal workings, which can be less secure if the logic itself needs to be protected.
They simplify the integration process with other systems – The ease of integrating a model with other systems is more related to the architecture and compatibility of the model with existing systems rather than its transparency. Transparent models do not inherently simplify integration processes.
References:
https://docs.aws.amazon.com/whitepapers/latest/model-explainability-aws-ai-ml/interpretability-versus-explainability.html
https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-model-explainability.html
In what scenario would traditional programming techniques be preferable over ML?
- A . When complex logic and scalability are required.
- B . When the problem can be solved with simple rules.
- C . When personalized recommendations are needed.
- D . When quick adaptation to new data is necessary.
B
Explanation:
Traditional programming is preferable when the problem can be solved with simple rules and does not require complex logic or scale.
You are a Data Scientist working for an e-commerce platform that uses a machine learning model to recommend products to customers. The model has been in production for over a year and was initially performing well. However, you have recently noticed a decrease in the model’s accuracy, particularly when recommending products to new customers. This decline suggests that the model may be experiencing drift due to changing customer preferences and market trends. To address this issue, you need to implement a strategy for detecting and managing model drift using Amazon SageMaker.
Which of the following strategies should you implement to effectively detect and manage model drift in your product recommendation model using Amazon SageMaker? (Select two)
- A . Retrain the model with the new training data, ensuring that the model remains up to date with new customer preferences
- B . Deploy multiple versions of the model simultaneously using Amazon SageMaker multi-model endpoints, and switch between them based on performance metrics
- C . Manually review model performance every quarter and initiate retraining only if a significant drop in accuracy is observed, minimizing unnecessary retraining costs
- D . Use Amazon SageMaker Clarify to continuously monitor and mitigate bias in the model, and initiate model retraining due to changes in data distribution
- E . Use Amazon SageMaker Model Monitor to set up monitoring for data quality and data drift, enabling you to receive alerts and initiate model retraining when the distribution of input data changes significantly from the training data
A,E
Explanation:
Correct options:
Use Amazon SageMaker Model Monitor to set up monitoring for data quality and data drift, enabling you to receive alerts and initiate model retraining when the distribution of input data changes significantly from the training data
Retrain the model with the new training data, ensuring that the model remains up to date with new customer preferences
Amazon SageMaker Model Monitor allows you to continuously monitor the input data for data quality and data drift. By setting up alerts, you can detect when the input data distribution has changed significantly from the training data, which is a key indicator of model drift. This proactive approach helps in taking timely action, such as retraining the model or adjusting it to account for new patterns in the data.
With SageMaker Model Monitor, you can set alerts that notify you when there are deviations in the model quality. Early and proactive detection of these deviations lets you to take corrective actions. You can take actions like retraining models, auditing upstream systems, or fixing quality issues without having to monitor models manually or build additional tooling.
via – https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html
Incorrect options:
Deploy multiple versions of the model simultaneously using Amazon SageMaker multi-model endpoints, and switch between them based on performance metrics – Deploying multiple versions of the same model using Amazon SageMaker multi-model endpoints is resource-intensive and cost-inefficient. So, this option is ruled out.
Manually review model performance every quarter and initiate retraining only if a significant drop in accuracy is observed, minimizing unnecessary retraining costs – Manually reviewing performance every quarter is reactive and might not catch drift early enough, leading to prolonged periods of suboptimal model performance. Automated monitoring with Model Monitor provides a more timely and systematic approach to detecting drift.
Use Amazon SageMaker Clarify to continuously monitor and mitigate bias in the model, and initiate model retraining due to changes in data distribution – While Amazon SageMaker Clarify is useful for monitoring and mitigating bias, it is not specifically designed for detecting model drift caused by changes in data distribution. Model Monitor is the more appropriate tool for addressing drift in this context.
References:
https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html
https://docs.aws.amazon.com/machine-learning/latest/dg/retraining-models-on-new-data.html
https://aws.amazon.com/blogs/machine-learning/automate-model-retraining-with-amazon-sagemaker-pip
elines-when-drift-is-detected/
https://aws.amazon.com/blogs/architecture/detecting-data-drift-using-amazon-sagemaker/
Your data science team is working on developing a machine learning model to predict customer churn. The dataset that you are using contains hundreds of features, but you suspect that not all of these features are equally important for the model’s accuracy. To improve the model’s performance and reduce its complexity, the team wants to focus on selecting only the most relevant features that contribute significantly to minimizing the model’s error rate.
Which feature engineering process should your team apply to select a subset of features that are the most relevant towards minimizing the error rate of the trained model?
- A . Feature extraction
- B . Feature creation
- C . Feature transformation
- D . Feature selection
D
Explanation:
Correct option:
Feature selection
Feature selection is the process of selecting a subset of extracted features. This is the subset that is relevant and contributes to minimizing the error rate of a trained model. Feature importance score and correlation matrix can be factors in selecting the most relevant features for model training.
Incorrect options:
Feature creation – Feature creation refers to the creation of new features from existing data to help with better predictions. Examples of feature creation include: one-hot-encoding, binning, splitting, and calculated features.
Feature transformation – Feature transformation and imputation include steps for replacing missing features or features that are not valid. Some techniques include: forming Cartesian products of features, non-linear transformations (such as binning numeric variables into categories), and creating re extraction involves reducing the amount of data to be processed using dimensionality reduction techniques. These
techniques include: Principal Components Analysis (PCA), Independent Component Analysis (ICA), and Linear Discriminant Analysis (LDA).
Reference: https://docs.aws.amazon.com/wellarchitected/latest/machine-learning-lens/feature-engineering.html
What is the primary distinction between discriminative models and generative models in the context of generative AI?
- A . Discriminative models are only used for text classification, while generative models are only used for image classification
- B . Discriminative models are used to generate new data, while generative models are used only for classification
- C . Generative models are trained on labeled data, while discriminative models can be trained on both labeled and unlabeled data
- D . Generative models focus on generating new data from learned patterns, whereas discriminative models classify data by distinguishing between different classes
D
Explanation:
Correct option:
Generative models focus on generating new data from learned patterns, whereas discriminative models classify data by distinguishing between different classes
Generative models learn the underlying patterns of data to create new, similar data, while discriminative models learn to distinguish between different classes of data. Generative models, such as GPT-3, can generate new content, whereas discriminative models are used for classification tasks. The former focuses on understanding and replicating the data distribution, while the latter focuses on decision boundaries to classify inputs.
For example, discriminative models look at images – known data like pixel arrangement, line, color, and shape ― and then map them to an outcome ― the unknown factor. Mathematically, these models work by identifying equations that could numerically map unknown and known factors as x and y variables.
Generative models take this one step further. Instead of predicting a label given some features, they try to predict features given a certain label. Mathematically, generative modeling calculates the probability of
x and y occurring together. It learns the distribution of different data features and their relationships. For example, generative models analyze animal images to record variables like different ear shapes, eye shapes, tail features, and skin patterns. They learn features and their relations to understand what different animals look like in general. They can then recreate new animal images that were not in the training set.
Incorrect options:
Discriminative models are used to generate new data, while generative models are used only for classification – Discriminative models are used primarily for classification, not for generating new data. Discriminative models are only used for text classification, while generative models are only used for image classification – Discriminative models can be used for both text and image classification, while generative models learn the underlying patterns of data to create new data.
Generative models are trained on labeled data, while discriminative models can be trained on both labeled and unlabeled data – The training data type (labeled vs. unlabeled) is not the primary distinction between generative and discriminative models.
Reference: https://aws.amazon.com/what-is/generative-ai/