System Info
transformers version: 5.15.0.dev0
- Platform: Linux-6.18.33.1-microsoft-standard-WSL2-x86_64-with-glibc2.43
- Python version: 3.13.14
- Huggingface_hub version: 1.24.0
- Safetensors version: 0.8.0
- Accelerate version: 1.14.0
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.13.0+cu132 (CUDA)
- Using distributed or parallel set-up in script?: No
- Using GPU in script?: Not clear.
- GPU type: NVIDIA GeForce RTX 4080 Laptop GPU
Who can help?
@molbap @guarin
The issue is with the vision model (Gemma4-E2B-IT)
Information
Tasks
Reproduction
File ".../transformers/models/gemma4/modeling_gemma4.py", line 2344, in forward
video_features = video_features.to(inputs_embeds.device, inputs_embeds.dtype)
^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'to'
The error is resolved on changing the code to:
video_features = video_features[0].to(inputs_embeds.device, inputs_embeds.dtype)
Expected behavior
The code works well by making the aforementioned change (which should be default behaviour).
System Info
transformersversion: 5.15.0.dev0Who can help?
@molbap @guarin
The issue is with the vision model (Gemma4-E2B-IT)
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
The error is resolved on changing the code to:
Expected behavior
The code works well by making the aforementioned change (which should be default behaviour).