-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Update modular_modernbert.py to support input_embeddings #35422
base: main
Are you sure you want to change the base?
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the norm is that only the base model, i.e. ModernBertModel
here, has get_input_embeddings
and set_input_embeddings
. See for example modeling_bert.py and modeling_roberta.py.
Beyond that, the ModernBertForSequenceClassification
class doesn't have an attribute called embeddings
.
However, the Python 3.9 patch is very good, and I'll be making a separate PR for it.
I opened #35458 with @KoichiYasuoka as co-author to implement the Python 3.9 support from this PR.
|
Thank you @tomaarsen for separating issues. Well... I added |
Oh I see, I didn't realise there were non-base model classes that use |
Thank you @tomaarsen and here I link to Ek and Bernardy (2020). |
What does this PR do?
Fixes #35344
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.