-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[Bug]: Fail to use deepseek-vl2 #12118
Comments
You need to use the latest code (corresponding to |
@DarkLight1337 It woks, thanks a lot ! |
@DarkLight1337 |
You can use TP to distribute the model across your GPUs. We assume that your two GPUs are identical. |
@DarkLight1337 Thank you very much for your suggestion! But how can I use TP? Is there any reference? |
@DarkLight1337 Thanks very much. |
Dear @DarkLight1337 , def message_formator(prompt, texts_imgs):
return [
{
"role": "system",
"content": [
{
'type': 'text',
'text': prompt
}
],
},
{
"role": "user",
"content": [
{
'type': 'image_url',
'image_url': {"url": f"data:image/png;base64,{encode_image(c)}"}
} if isinstance(c, Image.Image) else
{
'type': 'text',
'text': c
}
for c in texts_imgs
],
},
]
def run_chat(image_urls: List[Image]):
model_path="/home/xxx/model/deepseek-vl2"
llm = LLM(model=model_path,
max_model_len=4096,
max_num_seqs=2,
tensor_parallel_size=2,
hf_overrides={"architectures": ["DeepseekVLV2ForCausalLM"]},
limit_mm_per_prompt={"image": len(image_urls)})
sampling_params = SamplingParams(temperature=0.0,
max_tokens=128)
outputs = llm.chat(
message_formator("help write a code", ['hi']+[image_urls]+['hi']),
sampling_params=sampling_params,
chat_template=None,
)
for o in outputs:
generated_text = o.outputs[0].text
print(generated_text) I referenced the example, but it throws an error:
How should I write a chat template? |
cc @Isotr0py are you aware of an existing chat template for this model? If not, maybe we should add one to the examples directory. |
This model uses its hf processor to format prompt from conversation instead of tokenizer. 😅 Let me add a template to the examples directory. |
@gystar can you let me know..how you solved this transformers error? what version of vLLM image did you exaclty use? |
4.45.2 |
@gystar which version of the vllm are you using and which version of the transformers?
Error:
|
Please see the note in the supported models page:
|
@kar9999 have you managed to find the solution for this? I'm also facing the same issue. |
Your current environment
The output of `python collect_env.py`
Model Input Dumps
No response
🐛 Describe the bug
I run the original example of deepseek-vl2 in the documentation:
but got the following issue:
The deepseek-vl2 model have not been included in the newest version of transformers, but how can we use it with vllm?
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: