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

Fix bugs of loading model checkpoints as HuggingFace LM #73

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

qingyangliu0065
Copy link
Collaborator

Description

This PR fixed errors in loading HuggingFace model checkpoints as HuggingFaceLM objects. The init function of HuggingFaceLM now supports two ways of configuration:

  • input a model name corresponding to a pre-trained model in HF model hub, and optionally the tokenizer name (if none, we will use the default one with the model name)
  • input a path to the model checkpoint together with the tokenizer path (this could also be the pre-trained model name in most cases where tokenizers are not modified during training)

Copy link
Contributor

@neubig neubig left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@neubig neubig merged commit 2fc8d48 into main Sep 27, 2024
5 checks passed
@neubig neubig deleted the fix-HFLM-load-checkpoints branch September 27, 2024 16:34
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