Skip to content

请问现在十分支持部署 基座qwen2.5-VL + 多个lora 这样的服务 #4153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lzcchl opened this issue May 9, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@lzcchl
Copy link

lzcchl commented May 9, 2025

Describe the feature
Please describe the feature requested here(请在这里描述需求)

我已经查阅相关资料,如:

https://swift.readthedocs.io/zh-cn/latest/Instruction/%E6%8E%A8%E7%90%86%E5%92%8C%E9%83%A8%E7%BD%B2.html
https://github.com/modelscope/ms-swift/tree/main/examples/deploy/lora

,我发现这里推荐的是vllm backend的多lora部署,但是我使用最新的vllm里面报警告和报错:

WARNING 05-09 04:33:46 [models.py:480] Regarding multimodal models, vLLM currently only supports adding LoRA to language model, visual.patch_embed.proj will be ignored

ValueError: base_model.model.language_model.model.embed_tokens.base_layer.weight is unsupported LoRA weight

,这些我在issue中看到是不行的,因为qwen2.5-VL 微调的 lora 不仅仅微调了语言部分,还微调了视觉部分

vllm-project/vllm#16364
vllm-project/vllm#11255

,所以我想使用swift pytorch backend来部署多lora(运行时能动态切换),这样是可行的吗?

比如部署的代码是:

swift deploy
--host=0.0.0.0
--port=53000
--torch_dtype bfloat16
--model Qwen2.5-VL-3B-Instruct
--infer_backend pt
--gpu_memory_utilization 0.8
--tensor_parallel_size 1
--max_num_seqs 16
--disable_custom_all_reduce
--model_name qwenvl
--max_model_len 512
--adapters
test_lora0=${lora_dir_docker}/lora0
test_lora1=${lora_dir_docker}/lora1 \

然后我调用的时候,调用基座模型没问题,调用lora就会报错,我在想是不是我调用代码的问题,还是就不支持这么搞?

我调用的时候就是把下面的model_name替换成lora的名字
engine = InferClient(host='127.0.0.1', port=53002)
engine.infer([infer_request], request_config, metrics=[metric], model=model_name)

主要报错信息是
ValueError: Length of adapter_names should be the same as the number of inputs, but got 1 and 2268 respectively.

求助。

@Jintao-Huang Jintao-Huang added the bug Something isn't working label May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants