From cca0d38ab94770701e65ea5851f4e5ef1df6cf21 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 19 Mar 2025 02:04:12 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 10618c1a84..677c7f8744 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -116,8 +116,8 @@ def unsloth_base_fast_generate( is_vlm = is_vlm or hasattr(self.config, "vision_config") arch = self.config.architectures[0] - # Remove token_type_ids - kwargs.pop("token_type_ids", None) + # Remove token_type_ids - WRONG for Gemma 3 since bidirectional attention + # kwargs.pop("token_type_ids", None) # VLMs do not allow logits_to_keep global NUM_LOGITS_TO_KEEP