LMAO: Google's Official Guide to Distilling Gemini AI Models

36Kr

Source published: Site published:

Original article · فارسی

While some leading AI model companies are taking strict steps to stop others from distilling their models, Google has published a complete guide to running model distillation for businesses.

The official guide covers almost the entire process, from preparing datasets and setting up teacher models to training student models, monitoring tasks, and checking results. Google has even included API request examples and training settings.

https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/distillation?hl=zh-cn

However, the English version of this webpage currently returns a 404 error when opened, while versions in other languages work normally. The exact current status of the service has not been confirmed.

Google gives a practical reason for offering this service. The most advanced models are powerful, but they may be more than some business tasks actually need. Companies do not always need to use the most powerful model for every request. Instead, they want to lower costs and get faster responses while keeping the quality of the results high enough.

Google also offers supervised fine-tuning and distillation fine-tuning for open-source models. The page for these services is working normally. Google's listed teacher models include Zhipu's GLM-5.2 MaaS, while its student models include the Qwen 3 and Gemma 3 families.

1. No need to label training data by hand: Google handles the full distillation process

First, let's look at how Google's service carries out model distillation.

According to Google's official guide, the model combination supported during Early Access is Gemini 3.1 Pro as the teacher model and Gemini 2.5 Flash as the student model. Note that Gemini 2.5 Flash has since been retired.

There is an important difference between this approach and traditional training.

Traditional Supervised Fine-Tuning (SFT) usually requires people to prepare input examples along with the correct answers for each one. The model then learns from these labeled examples and adjusts how it responds. Reasoning Path Distillation is a form of process-based training. It teaches a smaller student model to copy how a leading model breaks tasks into steps, checks possible answers, and goes back to review its logic when needed.

Google's distillation service lets users provide a collection of prompts without preparing complete correct answers in advance. The teacher model creates target responses from these inputs. The results are then used to train the student model. The process also uses the teacher model's internal reasoning steps, which the document calls "raw thoughts." This is an important change in distillation technology in the age of reasoning models.

This approach may be especially useful for businesses that need models to handle tasks such as multi-step logical reasoning, summarizing technical documents, and writing complex code. For example, a company may find that Gemini Pro can handle a difficult task well, but using the Pro model directly may be too expensive or too slow for its business needs. The company can then try to transfer those abilities to a smaller Flash-level student model.

Google has explained the full process in detail.

First, businesses must prepare their own prompt datasets, save them in JSONL format, and upload them to Google Cloud Storage. The dataset can include system instructions and user inputs. It can also include some types of conversations with multiple turns.

Because the teacher model will create the target answers later, businesses only need to provide prompts when preparing the training data. They do not need to write and label a correct answer for every input by hand. The teacher model automatically creates the target responses and their original reasoning steps. These are then used to train the student model. Once training is finished, businesses still need a separate test dataset that was not used during training to check the model's performance.

Google also sets clear rules for the data. It recommends preparing at least 1,000 examples and including different situations that may appear in real-world use. These should include unusual cases and prompts of different lengths. A training dataset can contain no more than 50,000 examples, and its JSONL file must be no larger than 1GB.

The next step is to generate data with the teacher model. Users must set how the teacher model generates responses. One important setting is candidateCount, which controls how many different responses are generated for each input. The default is 4, and users can choose a value from 1 to 5.

Google also highlights that the quality of the data created by the teacher model directly affects how well the final student model performs.

After preparing the data, users move on to training the student model. They must set two main values: epochCount and learningRateMultiplier. The first controls how many times the student model goes through the entire dataset. It can be set from 1 to 100, with a default value of 4. The second controls the learning rate. Its allowed range is 0.25 to 4, and its default value is 1.

Once users submit the task, the system automatically runs the teacher model to generate responses and then fine-tunes the student model. Google's process does more than create a distilled model and register it in the model repository. After training, the student model is automatically added to the Google Cloud Model Registry, and a dedicated endpoint is created so developers can use it to make predictions. The system also saves intermediate checkpoints during training. Each checkpoint gets its own prediction endpoint, allowing developers to compare model performance at different stages.

This means businesses do not have to build the entire process themselves. Google has brought teacher model generation, data processing, student model training, and model deployment together in one cloud service.

After training, users still need to test the model with their separate test dataset. They should compare it with the original Gemini 2.5 Flash and Gemini 3.1 Pro models. This helps them see how much the student model has improved compared with its starting model and how far it still is from the teacher model's performance.

Google describes three main situations where this service may be useful.

The first is for businesses that handle many requests and need fast responses. For example, a company may need reasoning abilities close to those of a Pro model, but its applications may have strict response-time requirements, known as Service Level Agreements (SLAs), as well as limited budgets. In this case, it can try moving these tasks to a Flash-level model.

The second is for situations where companies do not have standard answers for their training data. A business may have collected many user questions and business prompts but lack the time or resources to write and label answers for every example. Letting a teacher model create the training answers automatically can reduce this work.

The third is for difficult reasoning tasks, such as multi-step logic, technical document summaries, and complex coding. A basic Flash model may not be good enough for these tasks, while a Pro model can handle them. Businesses can use distillation to try to reduce the ability gap between the two.

Although the guide looks quite complete, the service still has several important limits.

