josStorer / RWKV-Runner

A RWKV management and startup tool, full automation, only 8MB. And provides an interface compatible with the OpenAI API. RWKV is a large language model that is fully open source and available for commercial use.
https://www.rwkv.com
MIT License
5.05k stars 481 forks source link

是否能够进行多batch的推理? #338

Open xinyinan9527 opened 4 months ago

xinyinan9527 commented 4 months ago

我正在测试rwkv的推理速度,以及进行压测。 通过ab的方式确实可以进行压测,然而这些似乎都是单个batch_size的推理。如何使用多batch的推理呢 模型部署完成之后,使用

curl --location 'http://127.0.0.1:8000/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}'

能够进行单batch推理。

我目前看到能够接收的input类型是:Union[str, List[str], List[List[int]], None],请问如何使用多batch的推理