Charlie Ruan commited on
Commit
9e181bf
1 Parent(s): 277dbd9

Add configs

Browse files
added_tokens.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 32000,
3
+ "<|assistant|>": 32001,
4
+ "<|placeholder1|>": 32002,
5
+ "<|placeholder2|>": 32003,
6
+ "<|placeholder3|>": 32004,
7
+ "<|placeholder4|>": 32005,
8
+ "<|system|>": 32006,
9
+ "<|end|>": 32007,
10
+ "<|placeholder5|>": 32008,
11
+ "<|placeholder6|>": 32009,
12
+ "<|user|>": 32010
13
+ }
mlc-chat-config.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "0.1.0",
3
+ "model_type": "phi3",
4
+ "quantization": "q4f32_1",
5
+ "model_config": {
6
+ "model_type": "phi3",
7
+ "hidden_size": 3072,
8
+ "vocab_size": 32064,
9
+ "num_hidden_layers": 32,
10
+ "num_attention_heads": 32,
11
+ "intermediate_size": 8192,
12
+ "rms_norm_eps": 1e-05,
13
+ "num_key_value_heads": 32,
14
+ "position_embedding_base": 10000.0,
15
+ "context_window_size": 4096,
16
+ "prefill_chunk_size": 2048,
17
+ "head_dim": 96,
18
+ "tensor_parallel_shards": 1,
19
+ "max_batch_size": 80
20
+ },
21
+ "vocab_size": 32064,
22
+ "context_window_size": 4096,
23
+ "sliding_window_size": -1,
24
+ "prefill_chunk_size": 2048,
25
+ "attention_sink_size": -1,
26
+ "tensor_parallel_shards": 1,
27
+ "temperature": 1.0,
28
+ "presence_penalty": 0.0,
29
+ "frequency_penalty": 0.0,
30
+ "repetition_penalty": 1.0,
31
+ "top_p": 1.0,
32
+ "tokenizer_files": [
33
+ "tokenizer.model",
34
+ "tokenizer.json",
35
+ "added_tokens.json",
36
+ "tokenizer_config.json"
37
+ ],
38
+ "tokenizer_info": {
39
+ "token_postproc_method": "byte_fallback",
40
+ "prepend_space_in_encode": true,
41
+ "strip_space_in_decode": true
42
+ },
43
+ "conv_template": {
44
+ "name": "phi-3",
45
+ "system_template": "<|system|>\n{system_message}",
46
+ "system_message": "You are a helpful digital assistant. Please provide safe, ethical and accurate information to the user.",
47
+ "system_prefix_token_ids": [
48
+ 1
49
+ ],
50
+ "add_role_after_system_message": true,
51
+ "roles": {
52
+ "user": "<|user|>",
53
+ "assistant": "<|assistant|>"
54
+ },
55
+ "role_templates": {
56
+ "user": "{user_message}",
57
+ "assistant": "{assistant_message}",
58
+ "tool": "{tool_message}"
59
+ },
60
+ "messages": [],
61
+ "seps": [
62
+ "<|end|>\n"
63
+ ],
64
+ "role_content_sep": "\n",
65
+ "role_empty_sep": "\n",
66
+ "stop_str": [
67
+ "<|endoftext|>"
68
+ ],
69
+ "stop_token_ids": [
70
+ 2,
71
+ 32000,
72
+ 32001,
73
+ 32007
74
+ ],
75
+ "function_string": "",
76
+ "use_function_calling": false
77
+ },
78
+ "pad_token_id": 32000,
79
+ "bos_token_id": 1,
80
+ "eos_token_id": [
81
+ 32000,
82
+ 32001,
83
+ 32007
84
+ ],
85
+ "mean_gen_len": 128,
86
+ "max_gen_len": 512,
87
+ "shift_fill_factor": 0.3
88
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": true,
26
+ "single_word": false,
27
+ "special": false
28
+ },
29
+ "32000": {
30
+ "content": "<|endoftext|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "32001": {
38
+ "content": "<|assistant|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": true,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "32002": {
46
+ "content": "<|placeholder1|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": true,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "32003": {
54
+ "content": "<|placeholder2|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": true,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "32004": {
62
+ "content": "<|placeholder3|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": true,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "32005": {
70
+ "content": "<|placeholder4|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": true,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "32006": {
78
+ "content": "<|system|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": true,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "32007": {
86
+ "content": "<|end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": true,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "32008": {
94
+ "content": "<|placeholder5|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": true,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "32009": {
102
+ "content": "<|placeholder6|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": true,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "32010": {
110
+ "content": "<|user|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": true,
114
+ "single_word": false,
115
+ "special": true
116
+ }
117
+ },
118
+ "bos_token": "<s>",
119
+ "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
120
+ "clean_up_tokenization_spaces": false,
121
+ "eos_token": "<|endoftext|>",
122
+ "legacy": false,
123
+ "model_max_length": 4096,
124
+ "pad_token": "<|endoftext|>",
125
+ "padding_side": "left",
126
+ "sp_model_kwargs": {},
127
+ "tokenizer_class": "LlamaTokenizer",
128
+ "unk_token": "<unk>",
129
+ "use_default_system_prompt": false
130
+ }