inference 请问可以将lora纳入网页部署的选择内容吗?

wwodge7n  于 8个月前  发布在  其他
关注(0)|答案(3)|浏览(88)

我想在openai接口使用时,可以自由选择不同lora或者原版模型

mwg9r5ms

mwg9r5ms1#

我希望在网页上部署类似效果。

  1. CUDA_VISIBLE_DEVICES=0 python -m vllm.entrypoints.openai.api_server
  2. --trust-remote-code
  3. --max-model-len 4096
  4. --model /qwen/Qwen1.5-14B-Chat
  5. --enable-lora
  6. --lora-modules lora1=/lora/xxx lora2=~/lora/xxx
  7. curl --request POST
  8. --url [http://localhost:8000/v1/chat/completions](http://localhost:8000/v1/chat/completions)
  9. --header 'content-type: application/json'
  10. --data '{
  11. "model": "lora2",
  12. "messages": [
  13. {
  14. "role": "system",
  15. "content": "You are a helpful assistant."
  16. },
  17. {
  18. "role": "user",
  19. "content": "China is a"
  20. }
  21. ],
  22. "stop_token_ids": [151645, 151644, 151643],
  23. "max_tokens": 5,
  24. "temperature": 0.7
  25. }'
展开查看全部
brtdzjyr

brtdzjyr2#

@xs818818 和 @v0.9.2 支持了 LoRa 的集成,参考文档为:https://inference.readthedocs.io/zh-cn/latest/models/lora.html。然而,目前不对 LoRa 模型进行管理,用户需要自行下载并与 LLM image 模型一起启动。

7ivaypg9

7ivaypg93#

现在UI里如果填了lora config,应该如何请求呢?OpenAI的接口。

相关问题