Skip to content

[Examples] Fix ignore layers for Qwen2.5-VL #1658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/multimodal_vision/qwen_2_5_vl_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def data_collator(batch):
GPTQModifier(
targets="Linear",
scheme="W4A16",
ignore=["lm_head", "re:visual.*", "re:model.visual.*"],
ignore=["lm_head", "re:model.visual.*"],
Copy link
Collaborator

@brian-dellabetta brian-dellabetta Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we want to catch both visual. and model.visual., we can use an OR condition in our regex like

Suggested change
ignore=["lm_head", "re:model.visual.*"],
# NOTE: catch anything beginning with `model.visual.` or `visual.`
# to account for different behavior across transformers versions
ignore=["lm_head", "re:(model\.|)visual\..*"],

This will prevent the warning from appearing

),
]

Expand Down