mindspore_lite.LLMReq

class mindspore_lite.LLMReq(prompt_cluster_id: int, req_id: int, prompt_length: int)[源代码]

LLMEngine的请求类,用于表示多轮推理任务。

参数:
  • prompt_cluster_id (int) - 该推理任务的集群id。

  • req_id (int) - 该推理任务的请求id。

  • prompt_length (int) - 该推理任务的提示词长度。

property decoder_cluster_id

LLMEngine中该推理任务的解码器集群id。

static next_req_id()[源代码]

获取下一个请求id。

property prompt_cluster_id

LLMEngine中该推理任务的提示词集群id。

property prompt_length

该推理任务的提示词长度。

property prefix_id

LLMEngine中该推理任务的解码器集群id前缀。

property req_id

该推理任务的请求id。

property sequence_length

LLMEngine中该推理任务的解码器序列长度。