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

Refactor HuggingFace model initialization to include base model name … #190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jardinetsouffleton
Copy link
Collaborator

…and update tokenizer logic

if base_model_name is None:
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
else:
self.tokenizer = AutoTokenizer.from_pretrained(base_model_name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't get what's the point of that...

Copy link
Collaborator Author

@jardinetsouffleton jardinetsouffleton Dec 19, 2024

Choose a reason for hiding this comment

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

yes, sorry a little cryptic. I made this to support LoRA checkpoints, which are stored in the model_name directory. They are applied to a base model, stored at base_model_name directory. The directory where the adapters are stored contains only the adapters, while the model's safetensors + tokenizers, etc. are located in base_model_name

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