Instructions to use Maxscha/bert-test-aligned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maxscha/bert-test-aligned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Maxscha/bert-test-aligned", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("Maxscha/bert-test-aligned", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("Maxscha/bert-test-aligned", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Upload BertForMaskedLM
Browse files- modeling_bert.py +1 -1
modeling_bert.py
CHANGED
|
@@ -852,7 +852,7 @@ class BertLMHeadModel(BertPreTrainedModel):
|
|
| 852 |
|
| 853 |
class BertForMaskedLM(BertPreTrainedModel):
|
| 854 |
|
| 855 |
-
|
| 856 |
|
| 857 |
def __init__(self, config):
|
| 858 |
super().__init__(config)
|
|
|
|
| 852 |
|
| 853 |
class BertForMaskedLM(BertPreTrainedModel):
|
| 854 |
|
| 855 |
+
config_class = BertConfig
|
| 856 |
|
| 857 |
def __init__(self, config):
|
| 858 |
super().__init__(config)
|