Closed day9011 closed 2 months ago
May you provide the test code for the client?
May you provide the test code for the client?
ref https://github.com/user-attachments/files/16136811/flooding.zip
I use InternVL2 2B to verify locally and it works well. cc @irexyc
I suspect it's an environmental issue. I haven't been able to reproduce your problem on my end. @day9011
# server
# https://github.com/zhyncs/lmdeploy-build/releases/download/3030ae4/lmdeploy-0.5.0+cu121+3030ae4-cp39-cp39-manylinux2014_x86_64.whl
python3 -m lmdeploy serve api_server InternVL2-2B
# client
python3 internvl_test.py --image tiger.jpeg
# result
{"id":"1","object":"chat.completion","created":1720505284,"model":"InternVL2-2B","choices":[{"index":0,"message":{"role":"assistant","content":"```json\n{\n \"felled_tree\": false,\n \"landslide\": false,\n \"flooded_shop\": false\n}\n```"},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":1954,"total_tokens":1987,"completion_tokens":33}}
By the way, I used the Google Colab.
By the way, I used the Google Colab.
InternVL2 2B在我的环境里也可以,26B的返回结果为空。
@day9011
图片可以提供么?是所有的图片都不行么?
我看了你的 transformers (internvl2.py) 代码,里面的 do_sample
是关闭的,对应到 internvl_test.py 里面的代码,temperature 要设置成 0.
安装flash-attn后测试 internvl2,发生CUDA error: an illegal memory access was encountered
@day9011
图片可以提供么?是所有的图片都不行么?
我看了你的 transformers (internvl2.py) 代码,里面的
do_sample
是关闭的,对应到 internvl_test.py 里面的代码,temperature 要设置成 0.
@day9011
图片可以提供么?是所有的图片都不行么?
我看了你的 transformers (internvl2.py) 代码,里面的
do_sample
是关闭的,对应到 internvl_test.py 里面的代码,temperature 要设置成 0.
我尝试了三张图片,返回的prompt_tokens数量都一样
@day9011
图片可以提供么?是所有的图片都不行么?
我看了你的 transformers (internvl2.py) 代码,里面的
do_sample
是关闭的,对应到 internvl_test.py 里面的代码,temperature 要设置成 0.
我尝试了--tp 2,是正常了
temperature 0 和 0.7 我这里都是正常的。
如果 messages 如果只有文本,把图片去掉,对话有返回么 ?
temperature 0 和 0.7 我这里都是正常的。
如果 messages 如果只有文本,把图片去掉,对话有返回么 ?
只有文本是正常的
重新git pull模型后,能够正常显示了
重新git pull模型后,能够正常显示了
使用--tp 2是正常的,使用--tp 4也是无法输出,使用单卡也是不能正常输出,重新pull模型还是没有效果
重新git pull模型后,能够正常显示了
使用--tp 2是正常的,使用--tp 4也是无法输出,使用单卡也是不能正常输出,重新pull模型还是没有效果
单卡使用--tp 1也可以正常使用,应该是api接口有一点问题
@Expert68
单卡不行,单卡加 --tp 1可以?
两者都只会用一块卡把,我觉得是别的什么原因。
Checklist
Describe the bug
Internvl2 api 使用没法正常返回结果,用transforms的推理方式可以, lmdeploy==0.4.3部署的internvl1.5也可以。 internvl2 api: {'id': '1', 'object': 'chat.completion', 'created': 1720492891, 'model': '/storage210_new/models/huggingface/internvl/InternVL2-26B/', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': ''}, 'logprobs': None, 'finish_reason': 'stop'}], 'usage': {'prompt_tokens': 2466, 'total_tokens': 2466, 'completion_tokens': 0}}
internvl1.5 api: {"id":"103929","object":"chat.completion","created":1720494142,"model":"internvl-internlm2","choices":[{"index":0,"message":{"role":"assistant","content":"
json\n{\n \"felled_tree\": false,\n \"landslide\": false,\n \"flooded_shop\": false\n}\n
"},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":915,"total_tokens":948,"completion_tokens":33}}transforms: User:
Observe the image for the following three conditions. If any of them exist, return true; otherwise, return false. The results must be returned in a JSON format, including the following keys:
Assistant: ```json { "felled_tree": false, "landslide": false, "flooded_shop": false }
Error traceback
No response