First, Google clearly says that models created with this service can only be used for experiments and development. They cannot be deployed in production environments. The service is also not open to everyone. Businesses must contact Google to have their Google Cloud project added to an allowlist. They must also enable the Agent Platform API and obtain the required administrator permissions. According to the webpage, distillation tasks must run in the us-central1 region in the central United States. The first access period lasts 30 days, and the default limit for simultaneous tasks is 4.

There are also limits on the data that users can provide. The service currently supports text only. It does not support images, videos, or function calls. Each input can contain no more than 8,000 tokens. If more than 10% of the samples exceed this limit, the distillation task will be stopped. The teacher model can generate up to 24,000 tokens for each output. Anything beyond that limit will be cut off.

Google Cloud's official Release Notes show that the Gemini Distillation Service entered Early Access on May 8, 2026. In other words, this is not a service that suddenly appeared in recent days. Google has been working on turning model distillation into a business for some time.

2. Cheaper distillation is not a threat to Google: the company makes money from more than just models

Before distillation became a controversial topic, it was simply a normal technology. Google had already published detailed technical documents explaining it many years ago.

Google's relatively open approach makes more sense when we look at the difference between companies that mainly sell AI models and large cloud companies that provide a complete technology platform.

For companies such as Anthropic and OpenAI, their main strengths are their models and API services. They can be seen as wholesalers that sell model tokens. Unauthorized distillation creates a direct business risk for them. For example, someone might use a leading model to train a smaller open-source model, then run that smaller model locally or on a third-party cloud service. This could replace some uses of the more advanced model, reducing the income model companies earn from reasoning services and weakening their ability to charge higher prices in certain situations.

Google, however, has a complete technology system that includes chips (TPUs), cloud computing (GCP), and foundation models. It does not want to sell only the tokens produced by one model. It also wants to sell the cloud infrastructure businesses need to run AI. This includes the convenience and benefits that come from distillation.

As early as 2023, Google used distillation to make large models small enough to run on Android and iOS phones. This helped support Gmail's "Help Me Write" feature. In September 2024, Google Cloud CEO Thomas Kurian directly described "distillation, fine-tuning, and model adaptation" as key ways for Google Cloud to make money from AI. He also revealed that Samsung had used Google's Vertex AI distillation tools to customize Gemini and Imagen models. This helped bring on-device AI features to the Galaxy S24 series.

This shows that Google no longer sees distillation as just a way to make models more efficient in a research lab. It has become a product that can help business customers and bring in money.

Thomas Kurian described five ways Google Cloud makes money from AI: charging customers based on their use of GPUs, TPUs, and model tokens; collecting subscription fees for products such as Agentspace and Workspace; using AI to increase customers' use of other products; charging based on the actual business value AI provides; and moving customers to product plans with more features and higher usage limits as their needs grow.

Google does not need every business customer to keep using its most expensive models. For businesses that handle many requests and need fast responses, distillation gives them a chance to lower the cost of each reasoning task while also getting faster results.

Even if customers make fewer direct calls to expensive models, they can still use Google Cloud's services for distillation, training, model management, and deployment. Money that was once spent mainly on running models could instead be spent on a wider range of cloud services. Google's Gemini Enterprise Agent Platform, launched this year, is another example of this approach.

Google's strategy for open models is not limited to its own products. Its fine-tuning and distillation service for open models lists Zhipu's GLM-5.2 MaaS as a teacher model. It also supports the Qwen 3 and Gemma 3 families as student models.

By supporting models from different companies, Google shows that it wants to build model training and adaptation services into its cloud platform. It does not want to limit these services to Google's own Gemini models.

Also, businesses do not have to keep their final distilled models on Google Cloud forever. After training, developers can either deploy their models to an inference endpoint on the Gemini Enterprise Agent Platform or export the model weights from Cloud Storage and run them in other environments.

3. Google still needs to stop unauthorized distillation

Turning distillation into a cloud service that makes money does not mean Google will allow people to distill its models without permission. In fact, Google is taking strong steps to protect this business and its pricing power.

According to a report released by Google's Threat Intelligence Group (GTIG) in September this year, attackers have started using proxy networks, automated tools, and thousands of stolen or fake accounts to collect model outputs in large amounts. Some coordinated distillation campaigns involve more than 100 million prompts. These prompts cover text reasoning, visual understanding, audio understanding, and the generation of images and videos.

To deal with this kind of large-scale activity, where many accounts work together like ants carrying food, Google has built a system that checks activity across different accounts. Instead of judging risk only by how often one account makes requests, it combines real-time monitoring, classifiers that analyze activity later, and automated agents. This helps it detect groups of connected requests spread across different accounts and product channels. If it finds unusual activity, Google can restrict individual accounts or entire projects to stop further access to its models.

Google has also started taking direct action during the distillation process. It has introduced real-time active defenses designed to reduce the benefits that unauthorized student models can get from Gemini's outputs. Google says these measures are intended to make unauthorized distillation less effective and may even reduce the final performance of the student models.

At the same time, Google is improving protection for its models' internal reasoning information. A safety report for Gemini 4 Carbon, released in November, revealed that its defenses now also cover thought signatures and related reasoning traces. These protections address both attempts to extract information across different models and attempts to extract it from the same model. Their purpose is to stop attackers from copying a model's abilities by tricking it into revealing its internal reasoning information.

Google also says it has developed technology that can identify distilled Gemini models. This technology can help track where models came from and take action against related models. However, Google has not explained exactly how the technology works.

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 comes from the WeChat Official Account "InfoQ" (ID: infoqchina). It was written by Chu Xingjuan and published with permission from 36Kr.