keras-nlp icon indicating copy to clipboard operation
keras-nlp copied to clipboard

Add ModernBERT to KerasHub

Open gcuder opened this issue 11 months ago • 8 comments

ModernBERT has been released on HuggingFace. Since you can already load models from there into a Keras Backbone, it would be interesting to know, if this works as well.

https://huggingface.co/answerdotai/ModernBERT-base

gcuder avatar Dec 23 '24 10:12 gcuder

It does not yet work, as our Bert implementation does not support RoPE and alternating local/global attention.

Likely we would want to do this as a separate architecture (e.g. in a models/modern_bert/ directory), instead of sharing code with BERT, as its a substantially different architecture.

But we are planning to add it! It's a great fit for our library.

mattdangerw avatar Jan 08 '25 18:01 mattdangerw

Cool, let me know if I can help contributing to it.

gcuder avatar Jan 09 '25 20:01 gcuder

Hello is @sachinprasadhs still working on this I was thinking to pick this up and start working :)

pranavvp16 avatar Mar 01 '25 10:03 pranavvp16

@pranavvp16 , Assigning it to you since no one has started working on it.

sachinprasadhs avatar Mar 07 '25 05:03 sachinprasadhs

Thanks I'll keep posting updates on this thread :)

pranavvp16 avatar Mar 10 '25 07:03 pranavvp16

Found this resource and thought it could help https://github.com/sionic-ai/ModernBert-GTE-Model-Converter

gcuder avatar Mar 28 '25 08:03 gcuder

Hi 👋🏼 , I'm coming at this from the KerasHub Synpase Project.

CC: @mattdangerw for clarity. Happy to let @pranavvp16 continue the work.

SauravMaheshkar avatar May 05 '25 00:05 SauravMaheshkar

Hi Saurav! we haven't received any contribution here yet. Please feel free to open your PR.

divyashreepathihalli avatar May 08 '25 15:05 divyashreepathihalli