Original URL: https://getagenttools.com/blog/vertex-ai-distillation/

# Vertex AI distillation: GLM 5.2 teacher, Qwen 3 and Gemma 3 students

27 Nov 2026Marek.

- fine-tuning
- llm
- field-notes

Vertex AI distillation is a tuning job on Google Cloud that trains a small open model on the answers of a larger one. You upload prompts. A teacher model writes the answers. A smaller student model is tuned on them. Per Google's docs page updated on 20 November 2026, the only teacher is GLM 5.2 and the students are Qwen 3 (4B to 32B) and Gemma 3 (1B to 27B). You do not distill a Gemini model here. Gemini distillation is a separate Early Access service, and its docs page returns a 404 in English and loads in Japanese. This post is for people who want to know what the job does before they pay for one. I have not run a distillation job. Everything below comes from Google's docs and terms, read on 27 November 2026.

 

```python
# From Google's "Supervised and distillation fine-tuning for open models" page
from google import genai
from google.genai import types

client = genai.Client(vertexai=True, project=PROJECT_ID, location=REGION)

tuning_job = client.tunings.tune(
    base_model="qwen/qwen3@qwen3-4b",
    training_dataset=types.TuningDataset(gcs_uri="gs://BUCKET/train.jsonl"),
    config=types.CreateTuningJobConfig(
        method="DISTILLATION",
        base_teacher_model="zai-org/glm-5.2-maas",
        epoch_count=3,
        validation_dataset=types.TuningValidationDataset(gcs_uri="gs://BUCKET/val.jsonl"),
        output_uri="gs://BUCKET/output/",
    ),
)
```

  

- **Teacher.** GLM 5.2 MaaS, `zai-org/glm-5.2-maas`. It is the only teacher on the list.
- **Students.** Qwen 3 4B, 8B, 14B and 32B. Gemma 3 1B, 4B, 12B and 27B IT.
- **Data.** JSONL files in Cloud Storage. The training set can hold prompts only. A validation set is optional, and if you add one it needs prompts and reference answers.
- **Cost.** Tuning tokens (dataset tokens times epochs), plus the teacher calls at managed-model prices, plus storage and serving.
- **Limits.** Text only. A maximum sequence length of 8,192 tokens for these students. A default quota of at least one concurrent tuning job per project. The GLM 5.2 teacher endpoint is in Preview.

 

