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

Updates to hf model type modeling code #1069

Closed
wants to merge 2 commits into from
Closed

Conversation

haileyschoelkopf
Copy link
Collaborator

@haileyschoelkopf haileyschoelkopf commented Dec 4, 2023

This PR modifies the Huggingface code to:

  • Allows the seq2seq/causal backends to be selected automatically (--model_args backend="causal"). No change in functionality typically unless a user overrides the default backend (e.g. to get around MBart being listed as causal in transformers)
  • Adds more typehints
  • Modularizes HFLM.__init__()
  • re-adds support for passing a transformers.PreTrainedModel through pretrained model arg
  • warns the user this only works for single-process runs

Pretty big code change to HFLM, so maybe we should leave this staged for a day or 2 to make sure no bugs get introduced?

closes #1068 , #1084 .

@haileyschoelkopf
Copy link
Collaborator Author

Also addressing #1084 prior to merge.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ haileyschoelkopf
❌ zoryzhang
You have signed the CLA already but the status is still pending? Let us recheck it.

@haileyschoelkopf haileyschoelkopf deleted the refactor-HFLM branch December 21, 2023 14:29
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.

Support for model instance in HFLM.pretrained argument
3 participants