Instructions to use smangla/ModernBERT-base-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smangla/ModernBERT-base-squad2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="smangla/ModernBERT-base-squad2", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("smangla/ModernBERT-base-squad2", trust_remote_code=True) model = AutoModel.from_pretrained("smangla/ModernBERT-base-squad2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +2 -2
config.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
| 4 |
"CustomQAModel"
|
| 5 |
],
|
| 6 |
"auto_map": {
|
| 7 |
-
"AutoConfig": "
|
| 8 |
-
"AutoModel": "
|
| 9 |
},
|
| 10 |
"base_model_name_or_path": "answerdotai/ModernBERT-base",
|
| 11 |
"model_type": "modernbert",
|
|
|
|
| 4 |
"CustomQAModel"
|
| 5 |
],
|
| 6 |
"auto_map": {
|
| 7 |
+
"AutoConfig": "model.CustomQAModelConfig",
|
| 8 |
+
"AutoModel": "model.CustomQAModel"
|
| 9 |
},
|
| 10 |
"base_model_name_or_path": "answerdotai/ModernBERT-base",
|
| 11 |
"model_type": "modernbert",
|