LlavaForConditionalGeneration._merge_input_ids_with_image_features throws error #35169
Open
4 tasks done
Labels
bug
Multimodal
WIP
Label your PR/Issue with WIP for some long outstanding Issues/PRs that are work in progress
System Info
transformers
version: 4.43.1- distributed_type: MULTI_GPU
- mixed_precision: bf16
- use_cpu: False
- debug: False
- num_processes: 8
- machine_rank: 0
- num_machines: 1
- gpu_ids: all
- rdzv_backend: static
- same_network: True
- main_training_function: main
- enable_cpu_affinity: False
- downcast_bf16: no
- tpu_use_cluster: False
- tpu_use_sudo: False
- tpu_env: []
- dynamo_config: {'dynamo_backend': 'INDUCTOR'}
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Description
I am trying to use the
AutoAWQ
library to quantize a Pixtral model (mistral-community/Pixtral-Large-Instruct-2411
). However, I am encountering the following error:File "/quantization/quant/lib64/python3.11/site-packages/transformers/models/llava/modeling_llava.py", line 303, in _merge_input_ids_with_image_features num_images, num_image_patches, embed_dim = image_features.shape ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'shape'
Code
Here is the code I am using:
Analysis
The model I am using is
Pixtral-Large-Instruct-2411
, but its configuration isLlavaForConditionalGeneration
. The issue arises in theTransformers
library's source code whereimage_features
remainsNone
ifpixel_values
isNone
. Consequently, in the method_merge_input_ids_with_image_features
, the first linenum_images, num_image_patches, embed_dim = image_features.shape
tries to access theshape
attribute ofNone
, resulting in anAttributeError
.Steps to Reproduce
Pixtral-Large-Instruct-2411
model is available at the specified path.Actual Behavior
An
AttributeError
is raised due toimage_features
beingNone
.Expected behavior
The model should be loaded, quantized, and saved without any errors.
The text was updated successfully, but these errors were encountered: