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

HF: switch conditional checks to self.backend from AUTO_MODEL_CLASS #2353

Merged
merged 12 commits into from
Oct 8, 2024

Conversation

baberabb
Copy link
Contributor

The conditions in HFLM now check for either causal or seq2seq rather than checking for the AUTO_MODEL_CLASS

Copy link
Collaborator

@haileyschoelkopf haileyschoelkopf left a comment

Choose a reason for hiding this comment

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

Thanks a bunch for working on this!!

Broadly this is the right approach, but I had a different thought on how we should handle things while maintaining user back-compatibility--described in my PR comments. That should also ensure that we still respect novel subclass-overridden self.AUTO_MODEL_CLASS values.

lm_eval/models/huggingface.py Show resolved Hide resolved
lm_eval/models/huggingface.py Outdated Show resolved Hide resolved
lm_eval/models/huggingface.py Outdated Show resolved Hide resolved
lm_eval/models/huggingface.py Outdated Show resolved Hide resolved
lm_eval/models/huggingface.py Outdated Show resolved Hide resolved
lm_eval/models/huggingface.py Outdated Show resolved Hide resolved
@baberabb
Copy link
Contributor Author

baberabb commented Oct 1, 2024

@haileyschoelkopf ready to review again! Still need to test, but wanted to make sure if I understood you correctly.

@haileyschoelkopf
Copy link
Collaborator

We discussed offline and resolved comments!

@haileyschoelkopf haileyschoelkopf merged commit ab2c46c into main Oct 8, 2024
8 checks passed
@haileyschoelkopf haileyschoelkopf deleted the automodel branch October 8, 2024 20:47
mariagrandury pushed a commit to somosnlp/lm-evaluation-harness that referenced this pull request Oct 9, 2024
…S` (EleutherAI#2353)

* switch conditional checks to `self.backend`

* nit

* nit

* commit feedback

* fix test; update precommit hooks

* add escape hatch for custom self.AUTO_MODEL_CLASS

* add escape hatch for custom self.AUTO_MODEL_CLASS

* fix

* move assertion

* add logging messages

* update AUTO_MODEL_CLASS behavior in _get_backend

---------

Co-authored-by: haileyschoelkopf <hailey@eleuther.ai>
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