yujiepan commited on
Commit
bc63b89
·
verified ·
1 Parent(s): 79e0f01

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ pipeline_tag: text-generation
4
+ inference: true
5
+ widget:
6
+ - text: Hello!
7
+ example_title: Hello world
8
+ group: Python
9
+ base_model:
10
+ - baidu/ERNIE-4.5-21B-A3B-Thinking
11
+ ---
12
+
13
+ This tiny model is intended for debugging. It is randomly initialized using the configuration adapted from [baidu/ERNIE-4.5-21B-A3B-Thinking](https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-Thinking).
14
+
15
+ ### Example usage:
16
+
17
+ ```python
18
+ from transformers import AutoModelForCausalLM, AutoTokenizer
19
+
20
+ # Load model and tokenizer
21
+ model_id = "yujiepan/ernie-4.5-moe-tiny-random"
22
+ model = AutoModelForCausalLM.from_pretrained(
23
+ model_id,
24
+ device_map="auto",
25
+ torch_dtype="bfloat16",
26
+ trust_remote_code=True,
27
+ )
28
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
29
+
30
+ # Generate answer
31
+ prompt = "What is AI?"
32
+ input_ids = tokenizer.apply_chat_template(
33
+ [{"role": "user", "content": prompt}],
34
+ add_generation_prompt=True,
35
+ return_tensors="pt",
36
+ tokenize=True,
37
+ ).to(model.device)
38
+
39
+ output = model.generate(
40
+ input_ids,
41
+ do_sample=True,
42
+ max_new_tokens=32,
43
+ )
44
+ print(tokenizer.decode(output[0], skip_special_tokens=False))
45
+ ```
46
+
47
+ ### Codes to create this repo:
48
+
49
+ ```python
50
+ import json
51
+ from pathlib import Path
52
+
53
+ import accelerate
54
+ import torch
55
+ from huggingface_hub import file_exists, hf_hub_download
56
+ from transformers import (
57
+ AutoConfig,
58
+ AutoModelForCausalLM,
59
+ AutoProcessor,
60
+ GenerationConfig,
61
+ set_seed,
62
+ )
63
+
64
+ source_model_id = "baidu/ERNIE-4.5-21B-A3B-Thinking"
65
+ save_folder = "/tmp/yujiepan/ernie-4.5-moe-tiny-random"
66
+
67
+ processor = AutoProcessor.from_pretrained(source_model_id, trust_remote_code=True)
68
+ processor.save_pretrained(save_folder)
69
+
70
+ with open(hf_hub_download(source_model_id, filename='config.json', repo_type='model'), 'r', encoding='utf-8') as f:
71
+ config_json = json.load(f)
72
+ config_json['hidden_size'] = 8
73
+ config_json['intermediate_size'] = 32
74
+ config_json['moe_intermediate_size'] = 32
75
+ # config_json['moe_k'] = 6
76
+ config_json['head_dim'] = 32
77
+ config_json['num_attention_heads'] = 16
78
+ config_json['num_hidden_layers'] = 2
79
+ config_json['num_key_value_heads'] = 8
80
+ config_json['tie_word_embeddings'] = True
81
+ config_json['use_cache'] = True
82
+ with open(f"{save_folder}/config.json", "w", encoding='utf-8') as f:
83
+ json.dump(config_json, f, indent=2)
84
+
85
+ config = AutoConfig.from_pretrained(
86
+ save_folder,
87
+ trust_remote_code=True,
88
+ )
89
+ print(config)
90
+ torch.set_default_dtype(torch.bfloat16)
91
+ model = AutoModelForCausalLM.from_config(config)
92
+ torch.set_default_dtype(torch.float32)
93
+ if file_exists(filename="generation_config.json", repo_id=source_model_id, repo_type='model'):
94
+ model.generation_config = GenerationConfig.from_pretrained(
95
+ source_model_id, trust_remote_code=True,
96
+ )
97
+ model.generation_config.do_sample = True
98
+ print(model.generation_config)
99
+ model = model.cpu()
100
+ with torch.no_grad():
101
+ for name, p in sorted(model.named_parameters()):
102
+ torch.nn.init.normal_(p, 0, 0.1)
103
+ print(name, p.shape)
104
+ model.save_pretrained(save_folder)
105
+ print(model)
106
+ ```
107
+
108
+ ### Printing the model:
109
+
110
+ ```text
111
+ Ernie4_5_MoeForCausalLM(
112
+ (model): Ernie4_5_MoeModel(
113
+ (embed_tokens): Embedding(103424, 8, padding_idx=0)
114
+ (layers): ModuleList(
115
+ (0): Ernie4_5_MoeDecoderLayer(
116
+ (self_attn): Ernie4_5_MoeAttention(
117
+ (q_proj): Linear(in_features=8, out_features=512, bias=False)
118
+ (k_proj): Linear(in_features=8, out_features=256, bias=False)
119
+ (v_proj): Linear(in_features=8, out_features=256, bias=False)
120
+ (o_proj): Linear(in_features=512, out_features=8, bias=False)
121
+ )
122
+ (mlp): Ernie4_5_MoeMLP(
123
+ (gate_proj): Linear(in_features=8, out_features=32, bias=False)
124
+ (up_proj): Linear(in_features=8, out_features=32, bias=False)
125
+ (down_proj): Linear(in_features=32, out_features=8, bias=False)
126
+ (act_fn): SiLU()
127
+ )
128
+ (input_layernorm): Ernie4_5_MoeRMSNorm((8,), eps=1e-05)
129
+ (post_attention_layernorm): Ernie4_5_MoeRMSNorm((8,), eps=1e-05)
130
+ )
131
+ (1): Ernie4_5_MoeDecoderLayer(
132
+ (self_attn): Ernie4_5_MoeAttention(
133
+ (q_proj): Linear(in_features=8, out_features=512, bias=False)
134
+ (k_proj): Linear(in_features=8, out_features=256, bias=False)
135
+ (v_proj): Linear(in_features=8, out_features=256, bias=False)
136
+ (o_proj): Linear(in_features=512, out_features=8, bias=False)
137
+ )
138
+ (mlp): Ernie4_5_MoeSparseMoeBlock(
139
+ (moe_statics): Ernie4_5_MoeStatics()
140
+ (gate): Linear(in_features=8, out_features=64, bias=False)
141
+ (experts): ModuleList(
142
+ (0-63): 64 x Ernie4_5_MoeMLP(
143
+ (gate_proj): Linear(in_features=8, out_features=32, bias=False)
144
+ (up_proj): Linear(in_features=8, out_features=32, bias=False)
145
+ (down_proj): Linear(in_features=32, out_features=8, bias=False)
146
+ (act_fn): SiLU()
147
+ )
148
+ )
149
+ (shared_experts): Ernie4_5_MoeMLP(
150
+ (gate_proj): Linear(in_features=8, out_features=64, bias=False)
151
+ (up_proj): Linear(in_features=8, out_features=64, bias=False)
152
+ (down_proj): Linear(in_features=64, out_features=8, bias=False)
153
+ (act_fn): SiLU()
154
+ )
155
+ )
156
+ (input_layernorm): Ernie4_5_MoeRMSNorm((8,), eps=1e-05)
157
+ (post_attention_layernorm): Ernie4_5_MoeRMSNorm((8,), eps=1e-05)
158
+ )
159
+ )
160
+ (norm): Ernie4_5_MoeRMSNorm((8,), eps=1e-05)
161
+ (rotary_emb): Ernie4_5_MoeRotaryEmbedding()
162
+ )
163
+ (lm_head): Linear(in_features=8, out_features=103424, bias=False)
164
+ )
165
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- '<|im_start|>system
2
+ ' }}{%- if messages[0].role != 'system' and not system_settings %}{{- '<global_setting>
3
+ think_mode=True
4
+ </global_setting>' }}{%- else%}{{- '<system_setting>
5
+ ' }}{{- system_settings + '
6
+ ' if system_settings else '' }}{{- (messages[0].content + '
7
+ ' if messages[0].role == 'system' else '') + '</system_setting>
8
+
9
+ <global_setting>
10
+ think_mode=True
11
+ </global_setting>' }}{%- endif %}{%- if tools %}{{- "
12
+
13
+ <tool_list>" }}{{- '
14
+ ' }}{{-'['}}{% for tool in tools %}{{'{"type": "function", "function": '}}{{-(tool.function | tojson)}}}{%-if not loop.last%},{%- endif %}{%endfor%}{{-']'}}{{- "
15
+ </tool_list>" }}{%- endif %}{{-'<|im_end|>
16
+
17
+ ' }}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_output>') and message.content.endswith('</tool_output>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '
33
+ ' + content + '<|im_end|>' + '
34
+
35
+ ' }}
36
+ {%- elif message.role == "assistant" %}
37
+ {%- set reasoning_content = '' %}
38
+ {%- if message.thoughts is string %}
39
+ {%- set reasoning_content = message.thoughts %}
40
+ {%- else %}
41
+ {%- if '</think>' in content %}
42
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('
43
+ ').split('<think>')[-1].lstrip('
44
+ ') %}
45
+ {%- set content = content.split('</think>')[-1].lstrip('
46
+ ') %}
47
+ {%- endif %}
48
+ {%- endif %}
49
+ {%- if loop.index0 > ns.last_query_index and (loop.last or (not loop.last and reasoning_content)) %} {{- '<|im_start|>' + message.role + '
50
+ <think>
51
+ ' + reasoning_content.strip('
52
+ ') + '
53
+ </think>
54
+ ' }} {%- else %} {{- '<|im_start|>' + message.role + '
55
+ ' }} {%- endif %} {%- if content|length > 0 %} {{- '<response>
56
+ ' + content + '
57
+ </response>
58
+ ' }} {%- endif %} {%- if message.tool_calls %}
59
+ {%- for tool_call in message.tool_calls %}
60
+ {%- if (loop.first and content) or (not loop.first) %}
61
+ {{- '
62
+ ' }}
63
+ {%- endif %}
64
+ {%- if tool_call.function %}
65
+ {%- set tool_call = tool_call.function %}
66
+ {%- endif %}
67
+ {{- '
68
+ <tool_call>
69
+ {"name": "' }}
70
+ {{- tool_call.name }}
71
+ {{- '", "arguments": ' }}
72
+ {%- if tool_call.arguments is string %}
73
+ {{- tool_call.arguments }}
74
+ {%- else %}
75
+ {{- tool_call.arguments | tojson }}
76
+ {%- endif %}
77
+ {{- '}
78
+ </tool_call>
79
+ ' }}
80
+ {%- endfor %}
81
+ {%- endif %}
82
+ {{- '<|im_end|>
83
+
84
+ ' }}
85
+ {%- elif message.role == "tool" %}
86
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
87
+ {{- '<|im_start|>tool' }}
88
+ {%- endif %}
89
+ {{- '
90
+ <tool_output>' }}
91
+ {{- message.content|tojson }}
92
+ {{- '</tool_output>' }}
93
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
94
+ {{- '<|im_end|>
95
+
96
+ ' }}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- endfor %}
100
+ {{- "<|im_start|>assistant
101
+ <think>
102
+ "}}
config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Ernie4_5_MoeForCausalLM"
4
+ ],
5
+ "bos_token_id": 1,
6
+ "dtype": "bfloat16",
7
+ "eos_token_id": 2,
8
+ "head_dim": 32,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 8,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 32,
13
+ "max_position_embeddings": 131072,
14
+ "model_type": "ernie4_5_moe",
15
+ "moe_capacity": [
16
+ 64,
17
+ 64,
18
+ 64
19
+ ],
20
+ "moe_gate": "top2_fused",
21
+ "moe_intermediate_size": 32,
22
+ "moe_k": 6,
23
+ "moe_layer_end_index": 1,
24
+ "moe_layer_interval": 1,
25
+ "moe_layer_start_index": 1,
26
+ "moe_norm_min": 1e-12,
27
+ "moe_num_experts": 64,
28
+ "moe_num_shared_experts": 2,
29
+ "moe_use_aux_free": true,
30
+ "num_attention_heads": 16,
31
+ "num_hidden_layers": 2,
32
+ "num_key_value_heads": 8,
33
+ "output_router_logits": false,
34
+ "pad_token_id": 0,
35
+ "rms_norm_eps": 1e-05,
36
+ "rope_scaling": null,
37
+ "rope_theta": 500000,
38
+ "router_aux_loss_coef": 0.001,
39
+ "transformers_version": "4.57.0.dev0",
40
+ "use_bias": false,
41
+ "use_cache": true,
42
+ "vocab_size": 103424
43
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "do_sample": true,
4
+ "eos_token_id": 2,
5
+ "frequency_penalty": 0.0,
6
+ "pad_token_id": 0,
7
+ "presence_penalty": 0.0,
8
+ "temperature": 0.6,
9
+ "top_p": 0.95,
10
+ "transformers_version": "4.57.0.dev0",
11
+ "trust_remote_code": true
12
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ab3ac0ffb09176ac4483830939e7b8e2638ae2b85d5de59fe516afd8b4edec8
3
+ size 1833328
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<|begin_of_sentence|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask:1>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<unk>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "<|end_of_sentence|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93a291ef6e5c89e6c0f2d5d004734ff429faa8ab925e39d71d2374b3d0daf49e
3
+ size 10999541
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:098d756440604e3829c6c2375f835a82a1968c044b74e561f4b0084e53befd2e
3
+ size 1614702
tokenizer_config.json ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "3": {
31
+ "content": "0",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "4": {
39
+ "content": "1",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "5": {
47
+ "content": "2",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "6": {
55
+ "content": "3",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "7": {
63
+ "content": "4",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "8": {
71
+ "content": "5",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "9": {
79
+ "content": "6",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "10": {
87
+ "content": "7",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "11": {
95
+ "content": "8",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": false
101
+ },
102
+ "12": {
103
+ "content": "9",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": false
109
+ },
110
+ "100272": {
111
+ "content": "<|end_of_sentence|>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": true
117
+ },
118
+ "100273": {
119
+ "content": "<|begin_of_sentence|>",
120
+ "lstrip": false,
121
+ "normalized": false,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": true
125
+ },
126
+ "100274": {
127
+ "content": "<mask:1>",
128
+ "lstrip": false,
129
+ "normalized": false,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": true
133
+ },
134
+ "100281": {
135
+ "content": "<think>",
136
+ "lstrip": false,
137
+ "normalized": false,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "100282": {
143
+ "content": "</think>",
144
+ "lstrip": false,
145
+ "normalized": false,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ },
150
+ "100295": {
151
+ "content": "<tool_output>",
152
+ "lstrip": false,
153
+ "normalized": false,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": false
157
+ },
158
+ "100296": {
159
+ "content": "</tool_output>",
160
+ "lstrip": false,
161
+ "normalized": false,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": false
165
+ },
166
+ "100297": {
167
+ "content": "<tool_call>",
168
+ "lstrip": false,
169
+ "normalized": false,
170
+ "rstrip": false,
171
+ "single_word": false,
172
+ "special": false
173
+ },
174
+ "100298": {
175
+ "content": "</tool_call>",
176
+ "lstrip": false,
177
+ "normalized": false,
178
+ "rstrip": false,
179
+ "single_word": false,
180
+ "special": false
181
+ },
182
+ "100299": {
183
+ "content": "<response>",
184
+ "lstrip": false,
185
+ "normalized": false,
186
+ "rstrip": false,
187
+ "single_word": false,
188
+ "special": false
189
+ },
190
+ "100300": {
191
+ "content": "</response>",
192
+ "lstrip": false,
193
+ "normalized": false,
194
+ "rstrip": false,
195
+ "single_word": false,
196
+ "special": false
197
+ },
198
+ "100301": {
199
+ "content": "<system_setting>",
200
+ "lstrip": false,
201
+ "normalized": false,
202
+ "rstrip": false,
203
+ "single_word": false,
204
+ "special": false
205
+ },
206
+ "100302": {
207
+ "content": "</system_setting>",
208
+ "lstrip": false,
209
+ "normalized": false,
210
+ "rstrip": false,
211
+ "single_word": false,
212
+ "special": false
213
+ },
214
+ "100303": {
215
+ "content": "<global_setting>",
216
+ "lstrip": false,
217
+ "normalized": false,
218
+ "rstrip": false,
219
+ "single_word": false,
220
+ "special": false
221
+ },
222
+ "100304": {
223
+ "content": "</global_setting>",
224
+ "lstrip": false,
225
+ "normalized": false,
226
+ "rstrip": false,
227
+ "single_word": false,
228
+ "special": false
229
+ },
230
+ "100305": {
231
+ "content": "<tool_list>",
232
+ "lstrip": false,
233
+ "normalized": false,
234
+ "rstrip": false,
235
+ "single_word": false,
236
+ "special": false
237
+ },
238
+ "100306": {
239
+ "content": "</tool_list>",
240
+ "lstrip": false,
241
+ "normalized": false,
242
+ "rstrip": false,
243
+ "single_word": false,
244
+ "special": false
245
+ },
246
+ "100307": {
247
+ "content": "<|im_start|>",
248
+ "lstrip": false,
249
+ "normalized": false,
250
+ "rstrip": false,
251
+ "single_word": false,
252
+ "special": false
253
+ },
254
+ "100308": {
255
+ "content": "<|im_end|>",
256
+ "lstrip": false,
257
+ "normalized": false,
258
+ "rstrip": false,
259
+ "single_word": false,
260
+ "special": false
261
+ }
262
+ },
263
+ "additional_special_tokens": [],
264
+ "bos_token": "<s>",
265
+ "clean_up_tokenization_spaces": false,
266
+ "cls_token": "<|begin_of_sentence|>",
267
+ "eos_token": "</s>",
268
+ "extra_special_tokens": {},
269
+ "header_end_token": "<mask:7>",
270
+ "header_start_token": "<mask:6>",
271
+ "legacy": true,
272
+ "mask_token": "<mask:1>",
273
+ "model_max_length": 1000000000000000019884624838656,
274
+ "pad_token": "<unk>",
275
+ "sep_token": "<|end_of_sentence|>",
276
+ "sys_end_token": "<mask:5>",
277
+ "sys_start_token": "<mask:4>",
278
+ "tokenizer_class": "LlamaTokenizer",
279
+ "unk_token": "<unk>",
280
+ "use_default_system_prompt": false
281
+ }