文档
注册

AddLLMModel

函数功能

添加模型, 返回模型ID。

函数原型

ge::Status AddLLMModel(const std::map<ge::AscendString, std::vector<ge::ModelBufferData>> &model_type_to_buffer_datas, const std::map<ge::AscendString, ge::AscendString> &options, uint64_t &model_id);

参数说明

参数名

输入/输出

描述

model_type_to_buffer_datas

输入

当模型以ModelBufferData为结构时需要设置该参数。

该参数的key为model_type, 取值范围为:

  • inference: 推理模型
  • postprocess: 后处理模型

options

输入

模型相关配置项。示例如下。

llm.EnableNnInputFusion:使能模型输入融合功能。仅配置1生效,其他配置不生效;仅支持静态模型;不支持和PagedAttention场景一起使用。

model_id

输出

添加的模型ID。

返回值

  • SUCCESS: 执行成功。
  • 其他: 失败。

异常处理

无。

约束说明

需要在LLMEngineIntialize或者LLMEngineIntializeV2接口之前调用,如果不调用,默认的model_id为0。

搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词