diwank commited on
Commit
0280a5a
1 Parent(s): 26e5af8

Upload tokenizer

Browse files
special_tokens_map.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "eos_token": "<|endoftext|>",
3
+ "pad_token": "<|endoftext|>"
4
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<|endoftext|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ }
11
+ },
12
+ "auto_map": {
13
+ "AutoTokenizer": [
14
+ "tokenizer_utils.CryptGPTTokenizer",
15
+ null
16
+ ]
17
+ },
18
+ "clean_up_tokenization_spaces": true,
19
+ "eos_token": "<|endoftext|>",
20
+ "max_length": 1024,
21
+ "model_max_length": 1024,
22
+ "pad_token": "<|endoftext|>",
23
+ "stride": 0,
24
+ "tokenizer_class": "CryptGPTTokenizer",
25
+ "truncation_side": "right",
26
+ "truncation_strategy": "longest_first"
27
+ }
tokenizer_utils.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from transformers import PreTrainedTokenizerFast
2
+
3
+ class CryptGPTTokenizer(PreTrainedTokenizerFast):
4
+ @staticmethod
5
+ def clean_up_tokenization(out_string):
6
+ return out_string.replace(' ', "")
7
+
8
+ CryptGPTTokenizer.register_for_auto_class("AutoTokenizer")