Instructions to use PartAI/TookaBERT-Large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PartAI/TookaBERT-Large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="PartAI/TookaBERT-Large")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("PartAI/TookaBERT-Large") model = AutoModelForMaskedLM.from_pretrained("PartAI/TookaBERT-Large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,8 +23,8 @@ You can use this model directly for Masked Language Modeling using the provided
|
|
| 23 |
```Python
|
| 24 |
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
| 25 |
|
| 26 |
-
tokenizer = AutoTokenizer.from_pretrained("PartAI/
|
| 27 |
-
model = AutoModelForMaskedLM.from_pretrained("PartAI/
|
| 28 |
|
| 29 |
# prepare input
|
| 30 |
text = "شهر برلین در کشور <mask> واقع شده است."
|
|
@@ -39,7 +39,7 @@ It is also possible to use inference pipelines such as below.
|
|
| 39 |
```Python
|
| 40 |
from transformers import pipeline
|
| 41 |
|
| 42 |
-
inference_pipeline = pipeline('fill-mask', model="PartAI/
|
| 43 |
inference_pipeline("شهر برلین در کشور <mask> واقع شده است.")
|
| 44 |
```
|
| 45 |
|
|
|
|
| 23 |
```Python
|
| 24 |
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
| 25 |
|
| 26 |
+
tokenizer = AutoTokenizer.from_pretrained("PartAI/TookaBERT-Large")
|
| 27 |
+
model = AutoModelForMaskedLM.from_pretrained("PartAI/TookaBERT-Large")
|
| 28 |
|
| 29 |
# prepare input
|
| 30 |
text = "شهر برلین در کشور <mask> واقع شده است."
|
|
|
|
| 39 |
```Python
|
| 40 |
from transformers import pipeline
|
| 41 |
|
| 42 |
+
inference_pipeline = pipeline('fill-mask', model="PartAI/TookaBERT-Large")
|
| 43 |
inference_pipeline("شهر برلین در کشور <mask> واقع شده است.")
|
| 44 |
```
|
| 45 |
|