Fine-tuning data upload rules
Describes the format specifications, packaging requirements, size and quantity limits, and API upload quotas for text generation model fine-tuning data, helping users construct and upload compliant SFT/DPO/CPT training data by training method.
Overview
This document describes the format specifications, packaging requirements, size and quantity limits, and API upload quotas for text generation model fine-tuning data. The applicable scope is text generation model fine-tuning (text/image/video → text), covering pure text SFT/DPO/CPT, Qwen VL image and video understanding, video frame extraction, tool calling (function calling), and deep thinking (thinking). Video generation model fine-tuning (image → video) is out of this scope. Evaluation sets are not subject to these limits: in addition to the text generation format, they also support multi-modal scenarios such as visual understanding, text-to-image, image-to-image, and image-to-video (used for multi-modal model evaluation). For the format, see Evaluation set format.
The dataset type (training set or evaluation set) cannot be changed after creation. The support for each training method and element is detailed in Training method and element support matrix. Format construction rules for each combination are described in the corresponding chapters below.
WarningThe following operations are irreversible; proceed with caution:
- Published versions cannot be edited again; only draft versions created historically can be deleted or edited online.
- The dataset type cannot be changed after creation.
- Switching the type, scenario, or training method clears uploaded files.
Management operations (creation parameters, version management, evaluation set management rules, import method selection, data cleansing, security and compliance) are covered in sibling documents; see Training set and evaluation set, Introduction to model fine-tuning, etc. We recommend downloading the data template for the corresponding scenario on the dataset creation page and preparing data according to the template structure to avoid import failures.
For dataset construction recommendations (recommended data scale, diversity and balance, data augmentation strategies), see Model fine-tuning introduction - Dataset construction tips.
For reinforcement learning (RL) training data format (jsonl + messages + rollout_extra, uploaded via SDK), see RL training data format.
Training Method and Element Support Matrix
The training set supports five training methods: SFT, DPO, CPT, RL, and OPD. The support status of SFT, DPO, and CPT in relation to the evaluation set is shown in the matrix table below; for the RL data format, see the dedicated section below; for the OPD data format, see OPD distillation training. The recommended fine-tuning sequence is CPT (optional) → SFT → DPO (optional); SFT, DPO, and CPT are progressive rather than mutually exclusive.
Region availability:
- SFT, local upload, log backflow, API upload, and multimodal data formats are supported in all regions.
- DPO, CPT, OSS import, and cloud storage mount are only supported in the Beijing region.
The support matrix for training methods and elements is as follows:
Training Method | Text Generation | Visual Understanding - Image Input | Visual Understanding - Video Input (qwen3.5+) | Visual Understanding - Tool Calling (qwen3.5+) | Deep Thinking |
|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | |
✓ | ✗ | ✗ | ✗ | ✓ | |
✓ | ✗ | ✗ | ✗ | ✗ | |
✓ | ✗ | ✗ | ✗ | ✗ |
The table above covers the scope of text generation fine-tuning; for the complete scenarios supported by the evaluation set (including visual understanding, text-to-image, image-to-image, image-to-video, and other multi-modal scenarios), see Evaluation set format.
Adding a new version for any training method always uses the create-new mode, and all data must be re-imported.
For the field definitions of the training methods SFT/DPO/CPT, see Model fine-tuning introduction; for the RL data format, see the dedicated section below; for the OPD data format, see OPD distillation training.
Text Generation - SFT Format
SFT text generation training data uses the jsonl file format, based on the multi-turn ChatML messages structure.
- Supports the three roles system, user, and assistant; the content field is a string (for the content array structure in multi-modal scenarios, see the corresponding multi-modal format section).
- Maximum size of a single file: 200 MB.
- A dataset can mix rows of different formats — each record independently chooses its format, with no need to unify into a single format.
- Available formats: general conversation, deep thinking, tool calling, and the combination of tool and thinking (see the tab examples below).
SFT text generation supports the following sample formats; for the complete JSON structure of each sample, see the corresponding tab:
General ChatML
General ChatML format sample (system/user/assistant multi-turn conversation):
{
"messages": [
{"role": "system", "content": "系统输入1"},
{"role": "user", "content": "用户输入1"},
{"role": "assistant", "content": "期望的模型输出1"},
{"role": "user", "content": "用户输入2"},
{"role": "assistant", "content": "期望的模型输出2"}
]
}
Advanced Usage
-
Supports the
loss_weightparameter, with the value range(0.0, 1.0]; a larger value indicates higher importance of this data item during training.By default, only Qwen3.5 and later models are supported; to support Qwen3 and Qwen2.5 series models, contact your business manager.
{"role": "assistant", "content": "期望的模型输出", "loss_weight": "1.0"}
Deep Thinking (thinking)
Deep thinking (thinking) format sample (the thinking tags are placed in the last assistant message, and the line breaks before and after them must be preserved):
{
"messages": [
{"role": "system", "content": "系统输入1"},
{"role": "user", "content": "用户输入1"},
{"role": "assistant", "content": "模型输出1"},
{"role": "user", "content": "用户输入2"},
{"role": "assistant", "content": "<think>\n期望的思考内容2\n</think>\n\n期望的输出2"}
]
}
Tool Calling (function calling)
Use the Visual Understanding - SFT format.
Thinking Mode Format Notes
Deep thinking content is wrapped in <think>\n…\n</think>\n\n tags and placed within the assistant output text (belonging to the content of the last assistant message, together with the final reply). Rules:
- Can only be placed in the last assistant output; intermediate assistant outputs must not contain thinking tags.
- The line breaks before and after the thinking tags must be preserved.
- If the training samples set the model to not output thinking tags, it is not recommended to enable thinking mode calls after training is completed.
Evaluation Set Format
Evaluation sets serve text generation and multi-modal scenarios and are independent of the SFT/DPO/CPT training method—models trained with DPO/CPT are also evaluated with text generation evaluation sets, with no distinction by training method. Multi-modal evaluation sets are used for custom evaluation of multi-modal models (visual understanding, image generation, and video generation models).
Text evaluation sets support two sample formats, which you select in the training scenario of the data format when creating a dataset:
- Text generation (prompt&completion): single-turn format, where each sample consists of a Prompt (user question) and a Completion (reference answer). Local upload only supports xls and xlsx files (20 MB max per file); see the data template provided in the console for the column structure.
- Text generation (ChatML-messages): multi-turn format, where each sample is a messages array consisting of system, user, and assistant role messages, and the reference answer is the last assistant message in messages. Local upload supports jsonl, xls, and xlsx files (200 MB max per file); the sample file can be downloaded when creating a dataset.
Multi-modal evaluation sets support visual understanding, text-to-image, image-to-image, and image-to-video (first frame/first and last frames) scenarios. The data format is a Zip archive (2 GB max per file), with data.jsonl at the root of the archive; image and video files are in the same archive as data.jsonl and can be placed in subdirectories (for packaging rules, see Multi-modal archive packaging rules). When you switch scenarios, the data format description and sample download on the dataset creation page change accordingly.
The field structure of data.jsonl for each scenario is as follows (one sample per line, with field values being file paths inside the archive):
Scenario | Field | Description |
|---|---|---|
Visual understanding | messages | Message array with the same structure as the training set visual understanding SFT format (the content array contains text and image fields); the reference answer is the last assistant message. For more information, see Visual understanding - SFT format |
Text-to-image | prompt | Image generation instruction |
Image-to-image | prompt | Image editing instruction |
Image-to-image | input_imgs | Array of input image file paths (for example, the original image and the pose image) |
Image-to-image | img_path | Reference answer image file path |
Image-to-video (first frame) | first_frame_path | First frame image file path |
Image-to-video (first frame) | prompt | Video generation instruction |
Image-to-video (first and last frames) | first_frame_path | First frame image file path |
Image-to-video (first and last frames) | last_frame_path | Last frame image file path |
Image-to-video (first and last frames) | prompt | Video generation instruction |
Sample files for each scenario can be downloaded on the dataset creation page, or you can download the following attachments directly:
Visual understanding evaluation set sample (Trainingdata_vl.zip), Text-to-image evaluation set sample (wan-t2i-validation.zip), Image-to-image evaluation set sample (wan-mi2i-validation.zip), Image-to-video (first frame) evaluation set sample (wan-i2v-valid-dataset.zip), Image-to-video (first and last frame) evaluation set sample (wan-kf2v-valid-dataset.zip)
Data for each scenario is packaged separately. Each line below is a data.jsonl example for the text-to-image, image-to-image, image-to-video (first frame), and image-to-video (first and last frames) scenarios in order (for the visual understanding scenario example, see Visual understanding - SFT format):
{"prompt": "一只橘猫趴在洒满阳光的窗台上,窗外樱花盛开,画面温暖明亮"}
{"prompt": "把背景换成夕阳下的海滩,人物保持原有姿态", "input_imgs": ["origin.jpg", "pose.png"], "img_path": "result.jpg"}
{"first_frame_path": "first_frame.jpg", "prompt": "镜头从静态画面开始缓慢推近,画面中的人物微笑并向镜头挥手"}
{"first_frame_path": "image/1_first.jpg", "last_frame_path": "image/1_last.jpg", "prompt": "人物从站立的姿态平滑过渡到坐下"}
In ChatML format, each line is one jsonl sample; single-turn and multi-turn samples can be mixed. Examples are as follows:
{"messages": [{"role": "system", "content": "You are a helpful assistant"}, {"role": "user", "content": "谁在文艺复兴时期绘制人体?"}, {"role": "assistant", "content": "文艺复兴时期是一个关于艺术、文化和学术的复兴运动,在这个时期,许多艺术家都绘制了人体。"}]}
{"messages": [{"role": "system", "content": "You are a helpful assistant"}, {"role": "user", "content": "谁在文艺复兴时期绘制人体?"}, {"role": "assistant", "content": "文艺复兴时期是一个关于艺术、文化和学术的复兴运动,在这个时期,许多艺术家都绘制了人体。"},{"role": "user", "content": "那雕塑方面如何呢?"}, {"role": "assistant", "content": "文艺复兴时期的雕塑也非常有名,几位世界级的雕塑大师都出自于这个时期"}]}
ChatML format field description:
- messages: message array. The system message is optional and comes first, and user and assistant messages alternate; multi-turn conversations append more user/assistant message pairs, and the last assistant message is the reference answer of the sample.
- The content of an assistant message can include model thinking content: the thinking text is placed before the answer and separated by the
</think>marker (used when evaluating reasoning models). - extra: optional custom extension field that supports types such as object, array, and number, which you can use to attach custom data to samples as needed; some rule-based evaluation preset templates (contains all substrings, contains any substring, regex match) use this field as the evaluation input.
Evaluation set specifications:
- Ingestion methods: local upload and log ingestion; object storage (OSS) import and cloud storage mounting are not supported.
- Only historically created draft versions support online editing (Prompt/Completion); published versions are not editable.
- For ChatML format datasets, the file preview in the dataset details displays the full messages content line by line as jsonl.
Log ingestion restrictions:
- The supported log range is within the last 30 days.
- A single import is limited to 100,000 items.
- You must authorize the service-linked role and specify an API Key and model filter conditions.
- The training set is available only for SFT text generation scenarios (evaluation set text generation is also supported).
For details about the Log ingestion import method, see Log ingestion.
The evaluation set should be an independent collection with no data overlap, used to objectively evaluate the model's generalization capability. For evaluation set management rules, see Training set and evaluation set.
Text Generation - DPO Format
DPO text generation training data uses the jsonl format, based on the ChatML messages multi-turn structure, with two additional contrasting assistant outputs, chosen and rejected, used for preference alignment training. All content in messages is used as input, and DPO trains the model on positive and negative feedback for the last user input. For the messages multi-turn structure rules, see Text Generation - SFT Format.
For deep thinking content, the assistant output of chosen or rejected can be wrapped in thinking tags, and the thinking tags can only be placed in the last assistant row. For the rules, see Text Generation - SFT Format.
The loss_weight parameter (invitational testing) applies to the chosen module, with a value range from 0.0 to 1.0; a larger value indicates higher training importance. For more information, see Text Generation - SFT Format.
The maximum size of a single DPO training data file is 200 MB, consistent with SFT text generation. For the DPO definition, see Introduction to model fine-tuning; for version management and release operations, see Training set and evaluation set.
For a sample of DPO text generation training data, see the code block below:
General ChatML
General chosen/rejected comparison format sample (two contrasting assistant outputs):
{
"messages": [
{"role": "system", "content": "系统输入"},
{"role": "user", "content": "用户输入1"},
{"role": "assistant", "content": "模型输出1"},
{"role": "user", "content": "用户输入2"},
{"role": "assistant", "content": "模型输出2"},
{"role": "user", "content": "用户输入3"}
],
"chosen": {"role": "assistant", "content": "赞同的模型期望输出3"},
"rejected": {"role": "assistant", "content": "反对的模型期望输出3"}
}
Deep Thinking (thinking)
Thinking tag format sample (deep thinking content wrapped in thinking tags, placed in the last assistant output):
{
"messages": [
{"role": "system", "content": "系统输入"},
{"role": "user", "content": "用户输入1"},
{"role": "assistant", "content": "模型输出1"},
{"role": "user", "content": "用户输入2"}
],
"chosen": {"role": "assistant", "content": "<think>\n期望的思考内容\n</think>\n\n期望的模型输出"},
"rejected": {"role": "assistant", "content": "反对的模型期望输出2"}
}
Text Generation - CPT Format
CPT text generation training data uses the jsonl plain text format, with one jsonl object per line, structured as {text}, where the text field is plain text content. For the messages multi-turn structure rules, see Text Generation - SFT Format.
CPT training data constraints:
- A minimum of 50 million Tokens is recommended, and the maximum single file size is 300 MB.
For the CPT definition, see Introduction to model fine-tuning; for version management and release operations, see Training set and evaluation set. For the complete JSON structure of a CPT plain text sample, see the code block below.
{text} plain text format sample (one jsonl plain text object per line):
{
"text": "文本内容"
}
Visual Understanding - SFT Format
SFT image training data is used for Qwen VL multimodal understanding (the console UI option is "Image Understanding") scenarios. It uses the zip archive format, containing a data.jsonl training text data file and image files. data.jsonl must be placed in the root directory of the archive, and each training data entry in data.jsonl uses the content array structure for messages, with array items containing an image field (image) and a text field (text). A single-level directory structure is recommended. For packaging rules, see Multimodal archive packaging rules.
Image input limits
Image admission limits are as follows:
- The width and height of each image must not exceed 1024 px.
- Each image must not exceed 10 MB.
- Supported formats: bmp, jpeg, jpg, png, tif, tiff, webp.
resized_width and resized_height are optional target scaling control parameters used to specify the target scaling size of images, not image admission limits. The image admission limits are a width and height not exceeding 1024 px and a size not exceeding 10 MB per image. The actual values of the image admission limits are subject to the console display.
For image token consumption calculation, see Image and video understanding - Billing and rate limits.
Video input limits
Only qwen3.5 and later multimodal models are supported. Two video input modes are supported:
- Video file path mode: the video field is a string (such as "video1.mp4"), and the platform handles frame extraction. Suitable for scenarios that use complete video files.
- Image frame list mode: the video field is a list of image file names (such as ["0.jpg","1.jpg"]), and users prepare the frame sequence themselves. Suitable for scenarios where extracted frame images are already available.
NoteImages and videos in training data must also meet the input limits of model calls (such as image resolution, video duration, and frame rate). For call limits, see Video limits.
For video token consumption calculation, see Image and video understanding - Billing and rate limits.
For the field comparison and samples of the two modes, see below:
Field/Parameter | Video file path mode | Image frame list mode |
|---|---|---|
video | str (video file path, required) | List[str] (image frame list, required) |
sample_fps | Not applicable | float ([0.1, 10], default 2.0, optional) |
fps | float ([0.1, 10], default 2.0, optional) | Not applicable |
resized_width | int (scale width, optional) | int (scale width, optional) |
resized_height | int (scale height, optional) | int (scale height, optional) |
video_start | float (clip start time, optional) | Not applicable |
video_end | float (clip end time, optional) | Not applicable |
SFT image training examples are shown in the tabs below:
General ChatML
General ChatML format sample (system/user/assistant multi-turn conversation):
{
"messages": [
{"role": "system", "content": [{"text": "系统输入1"}]},
{"role": "user", "content": [{"text": "用户输入1"}]},
{"role": "assistant", "content": [{"text": "期望的模型输出1"}]},
{"role": "user", "content": [{"text": "用户输入2"}]},
{"role": "assistant", "content": [{"text": "期望的模型输出2"}]}
]
}
Deep Thinking (thinking)
Deep thinking (thinking) format sample (the thinking tags are placed in the last assistant message, and the line breaks before and after them must be preserved):
{
"messages": [
{"role": "system", "content": [{"text": "系统输入1"}]},
{"role": "user", "content": [{"text": "用户输入1"}]},
{"role": "assistant", "content": [{"text": "模型输出1"}]},
{"role": "user", "content": [{"text": "用户输入2"}]},
{"role": "assistant", "content": [{"text": "<think>\n期望的思考内容2\n</think>\n\n期望的输出2"}]}
]
}
Tool Calling (function calling)
NoteThe qwen3.5+ mode supports using the tool calling data format.
Tool calling (function calling) format example (tools definition + multi-turn messages including the tool role, with tool_call_id mapped one-to-one):
{
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "查询指定城市的实时天气",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "城市名称,例如:北京"}
},
"required": ["city"]
}
}
}
],
"messages": [
{"role": "user", "content": [{"text": "帮我查一下北京的天气"}]},
{
"role": "assistant",
"content": [{"text": "好的,我来帮您查询北京的天气。"}],
"tool_calls": [
{
"id": "call_3a11c1ba883b41b6a4e0cb",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"city\": \"北京\"}"
}
}
]
},
{"role": "tool", "tool_call_id": "call_3a11c1ba883b41b6a4e0cb", "content": [{"text": "{\"city\": \"北京\", \"weather\": \"晴\", \"temperature\": \"25℃\"}"}]},
{"role": "assistant", "content": [{"text": "北京今天天气晴朗,气温 25℃,适合出行。"}]}
]
}
Image Input
Image plus text format example (the content array contains image items and text items):
{
"messages": [
{"role": "system", "content": [{"text": "系统输入"}]},
{
"role": "user",
"content": [
{"text": "用户输入1"},
{"image": "图像文件名1.jpg", "resized_width": 200, "resized_height": 200}
]
},
{"role": "assistant", "content": [{"text": "期望的模型输出1"}]}
]
}
Video file path mode
Video file path mode format example (the video field is a video file path string):
{
"messages": [
{"role": "system", "content": [{"text": "系统输入"}]},
{
"role": "user",
"content": [
{"text": "用户输入1"},
{"video": "视频文件名1.mp4", "fps": 3.0, "resized_width": 200, "resized_height": 200, "video_start": 0.0, "video_end": 3.0}
]
},
{"role": "assistant", "content": [{"text": "期望的模型输出1"}]}
]
}
Image frame list mode
Image frame list mode format example (video is a frame list, including sample_fps):
{
"messages": [
{"role": "system", "content": [{"text": "系统输入"}]},
{
"role": "user",
"content": [
{"text": "用户输入2"},
{"video": ["0.jpg", "1.jpg", "2.jpg", "3.jpg"], "sample_fps": 5.0, "resized_width": 200, "resized_height": 200}
]
},
{"role": "assistant", "content": [{"text": "期望的模型输出2"}]}
]
}
For the definition of multimodal understanding, see Introduction to model fine-tuning.
Tool calling format description
The tool calling (function calling) mode adds tools definitions and the tool_calls/role:tool mechanism on top of the multi-turn messages structure. Field constraints are as follows:
- tools: Tool definition array; each item contains type:"function" and function{name, description, parameters}. parameters is a JSON Schema (including type/properties/required).
- messages: Multi-turn dialogue array, with roles including user, assistant, and tool.
- content: Multimodal content array, which may contain items such as image, text, and video (consistent with the multimodal understanding format).
- assistant.tool_calls: Tool call array generated by the model, containing id, type:"function", and function{name, arguments}. arguments is a JSON string.
- role:"tool": Tool return. tool_call_id must correspond one-to-one with the matching tool_calls[].id, and content holds the tool return result.
The last message in a multi-turn conversation is usually the assistant's final answer based on the tool return.
Model Studio does not support the OpenAI name and weight parameters; all assistant outputs are trained. Training data migrated from OpenAI/Azure must not carry the name/weight fields.
Data diversity and balance recommendations: the amount of data for each scenario should be relatively balanced, and the data ratio should match the actual scenario distribution, to avoid having too much data of a certain type causing the model to favor learning that type of features and undermining generalization.
Thinking mode format description
Deep thinking content is wrapped in the <think>\n…\n</think>\n\n tag and placed within the assistant output text (sharing the content of the last assistant message with the final answer). Rules:
- Can only be placed in the last assistant output; intermediate assistant outputs must not contain thinking tags.
- The line breaks before and after the thinking tags must be preserved.
- If the training samples set the model to not output thinking tags, it is not recommended to enable thinking mode calls after training is completed.
RL training data format
Reinforcement learning (RL) training data uses the jsonl format, with one JSON object per line, containing the messages and rollout_extra fields. RL data is uploaded through the SDK (AgenticRL.run()), not through the console packaging channel; billing is based on MTU model training units, not Tokens. For more information about the RL data format, SDK upload, and Rollout/Reward function development, see Reinforcement learning training overview.
Field descriptions:
messages: the user question, in ChatML structure ([{role, content}]). It contains only the prompt (user, optionally preceded bysystem) and does not contain theassistantresponse—the response is generated autonomously by the model during the Rollout phase.contentis a string.rollout_extra: the reference answer or business data, of dict type, passed through to the Reward function for scoring. Custom keys are supported (not limited tosolution); the framework automatically extractsground_truth(the reference answer), and custom keys are read viarollout_extra["key"].
RL data does not contain the reward field—the reward is computed by the Reward function at training runtime (scored by comparing against the rollout_extra reference answer, outputting a score of 0~1) and is not preset in the jsonl. Unlike SFT (where messages contain complete assistant answers) and DPO (chosen/rejected pairs), RL messages contain only the prompt.
Mathematical reasoning sample (rollout_extra.solution ground truth):
{"messages": [{"role": "user", "content": "Output the answer when you are ready. The answer should be surrounded by three sharps (###), in the form of ### ANSWER: <answer> ###. 6.6 minus x (3/2) times equals 5.6."}], "rollout_extra": {"solution": "2/3"}}
Code generation sample (entry_point/tests/timeout_sec/language):
{"messages": [{"role": "user", "content": "Write a function add(a, b) that returns the sum of two integers."}], "rollout_extra": {"entry_point": "add", "tests": "def test_add():\n assert add(1,2)==3\n assert add(-1,1)==0\n", "timeout_sec": 10, "language": "python"}}
Agent tool calling sample (expected_tools/success_check/max_steps):
{"messages": [{"role": "user", "content": "查询订单 ORD-123 的物流状态并告知预计送达日期。"}], "rollout_extra": {"expected_tools": ["query_order", "get_logistics"], "success_check": "SELECT status FROM orders WHERE id='ORD-123'", "max_steps": 6}}
Common keys of rollout_extra (by scenario):
- Mathematical reasoning:
solution(ground truth),solution_steps(procedure, optional),difficulty(difficulty, optional). - Agent tool calling:
expected_tools(expected tool set),success_check(success check),max_steps(reference for call efficiency). - Code generation:
entry_point(entry function),tests(unit test code),timeout_sec(execution timeout),language(sandbox selection).
RL data constraints:
- The data volume must be greater than
batch_size(default 64). A few dozen to a few hundred items can be used to validate the solution; for formal training, mathematical reasoning requires 500~2000 items, Agent ≥1000 items, and code ≥1000 problems—the larger the data volume, the better the results. - The training set and validation set are two separate jsonl files, uploaded via
TrainingDataset/ValidationDatasetrespectively (the validation set is optional). - RL data is uploaded through the SDK (
AgenticRL.run()), not through the console packaging channel; billing is based on MTU model training units, not Tokens. For more information about SDK fields and submission methods, see Reinforcement learning training configuration.
Multi-modal zip package packaging rules
Multi-modal understanding training data is uploaded as a zip package on the Add Dataset page, and the package must meet the following constraints:
- The zip package supports up to 2 GB.
- The allowed character set for folder and file names inside the package is ASCII letters (a-z, A-Z), digits (0-9), underscore (_), and hyphen (-).
- The training text data file is fixed as data.jsonl and must be located in the root directory of the zip package—ensure that data.jsonl is directly visible when you open the zip file after compression, without an additional wrapping folder outside it.
Image or video file names must be globally unique within the zip package, even if they are distributed across different folders. In data.jsonl, only the file name needs to be declared rather than the file path—correct example: image1.jpg; incorrect example: jpg_folder/image1.jpg.
Mount Cloud Storage does not support zip packages. When loading a dataset via Mount Cloud Storage, you must upload the uncompressed dataset folder as a whole to an OSS Bucket, and specify the data.jsonl file path via the file_path of MountStorage; when multiple files are included, you only need to specify the data.jsonl path, and the remaining files in the same directory are mounted automatically. For more information about Mount Cloud Storage, see Model fine-tuning using API.
For naming examples and the directory structure, see the code block below. For Mount Cloud Storage authorization operations, see Model fine-tuning in the console; for tagging OSS-imported Buckets, see Training set and evaluation set.
# 单层目录(推荐)
Trainingdata_vl.zip
|--- data.jsonl # 必须在根目录,外层不再包裹文件夹
|--- image1.png
|--- video1.mp4
# data.jsonl 内声明文件名(非路径)
# 正确:image1.jpg
# 错误:jpg_folder/image1.jpg
Go to the Add Dataset page in the console to upload the multi-modal zip package and complete package validation.
File size and quantity limits
The file size and quantity limits for Upload Local File are set by training method and scenario; see the per-scenario tables below. For image admission limits, see Visual understanding - SFT format; for evaluation set format limits, see Evaluation set format; for Log ingestion limits, see Log ingestion.
The value range of max_length varies by model and training method (for example, 500~32768, 500~65536, 500~131072); it is a training sequence length configuration parameter, not an upload admission limit. The upload admission size limit for a single piece of training data is subject to what is displayed on the console page.
The file size and quantity limits for Upload Local File are set by training method and scenario, and the recommended data volume is the minimum suggested value:
Training method/scenario | Single file size limit | File quantity limit(maxCount) | Recommended data volume |
|---|---|---|---|
Text generation - SFT format | 200 MB | 10 (default) | At least thousands of items |
Text generation - DPO format | 200 MB | 10 (default) | At least hundreds of items |
Text generation - CPT format | 300 MB | 1 | At least 50 million tokens |
Multi-modal (zip) | 2 GB | 1 | Prepare sufficient samples based on your actual scenario |
File name (without extension) | ≤120 characters, and must be unique | — | — |
Extension | Must be in the Add Dataset list | — | — |
API upload quotas
For quotas on uploading fine-tuning files through the DashScope API (with the purpose marked as model fine-tuning), see the quota table below. When you create a dataset in the console, the File API list supports merging and registering up to 10 files; fine-tuning files uploaded through the API are visible and usable in both the console model fine-tuning page and API calls.
Constraints on loading datasets via cloud storage mounting:
- Use the file_path field of MountStorage to specify the path of the data.jsonl root directory manifest; zip archives are not supported.
- Before mounting, you must authorize Model Studio to access your OSS data.
Handling quota exceedance and encryption:
- Single files larger than 300 MB: upload via cloud storage mounting or the multi-modal ZIP 2 GB channel.
- Total quota exceeded: delete historical files to free up space.
- Imported data automatically enables OSS server-side encryption (SSE-OSS, AES256).
For more information about API calls, authentication, SDKs, error codes, and MountStorage field details, see Model fine-tuning with the API.
The quotas for uploading fine-tuning files via the API are as follows:
Quota item | Limit | Description |
|---|---|---|
Single file size | No more than 300 MB | Fine-tuning files (for model fine-tuning purposes) |
Total space of valid files | 100 GB | Cumulative total of undeleted files |
Total number of valid files | 10000 files | Cumulative total of undeleted files |
File storage duration | No time limit | No automatic expiration |
File API list limit | 10 | Registered together when the dataset is created in the console |
The differences between OSS import and cloud storage mounting are compared as follows:
Dimension | OSS import | Mount Cloud Storage |
|---|---|---|
Prerequisites | Model Studio data access authorization tag | Authorize the Model Studio service to access OSS data |
Data form | Single or batch files | An entire uncompressed dataset folder (zip not supported) |
Entry point | Data Management > Add Dataset > OSS import | Model Fine-tuning > Create Training Task > Data Configuration > Mount Dataset |
Evaluation Set | ✗ | ✗ |
Upload validation and common errors
When you upload local files on the Add Dataset page, frontend validation rejects files that do not meet the access rules and displays a prompt. Common validation rejections and upload error scenarios are described in the collapsible sections below:
Problem: When uploading files, the frontend displays a prompt indicating that the number of files exceeds the limit, and the files are rejected.
Cause: maxCount is set by training method — 10 by default for SFT/DPO text, and 1 for multi-modal zip and CPT. If the number of uploaded files exceeds the limit of the corresponding training method, the frontend rejects them.
Action:Adjust as follows and re-upload:
- Check the maxCount upper limit corresponding to the current training method; for details see File size and quantity limits.
- Reduce the file count to within the upper limit; merge multi-modal data into a single zip, and merge CPT data into a single jsonl.
- If the file count still exceeds the limit, split into multiple datasets and upload in batches.
Issue: The filename (excluding extension) length exceeds 120 characters, and the frontend rejects the upload
Cause:The filename excluding extension has a 120-character upper limit and must contain only ASCII letters, digits, underscores, and hyphens.
Action:Adjust as follows and re-upload:
- Rename the file so that the filename (excluding extension) is shortened to within 120 characters.
- Use only a-z/A-Z/0-9/_/- characters; remove Chinese and other non-ASCII characters.
- Filenames inside a multi-modal archive must also be globally unique.
Issue: The filename (excluding extension comparison) is duplicated, and the frontend rejects the upload
Cause:Filenames within the same dataset must be unique excluding extension; the comparison ignores the extension.
Action:Adjust as follows and re-upload:
- Check for duplicate-named files and rename them so the part excluding extension is unique.
- Files with the same name but different extensions (e.g., image.jpg and image.png) are also judged as duplicates and must be differentiated simultaneously.
- Filenames inside a multi-modal zip must be globally unique, even if distributed across different folders.
Issue: The single file size exceeds the upper limit of the corresponding training method, and the frontend rejects the upload
Cause:The single file size upper limit varies by training method scenario — SFT/DPO text 200 MB, multi-modal zip 2 GB, CPT 300 MB.
Action:Adjust as follows and re-upload:
- Check whether the file size exceeds the upper limit of the corresponding training method.
- Split the jsonl into multiple files for batch upload (SFT/DPO); CPT data splitting requires creating multiple new datasets.
- For the overflow handling method when a single file exceeds 300 MB, see API upload quota.
Issue: The file extension is not in the supportedExtension list, and the frontend pops up a warning and rejects the upload
Cause:The extension must be within the supported list — text training uses jsonl; evaluation sets vary by sample format (prompt&completion uses xls/xlsx, and ChatML-messages supports jsonl/xls/xlsx); multi-modal images support bmp/jpeg/jpg/png/tif/tiff/webp, and multi-modal videos support mp4 and other formats.
Action:Adjust as follows and re-upload:
- Check whether the file extension is within the supported list for the corresponding scenario.
- Convert the file to a supported extension and repackage for upload.
- Image and video extensions inside a multi-modal zip must each conform, otherwise the entire package import fails.
Issue: During OSS upload, the file is set to error status, and the upload is not completed
Cause:Common causes are missing Bucket tag, abnormal Bailian service OSS access authorization, or non-conforming file format.
Action:Troubleshoot as follows and retry:
- Verify that the OSS Bucket has the Bailian data access authorization tag added.
- Confirm that the Bailian service has been authorized to access OSS data.
- Check that data.jsonl and the file format conform to the packaging rules and retry the upload; for details see Multimodal zip package packaging rules.
Irreversible operation risk notice:
- Publish and delete operations are both irreversible; published versions cannot be edited again, and only draft versions can be deleted or edited online.
- Dataset type (training set/evaluation set) cannot be changed or interchanged after creation; selecting the wrong one requires creating a new dataset and re-importing all data.
- Switching dataset type, training scenario, or training method clears the uploaded files and resets the storage location and import method.
Automatic validation set splitting randomly extracts 10% of data from the training set as the validation set, reducing the actual training data volume. For small datasets, an independent validation set is recommended; for validation set configuration operations see Fine-tune models in the console.
It is recommended to first download the data template for the corresponding scenario; preparing data according to the template structure can avoid import failures. For data template download recommendations see Overview. Common issue troubleshooting is detailed in the collapsible items below. For historical draft version data cleansing and augmentation operations, see Data cleansing and augmentation, and for security and compliance data domains see Zero-Code Reinforcement of Large Language Model Security and Compliance.
When upload validation fails, go to the console New Dataset page to check the file format and admission rules.