Courseiva

PMLE Scaling Prototypes into ML Models Practice Question

You have a TensorFlow training script that runs on a single machine. To speed up training on Vertex AI with 8 GPUs on a single machine, which strategy should you use?

⚠ Common exam trap

The trap is confusing single-machine multi-GPU (MirroredStrategy) with multi-machine multi-GPU (MultiWorkerMirroredStrategy) — candidates who skim the question miss the 'single machine' qualifier and pick the multi-worker variant.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

tf.distribute.MirroredStrategy

tf.distribute.MirroredStrategy is designed for synchronous, data-parallel training across multiple GPUs on a single machine. It replicates the model on each GPU, splits each batch across replicas, and uses all-reduce (via NCCL) to aggregate gradients, which is exactly the scenario described: 8 GPUs on one machine. This is the canonical strategy for single-node multi-GPU TensorFlow training.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    tf.distribute.ParameterServerStrategy

    Why it's wrong here

    ParameterServerStrategy places variables on parameter servers and workers compute updates, a topology designed for asynchronous, multi-machine clusters. On one machine with eight GPUs it introduces unnecessary server-worker separation. It is tempting as a scaling pattern, but it suits large distributed clusters, not a single host's local devices.

  • ✓

    tf.distribute.MirroredStrategy

    Why this is correct

    MirroredStrategy performs synchronous, all-reduce data-parallel training across multiple GPUs within one machine, replicating the model on each device and aggregating gradients. This directly satisfies the stem's constraint of 8 GPUs on a single machine, where MultiWorkerMirroredStrategy would add unnecessary cross-machine networking overhead.

  • ✗

    tf.distribute.TPUStrategy

    Why it's wrong here

    TPUStrategy targets Tensor Processing Unit pods and their specific collective communication topology; it cannot drive NVIDIA GPUs on a Vertex AI single machine. It is tempting because TPUs also accelerate training, but that requires TPU VMs. For eight local GPUs, MirroredStrategy replicates variables across the devices on that host.

  • ✗

    tf.distribute.MultiWorkerMirroredStrategy

    Why it's wrong here

    MultiWorkerMirroredStrategy coordinates gradients across multiple machines, each with its own workers, so it adds cross-host communication overhead without benefit on one host. It is tempting because it mirrors variables across workers, but that is for multi-node clusters; single-machine eight-GPU training needs MirroredStrategy, which mirrors across local devices only.

About these practice questions

One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.