Instructions to use mosaicml/mosaic-bert-base-seqlen-1024 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mosaicml/mosaic-bert-base-seqlen-1024 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="mosaicml/mosaic-bert-base-seqlen-1024", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("mosaicml/mosaic-bert-base-seqlen-1024", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("mosaicml/mosaic-bert-base-seqlen-1024", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse filesAdd SequenceClassification to auto_map
- config.json +2 -1
config.json
CHANGED
|
@@ -7,7 +7,8 @@
|
|
| 7 |
"attention_probs_dropout_prob": 0.1,
|
| 8 |
"auto_map": {
|
| 9 |
"AutoConfig": "configuration_bert.BertConfig",
|
| 10 |
-
"AutoModelForMaskedLM": "bert_layers.BertForMaskedLM"
|
|
|
|
| 11 |
},
|
| 12 |
"classifier_dropout": null,
|
| 13 |
"gradient_checkpointing": false,
|
|
|
|
| 7 |
"attention_probs_dropout_prob": 0.1,
|
| 8 |
"auto_map": {
|
| 9 |
"AutoConfig": "configuration_bert.BertConfig",
|
| 10 |
+
"AutoModelForMaskedLM": "bert_layers.BertForMaskedLM",
|
| 11 |
+
"AutoModelForSequenceClassification": "bert_layers.BertForSequenceClassification"
|
| 12 |
},
|
| 13 |
"classifier_dropout": null,
|
| 14 |
"gradient_checkpointing": false,
|