-
Notifications
You must be signed in to change notification settings - Fork 249
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
wrong output on phi3 vision model #447
Comments
Hi @adrid! Thank you for raising this, I'll take a look. |
Hi @adrid! I have fixed this now in #459. After you run When I run:
And import openai
openai.api_key = "EMPTY"
openai.base_url = "http://localhost:1234/v1/"
completion = openai.chat.completions.create(
model="phi3v",
messages=[
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://onnxruntime.ai/images/coffee.png"
},
},
{
"type": "text",
"text": "<|image_1|>\nWhat is shown in this image? Write a detailed response analyzing the scene.",
},
],
},
],
max_tokens=256,
frequency_penalty=1.0,
top_p=0.1,
temperature=0,
)
resp = completion.choices[0].message.content
print(resp) It gives:
If you could confirm that it works for you that would be great! |
It works great now @EricLBuehler ! I've checked couple more images and results now are correct. Thank you for checking this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I've started the server:
cargo run --release --features cuda -- --port 1234 vision-plain -m microsoft/Phi-3-vision-128k-instruct -a phi3v
And then I'm running the python request example from here:
https://github.com/EricLBuehler/mistral.rs/blob/master/docs/PHI3V.md
I'm getting:
The image shows a snow-covered mountain with a clear sky above and trees at the base. There appears to be a path or trail leading up the mountain, and some structures can be seen on the peak.
Which is correct.
But when I'm changing the image url to something else like for example: https://onnxruntime.ai/images/coffee.png
Then it takes forever until it gets out of memory.
Other image: https://onnxruntime.ai/images/table.png
For some images it stops but returns a mess:
I can't make it work on any other image than the one from the example.
Latest commit
3a79137
The text was updated successfully, but these errors were encountered: