配置项 |
取值类型 |
取值范围 |
配置说明 |
---|---|---|---|
speculationGamma |
uint32_t |
与plugin参数配置有关 |
memory_decoding时,该值配置应大于等于decoding_length。 建议值:等于decoding_length。 |
配置项 |
取值类型 |
取值范围 |
配置说明 |
---|---|---|---|
maxIterTimes |
uint32_t |
与plugin参数配置有关 |
如果dynamic_algo为true,该值需大于等于期望输出的长度+speculationGamma的值。 例:期望最大输出长度为512,则该值需要配置>=512+speculationGamma。 |
配置项 |
取值类型 |
取值范围 |
配置说明 |
---|---|---|---|
plugin_params |
std::string |
plugin_type:la level :[3, 16] window :[1, 16] guess_set_size :[1, 16] |
plugin_type配置la,表示当前选择lookahead并行解码。 level/window/guess_set_size为lookahead算法中的N/W/G参数,默认值为4/5/5,且每个参数可配置的上限不超过16。 配置示例: "{\"plugin_type\":\"la\",\"level\": 4,\"window\": 5,\"guess_set_size\": 5}" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | "ModelDeployConfig" : { "maxSeqLen" : 2560, "maxInputTokenLen" : 2048, "truncation" : false, "speculationGamma": 16, "ModelConfig" : [ { "plugin_params":" {\"plugin_type\":\"memory_decoding\",\"decoding_length\":16,\"dynamic_algo\":true}" "modelInstanceType" : "Standard", "modelName" : "Codellama-34B", "modelWeightPath" : "/data/weights/Codellama-34B", "worldSize" : 4, "cpuMemSize" : 5, "npuMemSize" : -1, "backendType" : "atb", "trustRemoteCode" : false } ] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | "ModelDeployConfig" : { "maxSeqLen" : 2560, "maxInputTokenLen" : 2048, "truncation" : false, "speculationGamma": 30, "ModelConfig" : [ { "plugin_params":"{\"plugin_type\":\"la\",\"level\":4,\"window\":5,\"guess_set_size\":5}", "modelInstanceType" : "Standard", "modelName" : "Qwen2.5-7B-Instruct", "modelWeightPath" : "/data/weights/Qwen2.5-7B-Instruct", "worldSize" : 1, "cpuMemSize" : 5, "npuMemSize" : -1, "backendType" : "atb", "trustRemoteCode" : false } ] } |