Prev Next

Cloud / Vertex AI Model Garden Interview questions

Last updated

1. What is Vertex AI Model Garden? 2. What is Gemini Enterprise Agent Platform and how does it relate to Vertex AI? 3. What are the model categories in Model Garden? 4. What are first-party models in Model Garden? 5. What are open models in Model Garden? 6. What are partner models in Model Garden? 7. What is Model as a Service (MaaS) in Model Garden? 8. What are self-deployed models in Model Garden? 9. What is a model card in Model Garden? 10. How do you access Model Garden? 11. What is one-click deployment in Model Garden? 12. What is the Model Garden SDK? 13. How do you list and deploy models using gcloud? 14. What is Gemma in Model Garden? 15. What are Llama models in Model Garden? 16. What are Claude models on Vertex AI? 17. How does Model Garden support Hugging Face models? 18. What is the Hugging Face access token used for in Model Garden? 19. What is custom weights deployment in Model Garden? 20. What serving runtimes does Model Garden use for open models? 21. What is Provisioned Throughput for partner models? 22. What permissions are needed to use MaaS models? 23. What licenses apply to open models in Model Garden? 24. What is Vertex AI Studio's role alongside Model Garden? 25. How do you call a managed open model with the OpenAI SDK? 26. What is the difference between MaaS and self-deployed models? 27. What is the difference between open-weight and open-source models? 28. How does Model Garden differ from the Hugging Face Hub? 29. When should you choose MaaS over self-deployment? 30. How do you deploy a model from the console step by step? 31. Explain the execution flow of a one-click deployment? 32. How do you send a prediction request to a deployed endpoint? 33. How do you call Claude through Vertex AI? 34. How do you fine-tune an open model from Model Garden? 35. How do you deploy a fine-tuned model from Model Garden? 36. How do regional and global endpoints differ for partner models? 37. How can you restrict which Model Garden models your organization uses? 38. How is data privacy handled for managed models in Model Garden? 39. How do you secure a self-deployed model endpoint? 40. Which is better, Gemini or a self-deployed open model, and why? 41. How do you troubleshoot GPU quota errors during deployment? 42. How do you troubleshoot out-of-memory errors on a deployed model? 43. How do you troubleshoot 403 and 429 errors from managed models? 44. How can you optimize the cost of self-deployed endpoints? 45. How can you optimize latency and throughput of a self-deployed LLM? 46. How do you evaluate candidate models before choosing one? 47. Explain the lifecycle of a model from selection to production? 48. What happens when you undeploy a model from an endpoint? 49. How would you design a multi-model setup using Model Garden? 50. How do you automate Model Garden deployments in CI/CD?

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
Which statement best describes Model Garden?
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
How many models does Google say Model Garden offers?
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
When was Gemini Enterprise Agent Platform announced as the evolution of Vertex AI?
November 30, 2023
March 3, 2021
April 22, 2026
January 1, 2027
What did "Vertex AI Endpoints" become after the rename?
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
Where would you expect to find Anthropic Claude in Model Garden?
Only among task-specific Google ML APIs
It is not listed in Model Garden
Only among open-weight community models
Among the partner models
Which category usually requires you to choose a machine type and accelerator yourself?
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
What do you manage when calling a first-party Gemini model through the API?
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
Where can you try a Gemini model interactively before writing code?
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
What is guaranteed when a model is described as open weight?
The full training dataset is public
The pretrained parameters are released
It can only be used for free
It runs only on TPUs
Which two consumption options exist for open models on Vertex AI?
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
Where do your requests go when you call a partner model as a managed API?
Directly to the partner's private servers
To your on-premises firewall only
To Vertex AI endpoints
To a public GitHub repository
Which of these is a partner model offered in Model Garden?
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
What is the main operational benefit of MaaS?
You must run your own autoscaler
You can export the model weights
You choose the exact GPU model
No infrastructure to provision or manage
How is standard MaaS usage typically billed?
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
Where does a self-deployed model run?
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
What do you pay for with a self-deployed endpoint?
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
What should you check on a model card before committing to a model?
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
Which action on a card opens a Gemini model for interactive prompting?
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.

  1. Cloud console: open the platform and choose Model Garden from the Tools or Models menu, then search and filter model cards.
  2. Python SDK: the Model Garden module in the Vertex AI SDK, used to list and deploy models in code.
  3. gcloud CLI: the gcloud ai model-garden models command group, with list and deploy.

The console is best for exploring and comparing. The SDK and CLI are better for repeatable deployments, scripts and CI pipelines.

Take quiz
Which CLI command group lists deployable Model Garden models?
gcloud compute images list
gcloud storage buckets list
gcloud ai model-garden models list
gcloud run services list
Which access path suits repeatable, scripted deployments best?
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
What does one-click deployment ultimately give you?
A downloaded zip of the training data
A PDF of the license
A new billing account
A live Vertex AI endpoint serving the model
Which choice is still yours during one-click deployment?
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
Which method on OpenModel creates a serving endpoint?
deploy()
bill()
export_weights()
tune_dataset()
Why use the SDK instead of the console for deployments?
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
Which flag shows supported Hugging Face models when listing?
--with-weights-export
--can-deploy-hugging-face-models
--list-all-vms
--include-bigquery
What does the default gcloud models list output leave out?
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
What kind of model is Gemma?
A proprietary model with hidden weights only
A managed speech-to-text API
A lightweight open-weight model family from Google
A vector database
What do you typically do before deploying Gemma from Model Garden?
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
Which company develops the Llama family?
Anthropic
Stability AI
Mistral AI
Meta
What do you need to supply when pulling a gated Llama model from Hugging Face?
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
How are Claude models consumed on Vertex AI?
As a managed API enabled from Model Garden
By downloading weights to your laptop
By deploying a Gemma container
Only through Cloud Functions
Where should you get the exact Claude model ID to use?
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.

  1. List supported Hugging Face models (the gcloud flag or the SDK's Hugging Face listing option).
  2. Pass the model ID to deploy, plus an access token if the model is gated.
  3. 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
What do you pass to deploy a Hugging Face model through Model Garden?
The author's email address
The Hugging Face model ID
A Pub/Sub topic name
A BigQuery table ID
Can every model on the Hugging Face Hub be deployed directly?
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
When is a Hugging Face access token required during deployment?
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
Where is the best place to keep the token?
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
Where must custom model files be uploaded before deployment?
A Compute Engine boot disk image only
A Cloud SQL table
A public GitHub release
A Cloud Storage bucket in your project
Which kind of custom model is not supported for import?
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
Which runtime in the list is built for serving embedding models?
TEI
PyTorch diffusion samplers only
vLLM
SGLang
Which kind of model typically uses the plain PyTorch container?
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
What does Provisioned Throughput give you?
Permanent export of model weights
Reserved capacity that is prioritized over pay-as-you-go requests
Automatic fine-tuning
Free unlimited tokens
Which endpoint type does not support Provisioned Throughput?
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
Which role is the usual minimum for calling managed models?
Compute Network Admin
Billing Account Creator
Vertex AI User
Storage Object Viewer only
Which API must your organization policy allow to enable partner models?
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
Where does Model Garden show an open model's license?
On the Cloud Billing invoice only
In the Cloud Logging sink settings
In the VPC firewall rules
On the model card
Do all open models in Model Garden share one identical license?
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
What does Vertex AI Studio let you do with a model from Model Garden?
Prompt it interactively and tune parameters before writing code
Rewrite its training dataset
Create a VPC peering
Change its GPU driver
Which button on a Gemini model card jumps into the prompt workspace?
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
What goes in the api_key field when using the OpenAI SDK against Vertex AI?
The project number only
A short-lived Google Cloud access token
Your Hugging Face password
A static Gmail address
Why must long-running apps refresh the credential?
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
Which model access style bills mainly per node-hour?
Gemini in Vertex AI Studio
MaaS pay-as-you-go
Self-deployed endpoints
Pre-trained speech APIs
Who sets the min and max replica count in each approach?
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
What does an open-weight release always include?
The entire training dataset
A free GPU allocation
A managed SLA
The trained model parameters
What extra do truly open-source models generally provide?
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
What is a key strength of Model Garden compared with the raw Hub?
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
How can the two work together?
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
Which situation points toward MaaS?
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
What most often pushes a team toward self-deployment?
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?

  1. Open Model Garden, search for the model and open its card.
  2. Read the license and the deployment notes, then click Deploy.
  3. Choose the region, endpoint name, machine type and accelerator. Start from the suggested default.
  4. Set minimum and maximum replicas, and any network or encryption options your organization requires.
  5. Accept the model terms and start the deployment.
  6. 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
Which step comes right after reading the license on the card?
Export billing data
Delete the endpoint
Click Deploy and configure region and hardware
Rotate the project number
What are the two usual causes of a failed first deployment?
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.

  1. A Model resource is created in the Model Registry, pointing to the serving container and the weight location.
  2. An Endpoint resource is created in the chosen region.
  3. The model is deployed to the endpoint on nodes with the chosen machine and accelerator.
  4. Each node starts the container (for example vLLM), pulls the weights and loads them into GPU memory.
  5. 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
Which resource records the serving container and weight location?
A Pub/Sub subscription
A Cloud DNS zone
A Cloud Run revision
The Model resource in the Model Registry
What happens just before an endpoint starts accepting requests?
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
Which method sends a request to a deployed endpoint in the SDK?
endpoint.predict()
endpoint.rename_region()
endpoint.export_weights()
endpoint.snapshot()
Where do you find the exact request format for a given model?
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
What credentials does AnthropicVertex use?
An Anthropic website cookie
Your Google Cloud credentials
An SSH key
A Hugging Face token
Why might you choose a regional endpoint for Claude?
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
What does LoRA train instead of all model weights?
Only the endpoint's DNS name
The billing account
Small adapter weights
A new tokenizer from scratch
Which route gives you the most control over code and hyperparameters?
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.

  1. 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.
  2. 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
In what format should a custom checkpoint be saved for custom weights deployment?
A CSV of token counts
A zipped Docker image only
A Cloud SQL dump
Hugging Face weights format
Why compare the tuned model with the base model after deployment?
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
Which option fixes where requests are processed?
A regional endpoint
The global endpoint
Neither, location is always random
Only a public load balancer
Which organization policy constraint can block the global API endpoint?
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
What is the Model Garden-specific organization policy constraint?
constraints/compute.disableSerialPortAccess
constraints/vertexai.allowedModels
constraints/gcp.resourceLocations only
constraints/storage.uniformBucketLevelAccess
A partner model call is blocked even though IAM looks right. What should you check?
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
What does Google state about prompts sent to managed models?
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
What should you verify for a specific managed model during a compliance review?
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.

  1. Private access: use a private endpoint or Private Service Connect so traffic never crosses the public internet.
  2. Least-privilege IAM: callers use dedicated service accounts with only Vertex AI User, and the endpoint's own service account is scoped tightly.
  3. Perimeter: put the project inside VPC Service Controls to limit data exfiltration.
  4. Encryption: use customer-managed encryption keys if your policy requires them.
  5. 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
Which control limits data exfiltration from the project?
Public IP on every node
A longer endpoint name
Disabling audit logs
VPC Service Controls
How should callers authenticate to a private production endpoint?
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
When does a self-deployed open model most often beat a managed Gemini call?
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
What is a sensible first step before choosing?
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.

  1. Read the error and note the accelerator type and region in the message.
  2. Open IAM and Admin, then Quotas, filter by the custom model serving quota for that GPU, and check usage against the limit.
  3. Request an increase with a justification, or free quota by undeploying idle endpoints.
  4. Try a different region or a different accelerator that the model card says is supported.
  5. 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
Where do you check and request more accelerator quota?
Cloud Build history
IAM and Admin, under Quotas
Cloud Storage lifecycle rules
The Hugging Face account page
Does spare L4 quota help when a model needs A100 GPUs?
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
Which two things share GPU memory on a serving node?
Docker tags and Git branches
Billing data and IAM roles
Model weights and the KV cache
Logs and DNS records
A crash happens only under heavy load. What is a likely fix?
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
Which status code most often means quota or capacity was exhausted?
403
204
301
429
A 403 appears for a partner model call. What is a likely first check?
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
What is the largest cost driver of a self-deployed endpoint?
Accelerator node-hours
Length of the endpoint name
Count of IAM members
Number of model cards viewed
Which move helps most for a dev endpoint used only a few hours a week?
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
Which technique lets multiple GPUs share one large model's computation?
Region mirroring
Tensor parallelism
Prefix renaming
Label smoothing
Why does prefix caching help?
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.

  1. Shortlist a Google, a partner and an open model from Model Garden.
  2. Enable partner models first, because the evaluation service needs them enabled before it can run.
  3. Run them through the Gen AI evaluation service with the same prompts and metrics.
  4. Record quality, latency and cost per request for each.
  5. 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
What must be true of a partner model before you can evaluate it?
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
Beyond quality, which two measures belong in the comparison?
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
  1. Select: shortlist by task, license, size and managed versus self-deployed.
  2. Trial: prompt in Studio or run a notebook.
  3. Evaluate and tune: measure on your data and tune only if the gap justifies it.
  4. Deploy: managed API or endpoint, with IAM and network controls.
  5. Operate: watch cost, latency and output quality, then loop back when better models appear.
Take quiz
Which step normally comes before deciding whether to tune?
Exporting the weights to email
Deleting the endpoint
Requesting a new billing account
Evaluating candidate models on your data
What closes the loop after a model is in production?
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
What stops node billing for a deployed model?
Undeploying it from the endpoint
Changing the project's label
Renaming the model
Opening the model card
What remains in the Model Registry after you undeploy?
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
What is the router's job in this design?
Compress the prompts to zero
Send each request to the cheapest model that can handle it
Rotate Hugging Face tokens
Store the model weights
Why add a managed model for burst traffic?
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.

  1. Define model ID, region, machine type, accelerator and replica limits in a config file.
  2. Deploy to a staging endpoint with gcloud ai model-garden models deploy or the SDK's deploy().
  3. Smoke test with a fixed prompt set and assert on latency and a few quality checks.
  4. Promote by deploying to production, shifting a small share of endpoint traffic first and then the rest.
  5. 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.

Take quiz
Why shift only a small share of traffic at first when promoting?
To skip the smoke tests
To avoid paying for any nodes
To catch problems before they affect all users
To rotate the project number
Where should a CI pipeline get a Hugging Face token?
From Secret Manager
From the model's README
From the endpoint's display name
From the repo's source code
«
»

Comments & Discussions