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

Integrate ELECTRA Pretrained Model into Keras_NLP Ecosystem #1281

Open
pranavvp16 opened this issue Oct 24, 2023 · 6 comments
Open

Integrate ELECTRA Pretrained Model into Keras_NLP Ecosystem #1281

pranavvp16 opened this issue Oct 24, 2023 · 6 comments
Assignees
Labels
type:feature New feature or request

Comments

@pranavvp16
Copy link
Contributor

I would like to add ELECTRA pretrained model in the keras_nlp ecosystem. I have went through the CONTRIBUTINT_MODELS.md and making an issue is the first task to add the model. I have pretty good understanding of transformers and have went through the ELECTRA architecture mentioned here. So if there is no problem regarding the integration I can start working on this !!

@mattdangerw mattdangerw added the type:feature New feature or request label Oct 25, 2023
@mattdangerw
Copy link
Member

Electra would be a welcome addition! Thanks! As mentioned in the model contribution guide, first thing to do would be to write a backbone and a checkpoint conversion script from a known source that shows we can match outputs.

Huggingface might be the easiest checkpoint source. The original electra repo would be totally fine as well, but looks like the implementation is in tf1, which would be a little painful to work with.

@pranavvp16
Copy link
Contributor Author

Thanks for assigning the issue, I'll start working on it

@shivance
Copy link
Collaborator

shivance commented Oct 30, 2023

@mattdangerw I had one Colab floating around which would implement electra in KerasNLP, will share if I find . Would be helpful for @pranavvp16

@shivance
Copy link
Collaborator

#794

@pranavvp16
Copy link
Contributor Author

@shivance thanks for the notebook but I think the notebook shares the pre-training approach of ELECTRA while I'm trying to implement the backbone of ELECTRA which is similar to BERT with some changes. Please let me know if I'm wrong here cause I'm pretty new to this thing. I have implemented the backbone successfully in keras according to the ELECTRA architecture, and working of weight conversion from hugging face checkpoint

@mattdangerw
Copy link
Member

I'm trying to implement the backbone of ELECTRA which is similar to BERT with some changes. Please let me know if I'm wrong here cause I'm pretty new to this thing. I have implemented the backbone successfully in keras according to the ELECTRA architecture, and working of weight conversion from hugging face checkpoint

Yes that's definitely a good approach! Let's start with the backbone, not the pretraining approach.

The pretraining approach would make for an excellent keras.io example (which was #794), but beginning with a backbone is the right first step on adding this model to our API.

Will take a look at the issues on the PR shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants