mediumMultiple Choice
GPU Acceleration to Reduce Inference Latency on Vertex AI — Ensemble Models
A company deploys a custom TensorFlow model to Vertex AI Endpoint for online predictions. After deployment, prediction latency is consistently high (over 500ms) even under low traffic. The model is CPU-only and the default machine type (n1-standard-2) is used. Which action will most likely reduce prediction latency?
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
✓
Change the machine type to n1-highcpu-16 with a GPU accelerator.
Changing the machine type to n1-highcpu-16 with a GPU accelerator provides significantly more compute resources for the custom TensorFlow model. The n1-highcpu-16 offers 16 vCPUs (vs. 2 in n1-standard-2), which reduces CPU-bound inference time, and adding a GPU accelerates matrix operations common in TensorFlow models, directly reducing latency per request. Option A is wrong because increasing max_replica_count allows more parallel requests but does not improve the processing time of a single request. Option C is wrong because setting min_replica_count ensures always-on capacity to avoid cold starts, but does not reduce steady-state latency. Option D is wrong because increasing batch size in the prediction request increases throughput by processing multiple inputs together, but does not reduce latency for a single prediction—it may actually increase the time to return a result for a given request.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the max_replica_count to 10 to allow more parallel requests.
Why it's wrong here
More replicas improve throughput but not per-request latency.
- ✓
Change the machine type to n1-highcpu-16 with a GPU accelerator.
Why this is correct
Adding a GPU accelerator offloads TensorFlow's matrix operations from the CPU, directly addressing the CPU-only constraint causing the 500ms latency. The n1-highcpu-16 shape supplies proportionally more vCPUs and memory for preprocessing and batching, so inference completes faster even at low traffic.
- ✗
Set min_replica_count to 3 to ensure always-on capacity.
Why it's wrong here
Min replicas reduce cold start but not steady-state latency.
- ✗
Increase the batch size in the prediction request.
Why it's wrong here
Larger batches increase latency per request.
Go deeper
Related to this question
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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.