Skip to content

Fix: target_modules as string incorrectly converted to set of characters#3275

Closed
Chessing234 wants to merge 1 commit into
huggingface:mainfrom
Chessing234:fix-target-modules-str
Closed

Fix: target_modules as string incorrectly converted to set of characters#3275
Chessing234 wants to merge 1 commit into
huggingface:mainfrom
Chessing234:fix-target-modules-str

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Bug: In transformers_weight_conversion.py, when target_modules or target_parameters is provided as a string (e.g. "all-linear"), passing it to set() splits the string into individual characters (e.g., {'a', 'l', '-', ...}). Root cause: set(str) iterates over characters instead of creating a set containing the string. Why fix is correct: Explicitly checking if the input is a string and wrapping it in a set with a single element prevents the string from being erroneously unpacked.

@BenjaminBossan

Copy link
Copy Markdown
Member

Again, duplicate of #3232.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants