jacobfulano
commited on
Commit
•
d91c559
1
Parent(s):
97a8dec
Update README.md
Browse files
README.md
CHANGED
@@ -42,7 +42,7 @@ April 2023
|
|
42 |
|
43 |
```python
|
44 |
from transformers import AutoModelForMaskedLM
|
45 |
-
mlm = AutoModelForMaskedLM.from_pretrained('mosaicml/mosaic-bert-base', trust_remote_code=True)
|
46 |
```
|
47 |
|
48 |
The tokenizer for this model is simply the Hugging Face `bert-base-uncased` tokenizer.
|
@@ -58,7 +58,7 @@ To use this model directly for masked language modeling, use `pipeline`:
|
|
58 |
from transformers import AutoModelForMaskedLM, BertTokenizer, pipeline
|
59 |
|
60 |
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|
61 |
-
mlm = AutoModelForMaskedLM.from_pretrained('mosaicml/mosaic-bert-base', trust_remote_code=True)
|
62 |
|
63 |
classifier = pipeline('fill-mask', model=mlm, tokenizer=tokenizer)
|
64 |
|
@@ -75,7 +75,7 @@ This model requires that `trust_remote_code=True` be passed to the `from_pretrai
|
|
75 |
|
76 |
```python
|
77 |
mlm = AutoModelForMaskedLM.from_pretrained(
|
78 |
-
'mosaicml/mosaic-bert-base',
|
79 |
trust_remote_code=True,
|
80 |
revision='24512df',
|
81 |
)
|
|
|
42 |
|
43 |
```python
|
44 |
from transformers import AutoModelForMaskedLM
|
45 |
+
mlm = AutoModelForMaskedLM.from_pretrained('mosaicml/mosaic-bert-base-seqlen-512', trust_remote_code=True)
|
46 |
```
|
47 |
|
48 |
The tokenizer for this model is simply the Hugging Face `bert-base-uncased` tokenizer.
|
|
|
58 |
from transformers import AutoModelForMaskedLM, BertTokenizer, pipeline
|
59 |
|
60 |
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|
61 |
+
mlm = AutoModelForMaskedLM.from_pretrained('mosaicml/mosaic-bert-base-seqlen-512', trust_remote_code=True)
|
62 |
|
63 |
classifier = pipeline('fill-mask', model=mlm, tokenizer=tokenizer)
|
64 |
|
|
|
75 |
|
76 |
```python
|
77 |
mlm = AutoModelForMaskedLM.from_pretrained(
|
78 |
+
'mosaicml/mosaic-bert-base-seqlen-512',
|
79 |
trust_remote_code=True,
|
80 |
revision='24512df',
|
81 |
)
|