静态配置采集接口

接口功能

采集静态配置。

接口格式

操作类型:GET

URLhttps://{ip}:{port}/v1/config

  • {ip}字段优先读取环境变量值MIES_CONTAINER_MANAGEMENT_IP;如果没有该环境变量,则取配置文件的“managementIpAddress”参数;如果配置文件中没有“managementIpAddress”参数,则取配置文件的“ipAddress”参数。
  • {port}字段优先读取配置文件的“managementPort”参数;如果配置文件中没有“managementPort”参数,则取配置文件的“port”参数。

请求参数

使用样例

请求样例:

GET https://{ip}:{port}/v1/config
响应样例:
{
    "modelName": "llama_65b",
    "maxSeqLen": 2560,
    "npuMemSize": 8,
    "cpuMemSize": 5,
    "worldSize": 8,
    "maxOutputLen": 512,
    "cacheBlockSize": 128
}

输出说明

参数

类型

说明

modelName

string

推理选取的模型名字。

maxSeqLen

uint32_t

最大序列长度。

npuMemSize

uint32_t

单个NPU中可以用来申请KV Cache的size上限。

cpuMemSize

uint32_t

CPU中可以用来申请KV Cache的size上限。

worldSize

uint32_t

使用几张卡进行推理。

maxOutputLen

uint32_t

最大输出长度。

cacheBlockSize

uint32_t

KV Cache block的size大小。