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

[Bug]: Different Behavior with Image Input on GROQ/Llama 3.2 Vision Model vs Qwen #6912

Open
NEWbie0709 opened this issue Nov 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@NEWbie0709
Copy link

What happened?

I've encountered an issue while using LiteLLM with the GROQ/Llama 3.2 Vision model and Qwen. The problem arises specifically when providing an image input.

--GROQ/Llama 3.2 Vision Model: Works as expected with image inputs.
--Qwen-vl-max-latest: Produces an error when processing the same image input.

code using

import requests
import json

url = 'http://localhost:4000/chat/completions'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sk-1234'
}

data = {
    "model": "model",  # your model_name
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "What's in this image?"
                },
                {
                    "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"
                    }
                }
            ]
        }
    ]
}

print(json.dumps(data))
response = requests.post(url, headers=headers, data=json.dumps(data))

print(response.status_code)
print(response.json())

Output from groq
WhatsApp Image 2024-11-25 at 11 05 09_7113de61

Output from qwen
image

Relevant log output

No response

Twitter / LinkedIn details

No response

@NEWbie0709 NEWbie0709 added the bug Something isn't working label Nov 26, 2024
@krrishdholakia
Copy link
Contributor

qwen isn't a supported provider. Are they openai compatible?

@NEWbie0709
Copy link
Author

Yes, Qwen is OpenAI-compatible. I’m using the OpenAI-compatible method to access it through LiteLLM
https://help.aliyun.com/zh/dashscope/developer-reference/compatibility-of-openai-with-dashscope?spm=a2c4g.11186623.help-menu-610100.d_3_6_0.7575528aKnGgE0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants