Instructions to use answerdotai/ModernBERT-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use answerdotai/ModernBERT-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="answerdotai/ModernBERT-base")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("answerdotai/ModernBERT-base") model = AutoModelForMaskedLM.from_pretrained("answerdotai/ModernBERT-base") - Notebooks
- Google Colab
- Kaggle
512 max positional embeddings, but 8192 context length
#2
by Fizzarolli - opened
hi!! this is fantastic and i love that someone finally made a series of models like this and i love you all
However. the model card notes that it was annealed up to 8192 context length which is great-- but then the config.json specifies 512 on the max positional embeddings. Am I missing something obvious? Does RoPE need to be manually configured? I am unsure
@Fizzarolli Good catch. That was a research code to hugging face transformers code porting mistake which I fixed in 5756c58 and f87846.
bwarner changed discussion status to closed