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

[Usage]: Bad Request with multiple multimodal inputs when using vision LLM. #8053

Closed
1 task done
mru4913 opened this issue Aug 31, 2024 · 1 comment · Fixed by #8049
Closed
1 task done

[Usage]: Bad Request with multiple multimodal inputs when using vision LLM. #8053

mru4913 opened this issue Aug 31, 2024 · 1 comment · Fixed by #8049
Labels
usage How to use vllm

Comments

@mru4913
Copy link

mru4913 commented Aug 31, 2024

Your current environment

The output of `python collect_env.py`

How would you like to use vllm

I have tried InterVL and MimiCPM by requesting with multiple multimodal inputs, but both failed to response and it comes with bad request error. I have done some research and noticed some VLMs like phi-3 already support such inputs. #5820. Is this feature still under construction? or Did I miss anything?

ONLINE INFER EXAMPLE

from openai import OpenAI

client = OpenAI()
response = client.chat.completions.create(
  model="xxx",
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What are in these images? Is there any difference between them?",
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
          },
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
          },
        },
      ],
    }
  ],
  max_tokens=300,
)
print(response.choices[0])

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@DarkLight1337
Copy link
Member

The OpenAI-compatible server currently doesn't support multiple inputs yet. This will be implemented very soon by #8049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage How to use vllm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants