> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bailian.console.aliyun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Training set and evaluation set

> Datasets are the foundation of model training and evaluation. The Alibaba Cloud Model Studio Data Management feature helps you efficiently create and manage datasets.

<meta property="og:title" content="Training set and evaluation set" />

## Dataset overview <span id="h2-sec-overview" />

Alibaba Cloud Model Studio <strong>Data Management</strong> centrally manages all large model-related datasets in your business workspace. Datasets are divided into <strong>Training Set</strong> (used for [model fine-tuning](/en/model-studio/model-training-overview), supporting SFT/DPO/CPT) and <strong>Evaluation Set</strong> (used for [Model evaluation](/en/model-studio/model-evaluation-overview)).

Training sets support four training scenarios: text generation, visual understanding, image-to-video (first frame), and image-to-video (first and last frame). Evaluation sets support only the text generation scenario. The dataset type cannot be changed after creation; choose carefully based on your downstream usage.

Dataset names can be up to 50 characters long (Chinese, English, digits, underscores, hyphens, and periods are supported), and descriptions up to 200 characters. Creating or publishing empty datasets is not supported. There is no limit on the number of datasets you can create, and no upper bound on the amount of data you can import.

DPO/CPT training methods and cloud storage mounting are supported only in the Beijing region.

## Training methods and scenarios <span id="h2-sec-compare-training" />

Training sets support three training methods with different applicable scenarios and minimum data requirements:

- <strong>SFT</strong> (supervised fine-tuning): instruction fine-tuning that enables the model to solve specific tasks. At least one thousand entries recommended. Available on all sites.
- <strong>DPO</strong> (direct preference optimization): preference alignment training. At least one hundred entries recommended.
- <strong>CPT</strong> (continual pre-training): domain knowledge injection. At least 50 million tokens of data recommended. Draft status and data inheritance are not supported.

CPT and image-to-video training sets do not support draft status; they can only be published immediately at creation. SFT and DPO text-generation training sets can be saved as drafts before publishing.

<table style={{ display: "table", tableLayout: "fixed", width: "100%" }}><colgroup><col style={{ width: "20%" }} /><col style={{ width: "20%" }} /><col style={{ width: "20%" }} /><col style={{ width: "20%" }} /><col style={{ width: "20%" }} /></colgroup><thead><tr><th><p><strong>Training method</strong></p></th><th><p><strong>Purpose</strong></p></th><th><p><strong>Recommended data volume</strong></p></th><th><p><strong>Site availability</strong></p></th><th><p><strong>Draft support</strong></p></th></tr></thead><tbody><tr><td><p>SFT</p></td><td><p>Supervised fine-tuning (instruction fine-tuning)</p></td><td><p>1,000+ entries</p></td><td><p>All sites</p></td><td><p>Supported</p></td></tr><tr><td><p>DPO</p></td><td><p>Direct preference optimization (preference alignment)</p></td><td><p>100+ entries</p></td><td><p>Beijing region</p></td><td><p>Supported</p></td></tr><tr><td><p>CPT</p></td><td><p>Continual pre-training (domain knowledge)</p></td><td><p>50 million tokens</p></td><td><p>Beijing region</p></td><td><p>Not supported</p></td></tr></tbody></table>

## Import methods <span id="h2-sec-compare-import" />

Datasets support four import methods with different applicable scenarios and prerequisites:

- <strong>Upload Local File</strong>: no prerequisites; directly upload local files, suitable for small batches of data.
- <strong>Import from OSS</strong>: add the tag `bailian-datahub-access=read` to the target bucket; suitable for large batches of data. Not supported for evaluation sets.
- <strong>Log Backflow</strong>: automatically extract training data from SLS inference logs; requires authorizing a service-linked role, forming an inference → data → fine-tuning enhancement loop.
- <strong>API Upload</strong>: upload data files programmatically via the Model Studio API, suitable for scenarios requiring automated integration. See [Fine-tuning via API or CLI](/en/model-studio/fine-tuning-api-guide).

For the complete limitations of log backflow (30-day range, 100,000 entry limit, API Key/model filter) and authorization requirements, see the [Log backflow](/en/model-studio/model-log-backflow) topic.

Imported data is automatically encrypted with OSS server-side encryption (SSE-OSS, AES256). Log backflow is available. For the complete list of restrictions, see Dataset overview.

<table style={{ display: "table", tableLayout: "fixed", width: "100%" }}><colgroup><col style={{ width: "25%" }} /><col style={{ width: "25%" }} /><col style={{ width: "25%" }} /><col style={{ width: "25%" }} /></colgroup><thead><tr><th><p><strong>Import method</strong></p></th><th><p><strong>Prerequisites</strong></p></th><th><p><strong>Applicable scenario</strong></p></th><th><p><strong>Evaluation set supported</strong></p></th></tr></thead><tbody><tr><td><p>Local upload</p></td><td><p>None</p></td><td><p>Small batches of data</p></td><td><p>Supported</p></td></tr><tr><td><p>OSS import</p></td><td><p>Bucket tag bailian-datahub-access=read</p></td><td><p>Large batches of data</p></td><td><p>Not supported</p></td></tr><tr><td><p>Log backflow</p></td><td><p>Authorization + API Key/model filter</p></td><td><p>Build training data from inference logs</p></td><td><p>Supported</p></td></tr></tbody></table>

<Warning>
  Log backflow requires authorizing a service-linked role first. For complete limitations and operational details, see the [Log backflow](/en/model-studio/model-log-backflow) topic.
</Warning>

## Data Preparation <span id="aebd25a7f1g2v" />

Preparing high-quality data is key to model fine-tuning results. For the recommended data volumes of each training method (SFT/DPO/CPT text generation), see [Tuning data upload rules](/en/model-studio/text-generation-tuning-data-upload-rules#sec-size-limits).

There are no official recommended data volumes for visual understanding and image-to-video training sets; prepare sufficient samples based on your actual scenario.

### Data format and templates <span id="h3-dp-format" />

For the data file format specifications of each training scenario (SFT text/visual understanding (image/video → text), DPO, CPT, evaluation sets), see [Tuning data upload rules](/en/model-studio/text-generation-tuning-data-upload-rules#sec-support-matrix).

On the <strong>Data Management</strong> dataset creation page, download the data template for the corresponding scenario; preparing data according to the template structure can prevent import failures.

For data diversity and augmentation strategies, see the [model fine-tuning](/en/model-studio/model-training-overview) documentation. For evaluation sets, prepare an independent set of non-overlapping data to objectively assess model generalization.

## Create a dataset <span id="ff93391793hx6" />

Before creating a dataset, the following prerequisites must be met: Model Studio service is activated; for OSS import, add the tag `bailian-datahub-access=read` to the target bucket; for log backflow, authorize a service-linked role.

On the <strong>[Data Management](https://bailian.console.aliyun.com/cn-beijing/model/data)</strong> > <strong>Dataset</strong> list page, click <strong>Create Dataset</strong> to enter the standalone creation page, then follow these steps:

1. Enter a dataset name (up to 50 characters) and a description (up to 200 characters, optional).
2. Select a dataset type: <strong>Training Set</strong> or <strong>Evaluation Set</strong> (cannot be changed after creation).
3. Select a training scenario: text generation, visual understanding, image-to-video (first frame), or image-to-video (first and last frame). Evaluation sets support only text generation.
4. Select a training method: SFT, DPO, or CPT.
5. Select a data format: <strong>Jsonl format</strong> or <strong>Excel format</strong>.
6. Select a storage location: <strong>Platform OSS storage</strong> (free, no data volume limit) or <strong>Mount Cloud Storage</strong> (not available for evaluation sets).
7. Select an import method and upload data: local upload, import from OSS, log backflow, or API upload (see the tab descriptions below).
8. Click <strong>Confirm</strong> to finish creating the dataset.

The three import methods are operated in different tabs, with different fields and operations in each tab. SFT text-generation and DPO text-generation training sets support uploading multiple files at the same time.

<table style={{ display: "table", tableLayout: "fixed", width: "100%" }}><colgroup><col style={{ width: "25%" }} /><col style={{ width: "25%" }} /><col style={{ width: "25%" }} /><col style={{ width: "25%" }} /></colgroup><thead><tr><th><p><strong>Parameter</strong></p></th><th><p><strong>Description</strong></p></th><th><p><strong>Required</strong></p></th><th><p><strong>Value description</strong></p></th></tr></thead><tbody><tr><td><p>Dataset name</p></td><td><p>Dataset identifier</p></td><td><p>true</p></td><td><p>Up to 50 characters; Chinese/English/digits/underscore/hyphen/period</p></td></tr><tr><td><p>Dataset description</p></td><td><p>Dataset description</p></td><td /><td><p>Up to 200 characters</p></td></tr><tr><td><p>Dataset type</p></td><td><p>Training set or evaluation set; cannot be changed after creation</p></td><td><p>true</p></td><td><p>Training set/Evaluation set</p></td></tr><tr><td><p>Training scenario</p></td><td><p>Training scenario the data applies to</p></td><td><p>true</p></td><td><p>Text generation/Visual understanding/Image-to-video (first frame)/Image-to-video (first and last frame)</p></td></tr><tr><td><p>Training method</p></td><td><p>Training algorithm type</p></td><td><p>true</p></td><td><p>SFT/DPO/CPT</p></td></tr><tr><td><p>Data format</p></td><td><p>Data file format</p></td><td><p>true</p></td><td><p>Jsonl format/Excel format</p></td></tr><tr><td><p>Storage location</p></td><td><p>Dataset storage method</p></td><td><p>true</p></td><td><p>Platform OSS storage/Cloud storage mounting</p></td></tr><tr><td><p>Import method</p></td><td><p>Data import source</p></td><td><p>true</p></td><td><p>Local upload/Import from OSS/Log backflow/API upload</p></td></tr></tbody></table>

<Tip>
  CPT and image-to-video training sets do not support draft status; they can only be published immediately at creation.
</Tip>

<Image src="https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/6624275871/p1091636.png" alt="image" width={491} />

<Tabs>
  <Tab title="Local upload">
    Click <strong>Upload File</strong> to select local data files. SFT text-generation and DPO text-generation support multi-file upload. The file format must meet the scenario requirements (see the <strong>Data preparation</strong> section), and imported data is automatically encrypted with SSE-OSS.
  </Tab>

  <Tab title="Import from OSS">
    After adding the tag `bailian-datahub-access=read` to the target bucket, select the bucket and specify the data file path. Suitable for large-scale data import; not supported for evaluation sets.
  </Tab>

  <Tab title="Log backflow">
    Authorize a service-linked role first. Select an API Key and a model, then filter inference logs from the last 30 days (one-time limit of 100,000 entries); the system automatically extracts training data from the logs, forming an inference → data → fine-tuning enhancement loop. For full operational details, see the dedicated log backflow topic.
  </Tab>
</Tabs>

## Version management <span id="h2-sec-add-version" />

A dataset can have multiple independent versions, with version numbers auto-incrementing. On the dataset detail page, click <strong>Add Version</strong> to create a new version.

When adding a version, select a data inheritance strategy:

- <strong>Inheritance Mode</strong>: incrementally modify data based on the previous version; suitable for minor iterations.
- <strong>Create Mode</strong>: re-import all data; suitable for large-scale updates.

CPT training sets do not support data inheritance; each new version requires new data.

Draft dataset versions can be used for <strong>Data Processing</strong> (data cleaning and data augmentation) to improve data quality before publishing.

<Note>
  CPT training sets do not support data inheritance; each new version requires new data.
</Note>

## Dataset management <span id="0c640e2d9d9ax" />

On the <strong>[Data Management](https://bailian.console.aliyun.com/cn-beijing/model/data)</strong> > <strong>Dataset</strong> list page, you can view all datasets. The list displays the following 9 columns: dataset name, type, latest version, data volume, import status, publish status, storage location, import method, and operations (add version/publish/delete). You can filter by storage location and import method. Datasets being imported auto-refresh their status every 5 seconds; no manual refresh is needed. Import status and publish status are two independent columns, reflecting data import progress and whether the dataset has been published, respectively.

### Publish and delete <span id="h3-mg-pubdel" />

<strong>Publish</strong> is irreversible; published versions cannot be edited. <strong>Delete</strong> on a published version is also irreversible; only draft versions can be deleted. Deleting an entire dataset removes all its versions. All these operations are irreversible; proceed with care.

### Edit and export <span id="h3-mg-editexp" />

Only draft versions can be edited online (Prompt/Completion content is editable); editing is unavailable for published versions. When exporting datasets, each type has a different format: SFT training sets are exported as .jsonl, visual understanding training sets as .zip, and evaluation sets as .xlsx. Exporting empty datasets is not supported.

<Image src="https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/6624275871/p1091637.png" alt="image" width={507} />

<Tip>
  Publishing and deletion operations are irreversible. Published versions cannot be edited; only draft versions can be deleted. Proceed with care.
</Tip>

## Billing <span id="455a13b29bjth" />

The Data Management feature is free, but dataset storage and downstream resources incur fees; see the Model Studio billing page for details.

- <strong>Platform OSS storage</strong>: fees are based on the Model Studio billing page.
- <strong>Mount Cloud Storage</strong>: fees are billed to the user's own OSS account.
- <strong>Log Backflow</strong>: SLS fees incurred are billed to the SLS product account.

Review the Model Studio billing documentation for the latest prices before use.

## Next steps <span id="h2-sec-next-steps" />

After a dataset is created and published, it can be used in the following downstream scenarios:

- After a training set is published, it is used for [model fine-tuning](/en/model-studio/model-training-overview) (SFT/DPO/CPT).
- After an evaluation set is published, it is used for [Model evaluation](/en/model-studio/model-evaluation-overview).
- Both draft and published datasets can be used for <strong>Data processing</strong> (data cleaning and augmentation).

To learn the full operational details of [Log backflow](/en/model-studio/model-log-backflow) (authorization flow, filter logic), see the dedicated log backflow topic.

Dataset CRUD is currently supported only in the console; the model fine-tuning API can reference published training set IDs via the training\_file\_ids parameter.
