Instructions to use sgugger/my-bert-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sgugger/my-bert-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="sgugger/my-bert-model", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("sgugger/my-bert-model", trust_remote_code=True) model = AutoModel.from_pretrained("sgugger/my-bert-model", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Add auto_map field
Browse files- config.json +3 -0
config.json
CHANGED
|
@@ -4,6 +4,9 @@
|
|
| 4 |
"MyBertModel"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
|
|
|
|
|
|
| 7 |
"classifier_dropout": null,
|
| 8 |
"gradient_checkpointing": false,
|
| 9 |
"hidden_act": "gelu",
|
|
|
|
| 4 |
"MyBertModel"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoModel": "modeling.MyBertModel"
|
| 9 |
+
},
|
| 10 |
"classifier_dropout": null,
|
| 11 |
"gradient_checkpointing": false,
|
| 12 |
"hidden_act": "gelu",
|