Instructions to use jhu-clsp/mmBERT-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jhu-clsp/mmBERT-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="jhu-clsp/mmBERT-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("jhu-clsp/mmBERT-base") model = AutoModelForMaskedLM.from_pretrained("jhu-clsp/mmBERT-base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -135,9 +135,9 @@ def predict_masked_token(text):
|
|
| 135 |
|
| 136 |
# Works across languages
|
| 137 |
texts = [
|
| 138 |
-
"The capital of France is
|
| 139 |
-
"La capital de España es
|
| 140 |
-
"Die Hauptstadt von Deutschland ist
|
| 141 |
]
|
| 142 |
|
| 143 |
for text in texts:
|
|
|
|
| 135 |
|
| 136 |
# Works across languages
|
| 137 |
texts = [
|
| 138 |
+
"The capital of France is<mask>.",
|
| 139 |
+
"La capital de España es<mask>.",
|
| 140 |
+
"Die Hauptstadt von Deutschland ist<mask>."
|
| 141 |
]
|
| 142 |
|
| 143 |
for text in texts:
|