[Bug] 使用lora适配器参数起服务后,只有一个模型可用,基础模型不可用
Checklist
- [x] 1. I have searched related issues but cannot get the expected help.
- [x] 2. The bug has not been fixed in the latest version.
- [ ] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
Describe the bug
我起服务的指令如下
lmdeploy serve api_server /root/workspace/personal_data/LLM_models/Qwen3-8B
--dtype auto
--session-len 30000
--api-keys use-openGV-8b
--server-port 20483
--model-name qwen3-8b
--adapters mylora=/root/workspace/personal_data/lora_model
成功运行,接口可以访问,但是可用模型只有qwen3-8b,没有mylora模型
使用lmdeploy教程中的指令起服务 lmdeploy serve api_server root/workspace/personal_data/LLM_models/Qwen3-8B --adapters mylora=/root/workspace/personal_data/lora_model则会报错,报错内容为lmdeploy serve api_server: error: the following arguments are required: model_path
我想知道如果只有一个模型可以访问,那这个模型是lora后的模型还是原始的模型,模型名称是qwen3-8b,对于我能运行并成功起服务的该指令:lmdeploy serve api_server /root/workspace/personal_data/LLM_models/Qwen3-8B
--dtype auto
--session-len 30000
--api-keys use-openGV-8b
--server-port 20483
--model-name qwen3-8b
--adapters mylora=/root/workspace/personal_data/lora_model
Reproduction
lmdeploy serve api_server /root/workspace/personal_data/LLM_models/Qwen3-8B
--dtype auto
--session-len 30000
--api-keys use-openGV-8b
--server-port 20483
--model-name qwen3-8b
--adapters mylora=/root/workspace/personal_data/lora_model
Environment
py310
Error traceback
使用lmdeploy教程中的指令起服务 lmdeploy serve api_server root/workspace/personal_data/LLM_models/Qwen3-8B --adapters > mylora=/root/workspace/personal_data/lora_model则会报错,报错内容为lmdeploy serve api_server: error: the following arguments are required: model_path
我用类似的方法可以起,你是不是路径里漏了 /?
客户端可以用 model=mylora 字段来选择激活的 adapter的
这个可能是默认启动后端为 turbomind 导致的。目前 lora 仅支持 pytorch 后端,详见 https://lmdeploy.readthedocs.io/en/latest/llm/api_server_lora.html
turbomind 后端虽然能传入 --adapters mylora=xxx 正常启动,但调用时会显示 mylora 模型找不到
。可以尝试启动命令中增加 --backend pytorch,如果启动成功那就说明 qwen3 lora 可用,失败则说明需要 LMDeploy 暂不支持,还需额外适配