Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Machine Learning Engineer practice bank has an additional 974 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are configuring a synchronous multi-host data-parallel training job in PyTorch on Agent Platform using a custom container image. Your training workload exhibits high gradient-synchronization latency during NCCL AllReduce operations across nodes, and you must scale training across 8 a2-megagpu-16g VMs (each providing 100 Gbps of network bandwidth) while minimizing communication overhead.
Your configuration requirements include:
DistributedDataParallel (DDP)Which configuration should you implement?
workerPoolSpecs[0] with 1 a2-megagpu-16g replica and workerPoolSpecs[1] with 7 a2-megagpu-16g replicas running a container with NCCL 2.7+ and google-reduction-server installed, parsing CLUSTER_SPEC to initialize DDP with bucket_cap_mb=64; configure workerPoolSpecs[2] with 25 CPU-only n1-highcpu-16 replicas (32 Gbps each) running the Reduction Server image.Reduction Server is a specialized All-Reduce collective communication service designed to accelerate multi-host, data-parallel GPU training by offloading gradient aggregation from GPU workers to dedicated high-bandwidth CPU nodes. When paired with PyTorch DistributedDataParallel (DDP), it replaces standard ring or tree All-Reduce topologies across GPU hosts with a high-throughput, low-latency reduction architecture.
replicaCount=1 to workerPoolSpecs[0] designates the required primary replica, while workerPoolSpecs[1] provisions the remaining 7 a2-megagpu-16g GPU worker replicas (8 GPU hosts total).a2-megagpu-16g VMs deliver 800 Gbps of aggregate network bandwidth (8 × 100 Gbps). Provisioning 25 CPU-only n1-highcpu-16 VMs (each providing 32 Gbps egress bandwidth) in workerPoolSpecs[2] yields 800 Gbps (25 × 32 Gbps), preventing network saturation at the reducer tier.google-reduction-server package, and PyTorch scripts must parse the CLUSTER_SPEC environment variable to configure MASTER_ADDR, MASTER_PORT, WORLD_SIZE, and RANK.bucket_cap_mb=64 in the DistributedDataParallel constructor increases the gradient bucket size from the 25 MB default to 64 MB, allowing Reduction Server to aggregate larger tensor payloads efficiently.workerPoolSpecs[2] reducer instances.Unlike parameter-server architectures that introduce asynchronous staleness or require framework rewrites, this setup preserves PyTorch DDP's synchronous mathematically equivalent gradient updates while maximizing network utilization through properly sized Reduction Server bandwidth and 64 MB gradient bucketing.
workerPoolSpecs[0] with 8 a2-megagpu-16g replicas and workerPoolSpecs[3] with 8 n1-highcpu-16 replicas running the Reduction Server image, and set bucket_cap_mb=1 in PyTorch DistributedDataParallel to minimize buffering delay before each NCCL AllReduce call.This configuration attempts to place all GPU workers in workerPoolSpecs[0], place the Reduction Server nodes in workerPoolSpecs[3], and shrink the PyTorch DDP gradient bucket size (bucket_cap_mb=1) so gradients are dispatched immediately without accumulating into larger buffers.
workerPoolSpecs[0]) is strictly reserved for the single primary replica (replicaCount must be 1). Additional GPU workers must be placed in workerPoolSpecs[1]. Moreover, workerPoolSpecs[3] is designated for evaluator replicas, whereas Reduction Server must be placed in workerPoolSpecs[2].n1-highcpu-16 nodes provides only 256 Gbps of egress bandwidth against 800 Gbps of GPU worker bandwidth, creating a severe network bottleneck.bucket_cap_mb to 1 MB (well below the 25 MB default and the recommended 64 MB) forces NCCL AllReduce to transmit many small tensors separately. Reduction Server achieves peak efficiency when aggregating large batched messages rather than tiny fragmented payloads.workerPoolSpecs[] relies on positional indexing: index 0 is primary (replicaCount: 1), index 1 is secondary workers, index 2 is parameter servers or Reduction Server, and index 3 is evaluators.Using workerPoolSpecs[3] is only appropriate when running a dedicated TensorFlow evaluator task alongside training workers, and smaller bucket sizes would only be considered when debugging extreme memory constraints on tiny single-node setups—never for multi-host Reduction Server scaling.
workerPoolSpecs[0] with 1 a2-megagpu-16g replica and workerPoolSpecs[1] with 7 a2-megagpu-16g replicas, and deploy 8 n1-highcpu-16 parameter server replicas in workerPoolSpecs[2] while refactoring the training script to use TensorFlow ParameterServerStrategy and reading TF_CONFIG instead of NCCL AllReduce.This approach replaces PyTorch DistributedDataParallel (DDP) and NCCL AllReduce with a TensorFlow ParameterServerStrategy architecture. In this paradigm, workerPoolSpecs[2] hosts parameter servers that store model variables and coordinate updates with workers asynchronously or via coordinator-managed tasks, using the TF_CONFIG environment variable for cluster discovery.
AllReduce. Refactoring the entire training codebase into TensorFlow and Keras introduces massive engineering overhead and changes the distributed execution semantics.n1-highcpu-16 nodes provides 256 Gbps of total egress bandwidth (8 × 32 Gbps), leaving a massive shortfall compared to the 800 Gbps generated by the 8 a2-megagpu-16g GPU workers.ParameterServerStrategy is primarily suited for asynchronous or coordinator-dispatched multi-worker TensorFlow training, especially with large sparse embedding tables.TF_CONFIG is automatically parsed by TensorFlow tf.distribute.Strategy APIs, whereas PyTorch custom containers rely on parsing CLUSTER_SPEC.This architecture would be appropriate if the codebase were already built in TensorFlow/Keras, the model relied on massive sparse embeddings that benefit from parameter server sharding, and the team explicitly wanted coordinator-based parameter server training rather than synchronous All-Reduce data parallelism.
workerPoolSpecs[0] to 1 ct5lp-hightpu-8t replica, workerPoolSpecs[1] to 7 ct5lp-hightpu-8t replicas, and workerPoolSpecs[2] to 25 n1-highcpu-16 Reduction Server replicas using the tpu_dist backend for NCCL AllReduce.This configuration attempts to migrate the workload from NVIDIA GPU VMs to Cloud TPU v5e instances distributed across workerPoolSpecs[0] and workerPoolSpecs[1], while keeping Reduction Server nodes in workerPoolSpecs[2] and combining the PyTorch tpu_dist backend with NCCL AllReduce.
workerPoolSpecs[0]) with replicaCount set to 1. Multi-host TPU scaling is provisioned via tpuTopology within that single pool rather than adding replicas across workerPoolSpecs[1].NVIDIA Collective Communications Library) exclusively support GPU workers. TPUs do not use NCCL; instead, TPU slices communicate directly over their dedicated high-speed Inter-Chip Interconnect (ICI) and Data Center Network (DCN).tpu_dist backend (used with TorchTPU for DistributedDataParallel, FSDP2, and DTensor on TPUs) executes collective operations through the XLA runtime over ICI, not through CPU-based Reduction Server nodes.tpuTopology defines the physical chip grid inside a single WorkerPoolSpec.Switching to Cloud TPU v5e (or TPU v6e / TPU7x) with tpu_dist would be appropriate when running dense matrix-heavy workloads on GKE or a single-pool TPU VM configuration (replicaCount=1 with tpuTopology) without Reduction Server or NCCL.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated