Instructions to use dimpo/bert-pretrained-wikitext-2-raw-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dimpo/bert-pretrained-wikitext-2-raw-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="dimpo/bert-pretrained-wikitext-2-raw-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("dimpo/bert-pretrained-wikitext-2-raw-v1") model = AutoModelForMaskedLM.from_pretrained("dimpo/bert-pretrained-wikitext-2-raw-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse filesChange the architecture to "BertForMaskedLM".
- config.json +1 -1
config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
"attention_probs_dropout_prob": 0.1,
|
| 6 |
"classifier_dropout": null,
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"BertForMaskedLM"
|
| 4 |
],
|
| 5 |
"attention_probs_dropout_prob": 0.1,
|
| 6 |
"classifier_dropout": null,
|