Decision model distillation
The Decision Model Distillation template has a teacher model make K independent decisions on case data and aggregates the results into a soft label distribution. It produces RLCD training data that you can use directly to fine-tune the typed decision head of a student model. The template is suitable for rapid decision-making use cases such as spam SMS detection, intent classification, and sentiment determination.
Template overview
The Decision Model Distillation template is suitable for rapid decision-making use cases such as spam SMS detection, intent classification, and sentiment determination. It has a teacher model make K independent decisions on your case data and aggregates the results into a soft label distribution. The output is training data in RLCD format that you can use directly to fine-tune the typed decision head of a student model.
This template supports only single-stage creation: Build distillation data. It does not include a student model training stage. After distillation, you must train the student model yourself by using the generated RLCD dataset.
The Decision Model Distillation template pipeline includes the following steps:
Step | Name | Description |
1 | Build case rows | Combines raw data rows with the inline schema to build case rows that contain a one-hot gold distribution and a typed-decision structure. |
2 | Teacher elicitation | Calls the teacher model for K independent samples for each question in each case to obtain verbalized probability distributions. |
3 | Label aggregation | Aggregates the distributions from K teacher samples into soft labels, then performs consistency filtering and a gold alignment audit. |
4 | Build training dataset | Combines cases and teacher soft labels, and outputs training-ready JSONL data in RLCD format. |
Procedure
Log on to the PAI console. In the left-side navigation pane, choose Model Application > Model Distillation (ModelDistill).
Click Create task to open the Distillation Template tab, or go directly to the Distillation Template tab.
Select Decision Model Distillation, then click Use Template to open the Create Distillation Task page. Configure the following key parameters and retain the default values for all other parameters.
Configure Basic Configuration:
Task name: The system populates this field automatically.
Output Path: Specify an OSS path that you have permission to access, such as
oss://mybucket.oss-cn-hangzhou-internal.aliyuncs.com/decision-distill/.NoteCreate a separate output directory for each distillation task to prevent files from being overwritten. The OSS bucket must be in the same region as the PAI service.
Click Next to open Build distillation data:
Teacher model: For Teacher Model Source, select Token Service, and then select a large language model with strong decision-making capabilities from the drop-down list, such as
qwen3.8-max.Dataset: Select an OSS directory or file that you have permission to access. You can download and use a sample directly.
Distillation Configuration: A default configuration is provided. Modify it as needed.
dataset.input_path: If you select a file for the dataset, the file name configured here does not take effect.
For more configuration parameters specific to the Decision Model Distillation template, such as the number of samples K and the consistency filtering threshold, see Configuration details below.
Compute Resource: For Resource Type, select General Computing. For Source, select Public Resources. In Job Resource, select an appropriate Instance Type, such as
ecs.c6.large.
Click Create. Then, in the billing reminder that appears, click OK. The page automatically redirects to the Basic Configuration page in task details, where you can track the task status.
NoteThe Decision Model Distillation template supports only a single stage (Build distillation data) and does not support the student model training stage.
Configuration details
The following sections describe key configuration parameters for the Decision Model Distillation template. Basic configuration and resource configuration are the same as for general model distillation, so only the parameters specific to this template are listed here.
Basic Configuration
Basic configuration includes the task name and output path. The output path is the root directory for all task outputs. The distillation dataset is also written to this directory, so you do not need to specify a separate dataset output path.
Build distillation data
Teacher model
The Decision Model Distillation template requires only one teacher model, which makes K independent decision samples for each case. Select a large language model with strong decision-making capabilities. The teacher model source supports only PAI Token Service.
Dataset
Select an input directory or file. The data must meet the following format requirements:
Format: JSONL. Each row contains
id,label, and a text field.Each row represents a case that requires a decision. The teacher model performs K independent samples on it.
Sample data:
{"id": "sms-001", "label": "ham", "text": "Hey, running late. Grab a table for 7:30 and I will meet you there."}
{"id": "sms-002", "label": "spam", "text": "WINNER! You have won a $1000 prize call now to claim within 24h."}
{"id": "sms-003", "label": "ham", "text": "Mum, I left the spare key under the plant pot as agreed. See you Sunday!"}
{"id": "sms-004", "label": "spam", "text": "URGENT: your bank account has been suspended. Reply STOP to cancel."}
{"id": "sms-005", "label": "ham", "text": "Your order 38291 has shipped and should arrive Tuesday before 6pm."}
{"id": "sms-006", "label": "spam", "text": "Congratulations! You were selected for a free vacation. Text GO to claim."}
{"id": "sms-007", "label": "ham", "text": "Can you pick up milk and bread on your way home? Thanks!"}
{"id": "sms-008", "label": "spam", "text": "You have 1 new voicemail. Call 0906-500-1122 to hear it. 3.00 per minute."}Distillation Configuration
Distillation configuration is provided in YAML format with recommended default values from the algorithm team. Modify the values as needed. The following table describes some parameters that warrant attention.
Section | Description |
dataset |
|
backend |
|
system1 |
|
pipeline |
|