Skip to content

Conversation

@ArthurZucker
Copy link
Collaborator

@ArthurZucker ArthurZucker commented Nov 18, 2025

Update the conversion:
image

image

to support torchao
image

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ArthurZucker ArthurZucker marked this pull request as ready for review November 19, 2025 11:07
Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

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

Sweet update!

Copy link
Member

@Cyrilvallez Cyrilvallez left a comment

Choose a reason for hiding this comment

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

All right! Much simpler than before!
Did not check in details all the complex regex patterns for edge cases though, but they look similar to before
The only thing I'm really not a fan of, is the double WeightRenaming + WeightConverter for the same keys -> IMO if we need any Operation, then we should simply have a WeightConverter correctly specifying sources and targets

Comment on lines 284 to 353
if not targets_were_none and bool(len(self.source_keys) - 1) + bool(len(self.target_keys) - 1) >= 2:
if bool(len(self.source_keys) - 1) + bool(len(self.target_keys) - 1) >= 2:
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'd rather have this without the bool - makes it harder to understand instead of simpler patterns IMO

@ArthurZucker ArthurZucker added for_v5? Core: Modeling Internals of the library; Models. labels Nov 20, 2025
@ArthurZucker ArthurZucker merged commit b63e6e0 into main Nov 20, 2025
24 checks passed
@ArthurZucker ArthurZucker deleted the vlm-update-conversion branch November 20, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core: Modeling Internals of the library; Models. for_v5?

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants