LMAO, Google personally teaches you how to distill Gemini
While some top model vendors are stepping up strict guard and taking every precaution to avoid being distilled, Google has directly released a full enterprise distillation operation guide.
From dataset preparation, teacher model configuration, to student model training, task monitoring and result evaluation, Google has documented almost the entire operation process in the official document, and even prepared API request examples and training parameters.
https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/distillation?hl=zh-cn
However, the English version of the above website currently shows a 404 error after opening, while pages in other languages display normally. The exact current status of this service remains unconfirmed.
In the document, the reason given by Google is quite "pragmatic": although cutting-edge models have strong capabilities, they may be over-configured for certain specific enterprise applications. What enterprises really need is not necessarily to call the most powerful model for every request, but to reduce latency and cost on the premise of ensuring task quality.
In addition to enterprise-facing services, Google also provides supervised fine-tuning and distillation fine-tuning services for open source models, and this page displays normally. The distillation teacher models listed by Google include Zhipu's GLM-5.2 MaaS, while the student models cover the Qwen 3 and Gemma 3 series.
1 No manual labeling required for training sets, Google has arranged the entire distillation workflow
Let's first take a look at how Google's service implements the "distillation" function.
According to the official document, the supported combination in the Early Access stage is: using Gemini 3.1 Pro as the teacher model, and Gemini 2.5 Flash as the student model (Note: this model has been retired).
There is a noteworthy difference here.
Traditional Supervised Fine-Tuning (SFT) usually requires preparing inputs and corresponding standard answers, and the model adjusts its own behavior by learning these labeled data; Reasoning Path Distillation is a variant of "process supervision", which forces the student model with smaller parameters to imitate the flagship model's task decomposition, hypothesis verification and logic backtracking paths.
Google's distillation service allows users to directly provide prompt datasets without preparing complete standard answers in advance. The teacher model will generate target responses based on these inputs, and then use the results for student model training, making use of the internal reasoning path generated by the teacher model, which is called "raw thoughts" in the document. This is the most critical watershed for distillation technology after the arrival of the "reasoning era".
For enterprises that need tasks such as multi-step logical reasoning, technical document summarization, and complex coding, this method is particularly worthy of attention. For example, if an enterprise has found that Gemini Pro can complete a certain complex task well, but the call cost and response latency of directly using the Pro model cannot meet business requirements, it can try to migrate its capabilities to a Flash-level student model.
Google has also broken down the entire process in great detail.
First, enterprises need to prepare their own prompt datasets, save them in JSONL format, and upload them to Google Cloud Storage. The dataset can contain system instructions and user inputs, and also supports certain forms of multi-turn conversations.
Since the target output will be generated by the teacher model later, in the training set preparation stage, enterprises only need to provide Prompts, and do not need to manually label standard answers for each input in advance. The teacher model will automatically generate target responses and the corresponding original thinking process, which will then be used for student model training. After the training is completed, enterprises still need to use an independent held-out test set to evaluate the model performance.
However, Google has also given clear data requirements: it is recommended to prepare at least 1000 samples, and try to cover different situations that may appear in the actual production traffic, including edge scenarios and prompts of different lengths. The entire training set supports a maximum of 50000 samples, and the JSONL file cannot exceed 1GB.
The next stage is the teacher model generation phase. Users need to configure the generation behavior of the teacher model, and one of the important parameters is candidateCount, that is, how many response variants to generate for each input. The default value is 4, and the allowed setting range is between 1 and 5.
The quality of the data generated by the teacher model directly affects the performance of the final student model, which Google also specially emphasized in the document.
After completing the data preparation, it enters the student model training stage. Users need to set two main parameters: epochCount and learningRateMultiplier. The former determines how many rounds the student model needs to repeat learning the entire dataset, with a range of 1 to 100 and a default value of 4; the latter is used to adjust the learning rate, with a range of 0.25 to 4 and a default value of 1.
After the entire task is submitted, the system will automatically perform teacher model reasoning and student model tuning. According to the process provided by Google, not only a distilled model registered in the model repository will be generated, after the training is completed, the student model will be automatically registered in the Google Cloud Model Registry, and a dedicated endpoint for inference will be generated. Intermediate checkpoints will also be saved during the training process, and prediction endpoints will be provided for the corresponding checkpoints, making it convenient for developers to compare the model performance at different training stages.
It can be seen that enterprises do not need to build a complete process of teacher model generation, data processing, student model training and model deployment from scratch, Google has integrated these links into the cloud platform service.
After the training is completed, users still need to use the held-out test set for evaluation, and compare with the original Gemini 2.5 Flash and Gemini 3.1 Pro respectively, to observe how much the student model has improved compared to the base model, and how big the gap between its performance and that of the teacher model is.
From the perspective of application scenarios, Google's given directions are mainly divided into three categories.
The first category is high-concurrency, latency-sensitive businesses. For example, enterprises need models with Pro-level reasoning capabilities, but actual applications are subject to strict latency Service Level Agreements (SLA) and budget constraints, at this time, they can try to migrate tasks to Flash-level models.
The second category is scenarios where standard answers are lacking. Enterprises may have accumulated a large number of user queries and business prompts, but do not have enough resources to label answers for these data one by one. Automatically generating training targets through the teacher model can reduce the workload of data preparation.
The third category is complex reasoning tasks, including multi-step logic, technical document summarization and complex coding. The basic version of the Flash model may not be competent, but the Pro model can complete these tasks, and enterprises can try to narrow the capability gap between the two through distillation.
This seemingly quite complete operation manual also has many limitations.
First of all, Google clearly reminds that the model distilled using this service can only be used for experiments and development, and cannot be deployed to the production environment; secondly, it has not been opened to all users. Enterprises need to contact Google to add their Google Cloud project to the allowlist, enable the Agent Platform API at the same time, and obtain corresponding administrator permissions. The page shows that the distillation task must run in the us-central1 region in the central United States. The first access period is 30 days, and the default concurrent quota is 4.
There are also obvious restrictions on the data side: currently only text data is supported, multi-modal inputs such as images and videos are not supported, and function calls are not supported. Each input allows a maximum of 8000 tokens, and if the proportion of samples exceeding this limit reaches more than 10%, the distillation task will be terminated. The maximum output generated by the teacher model is 24000 tokens, and the excess part will be truncated.
The official Google Cloud Release Notes show that the Early Access of the Gemini Distillation Service was included in the release record on May 8, 2026. That is to say, it is not a service suddenly launched in recent days, but turning distillation into a business is something that Google has long wanted to do and is doing.
2 No fear of cheaper distillation, Google makes money not only from models
Before being labeled as a "villain", distillation was originally just a normal technology. Google released technical documents to introduce it in detail very early.
Google's relatively open attitude lies more in the fact that "pure model vendors" and "full-stack cloud giants" have completely different business ledgers.
For vendors such as Anthropic or OpenAI whose core competitiveness is model capabilities and API services, they can essentially be regarded as "Token wholesalers". Unauthorized distillation will bring direct commercial risks to them: the flagship model is distilled into an open source small model for local deployment or deployment on third-party clouds, this substitution effect may erode the reasoning revenue of cutting-edge model vendors and weaken their pricing advantages in some application scenarios.
But Google has a complete full-stack ecosystem of "chips (TPU) + cloud computing (GCP) + foundation models". What Google wants to sell is never just Tokens of a single model, but the entire set of cloud infrastructure around AI operation, which of course also includes the convenience and advantages brought by distillation technology.
As early as 2023, Google used distillation to squeeze large models into local Android and iOS phones to support the "Help Me Write" function of Gmail; in September 2024, Google Cloud CEO Thomas Kurian explicitly listed "distillation, fine-tuning and model adaptation" as the core starting point for Google Cloud AI monetization, and disclosed that Samsung used Google's distillation tool Vertex AI to customize Gemini and Imagen models, realizing the on-device AI experience on the Galaxy S24 series.
This shows that for Google, distillation is no longer just a model optimization technology in the laboratory, but a product capability that can directly serve enterprise customers and generate commercial revenue.
Thomas summed up Google Cloud's AI monetization methods into five types: charging according to the usage of GPU, TPU and model Tokens; charging subscription fees through products such as Agentspace and Workspace; using AI to increase customers' usage of other products; charging according to actual business value; and upgrading customers to product versions with stronger functions and higher quotas as their needs grow.
Google does not need all enterprise customers to continuously call the most expensive models. For high-concurrency, latency-sensitive businesses, through distillation, enterprises have the opportunity to reduce the cost of single reasoning and obtain faster response speed at the same time.
Although customers may reduce direct calls to high-priced models, they can continue to use Google Cloud's distillation, training, model management and deployment services. The expenditure originally concentrated in the model reasoning link will then have the opportunity to be transformed into broader cloud platform service demands. The Gemini Enterprise Agent Platform launched by Google this year further reflects this idea.
Google's open model strategy is not limited to its own models. On the fine-tuning and distillation service page for open models, Zhipu GLM-5.2 MaaS has been listed as a distillation teacher model, and it also supports using the Qwen 3 and Gemma 3 series as student models.
This cross-vendor model combination reflects Google's desire to build model training and adaptation capabilities on the cloud platform, rather than restricting services within the Gemini's own ecosystem.
In addition, after the distillation is completed, enterprises do not need to permanently bind the final model to Google Cloud. After the training is completed, developers can choose to deploy the model to the inference endpoint of the Gemini Enterprise Agent Platform, or export the model weights from Cloud Storage and deploy them to other environments.
3 What should be prevented still needs to be prevented
Turning distillation into a profitable cloud service by no means means that Google will show leniency to unauthorized distillation activities. On the contrary, precisely to protect the pricing power of this business, Google's defense methods are very aggressive.
According to the report released by Google Threat Intelligence Group (GTIG) in September this year, attackers have begun to use proxy infrastructure, automated tools and thousands of stolen or fraudulent accounts to collect model outputs in batches. Some coordinated distillation activities involve more than 100 million prompts, covering text reasoning, visual understanding, audio understanding, as well as image and video generation.
In the face of this "ant moving house" style of theft, Google has established a cross-account detection mechanism, which no longer judges risks only according to the call frequency of a single account, but combines real-time monitoring, offline classifiers and agents to identify coordinated calls scattered across different accounts and product channels. Once an abnormality is found, account-level and project-level restriction measures can also be taken to block subsequent model access.
Google has also begun to directly intervene in the distillation process. It has deployed real-time active defense, trying to reduce the training benefits that unauthorized student models can obtain from Gemini outputs. Google clearly stated that these measures are designed to reduce the effectiveness of distillation activities, and even weaken the final performance of the student model.
At the same time, Google is also strengthening the protection of internal reasoning information. The Gemini 4 Carbon safety report released in November revealed that its defense scope has been extended to thought signatures and related reasoning traces, providing protection against cross-model extraction and same-model extraction respectively, to prevent attackers from reproducing the model's capabilities by inducing the model to output internal reasoning information.
In addition, Google stated that it has developed technology to identify Gemini distilled models, which can track the source of the models and take measures against related models. However, the official has not disclosed the specific implementation method.
References:
https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/distillation
https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/open-model-tuning
https://www.youtube.com/watch?v=aRHJ8VcqANw&t=8s
https://news.samsung.com/us/samsung-google-cloud-bring-generative-ai-to-samsung-galaxy-s24-series/
https://s206.q4cdn.com/479360582/files/doc_events/2025/Sep/thomas-kurian-goldman-sachs-transcript-09-09-25.pdf
https://deepmind-media.storage.googleapis.com/gemini/gemini_4_carbon_safety_report.pdf
This article is from the WeChat Official Account "InfoQ" (ID: infoqchina), written by Chu Xingjuan, authorized for release by 36Kr.