-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
transformers version 4.55.0
🐛 Describe the bug
https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/gemma3_mm.py#L691
In the following logic:
if (sliding_window := self.config.sliding_window) is not None:
If the attribute sliding_window does not exist in the config object (and it doesn't exist for Gemma3Config see https://github.com/huggingface/transformers/blob/main/src/transformers/models/gemma3/configuration_gemma3.py#L246), this will raise an AttributeError.
Suggested fix :
Replace the line with a safer getattr() call that handles missing attributes gracefully:
self.sliding_window = getattr(self.config, "sliding_window", None)
Before submitting a new issue...
- Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working