If you are still deciding whether tuning is the right fix at all, start with [RAG vs fine tuning](https://getagenttools.com/blog/rag-vs-fine-tuning/).

 

## What is Vertex AI distillation?

 

Vertex AI distillation is the search name for what Google's docs call "distillation fine-tuning" of open models. Google's page defines it: "Distillation lets you tune a smaller student model using the outputs of a larger teacher model." The job runs through the GenAI SDK. You name a teacher, and the teacher generates the responses that tune the student.

 

Vertex AI still appears in the SDK calls, but the docs now live under a new product name. Google's release notes for 22 April 2026 say "Vertex AI is now part of Gemini Enterprise Agent Platform." In my 27 November check, the old Vertex AI tuning URL redirected to the Agent Platform tuning page. Searches still say Vertex AI, so this post does too.

 

## Which teacher and student models does Vertex AI distillation support?

 

Google's docs list one teacher and eight students. The teacher is GLM 5.2 MaaS (`zai-org/glm-5.2-maas`), a model that Google serves as a managed model (MaaS). The students are Qwen 3 4B, 8B, 14B and 32B, and Gemma 3 1B, 4B, 12B and 27B IT. No Gemini model appears on either list.

 

| Role | Model | ID in the docs |
| --- | --- | --- |
| Teacher | GLM 5.2 MaaS | `zai-org/glm-5.2-maas` |
| Student | Qwen 3 4B, 8B, 14B, 32B | `qwen/qwen3@qwen3-4b` and so on |
| Student | Gemma 3 1B, 4B, 12B, 27B IT | `google/gemma3@gemma-3-1b-it` and so on |

 

The same page lists more models for plain supervised tuning, such as Gemma 4, Qwen 3.6 and Llama. Those are not distillation students. Gemma 4 also shows up on the agent side, with a smaller limit than Gemini models in [Gemini CLI context window](https://getagenttools.com/blog/gemini-cli-context-window/). The limitations table gives every Qwen 3 and Gemma 3 student a maximum sequence length of 8,192 tokens and text as the only modality.

 

## What happened to the Gemini Distillation Service?

 

The Gemini Distillation Service is a separate Early Access offering, and its English docs page is missing. Google's release notes for 8 May 2026 announce "Gemini Distillation Service Early Access" and link to `/gemini-enterprise-agent-platform/models/tuning/distillation`. On 27 November 2026 that English URL returned a 404 in my curl check. The Japanese version, `?hl=ja`, returned the page.

 

The Japanese page, last updated 16 September 2026, names one teacher, `gemini-3.1-pro`, and one student, `gemini-2.5-flash`. It labels the service Early Access under Google's pre-GA terms. It says the service is for experiments and development only, and that models distilled in this phase should not be used in production. Your project has to be on an allowlist, which you request through Google sales. Jobs run in `us-central1` through the REST API.

 

The same page says the student learns from the teacher's final answers and from its raw thoughts, the internal reasoning the teacher generates. The dataset can be prompts only. Five similar English URL patterns I tried also returned 404. Some news coverage this week uses the service name. I did not take any facts from it.

 

## How do you run an open-model distillation tuning job?

 

You run an open-model distillation job from Python with the GenAI SDK. Install `google-genai`, create a client with `vertexai=True`, your project and a location, and call `client.tunings.tune` with `method="DISTILLATION"` and `base_teacher_model`. The code at the top of this post is Google's sample with the bucket paths shortened.

 

For open models, Google strongly recommends the `global` endpoint. It picks a supported region with available capacity and creates a regional job there. You are charged for one job. Regional jobs are still available in `us-central1`, `europe-west4`, `us-west1`, `us-east5`, `asia-southeast1` and `asia-southeast2`. The project needs billing plus the Agent Platform and Cloud Storage APIs enabled.

 

When the job ends, the output folder in Cloud Storage holds `distillation_labelled_dataset.jsonl`, the teacher's labeled data. Checkpoints sit under `postprocess/node-0/checkpoints/`, with the final one in `final/`. Google stores at most 10 checkpoints. You can deploy the result to an Agent Platform endpoint, or export it from Cloud Storage and deploy it elsewhere.

 

## What data does the open-model distillation job need?

 

The open-model distillation job needs JSONL files in Cloud Storage, one example per line. The training set can contain prompts only, since the teacher writes the completions. A validation set is optional. If you add one, it must contain prompts and ground-truth completions. Google uses it during tuning to check quality on held-out examples.

 

Two text formats work for open-model distillation: prompt and completion pairs, and the turn-based chat format with `messages`. For open models, the `GenerateContent` format and multimodal datasets are for supervised tuning only. Before a run, Google points to a "knowledge distillation feasibility notebook" in Colab Enterprise. It checks whether your dataset suits the teacher and student pair. I have not opened that notebook.

 

## When does distillation help, and when does it not?

 

Distillation helps most when the teacher is much stronger than the student on your task, per Google's page. The docs name math and quantitative reasoning, domain questions that need step-by-step reasoning, and tasks where a teacher with thinking or chain-of-thought output gives better answers than the student.

 

The same page names the weak cases. Gains are smaller when the student already performs close to the teacher. They are also smaller on short-form retrieval tasks, where the teacher's reasoning trace adds nothing. My own take: measure that gap before you pay for a job. A small held-out set and the method in [LLM evaluation](https://getagenttools.com/blog/llm-evaluation/) are enough to see it.

 

## What does Vertex AI distillation cost?

 

A distillation job bills twice, per Google's pricing section. You pay for tuning, where training tokens are the tokens in your dataset times the number of epochs. You also pay for the API calls the job makes to the teacher, at managed-model prices. Cloud Storage and serving the tuned model are billed on top.

 

The docs give no per-job example. The teacher also uses your quota. GLM 5.2 MaaS runs on dynamic shared quota, and every teacher call draws from your project's share for that model. The tuning side has its own limit: a default quota of at least one concurrent tuning job per project, shared across regions and models.

 

## Can you distill models under Google Cloud terms?

 

Yes, within limits in the Google Cloud Service Specific Terms, last modified 24 November 2026. Section 17(a) bans using an AI/ML service or its generated output to develop a similar or competing product or service. It says this ban does not apply to Agent Platform, "formerly Vertex AI Platform," as long as you do not use a Google Pre-Trained Model.

 

The terms define a Google Pre-Trained Model as one "trained by Google and not released as an open model." Section 17(b) bars using output to substitute, replace or circumvent a Google Model, or to create or improve models similar to one. Its exception covers services that offer fine-tuning or distillation. Their output may be used to modify and use Modified Google Models instead of Google Pre-Trained Models. Google lists Gemma 3 on its open-models page. I read that as Gemma 3 falling outside the first definition. That is my reading, not legal advice.

 

Third-party models count as a "Separate Offering" with their own terms, such as an open source license or third-party terms. I have not read the GLM 5.2 or Qwen 3 licenses. Check both before you ship a student. The Gemini API terms are a different document. They cover the Gemini API and Google AI Studio and say you "may not use the Services to develop models that compete with the Services."

 

## Frequently asked questions

 

### Can I distill Gemini with Vertex AI?

 

Google documents Gemini-to-Gemini distillation through its allowlisted Gemini Distillation Service. That service is Early Access. Its Japanese docs page names `gemini-3.1-pro` as the teacher and `gemini-2.5-flash` as the student, for experiments and development only. The English page returned a 404 on 27 November 2026. The open-model job in this post has no Gemini model on either side.

 

### Is Vertex AI distillation in Preview?

 

The open-model distillation page carries no Preview or GA label in my 27 November read. The GLM 5.2 teacher does. Its model card lists the launch stage as Preview and says the `glm-5.2-maas` endpoint is available until at least 30 November 2026. "Early Access" belongs to the separate Gemini Distillation Service, per its release note from 8 May 2026 and its Japanese docs page.

 

### Can I take the distilled model off Google Cloud?

 

Yes, per the docs. The tuned model's artifacts land in your Cloud Storage output folder as safetensors files. Google says you can deploy them to an Agent Platform endpoint, or export them from Cloud Storage and deploy them elsewhere. Check the student model's own license first.

 

### Did you run a distillation job for this post?

 

No. I have not run a distillation job or the feasibility notebook. Everything here comes from Google's docs, release notes and terms, read on 27 November 2026. I checked the Gemini Distillation Service URL with curl that day. The English page returned a 404, and the Japanese version returned the page.

 

## When is Vertex AI distillation worth testing?

 

I think Vertex AI distillation is worth a test only when you can show a reasoning gap between GLM 5.2 and a Qwen 3 or Gemma 3 model on your own prompts. The bill has two parts, and the teacher is fixed. That teacher is in Preview, and its model card states availability only until at least 30 November 2026.

 

If you came for Gemini distillation, that is the separate Gemini Distillation Service. It is Early Access, allowlisted and not for production, and on 27 November 2026 its docs page loaded in Japanese but not in English.

 

Sources, read on 27 November 2026: Google Cloud, [Supervised and distillation fine-tuning for open models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/open-model-tuning) (updated 20 November 2026); [Gemini Enterprise Agent Platform release notes](https://docs.cloud.google.com/gemini-enterprise-agent-platform/release-notes) (entries of 22 April and 8 May 2026); [Gemini Distillation Service, Japanese version](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/distillation?hl=ja) (updated 16 September 2026; the English URL returned a 404); [Google Cloud Service Specific Terms](https://cloud.google.com/terms/service-terms), sections 17(a) and 17(b) and the AI/ML definitions; [GLM 5.2 model card](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/zaiorg/glm-52) (updated 24 November 2026); [Gemini API Additional Terms of Service](https://ai.google.dev/gemini-api/terms) (effective 23 March 2026).

Put this into practice

[See the tool list](https://getagenttools.com/tools/)[Train your team](https://getagenttools.com/#training)
