Skip to content
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

使用vllm部署Chinese-LLaVA-Med的Chinese-LLaVA-Med-7B 失败 #4061

Closed
1 task done
lxb0425 opened this issue Jun 4, 2024 · 5 comments
Closed
1 task done

使用vllm部署Chinese-LLaVA-Med的Chinese-LLaVA-Med-7B 失败 #4061

lxb0425 opened this issue Jun 4, 2024 · 5 comments
Labels
solved This problem has been already solved

Comments

@lxb0425
Copy link

lxb0425 commented Jun 4, 2024

Reminder

  • I have read the README and searched the existing issues.

System Info

基于llava1.5-7b-chat微调
CUDA_VISIBLE_DEVICES=0,1 API_PORT=7864 llamafactory-cli api /data/rich/project/LLaMA-Factory-main/examples/inference/vllm.yaml

vllm.yaml
model_name_or_path: /data/rich/model/Med-v1.0
template: vicuna
infer_backend: vllm
vllm_enforce_eager: true
这种部署可以文本对话 传图片报错

Reproduction

llamafactory-cli webchat --model_name_or_path /data/rich/model/Med-v1.0 --template vicuna --visual_inputs
这种方式界面是可以的
api的方式怎么实现

llamafactory-cli api config/llava1_5_full_sft_infer.yaml 后台报错 422
{
"model": "llava-v1.5",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "请告诉我这张图像里有什么,中文回复我"
},
{
"type": "image_url",
"image_url": {
"url": "https://th.bing.com/th/id/R.6b5df1bfe0e4778a44dba0753cd169c8?rik=QRQIMqvjWRCO5Q&riu=http%3a%2f%2fpic39.nipic.com%2f20140321%2f8857347_232251363165_2.jpg&ehk=7oAaMo6LCHJc%2bqpQ0IPvcH7v69jGRQhb2vDz%2fOd5720%3d&risl=&pid=ImgRaw&r=0"
}
}
]
}
],
"temperature": 0.7,
"top_p": 1,
"logprobs": false,
"top_logprobs": 0,
"n": 1,
"max_tokens": null,
"stop": null,
"stream": false,
"presence_penalty": 0,
"frequency_penalty": 0,
"user": "string",
"repetition_penalty": 1,
"session_id": -1,
"ignore_eos": false,
"skip_special_tokens": true,
"top_k": 40
}### Expected behavior

No response

Others

No response

@lxb0425 lxb0425 changed the title 使用vllm部署Chinese-LLaVA-Med-7B 无法调试通过 使用vllm部署Chinese-LLaVA-Med的Chinese-LLaVA-Med-7B 失败 Jun 4, 2024
@injet-zhou
Copy link
Contributor

The inference API currently does not support image input.
api模式下目前还不支持图片输入。

@lxb0425
Copy link
Author

lxb0425 commented Jun 5, 2024

llava官方部署没有微调的可以正常输入图像,部署使用llama factory微调后的版本就是失败 llama factory的api部署又不支持图形输入 就卡了bug

@hiyouga hiyouga added the pending This problem is yet to be addressed label Jun 5, 2024
hiyouga added a commit that referenced this issue Jun 5, 2024
@hiyouga
Copy link
Owner

hiyouga commented Jun 5, 2024

api 已经支持图像

@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Jun 5, 2024
@hiyouga hiyouga closed this as completed Jun 5, 2024
@lxb0425
Copy link
Author

lxb0425 commented Jun 6, 2024

入参转成base64 直接超token了
image
image

hiyouga added a commit that referenced this issue Jun 6, 2024
@hiyouga
Copy link
Owner

hiyouga commented Jun 6, 2024

@lxb0425 修复了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

3 participants