Google CloudScaling prototypes into ML models

Hyperparameter Tuning & Foundation Models — PMLE Practice Question

A representative Google Cloud Professional Machine Learning Engineer (PMLE) exam question on Hyperparameter Tuning & Foundation Models. Work through it below, then read why each option is right or wrong.

This question is part of the free Google Cloud Professional Machine Learning Engineer practice test.

Short answer

The correct answer is C. Use Vertex AI's Hyperparameter Tuning service with a search space for learning rate and batch size, with early stopping enabled to reduce wasted compute..

Vertex AI's Hyperparameter Tuning service automates the search for optimal hyperparameters, uses early stopping to terminate unpromising trials, and runs trials in parallel to reduce overall time and cost compared to manual sequential runs. Manual sequential runs waste compute and are error-prone. Training on a small sample does not guarantee hyperparameters generalize to the full dataset. A/B testing in production is unsafe for model tuning and introduces production risk.

The Question

Your team is fine-tuning a large language model on Vertex AI for customer support ticket classification. Training on the full dataset takes 8 hours and costs $1,200. You want to experiment with different hyperparameters (learning rate, batch size, number of epochs) to improve F1-score. What is the most cost-effective approach to tune the model while maintaining reproducibility?

ADeploy the model to an A/B test environment and adjust hyperparameters based on production performance metrics.
BRun 10 sequential full training jobs with different hyperparameters manually, documenting each run in a spreadsheet.
CUse Vertex AI's Hyperparameter Tuning service with a search space for learning rate and batch size, with early stopping enabled to reduce wasted compute.Correct
DTrain the model once on a small sample, then apply the hyperparameters to the full dataset in a single job.

Why C is correct

Vertex AI's Hyperparameter Tuning service automates the search for optimal hyperparameters, uses early stopping to terminate unpromising trials, and runs trials in parallel to reduce overall time and cost compared to manual sequential runs. Manual sequential runs waste compute and are error-prone. Training on a small sample does not guarantee hyperparameters generalize to the full dataset. A/B testing in production is unsafe for model tuning and introduces production risk.

Why the other options are wrong

Option A: Deploy the model to an A/B test environment and adjust hyperparameters based on production performance metrics.

Option A does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option B: Run 10 sequential full training jobs with different hyperparameters manually, documenting each run in a spreadsheet.

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option D: Train the model once on a small sample, then apply the hyperparameters to the full dataset in a single job.

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Key idea: Hyperparameter Tuning & Foundation Models

Vertex AI's Hyperparameter Tuning service automates the search for optimal hyperparameters, uses early stopping to terminate unpromising trials, and runs trials in parallel to reduce overall time and cost compared to manual sequential runs. Manual sequential runs waste compute and are error-prone. Training on a small sample does not guarantee hyperparameters generalize to the full dataset. A/B testing in production is unsafe for model tuning and introduces production risk. On the PMLE exam, questions in the "Scaling prototypes into ML models" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Google Cloud Professional Machine Learning Engineer domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Google Cloud Professional Machine Learning Engineer Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.