CoStudy

HomeCertificationsGCP Professional ML Engineer › Scaling Prototypes — Training, Tuning and Compute

Scaling Prototypes — Training, Tuning and Compute — GCP Professional ML Engineer practice questions

60 multiple-choice questions and 27 flashcards on Scaling Prototypes — Training, Tuning and Compute, about 20% of the GCP Professional ML Engineer bank. Every one carries a written rationale.

Written and maintained by Nick Burton · last updated 2026-08-22 · how we write and review questions

What this chapter covers

Scaling Prototypes — Training, Tuning and Compute is one of 8 chapters in CoStudy's GCP Professional ML Engineer bank, and it holds 60 of the bank's 300 multiple-choice questions — roughly 20% of the total. That proportion is not arbitrary: chapters follow the certifying body's published exam outline, and the number of questions in each is set by that domain's published weight, so the share of your practice time this chapter takes matches the share of the real exam it accounts for.

Studying by chapter is worth doing once you have a diagnostic score. A single overall percentage tells you whether you are close; it does not tell you which domain is dragging. Working a weak chapter in isolation, and re-testing it in isolation, is the fastest way to move a score that has stalled — and it is why the mock exams in CoStudy report by domain rather than as one number.

Free Scaling Prototypes — Training, Tuning and Compute practice questions

10 questions drawn from this chapter, with the full rationale shown — the controlling principle behind the right answer, and why each wrong option tempts and fails.

An engineer must ingest 8 TB of training images stored as millions of small JPEG files. The MOST effective preparation step is to:

  1. Copy the files to a persistent disk attached to the training VM
  2. Load all file paths into a database the training loop queries per batch
  3. Compress each file more aggressively to reduce total bytes read
  4. Convert them into a smaller number of large sharded record files

Answer: D — Convert them into a smaller number of large sharded record files

D) Correct — millions of small objects incur per-file overhead that dominates throughput; consolidating into large sharded records lets the input pipeline stream efficiently. A) A local disk still faces per-file overhead and adds a lengthy copy plus a capacity ceiling. B) A path database adds a query per batch and solves nothing about read efficiency. C) Extra compression reduces bytes but adds decode cost and leaves the file-count problem untouched.

A team wants to shorten a hyperparameter search by reusing knowledge from a previous search on a closely related model. The MOST appropriate technique is to:

  1. Seed the new search with the prior related study's trial results
  2. Copy the previous best configuration and skip the search entirely
  3. Restrict the space to the previous best value per parameter
  4. Run the same trial count on a smaller training subset each time

Answer: A — Seed the new search with the prior related study's trial results

A) Correct — transferring prior trial outcomes lets the optimizer start from an informed posterior rather than from scratch, which is the intended mechanism for related studies. B) Reusing one configuration blindly ignores that the models differ. C) Collapsing the space to previous values is not a search at all. D) Subsampling data speeds trials but corrupts the objective by measuring a different problem.

For a regression problem where outliers should be handled robustly, prefer:

  1. Mean squared error over all residuals
  2. Mean absolute error or Huber loss
  3. Categorical cross-entropy on logits
  4. Hinge loss as used by margin SVMs

Answer: B — Mean absolute error or Huber loss

A) Squaring makes a few extreme residuals dominate the gradient. B) Correct — absolute error weights every residual linearly, and Huber is quadratic near zero yet linear in the tails. C) A classification objective. D) A margin-based classification objective.

A team must decide between building a custom model and adopting a managed pretrained solution for entity extraction from contracts. The FIRST question they should answer is:

  1. How many engineers will be available over the next quarter
  2. Which accelerator type a custom model would require for training
  3. Whether a managed processor already covers the targets
  4. What the serving latency budget will be at peak traffic

Answer: C — Whether a managed processor already covers the targets

C) Correct — coverage by an existing managed capability determines whether custom work is needed at all, so it precedes every other question. A) Staffing shapes feasibility but should not be assessed before knowing whether the work is necessary. B) Accelerator choice matters only once custom training is decided. D) Latency is a serving constraint relevant after the approach is selected.

An XGBoost prototype must scale to billions of rows. Best Vertex path?

  1. Single-node XGBoost on a much larger memory-optimized VM type
  2. Switch to an LSTM so the rows can be streamed in as a sequence
  3. Distributed XGBoost on Dataproc, or BigQuery ML boosted-tree models
  4. Manually shard the rows and merge the per-shard models by hand

Answer: C — Distributed XGBoost on Dataproc, or BigQuery ML boosted-tree models

A) A single node still caps out well below billions of rows. C) Correct — distributed gradient boosting or SQL-native boosted trees scale to this volume. B) Wrong model class. D) Reinvents distributed training badly.

A team wants to train a custom TensorFlow model with no infrastructure management. Best option?

  1. Self-managed Compute Engine VMs with hand-installed CUDA
  2. Managed custom training in a pre-built TF container image
  3. Cloud Run containers autoscaled for stateless HTTP services
  4. App Engine standard runtime for hosting web applications

Answer: B — Managed custom training in a pre-built TF container image

A) Puts VM provisioning, driver installs and patching on the team. B) Correct — the managed custom training service runs a pre-built TensorFlow container on compute it provisions and tears down for you. C) Serverless request serving, not a training service. D) A web application platform with no training primitives.

Which statement about model parallelism is MOST accurate?

  1. It splits the model across devices when it will not fit on one
  2. It is preferred whenever the data exceeds one device's memory
  3. It removes any need for gradient exchange between the devices
  4. It scales throughput linearly with the number of devices added

Answer: A — It splits the model across devices when it will not fit on one

A) Correct — model parallelism partitions the model's parameters or layers across devices, and its motivating constraint is model memory. B) Data exceeding device memory is handled by streaming batches, not by splitting the model — this is the common reversal. C) Splitting a model increases inter-device communication, since activations must cross device boundaries. D) Communication overhead makes model-parallel scaling markedly sublinear.

Which situation MOST justifies using Ray on the managed platform rather than a standard custom training job?

  1. Fine-tuning one model with a single known configuration
  2. Training a boosted tree model that fits on a single machine
  3. Executing a nightly batch scoring job across a partitioned table
  4. Distributed reinforcement learning with many parallel rollouts

Answer: D — Distributed reinforcement learning with many parallel rollouts

D) Correct — Ray's strength is heterogeneous, dynamically scheduled distributed Python such as reinforcement learning with many concurrent actors, which a single-script training job expresses poorly. A) One model with one configuration is a plain custom job. B) A single-machine tree fit gains nothing from a cluster framework. C) Batch scoring belongs to a batch prediction service or a data pipeline.

A team must choose between a gradient boosted tree ensemble and a deep neural network for a tabular risk model that a regulator will review. The STRONGEST argument for the tree ensemble is:

  1. It always achieves higher accuracy than neural networks on tabular data
  2. It supports feature importance and split-level reasoning regulators can follow
  3. It trains without accelerators and therefore costs less to run
  4. It requires no feature scaling, which shortens the preprocessing pipeline

Answer: B — It supports feature importance and split-level reasoning regulators can follow

B) Correct — when a regulator must review the model, native interpretability at model-choice time is the controlling consideration, and tree ensembles expose importances and decision paths directly. A) Trees are often strong on tabular data but 'always' overstates it. C) Lower compute cost is true and tempting but secondary to the review requirement. D) Scale invariance is a genuine convenience and the weakest of the four arguments here.

During distributed training, one worker consistently finishes each step later than the others. In a synchronous setup, the effect is:

  1. All workers wait for the straggler, so throughput follows it
  2. The straggler's gradients are dropped and training proceeds unchanged
  3. The framework rebalances the shard sizes automatically each step
  4. Only the straggler's replica falls behind while the others advance

Answer: A — All workers wait for the straggler, so throughput follows it

A) Correct — synchronous training barriers at each step, so aggregate throughput is set by the slowest replica. B) Dropping gradients describes asynchronous or fault-tolerant variants, not standard synchronous all-reduce. C) Automatic per-step reshadring is not how these strategies work. D) Independent progress per replica is the asynchronous model, which this is not.

Scaling Prototypes — Training, Tuning and Compute flashcards

4 cards from the 27 in this chapter.

Custom training in Vertex AI?

BYO container or pre-built (PyTorch, TensorFlow, scikit-learn, XGBoost). Run on Vertex training jobs with GPUs/TPUs.

When do you choose TPUs over GPUs for a training workload?

TPUs suit very large dense matrix workloads with a static shape and a supported framework — large transformer and CNN training where the model can run mostly in the XLA-compiled graph. GPUs suit custom operations, dynamic shapes, sparse workloads, smaller jobs, and any library that requires a CUDA kernel.

Name three characteristics of a workload that make TPUs a poor fit.

Heavy use of custom or unsupported operations that fall back to the host • dynamic or frequently changing tensor shapes that force repeated recompilation • small models or small batch sizes where the accelerator cannot be saturated. Workloads dominated by data-dependent control flow or sparse lookups also underperform.

When use TPUs vs GPUs?

TPU: matrix-heavy workloads (transformers, CNNs at scale). GPU: more flexible, broad framework support.

Practise the full chapter

These are a sample. The full Scaling Prototypes — Training, Tuning and Compute chapter runs 87 items with per-chapter progress tracking, on the web and in the iOS app.

Open GCP Professional ML Engineer in CoStudy →

Other GCP Professional ML Engineer chapters

All GCP Professional ML Engineer practice questions →