Instructions to use mosaicml/mosaic-bert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mosaicml/mosaic-bert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="mosaicml/mosaic-bert-base", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("mosaicml/mosaic-bert-base", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("mosaicml/mosaic-bert-base", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update README.md
#1
by sam-mosaic - opened
README.md
CHANGED
|
@@ -24,7 +24,7 @@ March 2023
|
|
| 24 |
We recommend using the code in the [mosaicml/examples/bert repo](https://github.com/mosaicml/examples/tree/main/examples/bert) for pretraining and finetuning this model.
|
| 25 |
|
| 26 |
```python
|
| 27 |
-
from transformers import
|
| 28 |
mlm = AutoModelForMaskedLM.from_pretrained('mosaicml/mosaic-bert-base', trust_remote_code=True)
|
| 29 |
```
|
| 30 |
The tokenizer for this model is simply the Hugging Face `bert-base-uncased` tokenizer.
|
|
|
|
| 24 |
We recommend using the code in the [mosaicml/examples/bert repo](https://github.com/mosaicml/examples/tree/main/examples/bert) for pretraining and finetuning this model.
|
| 25 |
|
| 26 |
```python
|
| 27 |
+
from transformers import AutoModelForMaskedLM
|
| 28 |
mlm = AutoModelForMaskedLM.from_pretrained('mosaicml/mosaic-bert-base', trust_remote_code=True)
|
| 29 |
```
|
| 30 |
The tokenizer for this model is simply the Hugging Face `bert-base-uncased` tokenizer.
|