Update README.md
Browse files
README.md
CHANGED
@@ -39,7 +39,13 @@ It is available in the following sizes:
|
|
39 |
|
40 |
## Usage
|
41 |
|
42 |
-
You can use these models directly with the `transformers` library.
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
**⚠️ We strongly suggest using ModernBERT with Flash Attention 2, as it is by far the best performing variant of the model. To do so, install Flash Attention as follows, then use the model as normal:**
|
45 |
|
|
|
39 |
|
40 |
## Usage
|
41 |
|
42 |
+
You can use these models directly with the `transformers` library. Until the next `transformers` release, doing so requires installing transformers from main:
|
43 |
+
|
44 |
+
```sh
|
45 |
+
pip install git+https://github.com/huggingface/transformers.git
|
46 |
+
```
|
47 |
+
|
48 |
+
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.
|
49 |
|
50 |
**⚠️ We strongly suggest using ModernBERT with Flash Attention 2, as it is by far the best performing variant of the model. To do so, install Flash Attention as follows, then use the model as normal:**
|
51 |
|