Commit
•
fff1ccb
1
Parent(s):
49533b1
Update README.md
Browse files
README.md
CHANGED
@@ -15,9 +15,14 @@ Currently pretraining on [JackBAI/bert_pretrain_datasets](https://huggingface.co
|
|
15 |
|
16 |
|
17 |
```python
|
18 |
-
from transformers import
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
23 |
```
|
|
|
15 |
|
16 |
|
17 |
```python
|
18 |
+
from transformers import AutoModelForMaskedLM, AutoConfig
|
19 |
|
20 |
+
# Define the model path
|
21 |
+
model_path = "isemmanuelolowe/BerKANT_171M"
|
22 |
+
|
23 |
+
# Load the configuration
|
24 |
+
config = AutoConfig.from_pretrained(model_path)
|
25 |
+
|
26 |
+
# Load the model with the correct configuration
|
27 |
+
model = AutoModelForMaskedLM.from_pretrained(model_path, config=config, trust_remote_code=True)
|
28 |
```
|