查询指定模型压缩任务的详细信息。
查询压缩任务
地址
GET /api/v1/fine-tunes/compress/jobs/{job_id}
请求示例
curl "https://dashscope.aliyuncs.com/api/v1/fine-tunes/compress/jobs/quant-202604111200-a1b2" \
-H "Authorization: Bearer ${API_KEY}"
响应示例
{
"request_id": "uuid-string",
"output": {
"job_id": "quant-202604111200-a1b2",
"job_name": "qwen3.5-flash 压缩任务",
"job_description": "...",
"status": "SUCCEEDED",
"model": "qwen3.5-flash-2026-02-23-ft-***",
"base_model": "qwen3.5-flash-2026-02-23",
"template_id": "quant-flash-nvfp4-mlp-nomtp",
"template_name": "W4A4 NVFP4高性能压缩-MU5/MU8/MU9",
"template_description": "在更低比特压缩下兼顾高精度与高性能,进一步降低显存占用并提升推理吞吐。",
"training_type": "quantization",
"compress_type": "quantization",
"hyper_parameters": {},
"custom_calibration_file_ids": ["file-***"],
"quantized_output": "qwen3.5-flash-2026-02-23-test-quant-202604111200-a1b2",
"create_time": "2026-04-11 12:00:00",
"start_time": "2026-04-11 12:02:30",
"end_time": "2026-04-11 13:02:30",
"error": null,
"group": "quantization",
"usage": 3600
}
}
响应参数
|
字段 |
类型 |
说明 |
|
job_id |
String |
|
|
job_name |
String |
任务名称 |
|
job_description |
String |
任务描述 |
|
status |
String |
任务状态(详见任务状态) |
|
model |
String |
源模型 ID |
|
base_model |
String |
基础模型 ID |
|
template_id |
String |
使用的压缩模板 ID |
|
template_name |
String |
模板名称 |
|
template_description |
String |
模板描述 |
|
training_type |
String |
任务类型,固定为 |
|
compress_type |
String |
压缩类型,同 |
|
hyper_parameters |
Object |
实际生效的超参(仅返回用户可见参数) |
|
custom_calibration_file_ids |
Array<String> |
自定义校准数据集文件 ID 列表 |
|
quantized_output |
String |
量化后产出的模型 ID(仅 SUCCEEDED 时有值),可用于创建部署接口进行模型部署 |
|
create_time |
String |
任务创建时间 |
|
start_time |
String |
任务开始执行时间(PENDING/QUEUING 时为 null) |
|
end_time |
String |
任务完成时间(终态时有值) |
|
error |
Object |
失败时的错误信息,含 |
|
group |
String |
任务分组,固定为 |
|
usage |
Integer |
GPU 时长(秒),SUCCEEDED 或 CANCELED 时出现 |
错误码
通用错误码
|
错误码 |
HTTP |
说明 |
|
|
400 |
请求参数不合法 |
|
|
400 |
缺少必选参数 |
|
|
401 |
认证失败 |
|
|
403 |
无权限访问 |
|
|
404 |
资源不存在 |
|
|
400 |
资源状态不允许该操作(如取消已终态任务) |
|
|
429 |
配额超限 |
|
|
500 |
服务内部错误 |
业务错误码
以下业务错误码按场景分类列出。对外 Code 为接口实际返回的 code 字段值。
参数校验类
|
对外 Code |
HTTP |
说明 |
|
|
400 |
缺少必选参数 |
|
|
400 |
缺少必选参数 |
|
|
400 |
不支持对基础模型直接量化 |
|
|
400 |
指定的配置模板不存在 |
|
|
400 |
当前模型不支持该压缩模板 |
|
|
400 |
模型不支持量化 |
|
|
400 |
LoRA 调优模型不支持量化 |
|
|
400 |
模型数据不可用 |
|
|
400 |
任务名称包含不支持的字符 |
|
|
400 |
|
|
|
400 |
源模型尚未就绪 |
|
|
403 |
无权使用该压缩模板 |
超参数校验类
|
对外 Code |
HTTP |
说明 |
|
|
400 |
必选超参数未传 |
|
|
400 |
传入了未知超参数 |
|
|
400 |
超参数值不在枚举值列表中 |
|
|
400 |
超参数值超出数值范围 |
|
|
400 |
超参数值不是合法数字 |
任务查询类
|
对外 Code |
HTTP |
说明 |
|
|
404 |
指定的压缩任务不存在 |
|
|
400 |
缺少必选参数 |
分页与时间参数类
|
对外 Code |
HTTP |
说明 |
|
|
400 |
页码参数不合法(须 ≥ 1) |
|
|
400 |
每页数量不合法(须 1~100) |
|
|
400 |
时间格式不合法 |
错误响应示例
{
"request_id": "uuid-string",
"code": "InvalidParameter",
"message": "The specified model 'xxx-lora-yyy' is a LoRA model and not supported for quantization."
}