Data processing lets you use various model operators to clean and augment the training set used for model tuning, improving its quality.
This topic is applicable only to the China (Beijing) region.
Skip this topic if your training set contains data unsuitable for data cleaning and augmentation, such as legal documents, medical records, literary works, dialect collections, user reviews, or technical manuals.
Why data processing
In the model fine-tuning process, a high-quality training set will significantly improve the training performance and prediction capability of a large model. However, most existing training sets have low data quality and are insufficient in quantity. Therefore, you should first use the Data Processing feature of Alibaba Cloud Model Studio to perform Data Cleansing and Data Augmentation on your training set. After you obtain sufficient high-quality training data, you can then perform model fine-tuning.
Building an effective SFT training set typically requires 1,000+ samples.
|
Method |
Scenarios |
|
Data Cleansing |
You need to correct issues in the training data, such as issues with standardization, compliance, consistency, and duplication (Alibaba Cloud Model Studio currently supports ten data cleaning operations, such as special content removal and sensitive data masking). special content removal: Identifies and removes content such as URLs and special characters from your training data.
sensitive data masking: Identifies and masks sensitive data in your training data.
|
|
Data Augmentation |
To increase the diversity and balance of your training data or expand its size. |
Supported training sets
Data processing supports the SFT-text generation training set, but does not currently support the SFT-image understanding training set or the DPO-text generation training set.
This training set contains single-turn or multi-turn dialogue data in the ChatML format. SFT-ChatML format example.jsonl
Create a data flow task
Alibaba Cloud Model Studio does not currently provide an API for data processing.
This section shows you how to build a custom data flow in the console to illustrate the data processing workflow. This data flow first applies sensitive information masking (data cleaning) to the training data, and then performs data augmentation. The process has two steps:
-
Create a data flow: Build a custom data flow from a blank canvas.
-
Create a data flow task: Start a data flow task based on the created data flow to process your training set.
Clean the data before augmenting it to ensure the augmentation process runs on a high-quality dataset. This helps ensure that the data source for model fine-tuning is accurate.
If you only need to perform data cleaning or augmentation on your training data, you can use a prebuilt Data Flow Template in Alibaba Cloud Model Studio. Go to the Data Management page, and on the Data Flow tab, click .
Step 1: Create a data flow
-
Go to the Data Management page. On the Data Flow tab, click .
-
In the Create Data Flow dialog box, enter a Data Flow Name and Data Flow Description, and then click OK to open the data flow canvas. The data flow remains in the Draft state until you click Publish in the upper-right corner.
The Start node is pre-configured with a
dialogue_textparameter that represents the training set to be processed. You cannot modify this parameter.Click the
icon in the upper-left corner to exit the canvas. The system automatically saves your data flow draft. You can click Manage to open the canvas again and continue editing.
-
Drag the Data Cleansing node from the left to the canvas, enable the Sensitive Data Masking operator for the Data Cleansing node, and disable the other operators.
The Data Cleansing node is pre-configured with a
dataSetCountparameter, which represents the size of the training set generated when the node finishes. You cannot modify this parameter.
-
Connect the Start node to the Data Cleansing node.
-
Drag the Data Augmentation node from the left onto the canvas, and configure the parameters for the Data Augmentation node. Learn more about the parameters.
Parameter
Configuration
Select Scenario
Data Augmentation - General.
Sample count for instruction generation
This value must be smaller than the size of the input data for this node. Otherwise, use the default value.
Similarity filtering threshold
Keep the default value.
Number of samples to generate
Keep the default value.
Prompt Configuration
Use the default template provided by Alibaba Cloud Model Studio.
System Prompt: Please carefully observe the inputs and outputs of multiple data samples, summarize the underlying patterns based on your understanding, and then write a new [Question] and [Answer] pair. Note that the newly generated [Question] and [Answer] must meet the following requirements: 1. The generated [Question] and [Answer] must not be identical to any input samples, but they must maintain the same format. 2. The generated [Question] is not required to be limited to the topics or domains of the input questions. The generated [Answer] must correctly answer the generated [Question]. 3. The provided samples may be multi-turn conversations. The generated [Question] and [Answer] can also be multi-turn, but must keep the same format. 4. The generated [Question] and [Answer] must appear as a pair, with the [Question] preceding the [Answer]. ${few_shot_examples} -
Connect the Data Cleansing node to the Data Augmentation node, and then connect the Data Augmentation node to the End node.

-
Click Publish in the upper-right corner. The data flow status changes to Publish. If you edit the data flow again, its status reverts to Draft. Click the
icon in the upper-left corner to exit the canvas.Searching for a data flow: On the Data Flows tab, enter the data flow name in the search box and click the
icon to find the data flow. Fuzzy search is supported. -
Next, follow the instructions in Step 2: Create a data flow task to process your training set with this data flow.
Step 2: Create a data flow task
-
Go to the Data Management page. On the Data Flow tab, click . In the dialog box that appears, select the target data flow and click OK. If a data flow that you created does not appear in the list, this may be because:
-
The data flow has not been published.
You can go to , find the data flow that you want to publish, and then click .
-
The data flow does not belong to the current workspace.
-
-
Enter a Task Name, select Model Data as the Data Source, and select the training set to process from the list.
If no training set is available, click Manage to go to Model Data and upload a training set. For more information, see Training Sets and Evaluation Sets.
Model Data provides version management for training sets. After a training set is cleaned or augmented, a new version is automatically generated. This new version is saved independently and does not overwrite the original training set.
Data Processing currently supports only SFT-text generation training sets in formats other than ChatML. SFT-ChatML format example.jsonl
-
Click Created. The data flow task starts automatically.
The task may take some time to complete. During execution, you cannot manually stop the task.
-
Click the
icon to refresh the Processing Status. The possible Processing Status are described in the following table.Status
Description
Processing
The data flow task is running. During peak hours, tasks may be queued. No user action is required.
Completed
The data flow task completed successfully. Click Execution Process to the right of the task to view the results.
Processing failed
The data flow task failed. We recommend that you submit a ticket to determine the cause.
-
After the task completes, the system creates a new version of the processed training set. Make sure to use the correct version for subsequent operations.
Manage data flow tasks
This section shows you how to view the list of data flow tasks in your workspace, find a specific task, and review its basic information, configuration, processing status, and results.
Go to the Data management page and click the Tasks tab. On this page, you can:
-
View data flow task list: View the complete list and an overview of data flow tasks in the current workspace, including the Processing Status and Data Flow of each task.
-
Find a data flow task: Enter a data flow task name in the search box and click the
icon. Fuzzy search is supported. -
ViewingData Source and Data Flow: A new version of your training set is automatically generated after it is cleaned or enhanced. This new version is saved independently and does not overwrite the original training set. For example, if the training set before processing is version
V1, the processed data is stored as versionV2of the training set.Review the cleansed dataset to verify its integrity and accuracy.

-
View Execution Process: Click Execution Process in the Actions column to view the processing results and time taken for the data flow task, including the intermediate results and time taken for each processing node.

The Data Cleansing node displays the size of the output training set after each operator is applied. For example, in the figure above, the sensitive word filtering operator runs after the sensitive data masking operator, and the sensitive word filtering operator filters out one data entry.
-
Delete data flow task: Click Delete in the Actions column.
Deleting a task also permanently deletes its execution history. Proceed with caution.
Node
Start and end node
Condition node
Data cleaning node
Data augmentation node
Billing
This feature is free to use for a limited time. The start date for billing will be announced at a later date.
Next steps
Once you are satisfied with the processed training set, you can start model tuning.



icon to 




icon to change the operator execution order. The Data Cleansing node runs the operators in this order.
