isemmanuelolowe commited on
Commit
fff1ccb
1 Parent(s): 49533b1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -4
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 AutoModelForSequenceClassification, AutoTokenizer
19
 
20
- model_path = 'isemmanuelolowe/BerKANT_171M'
21
- model = AutoModelForSequenceClassification.from_pretrained(model_path, trust_remote_code=True)
22
- tokenizer = AutoTokenizer.from_pretrained(model_path)
 
 
 
 
 
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
  ```