8000 FEAT: Allow ignoring mismatched sizes when loading by BenjaminBossan · Pull Request #1620 · huggingface/peft · GitHub
[go: up one dir, main page]

Skip to content

FEAT: Allow ignoring mismatched sizes when loading #1620

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

Conversation

BenjaminBossan
Copy link
Member

Resolves #1605

When users pass ignore_mismatched_sizes=True to PeftModel.from_pretrained, the mismatched tensors will be ignored instead of raising an error. This is in line with how transformers handles this argument.

When users pass ignore_mismatched_sizes=True to
PeftModel.from_pretrained, the mismatched tensors will be ignored
instead of raising an error. This is in line with how transformers
handles this argument.
@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.

Copy link
Contributor
@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Thank you @BenjaminBossan for supporting ignore_mismatched_sizes flag when loading PEFT models!

@BenjaminBossan BenjaminBossan merged commit 5b60ec0 into huggingface:main Apr 8, 2024
@BenjaminBossan BenjaminBossan deleted the feat-possibility-to-ignore-mismatched-sizes-when-loading branch April 8, 2024 10:23
Guy-Bilitski pushed a commit to Guy-Bilitski/peft that referenced this pull request May 13, 2025
When users pass ignore_mismatched_sizes=True to
PeftModel.from_pretrained, the mismatched tensors will be ignored
instead of raising an error. This is in line with how transformers
handles this argument.
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.

Is there a choice to use ignore_mismatch_sizes in PeftModel.from_pretrained like AutoModel in Transformers?
3 participants
0