Skip to content
Google Cloud Certified Professional Machine Learning Engineer (PMLE) Exam Prep

Lesson 6 of 10 · 14 min

x
6/10

Domain 3: Scaling Prototypes into ML Models (Part 2 of 2)

This lesson covers 4 exam topics: Hyperparameter Tuning, Fine-Tuning Foundation Models, Choosing Training Hardware, Distributed Training. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.

1. Hyperparameter Tuning

Video lesson: PMLE 21/38: Hyperparameter Tuning

Central question: How does hyperparameter tuning work on Agent Platform?

Facts

  • Tuning runs many trials of your training code with different hyperparameter values and returns the best configuration for the metric you maximize or minimize (hyperparameter tuning overview).
  • Default algorithm: Bayesian optimization (Gaussian process bandits and related methods); alternatives are GRID_SEARCH and RANDOM_SEARCH.
  • Report the metric from your code (the hypertune helper library); metrics must be numeric. Conditional parameters apply only when a parent value matches.
  • Running trials in parallel finishes sooner but gives Bayesian optimization less information per step; cost depends on trial duration.
  • Vizier is the black-box optimization service behind tuning, also usable directly.

Exam traps

  • Grid search over many continuous parameters. Explodes in cost; use the default Bayesian search.
  • Maximum parallel trials always best. It reduces what each trial learns from earlier ones.

2. Fine-Tuning Foundation Models

Video lesson: PMLE 22/38: Fine-Tuning Foundation Models

Central question: When and how should you fine-tune a foundation model?

Facts

MethodDataUse
Supervised fine-tuning (SFT)Hundreds of labeled prompt-response examplesTeach a task, style or format
Preference tuningPairs of preferred and dispreferred responsesAlign output with human preferences
Reinforcement fine-tuning (preview)Prompts plus a reward functionOptimize for a measurable reward
Open-model tuningVariesTune Model Garden open models such as Gemma
  • Google recommends starting with prompting, then fine-tuning if needed; tuning fits when you have labeled data (about 100+ examples) and complex or unique tasks; quality beats quantity; data should match production prompts (introduction to tuning).
  • Parameter-efficient (adapter) tuning updates a small subset of parameters: cheaper and faster; full fine-tuning updates all parameters, with higher compute for tuning and serving.
  • Tuning benefits: higher task quality, more consistent results, and lower inference cost and latency because shorter prompts replace long instructions and few-shot examples.
  • Tuned Gemini models deploy to shared public endpoints only (endpoint types).

Exam traps

  • Tuning for frequently changing facts. Use RAG.
  • Full fine-tuning by default. Parameter-efficient tuning is cheaper.
  • Tuning before trying prompts.

3. Choosing Training Hardware

Video lesson: PMLE 23/38: Choosing Training Hardware

Central question: CPU, GPU or TPU for training?

Facts (Cloud TPU docs verified; selection rules are general guidance)

AcceleratorFits
CPUSmall models, classical ML (linear, trees), data-bound or logic-heavy work
GPUMost deep learning; broad framework and custom-op support; mixed workloads
TPULarge models dominated by matrix multiplication, large batch training; code compiled with XLA (JAX, TensorFlow, PyTorch/XLA)
  • TPUs are Google's custom ASICs for the large matrix operations in ML; TPUs connect into slices; code is compiled by XLA (Cloud TPU introduction).
  • TPUs may not fit models with ops unavailable on TPU or heavy custom operations; GPUs are more flexible.
  • Lower cost options: Spot VMs for fault-tolerant jobs, Dynamic Workload Scheduler (flex-start) for flexible start times, reservations for guaranteed capacity.

Exam traps

  • TPU for scikit-learn trees. CPU.
  • TPU for a model full of custom CUDA ops. GPU.

4. Distributed Training

Video lesson: PMLE 24/38: Distributed Training

Central question: How do data and model parallelism scale training?

Facts

  • Data parallelism: every replica holds the full model and processes a different slice of each batch; gradients are combined (all-reduce). Use when the model fits on one device.
  • Model parallelism: the model is split across devices (tensor or pipeline parallelism). Use when the model is too large for one device.
  • Agent Platform distributed jobs use worker pools: the first pool is the primary replica (chief), then workers, optional parameter servers and an evaluator (distributed training).
  • Reduction Server speeds up all-reduce for multi-node GPU data-parallel training.

Exam traps

  • Model parallelism for a small model with lots of data. Data parallelism.
  • Data parallelism for a model that doesn't fit in device memory. Model parallelism.

References

  1. PMLE exam guide — checked Oct 26, 2026
  2. Hyperparameter tuning overview — checked Oct 26, 2026
  3. Vizier overview — checked Oct 26, 2026
  4. Introduction to tuning — checked Oct 26, 2026
  5. Preference tuning — checked Oct 26, 2026
  6. Reinforcement fine-tuning — checked Oct 26, 2026
  7. Introduction to Cloud TPU — checked Oct 26, 2026
  8. Distributed training — checked Oct 26, 2026

Check your understanding

  • Default search algorithm?Show answer

    Answer

    Bayesian optimization.
  • Pairs of better and worse answers?Show answer

    Answer

    Preference tuning.
  • Huge transformer, JAX?Show answer

    Answer

    TPU.
  • Model too big for one GPU?Show answer

    Answer

    Model parallelism.
  • Goal setting?Show answer

    Answer

    Maximize or minimize a numeric metric.
Previous

Progress is saved in this browser.

Next Lesson