创建模型精调作业
更新时间:2024-04-19
功能介绍
本接口用于模型精调作业。
注意事项
- 调用本文API,使用“安全认证/Access Key ”中的Access Key ID 和 Secret Access Key等进行鉴权,无法使用获取Access Token的方式鉴权,具体鉴权认证机制参考鉴权认证机制。
请求说明
基本信息
请求地址: https://qianfan.baidubce.com/v2/finetuning
请求方式: POST
Header参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
Content-Type | string | 是 | 固定值:application/json |
x-bce-date | string | 否 | 当前时间,遵循ISO8601规范,格式如2016-04-06T08:23:49Z |
Authorization | string | 是 | 用于验证请求合法性的认证信息,更多内容请参考鉴权认证机制,签名工具可参考IAM签名工具 |
Query参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
Action | string | 是 | 方法名称,固定值CreateFineTuningJob |
Body参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 是 | 作业名称,取值范围:字符串长度为 [2, 20] |
description | string | 否 | 作业描述,取值范围:字符串长度为 [0, 500] |
model | string | 是 | 基础模型版本,支持对话续写类、图像生成类模型版本,说明: (1)对话续写类模型版本,该字段可选值如下: · ERNIE-Speed-8K · ERNIE-Lite-8K-0704 · ERNIE-Lite-8K-0725 · ERNIE-Lite-8K-0922 · ERNIE-Lite-8K-0308 · ERNIE-Tiny-8K · Meta-Llama-3-8B · Qianfan-Chinese-Llama-2-7B · Qianfan-Chinese-Llama-2-7B-32K · Qianfan-Chinese-Llama-2-13B-v1 · Qianfan-Chinese-Llama-2-13B-v2 · Mixtral-8x7B · SQLCoder-7B · ChatGLM2-6B-32K · ChatGLM2-6B · Baichuan2-7B-Chat · Baichuan2-13B-Chat · BLOOMZ-7B · CodeLlama-7B (2)图像类模型版本,该字段可选值如下: · WENXIN-YIGE · Stable-Diffusion-XL-Base-1.0 |
trainMode | string | 是 | 调优的训练模式类型,说明: (1)当model值为ERNIE-Speed-8K,该参数可选值为以下: · SFT · PostPretrain · DPO (2)当model值为ERNIE-Lite-8K-0308、 ERNIE-Tiny-8K 或 Meta-Llama-3-8B,该参数可选值为以下: · SFT · DPO (3)ERNIE-Lite-8K-0922或Qianfan-Chinese-Llama-2-13B-v1,该参数可选值为以下: · SFT · PostPretrain (4)其他,该参数为固定值SFT |
parameterScale | string | 否 | 调优的参数规模,说明:该字段取值如下,也可以参考本文模型支持情况 (1)文本生成类,当模型版本当trainMode为SFT · 模型为ERNIE-Tiny-8K、Mixtral-8x7B、ChatGLM2-6B-32K 或 Custom-Model(自定义模型),该参数值为FullFineTuning · 其他模型,该字段值可选值为FullFineTuning、LoRA (2)图像类 · 当模型为WENXIN-YIGE,该参数为固定值FullFineTuning · 当模型为Stable-Diffusion-XL-Base-1.0,该参数为固定值LoRA |
hyperParameterConfig | object | 否 | 超参数配置 |
hyperParameterConfig说明
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
epoch | int | 否 | 迭代轮次,说明:该字段取值详情参考本文模型支持情况 |
learningRate | float | 否 | 学习率,说明:该字段取值详情参考本文模型支持情况 |
batchSize | int | 否 | 批处理大小,说明:该字段取值更多详情参考本文模型支持情况 |
maxSeqLen | int | 否 | 序列长度,说明:该字段取值更多详情参考本文模型支持情况 |
loggingSteps | int | 否 | 保存日志间隔,说明: (1)当为以下情况,该字段必填: · model为ERNIE-Speed-8K,且trainMode为SFT · model为ERNIE-Lite-8K-0922,且trainMode为SFT · model为ERNIE-Lite-8K-0308,且trainMode为SFT · model为ERNIE-Tiny-8K,且trainMode为SFT (2)取值范围[1, 100],默认值为1 |
warmupRatio | float | 否 | 预热比例,说明:该字段取值更多详情参考本文模型支持情况 |
weightDecay | float | 否 | 正则化系数,说明:该字段取值更多详情参考本文模型支持情况 |
loraRank | int | 否 | LoRA 策略中的秩,说明:该字段取值更多详情参考本文模型支持情况 |
loraAlpha | int | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
loraAllLinear | string | 否 | LoRA 所有线性层,说明:该字段取值更多详情参考本文模型支持情况 |
loraTargetModules | string[] | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
loraDropout | float | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
schedulerName | string | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
Packing | bool | 否 | 可选值:true 或 false,默认值false,说明:该字段取值更多详情参考本文模型支持情况 |
gradientAccumulationSteps | int | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
pseudoSamplingProb | float | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
checkpointCount | int | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
saveStep | int | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
dpoBeta | floatnt | 否 | 说明:该字段取值更多详情参考本文模型支持情况 |
模型支持情况
- 对话续写类
model | trainMode | parameterScale | hyperParameterConfig |
---|---|---|---|
ERNIE-Speed-8K | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate: FullFineTuning:[0.00001,0.00004],默认值0.00003 LoRA:[0.00003,0.001],默认值0.0003 (3)maxSeqLen: 单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.0001 (7)gradientAccumulationSteps:[0,32],默认值0 (8)pseudoSamplingProb:[0,1],默认值0 (9)仅LoRA支持: loraRank: 单选,2 或 4 或 8,默认为8 loraAllLinear: 单选,True 或 False,默认为True |
ERNIE-Speed-8K | PostPretrain | - | (1)epoch:[1,10],默认值1 (2)learningRate:[0.00001,0.00004],默认值0.00003 (3)maxSeqLen: 单选,4096 或 8192,默认值4096 |
ERNIE-Speed-8K | DPO | - | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000001,0.00001],默认值0.000001 (3)maxSeqLen:单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.01 (7)dpoBeta:[0.01,1],默认值0.1 |
ERNIE-Lite-8K-0308 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate: FullFineTuning:[0.00001,0.00004],默认值0.00003 (3) LoRA:[0.00003,0.001],默认值0.0003 (4)maxSeqLen: 单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (5)loggingSteps:[1,100],默认值1 (6)warmupRatio:[0.01,0.5],默认值0.1 (7)weightDecay:[0.0001,0.1],默认值0.01 (8)gradientAccumulationSteps:[0,32],默认值0 (9)pseudoSamplingProb:[0,1],默认值0 (10)仅LoRA支持: loraRank: 单选,2 或 4 或 8,默认为8 loraAllLinear: 单选,True 或 False,默认为True |
ERNIE-Lite-8K-0308 | DPO | - | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000001,0.00001],默认值0.000001 (3)maxSeqLen:单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.01 (7)dpoBeta:[0.01,1],默认值0.1 |
ERNIE-Lite-8K-0704 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate: FullFineTuning:[0.00001,0.00004],默认值0.00003 LoRA:[0.00003,0.001],默认值0.0003 |
ERNIE-Lite-8K-0725 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate: FullFineTuning:[0.00001,0.00004],默认值0.00003 LoRA:[0.00003,0.001],默认值0.0003 (3)maxSeqLen: 单选,4096 或 8192,默认值4096 |
ERNIE-Lite-8K-0922 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate: FullFineTuning:[0.00001,0.00004],默认值0.00003 LoRA:[0.00003,0.001],默认值0.0003 (3)maxSeqLen: 单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.01 (7)gradientAccumulationSteps:[0,32],默认值0 (8)仅LoRA支持: loraRank: 单选,2 或 4 或 8,默认为8 loraAllLinear: 单选,True 或 False,默认为True |
ERNIE-Lite-8K-0922 | PostPretrain | - | (1)epoch:[1,10],默认值1 (2)learningRate:[0.00001,0.00004],默认值0.00003 (3)maxSeqLen: 单选,4096 或 8192,默认值4096 |
ERNIE-Character-8K-0321 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2) learningRate: FullFineTuning:[0.000001,0.001],默认值0.0003 (3)maxSeqLen:单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.01 (7)gradientAccumulationSteps:[0,32],默认值0 (8)pseudoSamplingProb:[0,1],默认值0 (9)仅FullFineTuning支持: checkpointCount:[1,10],默认值1 saveStep:64 或 128 或 256 或 512 或 1024 或 2048 或 4096,默认值256 (10)仅LoRA支持: loraRank:单选,2 或 4 或 8,默认为8 loraAllLinear:单选,True 或 False,默认为True |
ERNIE-Tiny-8K | SFT | FullFineTuning | (1)epoch:[1,50],默认值1 (2)learningRate: FullFineTuning:[0.00001,0.00004],默认值0.00003 (3)maxSeqLen: 单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.01 (7)gradientAccumulationSteps:[0,32],默认值0 (8)pseudoSamplingProb:[0,1],默认值0 |
ERNIE-Tiny-8K | DPO | - | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000001,0.00001],默认值0.000001 (3)maxSeqLen:单选,512 或 1024 或 2048 或 4096 或 8192,默认值4096 (4)loggingSteps:[1,100],默认值1 (5)warmupRatio:[0.01,0.5],默认值0.1 (6)weightDecay:[0.0001,0.1],默认值0.01 (7)dpoBeta:[0.01,1],默认值0.1 |
Meta-Llama-3-8B | SFT | FullFineTuning | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,2],默认值1 |
Qianfan-Chinese-Llama-2-7B | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
Qianfan-Chinese-Llama-2-7B-32K | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值3 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,4096 或 8192 或 16384 或 32768,默认值32768 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
Qianfan-Chinese-Llama-2-13B-v1 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen:单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
Qianfan-Chinese-Llama-2-13B-v1 | PostPretrain | - | (1)epoch:1 (2)learningRate:[0.0000002,0.0002],默认值0.00002 (3)batchSize:[48,960],默认值192 (4)weightDecay:[0.0001,0.05],默认值0.01 (5)checkpointCount:[1,10],默认值1 (6)saveStep:[64,8192],默认值256 |
Qianfan-Chinese-Llama-2-13B-v2 | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen:单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
Mixtral-8x7B | SFT | FullFineTuning | (1)epoch:[1,20],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 |
SQLCoder-7B | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
ChatGLM2-6B-32K | SFT | FullFineTuning | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:1Packing:布尔值,true 或 false,默认值false (4)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (5)warmupRatio:[0.01,0.1],默认值0.03 (6)weightDecay:[0.001,1],默认值0.01 (7)maxSeqLen: 单选,4096 或 8192 或 16384 或 32768,默认值32768 (8)checkpointCount:[1,10],默认值1 (9)saveStep:[64,4096],默认值256 |
ChatGLM2-6B | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
Baichuan2-7B-Chat | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1Packing:布尔值,true 或 false,默认值false (4)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (5)warmupRatio:[0.01,0.1],默认值0.03 (6)weightDecay:[0.001,1],默认值0.01 (7)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (8)checkpointCount:[1,10],默认值1 (9)saveStep:[64,4096],默认值256 (10)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
Baichuan2-13B-Chat | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
BLOOMZ-7B | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)checkpointCount:[1,10],默认值1 (9)saveStep:[64,4096],默认值256 (10)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 |
CodeLlama-7B | SFT | FullFineTuning、LoRA | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)batchSize:[1,4],默认值1 (4)Packing:布尔值,true 或 false,默认值false (5)schedulerName: 单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (6)warmupRatio:[0.01,0.1],默认值0.03 (7)weightDecay:[0.001,1],默认值0.01 (8)maxSeqLen: 单选,512 或 1024 或 2048 或 4096,默认值4096 (9)checkpointCount:[1,10],默认值1 (10)saveStep:[64,4096],默认值256 (11)仅LoRA支持: loraRank: 单选,8 或 16 或 32 或 64,默认值32 loraAlpha: 单选,8 或 16 或 32 或 64,默认值32 loraDropout:[0.01,0.5],默认值0.1 loraTargetModules: 多选,self_attn.q_proj、self_attn.k_proj、self_attn.v_proj、self_attn.o_proj、mlp.gate_proj、mlp.up_proj、mlp.down_proj,默认值self_attn.q_proj + self_attn.v_proj |
Custom-Model(自定义模型) | SFT | FullFineTuning | (1)epoch:[1,50],默认值1 (2)learningRate:[0.0000000001,0.0002],默认值0.000001 (3)schedulerName:单选,linear 或 cosine 或 polynomial 或 constant 或 constant_with_warmup,默认值cosine (4)warmupRatio:[0.01,0.1],默认值0.03 (5)weightDecay:[0.001,1],默认值0.01 |
- 文生图
model | trainMode | parameterScale | hyperParameterConfig |
---|---|---|---|
WENXIN-YIGE | SFT | FullFineTuning | epoch:[1,100],默认值20 learningRate:[0.00000001,0.01],默认值0.00001 batchSize:[1,8],默认值8 |
Stable-Diffusion-XL-Base-1.0 | SFT | LoRA | epoch:[1,100],默认值20 learningRate:[0.00001,0.0001],默认值0.00005 batchSize:[2,8],默认值8 |
响应说明
名称 | 类型 | 描述 |
---|---|---|
requestId | string | 请求ID |
result | object | 请求结果 |
result说明
名称 | 类型 | 描述 |
---|---|---|
jobId | string | 作业ID |
示例
请求示例
curl --location 'https://qianfan.baidubce.com/v2/finetuning?Action=CreateFineTuningJob' \
--header 'Authorization: bce-auth-v1/f0exxx/2023-09-19T13:42:13Z/180000/host;x-bce-date/9a8cfb8exxxx' \
--header 'x-bce-date: 2023-09-19T13:37:10Z' \
--header 'Content-Type: application/json' \
--data '{
"name":"test_name",
"description":"test_description",
"model":"ERNIE-Lite-8K-0922",
"trainMode":"SFT"
}'
响应示例
{
"requestId":"1bef3f87-c5b2-4419-936b-50f9884f10d4",
"result":{
"jobId":"job-ftp4icwebtnc"
}
}
错误码
若请求错误,服务器将返回的JSON文本包含以下参数:
名称 | 描述 |
---|---|
error_code | 错误码 |
error_msg | 错误描述信息,帮助理解和解决发生的错误 |
例如Access Token失效返回:
{
"error_code": 110,
"error_msg": "Access token invalid or no longer valid"
}
更多千帆大模型平台其他错误码,也可以查看错误码说明。