ukint-vs commited on
Commit
5864ec7
·
verified ·
1 Parent(s): 22f8b0d

Upload verified Nanbeige4.2 int8 Core AI LanguageBundle

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ 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
+ gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/nanbeige4_2_3b_decode_int8hu_block32_sym_s1.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
37
+ gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/metadata.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata_version": "0.2",
3
+ "kind": "llm",
4
+ "name": "nanbeige4_2_3b_decode_int8hu_block32_sym_s1",
5
+ "assets": {
6
+ "main": "nanbeige4_2_3b_decode_int8hu_block32_sym_s1.aimodel"
7
+ },
8
+ "language": {
9
+ "tokenizer": "Nanbeige/Nanbeige4.2-3B",
10
+ "vocab_size": 166144,
11
+ "max_context_length": 4096,
12
+ "embedded_tokenizer": true,
13
+ "function_map": {
14
+ "main": [
15
+ "main"
16
+ ]
17
+ }
18
+ },
19
+ "source": {
20
+ "model_definition": "torch",
21
+ "hf_model_id": "Nanbeige/Nanbeige4.2-3B",
22
+ "hf_revision": "5ff54fb7ed86ce8e216d78bff5417ab9981de3d4"
23
+ },
24
+ "compression": null,
25
+ "compilation": {
26
+ "date": "2026-07-22T15:06:28.708628+00:00",
27
+ "targets": []
28
+ }
29
+ }
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/nanbeige4_2_3b_decode_int8hu_block32_sym_s1.aimodel/main.hash ADDED
@@ -0,0 +1 @@
 
 
1
+ `Y
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/nanbeige4_2_3b_decode_int8hu_block32_sym_s1.aimodel/main.mlirb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60590d64a7a2808ba8db6dbf89a4dc7e2fa994485596a0c56c4cdfa972448a43
3
+ size 4909579220
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/nanbeige4_2_3b_decode_int8hu_block32_sym_s1.aimodel/metadata.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "assetVersion" : "2.0",
3
+ "producer" : "coreai-core 1.0.0b2",
4
+ "creationDate" : "20260722T150626Z"
5
+ }
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/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
+ }
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/chat_template.jinja ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ {%- macro visible_text(content) -%}
4
+ {%- if content is string -%}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping -%}
7
+ {%- for item in content -%}
8
+ {%- if item is mapping and item.type == 'text' -%}
9
+ {{- item.text }}
10
+ {%- elif item is string -%}
11
+ {{- item }}
12
+ {%- elif item is mapping and item.type in ['image', 'image_url', 'video', 'video_url', 'audio', 'audio_url', 'input_audio'] -%}
13
+ {%- set media_type = item.type | replace('_url', '') | replace('input_', '') -%}
14
+ {{- "<reminder>You are unable to process this " ~ media_type ~ " because you don't have multi-modal input ability. Try different methods.</reminder>" }}
15
+ {%- endif -%}
16
+ {%- endfor -%}
17
+ {%- else -%}
18
+ {{- content }}
19
+ {%- endif -%}
20
+ {%- endmacro -%}
21
+
22
+
23
+ {%- set tool_call_format = tool_call_format if tool_call_format is defined else 'xml' %}
24
+ {%- if tools %}
25
+ {{- '<|im_start|>system\n' }}
26
+ {%- if messages|length > 0 and messages[0].get('role', '') == 'system' %}
27
+ {{- visible_text(messages[0].content) + '\n\n' }}
28
+ {%- else %}
29
+ {{- '你是一位工具函数调用专家,你会得到一个问题和一组可能的工具函数。根据问题,你需要进行一个或多个函数/工具调用以实现目的,请尽量尝试探索通过工具解决问题。\n如果没有一个函数可以使用,请直接使用自然语言回复用户。\n如果给定的问题缺少函数所需的参数,请使用自然语言进行提问,向用户询问必要信息。\n如果调用结果已经足够回答用户问题,请对历史结果进行总结,使用自然语言回复用户。' }}
30
+ {%- endif %}
31
+
32
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
33
+ {%- for tool in tools %}
34
+ {{- "\n" }}
35
+ {{- tool | tojson }}
36
+ {%- endfor %}
37
+
38
+ {%- if tool_call_format == 'json' %}
39
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n" }}
40
+ {{- '<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n' }}
41
+ {%- else %}
42
+ {{- "\n</tools>\n\nFor each function call, output the function name and arguments within the following XML format:\n" }}
43
+ {{- '<tool_call>
44
+ <function=example_function_name>
45
+ <parameter=example_parameter_1>
46
+ value_1
47
+ </parameter>
48
+ <parameter=example_parameter_2>
49
+ This is the value for the second parameter
50
+ that can span
51
+ multiple lines
52
+ </parameter>
53
+ </function>
54
+ </tool_call><|im_end|>\n' }}
55
+ {%- endif %}
56
+
57
+ {%- else %}
58
+ {%- if messages|length > 0 and messages[0].get('role', '') == 'system' %}
59
+ {{- '<|im_start|>system\n' + visible_text(messages[0].content) + '<|im_end|>\n' }}
60
+ {%- else %}
61
+ {{- '<|im_start|>system\n你是南北阁,一款由BOSS直聘自主研发并训练的专业大语言模型。<|im_end|>\n' }}
62
+ {%- endif %}
63
+ {%- endif %}
64
+
65
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
66
+ {%- for message in messages[::-1] %}
67
+ {%- set index = (messages|length - 1) - loop.index0 %}
68
+ {%- if ns.multi_step_tool and message.get('role', '') == "user" and visible_text(message.content) is string and not(visible_text(message.content).startswith('<tool_response>') and visible_text(message.content).endswith('</tool_response>')) %}
69
+ {%- set ns.multi_step_tool = false %}
70
+ {%- set ns.last_query_index = index %}
71
+ {%- endif %}
72
+ {%- endfor %}
73
+
74
+ {%- for message in messages %}
75
+ {%- if visible_text(message.content) is string %}
76
+ {%- set content = visible_text(message.content) %}
77
+ {%- else %}
78
+ {%- set content = '' %}
79
+ {%- endif %}
80
+
81
+ {%- if message.get('role', '') == "system" %}
82
+ {%- if not loop.first %}
83
+ {{- raise_exception('System message must be at the beginning.') }}
84
+ {%- endif %}
85
+
86
+ {%- elif message.get('role', '') == "assistant" %}
87
+ {%- set reasoning_content = '' %}
88
+ {%- if message.reasoning_content is string %}
89
+ {%- set reasoning_content = message.reasoning_content %}
90
+ {%- else %}
91
+ {%- if '</think>' in content %}
92
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
93
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
94
+ {%- endif %}
95
+ {%- endif %}
96
+ {%- set reasoning_content = reasoning_content|trim %}
97
+
98
+ {%- if (preserve_thinking is defined and preserve_thinking is false) and (loop.index0 < ns.last_query_index) %}
99
+ {{- '<|im_start|>' + message.get('role', '') + '\n<think>\n\n</think>\n\n' + content }}
100
+ {%- else %}
101
+ {{- '<|im_start|>' + message.get('role', '') + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- endif %}
103
+
104
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
105
+ {%- if tool_call_format == 'json' %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if (loop.first and content) or (not loop.first) %}
108
+ {{- '\n' }}
109
+ {%- endif %}
110
+ {%- if tool_call.function %}
111
+ {%- set tool_call = tool_call.function %}
112
+ {%- endif %}
113
+ {{- '<tool_call>\n{"name": "' }}
114
+ {{- tool_call.name }}
115
+ {{- '", "arguments": ' }}
116
+ {%- if tool_call.arguments is string %}
117
+ {{- tool_call.arguments }}
118
+ {%- else %}
119
+ {{- tool_call.arguments | tojson }}
120
+ {%- endif %}
121
+ {{- '}\n</tool_call>' }}
122
+ {%- endfor %}
123
+ {%- else %}
124
+ {%- for tool_call in message.tool_calls %}
125
+ {%- if tool_call.function is defined %}
126
+ {%- set tool_call = tool_call.function %}
127
+ {%- endif %}
128
+
129
+ {%- if loop.first %}
130
+ {%- if content|trim %}
131
+ {{- '
132
+
133
+ <tool_call>
134
+ <function=' + tool_call.name + '>
135
+ ' }}
136
+ {%- else %}
137
+ {{- '<tool_call>
138
+ <function=' + tool_call.name + '>
139
+ ' }}
140
+ {%- endif %}
141
+ {%- else %}
142
+ {{- '
143
+ <tool_call>
144
+ <function=' + tool_call.name + '>
145
+ ' }}
146
+ {%- endif %}
147
+
148
+ {%- if tool_call.arguments is defined %}
149
+ {%- for args_name, args_value in tool_call.arguments|items %}
150
+ {{- '<parameter=' + args_name + '>
151
+ ' }}
152
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
153
+ {{- args_value }}
154
+ {{- '
155
+ </parameter>
156
+ ' }}
157
+ {%- endfor %}
158
+ {%- endif %}
159
+ {{- '</function>
160
+ </tool_call>' }}
161
+ {%- endfor %}
162
+ {%- endif %}
163
+ {%- endif %}
164
+ {{- '<|im_end|>\n' }}
165
+
166
+ {%- elif message.get('role', '') == "tool" %}
167
+ {%- if loop.previtem and loop.previtem.get('role', '') != "tool" %}
168
+ {{- '<|im_start|>user' }}
169
+ {%- endif %}
170
+ {{- '\n<tool_response>\n' }}
171
+ {{- content }}
172
+ {{- '\n</tool_response>' }}
173
+ {%- if loop.last or loop.nextitem.get('role', '') != "tool" %}
174
+ {{- '<|im_end|>\n' }}
175
+ {%- endif %}
176
+ {%- elif message.get('role', '') != '' %}
177
+ {{- '<|im_start|>' + message.get('role', '') + '\n' + content + '<|im_end|>' + '\n' }}
178
+ {%- endif %}
179
+ {%- endfor %}
180
+
181
+ {%- if add_generation_prompt %}
182
+ {{- '<|im_start|>assistant\n' }}
183
+
184
+ {%- if enable_thinking is defined and enable_thinking is false %}
185
+ {{- '<think>
186
+
187
+ </think>
188
+
189
+ ' }}
190
+ {%- else %}
191
+ {{- '<think>
192
+ ' }}
193
+ {%- endif %}
194
+
195
+ {%- endif %}
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/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
+ }
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d858a0fc007f22af6ae18bfa1ae52d30e398aa9cd1ea06e7777176869346a3f
3
+ size 18450979
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb41d04798b714520a9b075727b0226538b7330254299062742c50ec8374bc36
3
+ size 2782298
gpu-pipelined/nanbeige4_2_3b_decode_int8hu_block32_sym_s1/tokenizer/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": false,
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
+ }