Cloud / Vertex AI Model Garden Interview questions
Last updated
1. What is Vertex AI Model Garden?
Vertex AI Model Garden is Google Cloud's model catalog. It gives you one place to discover, test, customize and deploy models from Google, from partners and from the open-source community. Google describes it as a curated set of 200+ models.
Every model is reached through the same surfaces: the Cloud console, the Vertex AI SDK and the gcloud CLI. Some models are serverless APIs you can call straight away, while others are deployed onto an endpoint that you control.
It also connects to the rest of the platform, so a model you pick can move on to tuning, evaluation and serving without leaving Google Cloud.
Naming note: since April 2026 Google brands the platform as Gemini Enterprise Agent Platform (formerly Vertex AI). Model Garden is still part of it, and many docs, SDK packages and commands still say Vertex AI.
Take quiz
A hosting service limited to Gemini models
A catalog for discovering, testing, customizing and deploying Google, partner and open models
A billing report for Vertex AI spend
A storage service used only for training datasets
Fewer than 30
Exactly 2,000
Only the Gemini family
More than 200
2. What is Gemini Enterprise Agent Platform and how does it relate to Vertex AI?
Gemini Enterprise Agent Platform is the name Google Cloud announced on April 22, 2026 (at Cloud Next '26) for the evolution of Vertex AI. Vertex AI services and roadmap items are now delivered through it.
It keeps what Vertex AI users already had, namely model selection through Model Garden, model building and tuning, and adds agent-focused pieces such as agent building, integration, orchestration, security and governance.
| Old name | New name |
| Vertex AI Endpoints | Agent Platform Endpoints |
| Vertex AI Pipelines | Agent Platform Pipelines |
| Vertex AI Workbench | Agent Platform Workbench |
| Vertex AI Prediction / Inference | Agent Platform Inference |
In an interview, a safe phrasing is "Model Garden on Vertex AI, which is now part of Gemini Enterprise Agent Platform". API and SDK identifiers can lag behind the branding, so confirm exact names in the current docs.
Take quiz
November 30, 2023
March 3, 2021
April 22, 2026
January 1, 2027
Agent Platform Endpoints
Gemini Hosts
Model Garden Nodes
Agent Gateway Pools
3. What are the model categories in Model Garden?
Model Garden groups its catalog into three practical categories: first-party models from Google, partner (third-party) models, and open models. Within those, individual cards are labelled as foundation, tunable or task-specific models.
| Category | Typical examples | How you usually consume it |
| First-party | Gemini, Imagen, Veo, Lyria | Managed Google API |
| Partner | Anthropic Claude, Mistral | Managed API (MaaS), some self-deploy |
| Open | Gemma, Llama, Hugging Face models | MaaS for a curated few, otherwise self-deploy |
The category matters because it decides who runs the infrastructure, how you are billed and which controls you get.
Take quiz
Only among task-specific Google ML APIs
It is not listed in Model Garden
Only among open-weight community models
Among the partner models
Pre-trained Google ML APIs
Self-deployed open models
Claude as a managed API
Gemini through the Google API
4. What are first-party models in Model Garden?
First-party models are models built and served by Google itself. They include the Gemini family for text and multimodal work, plus task-focused models for image generation, video generation, music and speech.
You call them as a managed Google API. There is no endpoint to create and no GPU to size, and Google handles scaling and updates. You can try them in Vertex AI Studio first, then call the same model from the SDK.
Google also lists Gemini on Model Garden alongside pre-trained APIs, which are narrower services built for one job, such as speech or vision, and exposed through simple API calls.
Take quiz
Only your requests and permissions, since Google runs the serving infrastructure
Hugging Face access tokens
The GPU type and node count of a dedicated endpoint
The container image and vLLM flags
Cloud Storage browser
The Model Registry import wizard
Vertex AI Studio
Cloud Build triggers
5. What are open models in Model Garden?
Open models are models whose pretrained weights are published, so you can run, tune and deploy them yourself. Gemma and Llama are well-known examples in Model Garden, and Hugging Face models can be deployed too.
Most are open weight rather than fully open source. You get the parameters, but not necessarily the training code or data.
On Vertex AI you can consume them in two ways: a small curated set as serverless managed APIs, or any deployable model as a self-deployed endpoint inside your own project and VPC network.
Take quiz
The full training dataset is public
The pretrained parameters are released
It can only be used for free
It runs only on TPUs
Only batch jobs or only notebooks
Only on-premises export
Only a browser demo or only a mobile app
Managed serverless API for some, self-deployed endpoint for others
6. What are partner models in Model Garden?
Partner models are models built by Google's partners and offered through Model Garden, for example Anthropic's Claude and Mistral. Most are delivered as a managed API, so you keep sending requests to Vertex AI endpoints rather than to the partner's own servers.
Before first use you typically enable the model from its card, which creates a Marketplace-style entitlement and may require accepting the partner's terms.
A few partner models can instead be self-deployed on your own hardware. Weights of those self-deployed partner models cannot be exported.
Take quiz
Directly to the partner's private servers
To your on-premises firewall only
To Vertex AI endpoints
To a public GitHub repository
Anthropic Claude
Gemini Nano
Cloud SQL
BigQuery ML linear regression
7. What is Model as a Service (MaaS) in Model Garden?
MaaS means the model is offered as a fully managed, serverless API. Google handles provisioning, scaling and patching, and you pay for what you use, usually per token, instead of paying for idle machines.
Both partner models (such as Claude and Mistral) and a curated list of open models (such as Llama) are available this way. You still call a Vertex AI endpoint and use IAM for access.
Some MaaS models can reserve capacity with Provisioned Throughput for a fixed fee when you need steadier availability.
Take quiz
You must run your own autoscaler
You can export the model weights
You choose the exact GPU model
No infrastructure to provision or manage
Per node-hour of a VM you keep running
Pay as you go, usually per token
Only through committed use discounts on VMs
A flat annual license for the weights
8. What are self-deployed models in Model Garden?
Self-deployed models are models you deploy to a Vertex AI endpoint in your own project. You pick the region, machine type and accelerator, and the model runs inside your project and VPC network.
This covers open models, custom or fine-tuned weights and some partner models. Model Garden gives a deployment pattern that wraps the serving container, the Model Registry entry and the endpoint.
The trade-off is control against effort. You gain network isolation, tunable serving settings and weight ownership for open models, but you pay for the nodes while they run and must watch quota and scaling.
Take quiz
On a Vertex AI endpoint in your own project and VPC network
On shared infrastructure owned by the model author
Only in Google's public Gemini fleet
Inside the browser console tab
A one-time purchase of the weights
Nothing, deployment is always free
The compute nodes that serve the model while they are deployed
Only the tokens you generate
9. What is a model card in Model Garden?
A model card is the detail page for one model in Model Garden. It is where you evaluate the model and start using it.
Cards typically show an overview, the model's intended use, license and terms, and the actions available for it. Depending on the model, those can be:
- Open in Vertex AI Studio to prompt it
- Deploy to an endpoint
- Enable a managed partner API
- Open notebook for tuning or serving samples
Read the card before building. It tells you whether the model is a managed API or self-deployed, and whether tuning is supported.
Take quiz
Only the colour theme of the card
Its license, intended use and which actions it supports
Your monthly invoice history
The VM serial numbers it will use
Rotate keys
Export weights
Create snapshot
Open in Vertex AI Studio
10. How do you access Model Garden?
There are three common routes, and they all lead to the same catalog.
- Cloud console: open the platform and choose Model Garden from the Tools or Models menu, then search and filter model cards.
- Python SDK: the Model Garden module in the Vertex AI SDK, used to list and deploy models in code.
- gcloud CLI: the
gcloud ai model-garden modelscommand group, withlistanddeploy.
The console is best for exploring and comparing. The SDK and CLI are better for repeatable deployments, scripts and CI pipelines.
Take quiz
gcloud compute images list
gcloud storage buckets list
gcloud ai model-garden models list
gcloud run services list
The SDK or gcloud CLI
Editing the model card text
Manually clicking through the console each time
Emailing a request to the model author
11. What is one-click deployment in Model Garden?
One-click deployment is the Deploy button on a model card. It packages the usual steps into a single guided flow: register the model, create an endpoint and start a serving container on suitable hardware.
You still make a few choices, namely the region, endpoint name, machine type and accelerator, and you accept the model license where required. Model Garden suggests tested defaults for the model's size.
When it finishes you have a live Vertex AI endpoint you can call from the SDK or REST. The same flow can be run from code with the SDK or gcloud.
Take quiz
A downloaded zip of the training data
A PDF of the license
A new billing account
A live Vertex AI endpoint serving the model
The Linux kernel version
Region and machine or accelerator type
The model's internal layer count
The partner's pricing contract
12. What is the Model Garden SDK?
The Model Garden SDK is a module in the Vertex AI SDK for Python that lets you list, deploy and manage Model Garden models from code. Its central class is OpenModel, which wraps a model ID and exposes a deploy() method.
import vertexai from vertexai import model_garden vertexai.init(project="my-project", location="us-central1") model = model_garden.OpenModel("google/gemma3@gemma-3-1b-it") endpoint = model.deploy()
deploy() returns an endpoint object you can call. It is the code equivalent of the console's Deploy button and is easy to put in a pipeline.
Take quiz
deploy()
bill()
export_weights()
tune_dataset()
It is the only way to see model cards
It makes models free
It makes deployments repeatable and scriptable
It removes the need for a Google Cloud project
13. How do you list and deploy models using gcloud?
Use the gcloud ai model-garden models command group. list shows deployable models, and deploy creates the endpoint.
gcloud ai model-garden models list gcloud ai model-garden models list --can-deploy-hugging-face-models gcloud ai model-garden models deploy \ --model=google/gemma3@gemma-3-1b-it \ --region=us-central1
The default list leaves out tuned models and Hugging Face models. Add --can-deploy-hugging-face-models to see the supported Hugging Face ones. For gated Hugging Face models, deploy also accepts --hugging-face-access-token.
Take quiz
--with-weights-export
--can-deploy-hugging-face-models
--list-all-vms
--include-bigquery
Anything older than a day
All partner models and all regions
Every Gemma model
Tuned models and Hugging Face models
14. What is Gemma in Model Garden?
Gemma is Google's family of lightweight open-weight models, built with research related to Gemini. In Model Garden it is a common first choice for self-deployment because the smaller sizes fit on a single modest GPU.
Model Garden lists several Gemma variants, including instruction-tuned versions, and gives you notebooks for serving and tuning. The ID format used by the SDK looks like google/gemma3@gemma-3-1b-it.
Gemma is released under its own terms of use, so you accept those before deploying. Note it is open weight, not a managed Google API.
Take quiz
A proprietary model with hidden weights only
A managed speech-to-text API
A lightweight open-weight model family from Google
A vector database
Accept its terms of use
Ask Google to export a hard drive
Convert it to a SQL schema
Buy a TPU pod
15. What are Llama models in Model Garden?
Llama is Meta's open-weight model family. Model Garden offers it in two ways: a curated set as serverless MaaS (for example Llama 4 Scout 17B-16E) and a wider set you can self-deploy.
Llama models are released under Meta's community license, and access is gated. You accept the license in Model Garden, and for Hugging Face downloads you also need an access token.
For the MaaS route you call a Vertex AI endpoint, often with an OpenAI-compatible chat completions interface.
Take quiz
Anthropic
Stability AI
Mistral AI
Meta
A BigQuery dataset name
A Hugging Face access token
A Cloud DNS zone
A TPU reservation ID
16. What are Claude models on Vertex AI?
Anthropic's Claude models are partner models offered on Vertex AI as a managed API (MaaS). You enable the model from its Model Garden card, then send requests to Vertex AI endpoints with Google Cloud authentication.
You can call them with Anthropic's SDK, which has a Vertex client, or with raw REST. Always copy the exact model ID from the model card, because IDs are version-specific.
Billing and access run through Google Cloud. Anthropic's models are not self-hosted by you, so there are no GPUs to size.
Take quiz
As a managed API enabled from Model Garden
By downloading weights to your laptop
By deploying a Gemma container
Only through Cloud Functions
From your VM's hostname
From the Cloud Billing export
From the model card in Model Garden
From a random blog guess
17. How does Model Garden support Hugging Face models?
Model Garden can deploy many Hugging Face models straight to a Vertex AI endpoint. You pass the Hugging Face model ID, such as stabilityai/stable-diffusion-xl-base-1.0, instead of a Model Garden ID.
- List supported Hugging Face models (the gcloud flag or the SDK's Hugging Face listing option).
- Pass the model ID to
deploy, plus an access token if the model is gated. - Pick hardware and wait for the endpoint to become ready.
Only models Model Garden can serve are listed, so not every model on the Hub qualifies. For ones that are not supported, the custom weights route is the alternative.
Take quiz
The author's email address
The Hugging Face model ID
A Pub/Sub topic name
A BigQuery table ID
Only models written in Java
Yes, every one without exception
Only models under 1 MB
No, only models Model Garden can serve are supported
18. What is the Hugging Face access token used for in Model Garden?
The token authenticates Vertex AI to Hugging Face when a model is gated, meaning the author requires you to accept terms before downloading weights. Llama is a typical case.
You first accept the license on the model's Hugging Face page, create a read-only token in your Hugging Face account, then pass it at deploy time:
gcloud ai model-garden models deploy \ --model=meta-llama/Llama-3.2-1B-Instruct \ --hugging-face-access-token=HF_TOKEN \ --region=us-central1
Public, ungated models do not need it. Treat the token like a password and keep it out of source control, for example in Secret Manager.
Take quiz
For every model, including public ones
Never, because Google bundles all weights
When the model is gated behind terms the author requires you to accept
Only for models smaller than 1 GB
In a secret manager rather than in source control
Committed to the repo's README
Pasted into the model card page
Inside the endpoint's display name
19. What is custom weights deployment in Model Garden?
Custom weights deployment lets you serve your own fine-tuned or imported version of a supported base model without writing a serving container. You upload the model files to a Cloud Storage bucket in your project, then deploy from Model Garden.
Key constraints from the docs at the time of writing:
- The feature has been in Preview, so check its current status.
- Files must be in the Hugging Face weights format.
- Quantized models are not supported for import.
- It works for supported base models and many Hugging Face architectures, including LoRA (PEFT) adapters.
The Model Garden SDK can also import Hugging Face weights into a bucket and deploy them in a few calls.
Take quiz
A Compute Engine boot disk image only
A Cloud SQL table
A public GitHub release
A Cloud Storage bucket in your project
Fine-tuned Gemma checkpoints
Quantized models
Models in Hugging Face weights format
LoRA adapters on a supported base
20. What serving runtimes does Model Garden use for open models?
Model Garden ships prebuilt serving containers so you do not assemble the stack yourself. The main runtimes are vLLM, SGLang, Hugging Face TGI (text generation), TEI (text embeddings) and plain PyTorch inference.
| Runtime | Typical use |
| vLLM | High-throughput LLM serving with continuous batching |
| SGLang | LLM serving, including structured and multi-turn workloads |
| TGI | Hugging Face text generation inference |
| TEI | Embedding model serving |
| PyTorch | Diffusion, vision and other non-LLM models |
Google also publishes some of these images as FedRAMP High compliant containers, which matters for regulated workloads.
Take quiz
TEI
PyTorch diffusion samplers only
vLLM
SGLang
Only partner managed APIs
Only large chat models
Image diffusion or other non-LLM models
Only SQL-generation models
21. What is Provisioned Throughput for partner models?
Provisioned Throughput reserves model capacity for a fixed fee. You decide how much throughput you need and in which regions, and your requests are prioritized over standard pay-as-you-go traffic.
The result is better availability and steadier latency during busy periods, at the cost of paying for the reservation even when it is idle. It is offered for some partner models, not all.
One limitation to remember: Provisioned Throughput is not supported on the global endpoint, so use a regional endpoint if you depend on it.
Take quiz
Permanent export of model weights
Reserved capacity that is prioritized over pay-as-you-go requests
Automatic fine-tuning
Free unlimited tokens
Any endpoint in us-central1
A dedicated regional endpoint with reservation
A regional endpoint
The global endpoint
22. What permissions are needed to use MaaS models?
Calling a managed model needs the Vertex AI User role (roles/aiplatform.user) on the project, or an equivalent custom role.
Enabling a partner model is a separate step. The Cloud Commerce Consumer Procurement API (cloudcommerceconsumerprocurement.googleapis.com) must be allowed by your organization policy, and whoever enables the model needs permission to manage the procurement entitlement.
For open MaaS models you also need to grant users access to open models before first use. If an organization policy restricts which Model Garden models are allowed, the model must be on the allowed list.
Take quiz
Compute Network Admin
Billing Account Creator
Vertex AI User
Storage Object Viewer only
Cloud Commerce Consumer Procurement API
Cloud Translation API
Cloud Vision API
Cloud Scheduler API
23. What licenses apply to open models in Model Garden?
Each open model carries its own license, and Model Garden shows it on the model card. There is no single Google license that covers them all.
- Gemma uses Google's Gemma terms of use.
- Llama uses Meta's community license with usage conditions.
- Other open models may use licenses such as Apache 2.0 or MIT, or custom terms.
You usually accept the terms before deploying, and for gated Hugging Face models also on the Hugging Face page. Check commercial-use limits, attribution rules and any acceptable-use policy before shipping a product built on the model.
Take quiz
On the Cloud Billing invoice only
In the Cloud Logging sink settings
In the VPC firewall rules
On the model card
Yes, all are public domain
No, each model has its own license terms
Yes, a single Google license covers all
Only Gemma has a license
24. What is Vertex AI Studio's role alongside Model Garden?
Vertex AI Studio is the interactive workspace for prompting and comparing models. Model Garden is where you discover models, and Studio is where you try them.
From a Gemini or supported partner model card, the Open in Vertex AI Studio button loads that model into a prompt workspace. You test prompts, adjust parameters such as temperature and token limits, then export the same call as code.
For open models you deploy yourself, Studio is less central. You normally test the endpoint through the SDK or a notebook.
Take quiz
Prompt it interactively and tune parameters before writing code
Rewrite its training dataset
Create a VPC peering
Change its GPU driver
Export to BigQuery
Deploy to TPU pod
Open in Vertex AI Studio
Clone repository
25. How do you call a managed open model with the OpenAI SDK?
Managed open models on Vertex AI expose an OpenAI-compatible chat completions API. You point the OpenAI client at the Vertex AI base URL and use a short-lived Google access token as the API key.
import google.auth, google.auth.transport.requests, openai creds, _ = google.auth.default( scopes=["https://www.googleapis.com/auth/cloud-platform"]) creds.refresh(google.auth.transport.requests.Request()) client = openai.OpenAI( base_url=f"https://{LOCATION}-aiplatform.googleapis.com/v1/projects/" f"{PROJECT}/locations/{LOCATION}/endpoints/openapi", api_key=creds.token) resp = client.chat.completions.create( model="meta/llama-4-scout-17b-16e-instruct-maas", messages=[{"role": "user", "content": "Define MaaS in one line."}])
The token expires, so refresh it for long-running apps. Take the exact model ID and location from the model card.
Take quiz
The project number only
A short-lived Google Cloud access token
Your Hugging Face password
A static Gmail address
Because the base URL rotates daily
Because the model ID changes hourly
Because endpoints delete themselves nightly
Because the access token expires
26. What is the difference between MaaS and self-deployed models?
The core difference is who runs the infrastructure. With MaaS, Google serves the model as a serverless API. With self-deployment, you run it on endpoint nodes in your own project.
| Aspect | MaaS | Self-deployed |
| Infrastructure | Managed by Google | Nodes you configure in your project |
| Billing | Usually per token | Per node-hour while deployed |
| Scaling | Handled for you | You set min and max replicas |
| Network control | Calls go to a Vertex AI endpoint | Runs in your project and VPC |
| Weights | Not available to you | Open models: you hold the weights; partner models: not exportable |
| Setup time | Enable and call | Deploy, wait for nodes, tune |
Pick MaaS for speed and spiky traffic, and self-deployment when you need control, customization or steady heavy load.
Take quiz
Gemini in Vertex AI Studio
MaaS pay-as-you-go
Self-deployed endpoints
Pre-trained speech APIs
You, only for self-deployed endpoints
Anthropic, for every model
Nobody, replicas do not exist
You, only for MaaS
27. What is the difference between open-weight and open-source models?
An open-weight model publishes its trained parameters, so you can run and tune it. A truly open-source model goes further and releases enough, such as code and often data details, under a recognized open license.
| Open weight | Open source | |
| Weights released | Yes | Yes |
| Training code and data details | Often not | Generally provided |
| License | Custom terms are common | OSI-style license |
| Example in Model Garden | Llama, Gemma | Models under Apache 2.0 or MIT with full recipes |
Google's own docs make this distinction, and Vertex AI offers both. In practice, check the license on each model card for commercial limits.
Take quiz
The entire training dataset
A free GPU allocation
A managed SLA
The trained model parameters
A Google support contract
Code and training details under a recognized open license
A dedicated endpoint
Quantized versions only
28. How does Model Garden differ from the Hugging Face Hub?
The Hub is a vast community repository of models, datasets and Spaces. Model Garden is a curated catalog tied to Google Cloud's deployment, IAM and networking.
| Model Garden | Hugging Face Hub | |
| Scope | Curated, 200+ models | Huge community catalog |
| Deployment | Managed endpoints in your project | You build or choose the hosting |
| Governance | IAM, org policy, VPC | Depends on your own setup |
| Partner APIs | Claude, Mistral and others | Not a managed API marketplace |
They also work together. Model Garden can deploy many Hub models by ID, so the Hub acts as a source and Model Garden as the serving layer.
Take quiz
Managed deployment with Google Cloud IAM and networking controls
It is limited to image models
It stores more community datasets
It has no licensing at all
The Hub replaces Vertex AI endpoints
Model Garden deletes Hub models
Model Garden can deploy many Hub models by their ID
They cannot interoperate
29. When should you choose MaaS over self-deployment?
Choose MaaS when you want the fastest path to production and do not need to touch the weights or the serving stack.
- Traffic is spiky or unpredictable, and idle GPUs would be wasteful.
- You lack ML platform staff to manage GPUs, quota and scaling.
- The model you want exists as a managed API, such as Claude or Llama.
Choose self-deployment when you need a fine-tuned model, a model that is not offered as MaaS, strict network placement, or a steady high load where dedicated nodes cost less per token.
flowchart TD
A["Need a model"] --> B{"Offered as MaaS?"}
B -- No --> E["Self-deploy"]
B -- Yes --> C{"Need custom weights or VPC-only serving?"}
C -- Yes --> E
C -- No --> D{"Steady heavy traffic?"}
D -- Yes --> F["Compare node cost vs per-token cost"]
D -- No --> G["Use MaaS"]
Take quiz
You need a model absent from the managed list
Unpredictable traffic and a small platform team
Your policy forbids any managed API
You must edit the model's weights
Wanting no GPU quota concerns
Preferring per-token billing
Wanting zero setup
Needing a fine-tuned model or strict network placement
30. How do you deploy a model from the console step by step?
- Open Model Garden, search for the model and open its card.
- Read the license and the deployment notes, then click Deploy.
- Choose the region, endpoint name, machine type and accelerator. Start from the suggested default.
- Set minimum and maximum replicas, and any network or encryption options your organization requires.
- Accept the model terms and start the deployment.
- Wait until the endpoint shows as ready, then test it with the sample request, a notebook or the SDK.
Deployment can take several minutes because nodes must start and weights must load. If it fails, the usual suspects are GPU quota in the chosen region and a machine type that is too small for the model.
Take quiz
Export billing data
Delete the endpoint
Click Deploy and configure region and hardware
Rotate the project number
Insufficient GPU quota and a machine type too small for the model
A missing profile photo and a long project name
Too many model cards open and a slow browser
Wrong keyboard layout and a disabled cookie
31. Explain the execution flow of a one-click deployment?
When you press Deploy, Model Garden orchestrates several Vertex AI resources on your behalf.
- A Model resource is created in the Model Registry, pointing to the serving container and the weight location.
- An Endpoint resource is created in the chosen region.
- The model is deployed to the endpoint on nodes with the chosen machine and accelerator.
- Each node starts the container (for example vLLM), pulls the weights and loads them into GPU memory.
- After health checks pass, the endpoint accepts prediction requests.
sequenceDiagram participant U as You participant MG as Model Garden participant R as Model Registry participant E as Endpoint participant N as GPU node U->>MG: Click Deploy MG->>R: Create Model resource MG->>E: Create Endpoint MG->>N: Start container and load weights N-->>E: Health checks pass E-->>U: Ready for requests
Billing for the nodes starts once they are provisioned, so a stuck deployment still costs money until you undeploy it.
Take quiz
A Pub/Sub subscription
A Cloud DNS zone
A Cloud Run revision
The Model resource in the Model Registry
The license is revoked
Nodes load weights and health checks pass
Billing is paused
The model is deleted and recreated
32. How do you send a prediction request to a deployed endpoint?
Get a handle to the endpoint and call predict. For vLLM-based Model Garden deployments, each instance is a dictionary with a prompt and generation settings.
from google.cloud import aiplatform aiplatform.init(project="my-project", location="us-central1") endpoint = aiplatform.Endpoint("ENDPOINT_ID") resp = endpoint.predict(instances=[{ "prompt": "Explain MaaS in two sentences.", "max_tokens": 128, "temperature": 0.2, }]) print(resp.predictions[0])
Many deployments also accept chat-style payloads, and some work with OpenAI-compatible clients. The model's sample notebook shows the exact request shape. Authenticate with a service account that has the Vertex AI User role.
Take quiz
endpoint.predict()
endpoint.rename_region()
endpoint.export_weights()
endpoint.snapshot()
In the IAM audit log
In your VM's /etc folder
In the model's sample notebook or card
In the VPC route table
33. How do you call Claude through Vertex AI?
Enable the Claude model from its Model Garden card, then call it with Anthropic's SDK using the Vertex client. Authentication uses your Google Cloud credentials, not an Anthropic API key.
from anthropic import AnthropicVertex client = AnthropicVertex(region=REGION, project_id=PROJECT) msg = client.messages.create( model=MODEL_ID_FROM_CARD, max_tokens=512, messages=[{"role": "user", "content": "Summarize this ticket."}], ) print(msg.content[0].text)
Use the model ID listed on the card, since IDs are version-specific. A regional endpoint keeps traffic in a region and supports Provisioned Throughput, while the global endpoint favors availability but does not support it.
Take quiz
An Anthropic website cookie
Your Google Cloud credentials
An SSH key
A Hugging Face token
It lets you export weights
It removes the need for IAM
It is always cheaper than every other option
Region pinning and Provisioned Throughput support
34. How do you fine-tune an open model from Model Garden?
Most open and fine-tunable model cards offer a tuning path. The two common routes are:
- Notebook: click Open notebook and run the sample in Colab Enterprise or Workbench. You get full control over code, hyperparameters and experiments.
- Managed job: for supported models, launch tuning from the card, point it at training data in Cloud Storage and let Vertex AI run it.
Parameter-efficient methods such as LoRA train small adapters instead of all weights. They need less GPU memory and are cheaper than full fine-tuning.
Dataset formats differ by model, usually JSONL, so follow the card. After tuning you deploy the result to an endpoint and evaluate it against the base model.
Take quiz
Only the endpoint's DNS name
The billing account
Small adapter weights
A new tokenizer from scratch
Running the sample notebook
Clicking Delete on the card
Using the Studio prompt box
Exporting a CSV of results
35. How do you deploy a fine-tuned model from Model Garden?
There are two paths, depending on how you tuned.
- Managed tuning job: the tuned model is registered in the Model Registry. Open it and deploy it to an endpoint, or deploy from the tuning job's results.
- Your own training: save the checkpoint or LoRA adapter in Hugging Face weights format to Cloud Storage, then use the custom weights deployment, from the console or the SDK.
Both routes need the base model to be a supported one. Quantized checkpoints are not accepted by custom weights import, so merge or export in full or half precision first.
After deployment, run the same evaluation set against base and tuned models. A tuned model that wins on your data is worth the endpoint cost, and one that does not should be discarded.
Take quiz
A CSV of token counts
A zipped Docker image only
A Cloud SQL dump
Hugging Face weights format
To reset the endpoint's quota
To confirm tuning actually improves results on your data
To refresh the Hugging Face token
To switch the project's billing region
36. How do regional and global endpoints differ for partner models?
A regional endpoint serves requests from a region you name. A global endpoint does not pin a region, and Google routes the request to wherever capacity is available, which improves availability.
| Regional endpoint | Global endpoint | |
| Request location | Fixed region | Routed dynamically |
| Provisioned Throughput | Supported (where offered) | Not supported |
| Data residency control | Stronger, you choose the region | Weaker, region not fixed |
| Availability | Bound to one region's capacity | Usually higher |
If your policy demands regional processing, you can block the global endpoint with the constraints/gcp.restrictEndpointUsage organization policy constraint.
Take quiz
A regional endpoint
The global endpoint
Neither, location is always random
Only a public load balancer
constraints/compute.vmExternalIpAccess
constraints/sql.restrictPublicIp
constraints/gcp.restrictEndpointUsage
constraints/iam.allowedPolicyMemberDomains
37. How can you restrict which Model Garden models your organization uses?
Use an organization policy that limits which Model Garden models are allowed. It is the Model Garden-specific constraint, constraints/vertexai.allowedModels, and you set it at the organization, folder or project level.
Layer it with other controls:
- IAM: grant Vertex AI User only to the identities that should call models.
- Partner models: the Cloud Commerce Consumer Procurement API must be allowed, and the policy must list the partner model.
- Endpoint restriction: block the global endpoint if you need regional-only processing.
If a user can see a model but a call fails with a policy error, check the allowed-models list first.
Take quiz
constraints/compute.disableSerialPortAccess
constraints/vertexai.allowedModels
constraints/gcp.resourceLocations only
constraints/storage.uniformBucketLevelAccess
Whether Cloud DNS has a CNAME
Whether the endpoint name is long
Whether the bucket has versioning
Whether the allowed-models policy includes that model
38. How is data privacy handled for managed models in Model Garden?
For managed APIs, Google states that customer prompts and model responses are not shared with third parties when you use the Vertex AI API. That includes partner models such as Claude and managed open models.
A few details matter for compliance reviews:
- Data at rest stays in the region or multi-region you select for open models.
- Regionalization of processing can vary, so confirm it for the exact model.
- Generative AI certifications on Vertex AI continue to apply to partner and open MaaS use.
With self-deployed models the picture is simpler to defend, because the model runs inside your own project and VPC network and you control logging and egress.
Take quiz
They are published in the model card
They are sold to the partner
They are not shared with third parties
They are posted to a public bucket
Where processing happens, since regionalization can vary
The size of the model card page
The model's logo colours
The author's social media
39. How do you secure a self-deployed model endpoint?
Treat the endpoint like any production API and layer controls from the network to the identity.
- Private access: use a private endpoint or Private Service Connect so traffic never crosses the public internet.
- Least-privilege IAM: callers use dedicated service accounts with only Vertex AI User, and the endpoint's own service account is scoped tightly.
- Perimeter: put the project inside VPC Service Controls to limit data exfiltration.
- Encryption: use customer-managed encryption keys if your policy requires them.
- Secrets and audit: keep tokens in Secret Manager and enable audit logging for endpoint calls.
Add input and output filtering at the application layer, since the endpoint serves whatever the model generates.
Take quiz
Public IP on every node
A longer endpoint name
Disabling audit logs
VPC Service Controls
With no authentication
With dedicated, least-privilege service accounts
With one shared owner account
With a Hugging Face token
40. Which is better, Gemini or a self-deployed open model, and why?
Neither wins in general. Gemini is usually better when you want top capability with zero infrastructure. A self-deployed open model is better when control, customization or unit cost under steady load matters most.
| Factor | Gemini (managed) | Self-deployed open model |
| Operations | None | You run endpoints and scaling |
| Customization | Prompting and supported tuning | Full tuning, custom weights, serving flags |
| Cost shape | Per token | Per node-hour, cheaper at steady high volume |
| Data control | Managed service terms | Inside your VPC |
| Time to start | Minutes | Hours to days with evaluation |
A practical approach is to prototype on a managed model, measure quality and cost, and move a workload to an open model only when the numbers justify the extra operations.
Take quiz
Steady high volume or a need for deep customization
When you want zero operational work
When traffic is a handful of requests a day
When you cannot manage any infrastructure
Fine-tune before testing any prompt
Choose the largest model by default
Prototype on a managed model and measure quality and cost
Commit to a GPU reservation immediately
41. How do you troubleshoot GPU quota errors during deployment?
A quota error means your project has no spare accelerators of that type in that region. The deployment fails or stays pending, and the message names the quota.
- Read the error and note the accelerator type and region in the message.
- Open IAM and Admin, then Quotas, filter by the custom model serving quota for that GPU, and check usage against the limit.
- Request an increase with a justification, or free quota by undeploying idle endpoints.
- Try a different region or a different accelerator that the model card says is supported.
- Redeploy once the quota is confirmed.
Quota is separate for each GPU type and region, so having L4 headroom does not help an A100 deployment.
Take quiz
Cloud Build history
IAM and Admin, under Quotas
Cloud Storage lifecycle rules
The Hugging Face account page
Yes, but only on weekends
Only if the endpoint name matches
Yes, all GPUs share one pool
No, quota is tracked per GPU type and region
42. How do you troubleshoot out-of-memory errors on a deployed model?
OOM usually means the model plus its KV cache do not fit in GPU memory. Weights take a fixed amount, and long prompts and many concurrent requests grow the cache on top.
Start with the container logs in Cloud Logging, which show whether the crash happened at load time or under traffic.
- At load: the weights are too big. Use a larger accelerator, more GPUs with tensor parallelism, or a quantized variant such as FP8.
- Under traffic: lower the maximum sequence length or concurrent sequences, or the memory-utilization setting of the serving runtime.
- Right-sizing: compare the model card's recommended machine type with what you chose.
Change one setting at a time and redeploy, so you know which change fixed it.
Take quiz
Docker tags and Git branches
Billing data and IAM roles
Model weights and the KV cache
Logs and DNS records
Lower max sequence length or concurrent sequences
Rename the endpoint
Disable Cloud Logging
Add more IAM roles
43. How do you troubleshoot 403 and 429 errors from managed models?
The two codes point to different problems, so separate them first.
| Error | Typical causes | Fix |
| 403 Permission denied | Model not enabled, missing Vertex AI User role, organization policy blocks the model, procurement API not allowed | Enable the model from its card, grant the role, update the allowed-models policy |
| 429 Resource exhausted | Quota or capacity limit hit on pay-as-you-go traffic | Retry with exponential backoff, request a quota increase, or reserve Provisioned Throughput |
Also check the region and model ID. A 404 or a model-not-found message often means the model is not offered in that region or the ID is wrong.
For sustained 429s, a backoff-only client is not enough. Reserve capacity or spread load across supported regions.
Take quiz
403
204
301
429
Whether the bucket is multi-region
Whether the model was enabled and the organization policy allows it
Whether the prompt has emojis
Whether the SDK was installed last week
44. How can you optimize the cost of self-deployed endpoints?
Cost for a self-deployed endpoint is mostly accelerator node-hours, so every optimization either shrinks the nodes or shortens the time they run.
- Right-size: pick the smallest machine that fits the model and your traffic, using the card's recommendation as a baseline.
- Quantize: an FP8 or similar variant can fit on cheaper or fewer GPUs, if quality holds on your tests.
- Tune replicas: keep the minimum low and let autoscaling add nodes only under load.
- Undeploy idle endpoints in dev and test, since dedicated endpoints typically keep at least one node warm.
- Commit: use reservations or committed use discounts for steady production load, and consider Spot VMs for tolerant workloads where offered.
- Rethink: if traffic is low or spiky, a MaaS model may simply cost less.
Take quiz
Accelerator node-hours
Length of the endpoint name
Count of IAM members
Number of model cards viewed
Raise the minimum replicas
Switch to a larger GPU
Undeploy it when idle
Enable more regions
45. How can you optimize latency and throughput of a self-deployed LLM?
Latency has two parts: time to first token and per-token speed. Throughput is how many requests the node can serve at once. Most levers come from the serving runtime.
- Use a fast runtime such as vLLM or SGLang, which batch requests continuously instead of waiting for fixed batches.
- Parallelize: shard big models across GPUs with tensor parallelism so each token is computed faster.
- Quantize to cut memory traffic, then confirm quality did not drop.
- Cache prefixes: repeated system prompts benefit from prefix caching.
- Limit lengths: a sensible max sequence length frees KV cache for more concurrent requests.
- Stream tokens so users see output sooner, and keep the endpoint close to callers.
Load-test with realistic prompts, because the best settings depend on your input and output lengths.
Take quiz
Region mirroring
Tensor parallelism
Prefix renaming
Label smoothing
It adds GPUs automatically
It compresses the license
It disables streaming
Repeated system prompts do not have to be recomputed each time
46. How do you evaluate candidate models before choosing one?
Build a small golden dataset from your real prompts, with reference answers or rubric criteria, then run each candidate against it.
- Shortlist a Google, a partner and an open model from Model Garden.
- Enable partner models first, because the evaluation service needs them enabled before it can run.
- Run them through the Gen AI evaluation service with the same prompts and metrics.
- Record quality, latency and cost per request for each.
- Re-test the winner on a harder, held-out slice before you commit.
A model that is slightly worse on quality but far cheaper may be the right production choice, so weigh all three numbers together.
Take quiz
It must be quantized
It must be deleted from the Registry
It has to be enabled through Model Garden
It must be exported to a laptop
Latency and cost per request
Time zone and keyboard layout
Logo size and page color
Number of GitHub stars only
47. Explain the lifecycle of a model from selection to production?
The lifecycle runs from discovery to monitoring, and Model Garden covers the first half directly.
flowchart LR
A["Browse Model Garden"] --> B["Read model card and license"]
B --> C["Try in Studio or notebook"]
C --> D["Evaluate vs candidates"]
D --> E{"Tune needed?"}
E -- Yes --> F["Fine-tune with LoRA or full"]
E -- No --> G["Deploy"]
F --> G
G --> H["Endpoint in production"]
H --> I["Monitor cost, latency, quality"]
I --> D
- Select: shortlist by task, license, size and managed versus self-deployed.
- Trial: prompt in Studio or run a notebook.
- Evaluate and tune: measure on your data and tune only if the gap justifies it.
- Deploy: managed API or endpoint, with IAM and network controls.
- Operate: watch cost, latency and output quality, then loop back when better models appear.
Take quiz
Exporting the weights to email
Deleting the endpoint
Requesting a new billing account
Evaluating candidate models on your data
Disabling logs
Monitoring cost, latency and quality, then re-evaluating
Archiving the license
Removing IAM roles
48. What happens when you undeploy a model from an endpoint?
Undeploying removes the deployed model from the endpoint and releases its serving nodes, so node-hour charges for that deployment stop. Requests to the endpoint that relied on it will fail or fall to other deployed models.
The Model resource stays in the Model Registry, so you can redeploy it later without re-importing. The endpoint also remains until you delete it, and an empty endpoint costs nothing for compute.
- Undeploy: frees GPUs and stops node billing, keeps the Model.
- Delete endpoint: removes the endpoint resource itself, after models are undeployed.
- Delete model: removes the Registry entry, which you only do when you are done with it.
If the endpoint was taking traffic, shift traffic first or redirect clients, to avoid errors.
Take quiz
Undeploying it from the endpoint
Changing the project's label
Renaming the model
Opening the model card
A copy in the partner's cloud
Nothing, it is erased immediately
The Model resource, ready to redeploy
Only the billing invoice
49. How would you design a multi-model setup using Model Garden?
Use a router in front of several models, so each request goes to the cheapest model that can handle it.
flowchart TD C["Client request"] --> R["Router service"] R -->|simple| S["Small open model, self-deployed"] R -->|complex| M["Managed frontier model, MaaS"] R -->|bursty overflow| M S -.->|failure or low confidence| M M --> O["Response"] S --> O
- Small self-deployed model for high-volume, simple tasks such as classification or extraction, where steady load makes dedicated nodes cheap.
- Managed model for hard reasoning and burst traffic, so you do not over-provision GPUs.
- Fallback: route failures or low-confidence answers up to the stronger model.
Log the model used, latency and cost for each request. Those logs let you adjust routing rules with evidence instead of guesses.
Take quiz
Compress the prompts to zero
Send each request to the cheapest model that can handle it
Rotate Hugging Face tokens
Store the model weights
It makes the small model larger
It removes the need for any router
It disables fallbacks
It avoids over-provisioning GPUs for peaks
50. How do you automate Model Garden deployments in CI/CD?
Treat a model deployment like application code. Script it with the SDK or gcloud, keep the settings in version control and run it from a pipeline.
- Define model ID, region, machine type, accelerator and replica limits in a config file.
- Deploy to a staging endpoint with
gcloud ai model-garden models deployor the SDK'sdeploy(). - Smoke test with a fixed prompt set and assert on latency and a few quality checks.
- Promote by deploying to production, shifting a small share of endpoint traffic first and then the rest.
- Roll back by routing traffic to the previous deployed model, and undeploy old versions when safe.
Use a dedicated service account for the pipeline, with only the roles it needs, and pull tokens from Secret Manager. Infrastructure-as-code tools can manage the surrounding endpoints, networking and IAM.