wallacelw commited on
Commit
61c6d57
·
verified ·
1 Parent(s): 8fc9d35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -17,9 +17,9 @@ You can use these models directly with the `transformers` library starting from
17
  pip install -U transformers>=4.48.0
18
  ```
19
 
20
- 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.
21
 
22
- **⚠️ 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:**
23
 
24
  ```bash
25
  pip install flash-attn
@@ -51,14 +51,14 @@ from transformers import pipeline
51
  from pprint import pprint
52
  pipe = pipeline(
53
  "fill-mask",
54
- model="answerdotai/ModernBERT-base",
55
  )
56
  input_text = "He walked to the [MASK]."
57
  results = pipe(input_text)
58
  pprint(results)
59
  ```
60
 
61
- **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.
62
 
63
  #
64
 
 
17
  pip install -U transformers>=4.48.0
18
  ```
19
 
20
+ 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.
21
 
22
+ **⚠️ 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:**
23
 
24
  ```bash
25
  pip install flash-attn
 
51
  from pprint import pprint
52
  pipe = pipeline(
53
  "fill-mask",
54
+ model="wallacelw/ModBERTBr",
55
  )
56
  input_text = "He walked to the [MASK]."
57
  results = pipe(input_text)
58
  pprint(results)
59
  ```
60
 
61
+ **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.
62
 
63
  #
64