Skip to content
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

Base Model Revision #1567

Closed
mnoukhov opened this issue Mar 16, 2024 · 8 comments
Closed

Base Model Revision #1567

mnoukhov opened this issue Mar 16, 2024 · 8 comments

Comments

@mnoukhov
Copy link
Contributor

Feature request

Currently, the adapter_config only stores the base_model_name_or_path but not the revision. This means that if a PeftModel is trained on top of a model with a revision then loading PeftModel.from_pretrained will load the main revision of the base model, not the correct revision.

We should add a base_model_revision to the adapter_config so that we can correctly load the base model

Motivation

This will cause a bug if using PeftModel.from_pretrained when the base model has a revision.

Your contribution

I can try to submit a PR if I have time in 2-3 weeks

@BenjaminBossan
Copy link
Member

Thanks for this suggestion, it sounds good. A PR would be great, but no need to rush it.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@BenjaminBossan
Copy link
Member

@mnoukhov are you still interested in providing a PR?

@mnoukhov
Copy link
Contributor Author

I looked into it and found that there's already actually a revision parameter

revision: Optional[str] = field(default=None, metadata={"help": "The specific model version to use."})

It's just not being used when calling from_pretrained here

base_model = target_class.from_pretrained(base_model_path, **kwargs)

I've opened the PR #1658 but in order to do unit tests, I need a model with a base model with revision. If you don't mind this not being on hf-internal-testing, I can upload it to my personal account, but maybe you'd prefer the former. Let me know @BenjaminBossan

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@BenjaminBossan
Copy link
Member

not stale

Copy link

github-actions bot commented Jun 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@mnoukhov
Copy link
Contributor Author

mnoukhov commented Jun 6, 2024

resolved by #1658

@mnoukhov mnoukhov closed this as completed Jun 6, 2024
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

No branches or pull requests

2 participants