Skip to content

Simplify loading structure#43589

Merged
Cyrilvallez merged 7 commits intomainfrom
simplify-structs
Feb 2, 2026
Merged

Simplify loading structure#43589
Cyrilvallez merged 7 commits intomainfrom
simplify-structs

Conversation

@Cyrilvallez
Copy link
Member

@Cyrilvallez Cyrilvallez commented Jan 29, 2026

What does this PR do?

As per the title. This simplifies the use of LoadStateDictInfo a bit everywhere, and makes it clear that the entries within the struct are mutated in-place all the time.

@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.

@Cyrilvallez Cyrilvallez changed the title Simplify loading structures Simplify loading structure Jan 29, 2026
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

Comment on lines -4254 to -4256
@staticmethod
def _finalize_load_state_dict(
model,
Copy link
Collaborator

Choose a reason for hiding this comment

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

run peft tests pretty sure we need the split between the tow, it allows for better granularity

a bit more

more

better

better

better

fix

use set

fix default

doc

fix

doc

fix
@Cyrilvallez
Copy link
Member Author

Alright, resplit the 2 methods indeed!
Since nothing really changed after last review and the test failing is unrelated, merging!

@Cyrilvallez Cyrilvallez merged commit 0fa2c2f into main Feb 2, 2026
24 of 26 checks passed
@Cyrilvallez Cyrilvallez deleted the simplify-structs branch February 2, 2026 13:28
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.

3 participants