You need to enable JavaScript to run this app.
文档中心
火山方舟

火山方舟

复制全文
下载 pdf
管理模型精调
创建模型调优任务
复制全文
下载 pdf
创建模型调优任务
POST https://ark.cn-beijing.volcengineapi.com/?Action=CreateModelCustomizationJob&Version=2024-01-01​
创建一个模型调优任务,支持全量 SFT、SFT-LoRA、继续预训练、DPO-LoRA、DPO、GRPO、GRPOLoRA、PPO、OPD、OPDLoRA 等训练类型。​
说明​
  • 训练类型 CustomizationType 一经创建即不可修改;如需更换类型请新建任务。​
  • 任务创建后会进入排队(Queue)→ 运行中(Running)→ 完成(Completed)/ 失败(Failed)/ 取消(Cancelled)的阶段流转,可通过 GetModelCustomizationJob 接口查询当前 Status.Phase。​
  • Hyperparameters 数组中每一项的 Name 不能重复;具体可用超参数因训练类型不同而异,请参考训练类型文档。​
  • 强化学习类训练(GRPO、GRPOLoRA、PPO 等)需配合 RewardConfigs 或 CustomRLPipelineConfig 使用。​
鉴权​
本接口支持鉴权方式如下,详情请参见 Base URL 及鉴权。​
  • Access Key 鉴权,请在 Access Key 管理 页面,获取 Access Key。本接口仅支持 Access Key 鉴权。​
​​
请求参数​
Body 参数​
CustomizationType string 必选 | 训练类型​
​
Data object 必选 | 微调数据集​
​
ModelReference object 必选 | 微调基础模型​
​
Name string 必选 | 任务名称​
​
BillingMethod string | 计费方式​
​
CustomRLPipelineConfig object | RL 流水线配置​
​
DebugConfig object | 调试配置​
​
Description string | 任务描述​
​
EnableTrajectory boolean | 启用轨迹采集​
​
Hyperparameters object[] | 训练超参​
​
OutputConfig object | 输出配置​
​
Priority string | 调度优先级​
​
ProjectName string 默认值 default | 所属项目​
​
RewardConfigs object[] | 奖励规则配置​
​
SaveModelLimit integer 默认值 1 | 保存模型上限​
​
Tags object[] | 标签列表​
​
TestOptions object | 测试选项(内部)​
​
​
响应参数​
Id string | 任务 ID​
​
​

Request

curl 'https://ark.cn-beijing.volcengineapi.com/?Action=CreateModelCustomizationJob&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{
    "Name": "测试任务",
    "Description": "这是一个测试任务",
    "Tags": [
        {
            "Key": "test_key",
            "Value": "test_value"
        }
    ],
    "ProjectName": "default",
    "CustomizationType": "FinetuneLoRA",
    "ModelReference": {
        "FoundationModel": {
            "Name": "skylark2-lite-8k",
            "ModelVersion": "1.0"
        }
    },
    "Hyperparameters": [
        {
            "Name": "epoch",
            "Value": "6"
        },
        {
            "Name": "learning_rate",
            "Value": "0.00001"
        }
    ],
    "SaveModelLimit": 1,
    "Data": {
        "TrainingSet": {
            "TosBucket": "ark-auto-created-required-2100000000-cn-beijing",
            "TosPaths": [
                "model-customization-job-upload-set/1712561985763/test.jsonl"
            ]
        }
    }
}
'

Response

{
    "ResponseMetadata": {
        "RequestId": "20240401114541A47B2E9C8F5D103E76",
        "Action": "CreateModelCustomizationJob",
        "Version": "2024-01-01",
        "Service": "ark",
        "Region": "cn-beijing"
    },
    "Result": {
        "Id": "mcj-20240401114541-5gzd8"
    }
}
最近更新时间:2026.09.17 14:46:56
这个页面对您有帮助吗?
有用
有用
无用
无用