You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.求助。
The text was updated successfully, but these errors were encountered: