Cannot input image in ollama for gemma-3-27b-it-GGUF:Q4_K_M

#3
by kitc - opened

Model variant: gemma-3-27b-it-GGUF:Q4_K_M
I am hosting the model in ollama and use python API to send request to the model

from ollama import Client
client = Client(host=host)
response = client.chat(
    model=model,
    messages=[
        {
            "role": "user",
            "content": "Write the text in the image",
            "images": [image_path]
        }
    ]
)
return response['message']['content']

It raise the error

ollama._types.ResponseError: Failed to create new sequence: failed to process inputs: this model is missing data required for image input
 (status code: 500)

I think the error is raised when the model is not support image input.

I'm having the same issue with the 4b version, I think it's something to do with the vision element not being properly linked to the model, but it is a little beyond my skillset to resolve that. The standard quantized versions hosted on ollama work, so it must be something to do with how it's configured here.

Unsloth AI org

Do you guys know if it works on llama.cpp? :)

the same issue here

Yes, it works with llama.cpp(text only)
I tried 4B version

+1

curl http://localhost:11434/api/chat -d '{
"model": "gemma-3-27b-it-GGUF:Q4_K_M",
"messages": [{
"role": "user",
"content": "what is in this image?",
"images": ["'"$(base64 -w 0 {(The_image_work_on_standard_version)} )"'"]
}]
}'
{"error":"Failed to create new sequence: failed to process inputs: this model is missing data required for image input\n"}

Didn't look deeper yet but I believe all the "unslothed" versions of any model are only capable of text.

Didn't look deeper yet but I believe all the "unslothed" versions of any model are only capable of text.

According their blog, a visual capability was fixed. But it wasn't. Checked 27b Q4_K_M model with tensor parallelization in llama.cpp and ollama (native ollama quantized model works well). Vllm doesn't work at all. Perhaps, there was missed something on my side.

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment