bnjmnmarie commited on
Commit
8a40d42
·
verified ·
1 Parent(s): fe892ae

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
added_tokens.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 166104,
3
+ "</tool_call>": 166106,
4
+ "<think>": 166103,
5
+ "<tool_call>": 166105,
6
+ "<|endoftext|>": 166102,
7
+ "<|im_end|>": 166101,
8
+ "<|im_start|>": 166100
9
+ }
chat_template.jinja ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ {%- if tools %}
3
+ {{- '<|im_start|>system
4
+ ' }}
5
+ {%- if messages[0].role == 'system' %}
6
+ {{- messages[0].content + '
7
+
8
+ ' }}
9
+ {%- else %}
10
+ {{- '你是一位工具函数调用专家,你会得到一个问题和一组可能的工具函数。根据问题,你需要进行一个或多个函数/工具调用以实现目的,请尽量尝试探索通过工具解决问题。
11
+ 如果没有一个函数可以使用,请直接使用自然语言回复用户。
12
+ 如果给定的问题缺少函数所需的参数,请使用自然语言进行提问,向用户询问必要信息。
13
+ 如果调用结果已经足够回答用户问题,请对历史结果进行总结,使用自然语言回复用户。' }}
14
+ {%- endif %}
15
+ {{- "# Tools
16
+
17
+ You may call one or more functions to assist with the user query.
18
+
19
+ You are provided with function signatures within <tools></tools> XML tags:
20
+ <tools>" }}
21
+ {%- for tool in tools %}
22
+ {{- "
23
+ " }}
24
+ {{- tool | tojson }}
25
+ {%- endfor %}
26
+ {{- "
27
+ </tools>
28
+
29
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
30
+ <tool_call>
31
+ {\"name\": <function-name>, \"arguments\": <args-json-object>}
32
+ </tool_call><|im_end|>
33
+ " }}
34
+ {%- else %}
35
+ {%- if messages[0].role == 'system' %}
36
+ {{- '<|im_start|>system
37
+ ' + messages[0].content + '<|im_end|>
38
+ ' }}
39
+ {%- else %}
40
+ {{- '<|im_start|>system
41
+ 你是南北阁,一款由BOSS直聘自主研发并训练的专业大语言模型。<|im_end|>
42
+ ' }}
43
+ {%- endif %}
44
+ {%- endif %}
45
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
46
+ {%- for message in messages[::-1] %}
47
+ {%- set index = (messages|length - 1) - loop.index0 %}
48
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
49
+ {%- set ns.multi_step_tool = false %}
50
+ {%- set ns.last_query_index = index %}
51
+ {%- endif %}
52
+ {%- endfor %}
53
+ {%- for message in messages %}
54
+ {%- if message.content is string %}
55
+ {%- set content = message.content %}
56
+ {%- else %}
57
+ {%- set content = '' %}
58
+ {%- endif %}
59
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
60
+ {{- '<|im_start|>' + message.role + '
61
+ ' + content + '<|im_end|>' + '
62
+ ' }}
63
+ {%- elif message.role == "assistant" %}
64
+ {%- set reasoning_content = '' %}
65
+ {%- if message.reasoning_content is string %}
66
+ {%- set reasoning_content = message.reasoning_content %}
67
+ {%- else %}
68
+ {%- if '</think>' in content %}
69
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('
70
+ ').split('<think>')[-1].lstrip('
71
+ ') %}
72
+ {%- set content = content.split('</think>')[-1].lstrip('
73
+ ') %}
74
+ {%- endif %}
75
+ {%- endif %}
76
+ {%- if loop.index0 > ns.last_query_index or keep_all_think or (extra_body is defined and extra_body.keep_all_think) %}
77
+ {%- if loop.last or (not loop.last and reasoning_content) %}
78
+ {{- '<|im_start|>' + message.role + '
79
+ <think>
80
+ ' + reasoning_content.strip('
81
+ ') + '
82
+ </think>
83
+
84
+ ' + content.lstrip('
85
+ ') }}
86
+ {%- else %}
87
+ {{- '<|im_start|>' + message.role + '
88
+ ' + content }}
89
+ {%- endif %}
90
+ {%- else %}
91
+ {{- '<|im_start|>' + message.role + '
92
+ ' + content }}
93
+ {%- endif %}
94
+ {%- if message.tool_calls %}
95
+ {%- for tool_call in message.tool_calls %}
96
+ {%- if (loop.first and content) or (not loop.first) %}
97
+ {{- '
98
+ ' }}
99
+ {%- endif %}
100
+ {%- if tool_call.function %}
101
+ {%- set tool_call = tool_call.function %}
102
+ {%- endif %}
103
+ {{- '<tool_call>
104
+ {"name": "' }}
105
+ {{- tool_call.name }}
106
+ {{- '", "arguments": ' }}
107
+ {%- if tool_call.arguments is string %}
108
+ {{- tool_call.arguments }}
109
+ {%- else %}
110
+ {{- tool_call.arguments | tojson }}
111
+ {%- endif %}
112
+ {{- '}
113
+ </tool_call>' }}
114
+ {%- endfor %}
115
+ {%- endif %}
116
+ {{- '<|im_end|>
117
+ ' }}
118
+ {%- elif message.role == "tool" %}
119
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
120
+ {{- '<|im_start|>user' }}
121
+ {%- endif %}
122
+ {{- '
123
+ <tool_response>
124
+ ' }}
125
+ {{- content }}
126
+ {{- '
127
+ </tool_response>' }}
128
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
129
+ {{- '<|im_end|>
130
+ ' }}
131
+ {%- endif %}
132
+ {%- endif %}
133
+ {%- endfor %}
134
+ {%- if add_generation_prompt %}
135
+ {{- '<|im_start|>assistant
136
+ ' }}
137
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 166100,
8
+ "dtype": "bfloat16",
9
+ "embd_pdrop": 0.0,
10
+ "eos_token_id": 166101,
11
+ "head_dim": 128,
12
+ "hidden_act": "silu",
13
+ "hidden_size": 2560,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 10496,
16
+ "max_position_embeddings": 262144,
17
+ "mlp_bias": false,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 20,
20
+ "num_hidden_layers": 32,
21
+ "num_key_value_heads": 4,
22
+ "pad_token_id": 0,
23
+ "pretraining_tp": 1,
24
+ "quantization_config": {
25
+ "config_groups": {
26
+ "group_0": {
27
+ "format": "pack-quantized",
28
+ "input_activations": null,
29
+ "output_activations": null,
30
+ "targets": [
31
+ "Linear"
32
+ ],
33
+ "weights": {
34
+ "actorder": null,
35
+ "block_structure": null,
36
+ "dynamic": false,
37
+ "group_size": 128,
38
+ "num_bits": 4,
39
+ "observer": "memoryless_minmax",
40
+ "observer_kwargs": {},
41
+ "scale_dtype": null,
42
+ "strategy": "group",
43
+ "symmetric": false,
44
+ "type": "int",
45
+ "zp_dtype": "torch.int8"
46
+ }
47
+ }
48
+ },
49
+ "format": "pack-quantized",
50
+ "global_compression_ratio": null,
51
+ "ignore": [
52
+ "lm_head"
53
+ ],
54
+ "kv_cache_scheme": null,
55
+ "quant_method": "compressed-tensors",
56
+ "quantization_status": "compressed",
57
+ "sparsity_config": {},
58
+ "transform_config": {},
59
+ "version": "0.13.1.a20260212"
60
+ },
61
+ "resid_pdrop": 0.0,
62
+ "rms_norm_eps": 1e-05,
63
+ "rope_scaling": null,
64
+ "rope_theta": 70000000,
65
+ "tie_word_embeddings": false,
66
+ "transformers_version": "4.57.6",
67
+ "use_cache": true,
68
+ "vocab_size": 166144
69
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 166100,
4
+ "eos_token_id": 166101,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.57.6"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:374aedadc1ea7ac4e42f9c147ca96d20c711e0e8b235c25863dc8e986e3ad713
3
+ size 3303380160
recipe.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ AWQModifier:
4
+ targets: [Linear]
5
+ ignore: [lm_head]
6
+ scheme: W4A16_ASYM
7
+ mappings:
8
+ - smooth_layer: re:.*input_layernorm$
9
+ balance_layers: ['re:.*q_proj$', 're:.*k_proj$', 're:.*v_proj$']
10
+ activation_hook_target: null
11
+ - smooth_layer: re:.*v_proj$
12
+ balance_layers: ['re:.*o_proj$']
13
+ activation_hook_target: null
14
+ - smooth_layer: re:.*post_attention_layernorm$
15
+ balance_layers: ['re:.*gate_proj$', 're:.*up_proj$']
16
+ activation_hook_target: null
17
+ - smooth_layer: re:.*up_proj$
18
+ balance_layers: ['re:.*down_proj$']
19
+ activation_hook_target: null
20
+ duo_scaling: true
21
+ n_grid: 20
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|endoftext|>"
4
+ ],
5
+ "bos_token": {
6
+ "content": "<|im_start|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "eos_token": {
13
+ "content": "<|im_end|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false
18
+ },
19
+ "pad_token": {
20
+ "content": "<unk>",
21
+ "lstrip": false,
22
+ "normalized": true,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": true,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c19684f77ffbbe626fa5c77d4fac1d8069fe5770e1e6576d38f9e2813f2a43a7
3
+ size 18451221
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb41d04798b714520a9b075727b0226538b7330254299062742c50ec8374bc36
3
+ size 2782298
tokenizer_config.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": true,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": true,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "166100": {
31
+ "content": "<|im_start|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "166101": {
39
+ "content": "<|im_end|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "166102": {
47
+ "content": "<|endoftext|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "166103": {
55
+ "content": "<think>",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "166104": {
63
+ "content": "</think>",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "166105": {
71
+ "content": "<tool_call>",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "166106": {
79
+ "content": "</tool_call>",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ }
86
+ },
87
+ "additional_special_tokens": [
88
+ "<|endoftext|>"
89
+ ],
90
+ "bos_token": "<|im_start|>",
91
+ "clean_up_tokenization_spaces": false,
92
+ "eos_token": "<|im_end|>",
93
+ "extra_special_tokens": {},
94
+ "legacy": true,
95
+ "model_max_length": 1000000000000000019884624838656,
96
+ "pad_token": "<unk>",
97
+ "sp_model_kwargs": {},
98
+ "spaces_between_special_tokens": false,
99
+ "tokenizer_class": "LlamaTokenizer",
100
+ "unk_token": "<unk>",
101
+ "use_default_system_prompt": false
102
+ }