[Bug] Model crash when input contains only images without any accompanying text

#1
by aifeifei798 - opened

[Bug] Model crash when input contains only images without any accompanying text (google/gemma-4-12B-it-qat-q4_0-unquantized)

Description:
I've encountered a consistent issue where the Gemma-4-12B model (VLM) crashes or produces a runtime error when the user input contains only an image without any text instructions or prompts.

Environment:

  • Model: gemma-4-12B-it-qat-q4_0-unquantized (Multi-modal)
  • Inference Engine: llama.cpp / LM Studio
  • Format: GGUF (converted with mmproj)

Steps to Reproduce:

  1. Upload an image to the model.
  2. Submit the image without typing any characters (no spaces, no words).
  3. The model/inference engine occasionally crashes or fails to generate a response.

Expected Behavior:
The model should either provide a default description of the image or handle the empty text input gracefully (e.g., by prompting the user for instructions).

Actual Behavior:
Occasional crash of the inference process.

gemma-4-12b-it-qat-unquantized@q4_k
Processing Prompt... 100%

This message contains no content. The AI has nothing to say.

Notes:
I am using a QAT (Quantization-Aware Training) version of the model. The issue seems to be related to how the vision-language projector handles an empty sequence of text tokens alongside image tokens.

Best regards,
[aifeifei798]

Google org
edited Jun 24

Hi @aifeifei798
Thanks for reporting it . I tried to reproduce the issue using the steps you provided, but I wasn't able to trigger the crash on my end.When submitting an image without any accompanying text, the model handled the empty input gracefully and returned the following expected output :
"It looks like you haven't provided a prompt or a question yet! Please go ahead and type what you'd like me to do."

Could you share a few more details to help us investigate further?

  1. The exact script or command-line arguments you are using to run llama.cpp or LM Studio.
  2. Any specific error logs or segmentation fault traces thrown by the inference engine at the exact moment of the crash
  3. The hardware (GPU) and the specific version/commit of llama.cpp or LM Studio you are currently running.

Thanks

Sign up or log in to comment