Update README.md
Browse files16 unmodified lines17181920212223242525 unmodified lines515253545556575859606162636416 unmodified linespip install -U transformers>=4.48.0```Since ModernBERT is a Masked Language Model (MLM), you can use the `fill-mask` pipeline or load it via `AutoModelForMaskedLM`. To use ModernBERT for downstream tasks like classification, retrieval, or QA, fine-tune it following standard BERT fine-tuning recipes.**⚠️ If your GPU supports it, we recommend using ModernBERT with Flash Attention 2 to reach the highest efficiency. To do so, install Flash Attention as follows, then use the model as normal:**```bashpip install flash-attn25 unmodified linesfrom pprint import pprintpipe = pipeline("fill-mask",model="answerdotai/ModernBERT-base",)input_text = "He walked to the [MASK]."results = pipe(input_text)pprint(results)```**Note:** ModernBERT does not use token type IDs, unlike some earlier BERT models. Most downstream usage is identical to standard BERT models on the Hugging Face Hub, except you can omit the `token_type_ids` parameter.#16 unmodified lines17181920212223242525 unmodified lines515253545556575859606162636416 unmodified linespip install -U transformers>=4.48.0```Since ModBERTBr is a Masked Language Model (MLM), you can use the `fill-mask` pipeline or load it via `AutoModelForMaskedLM`. To use ModBERTBr for downstream tasks like classification, retrieval, or QA, fine-tune it following standard BERT fine-tuning recipes.**⚠️ If your GPU supports it, we recommend using ModBERTBr with Flash Attention 2 to reach the highest efficiency. To do so, install Flash Attention as follows, then use the model as normal:**```bashpip install flash-attn25 unmodified linesfrom pprint import pprintpipe = pipeline("fill-mask",model="wallacelw/ModBERTBr",)input_text = "He walked to the [MASK]."results = pipe(input_text)pprint(results)```**Note:** ModBERTBr does not use token type IDs, unlike some earlier BERT models. Most downstream usage is identical to standard BERT models on the Hugging Face Hub, except you can omit the `token_type_ids` parameter.#
README.md+4-4