ctoraman commited on
Commit
3200f11
·
1 Parent(s): 6472f75

readme updated

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -20,6 +20,23 @@ Model architecture is similar to bert-medium (8 layers, 8 heads, and 512 hidden
20
  The details can be found at this paper:
21
  https://arxiv.org/...
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ### BibTeX entry and citation info
24
  ```bibtex
25
  @article{}
 
20
  The details can be found at this paper:
21
  https://arxiv.org/...
22
 
23
+ The following code can be used for model loading and tokenization, example max length (514) can be changed:
24
+ ```
25
+ model = AutoModel.from_pretrained([model_path])
26
+ #for sequence classification:
27
+ #model = AutoModelForSequenceClassification.from_pretrained([model_path], num_labels=[num_classes])
28
+
29
+ tokenizer = PreTrainedTokenizerFast(tokenizer_file=[file_path])
30
+ tokenizer.mask_token = "[MASK]"
31
+ tokenizer.cls_token = "[CLS]"
32
+ tokenizer.sep_token = "[SEP]"
33
+ tokenizer.pad_token = "[PAD]"
34
+ tokenizer.unk_token = "[UNK]"
35
+ tokenizer.bos_token = "[CLS]"
36
+ tokenizer.eos_token = "[SEP]"
37
+ tokenizer.model_max_length = 514
38
+ ```
39
+
40
  ### BibTeX entry and citation info
41
  ```bibtex
42
  @article{}