palmfuture commited on
Commit
3757339
·
verified ·
1 Parent(s): 1316a7d

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ 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
37
+ figures/Nex-N2-Benchmark-white.png filter=lfs diff=lfs merge=lfs -text
38
+ model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ library_name: transformers
5
+
6
+ base_model: nex-agi/Nex-N2-mini
7
+ quantized_by: palmfuture
8
+
9
+ tags:
10
+ - gptq
11
+ - int4
12
+ - moe
13
+ - qwen3.5
14
+ - gptqmodel
15
+ - quantized
16
+ ---
17
+
18
+ # Nex-N2-mini-GPTQ-Int4
19
+
20
+ GPTQ Int4 quantization of Nex-N2-mini using GPTQModel.
21
+
22
+ ## Quantization Details
23
+
24
+ - Method: GPTQ
25
+ - Bits: 4
26
+ - Group Size: 128
27
+ - Symmetric: True
28
+ - desc_act: False
29
+ - Calibration Samples: 256
30
+ - Calibration Tokens: ~124k
31
+ - Quantizer: GPTQModel 7.1.0
32
+ - Model Size: ~22 GB
33
+
34
+ ## Quantization Statistics
35
+
36
+ | Metric | Value |
37
+ |----------|----------|
38
+ | Total Modules | 30,720 |
39
+ | GPTQ Success Rate | 99.736% |
40
+ | RTN Fallback Rate | 0.264% |
41
+ | Mean Loss | 1.53e-04 |
42
+ | P95 Loss | 5.18e-04 |
43
+ | P99 Loss | 8.16e-04 |
44
+ | Max Loss | 1.96e-03 |
45
+
46
+ ## Calibration
47
+
48
+ Domain-mixed calibration set:
49
+
50
+ | Source | Samples | Purpose |
51
+ |---|---:|---|
52
+ | `allenai/c4` | 102 | General English text |
53
+ | `allenai/tulu-3-sft-mixture` | 77 | Instruction-following |
54
+ | `codeparrot/codeparrot-clean-valid` | 51 | Code generation |
55
+ | `HuggingFaceH4/MATH-500` | 26 | Mathematical reasoning |
56
+ | **Total** | **256** | `seq_len=1024`, ~124k tokens |
57
+
58
+ ## Notes
59
+
60
+ This is an unofficial community quantization by [palmfuture](https://huggingface.co/palmfuture).
61
+
62
+ All credit for the original model goes to the Nex-AI team.
63
+
64
+ ---
65
+
66
+ <div align="center">
67
+ <img src="./figures/NEX_logo.svg" width="20%"/>
68
+ </div>
69
+
70
+ ---
71
+
72
+ <div align="center">
73
+ 🤗 <a href="https://hf.co/collections/nex-agi/nex-n2"><b>Model</b></a>&nbsp&nbsp | &nbsp&nbsp
74
+ 💻 <a href="https://github.com/nex-agi/Nex-N2"><b>Github</b></a>&nbsp&nbsp | &nbsp&nbsp
75
+ 🧭 <a href="https://www.modelscope.cn/collections/nex-agi/Nex-N2"><b>ModelScope</b></a>&nbsp&nbsp | &nbsp&nbsp
76
+ 🚀 <a href="https://nex-agi.com"><b>Nex-AGI</b></a>
77
+ </div>
78
+
79
+ # Nex-N2
80
+
81
+ **An agentic model with Agentic Thinking.**
82
+
83
+ Today, we are officially releasing and open-sourcing our next-generation model, **Nex-N2** — an agent model built for real-world productivity scenarios. With first-tier coding and agentic capabilities, Nex-N2 keeps driving complex, long-horizon tasks forward in real environments to deliver stable, end-to-end results.
84
+
85
+ Over the past year, a paradigm shift led by Vibe Coding and Harness Engineering has been redefining the limits of LLM agents. From dialogue, to reasoning, to agents that execute long-horizon tasks with environmental feedback, the tasks models must handle keep growing harder, the contexts longer, and the environments more realistic. The core of next-generation model competition is no longer *whether a model can think*, but whether it can reliably and efficiently turn thinking into actions that are executable, verifiable, and iterable.
86
+
87
+ Rather than treating reasoning, tool use, and environment execution as separate capabilities, Nex-N2 unifies them through an **Agentic Thinking** framework that connects requirement understanding, task planning, code implementation, environmental feedback, evaluation and debugging, and continuous iteration into a single closed loop. The framework has two parts:
88
+
89
+ - **Adaptive Thinking** lets the model decide on its own when to think and how deeply — executing simple actions quickly while reasoning thoroughly on critical decisions.
90
+ - **Coherent Thinking** carries one consistent reasoning paradigm across general reasoning and diverse agentic tasks, staying consistent across tasks and modalities to enable stable capability transfer.
91
+
92
+ Across real agentic workflows — agentic coding, deep research, tool calling, and terminal execution — Nex-N2 reaches first-tier performance, with substantial gains over the previous-generation Nex-N1 on multiple authoritative benchmarks. In real productivity scenarios such as OpenClaw one-person-company workflows, end-to-end game development, and web and multimodal generation, it likewise demonstrates outstanding usability, robustness, and stability.
93
+
94
+ ## Open Source
95
+
96
+ In keeping with our commitment to open source, we are releasing both **Nex-N2-Pro** and **Nex-N2-mini** as open-source models starting today.
97
+
98
+ - **Nex-N2-Pro:** [Hugging Face](https://huggingface.co/nex-agi/Nex-N2-Pro) | [ModelScope](https://www.modelscope.cn/models/nex-agi/Nex-N2-Pro)
99
+ - **Nex-N2-mini:** [Hugging Face](https://huggingface.co/nex-agi/Nex-N2-mini) | [ModelScope](https://www.modelscope.cn/models/nex-agi/Nex-N2-mini)
100
+ - **Early Access:** [SiliconFlow](https://cloud.siliconflow.cn/me/models?target=nex-agi%2FNex-N2-Pro)
101
+
102
+ We welcome developers and enterprises to integrate and try Nex-N2 and share their feedback.
103
+
104
+ ## Performance
105
+
106
+ We evaluate Nex-N2 in real agentic workflows along three directions — agentic tasks, coding tasks, and general tasks — covering benchmarks across tool calling, search-based decision-making, software engineering, and terminal execution. Nex-N2-Pro delivers strong performance that keeps pace with top-tier models such as GPT-5.5 and Opus 4.7: it excels at coding (e.g., 75.3 on Terminal-Bench 2.1) and long-horizon tasks (1585 on GDPval), and shows especially strong generalization and competitiveness on newer benchmarks like SWE-Atlas and DeepSWE. On general capability and core reasoning, it stands on par with leading frontier models.
107
+
108
+ ![Nex-N2 Benchmark Overview](./figures/Nex-N2-Benchmark-white.png)
109
+
110
+ Nex-N2 ships in two variants, both post-trained on the Qwen3.5 series: **Nex-N2-Pro** (built on `Qwen3.5-397B-A17B`) and **Nex-N2-mini** (built on `Qwen3.5-35B-A3B-Base`), covering different latency and quality trade-offs. The table below reports their scores alongside leading proprietary and open models across our full evaluation suite.
111
+
112
+ | Benchmark | **Nex-N2-mini** | **Nex-N2-Pro** | GPT-5.5 | Opus 4.7 | Kimi-K2.6 | GLM-5.1 | MiniMax M3 | DeepSeek-V4-Pro |
113
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
114
+ | **Agent** | | | | | | | | |
115
+ | BrowseComp | 74.1 | 83.7 | 84.4 | 79.8 | 83.2 | 79.3 | 83.5 | 83.4 |
116
+ | GDPval | 1402 | 1585 | 1769 | 1753 | 1481 | 1535 | - | 1554 |
117
+ | Toolathlon | 33.3 | 51.9 | 55.6 | 52.8 | 50.0 | 40.7 | - | 51.8 |
118
+ | WildClawBench | 47.7 | 53.5 | 58.2 | 62.2 | - | 48.2 | - | 43.7 |
119
+ | WideSearch | 62.0 | 75.6 | - | - | 80.8 | - | - | - |
120
+ | TAU3 | 65.9 | 71.1 | - | - | - | 70.6 | - | - |
121
+ | **Coding & SWE** | | | | | | | | |
122
+ | SWE-Bench Pro | 50.2 | 58.8 | 58.6 | 64.3 | 58.6 | 58.4 | 59.0 | 55.4 |
123
+ | Terminal-Bench 2.1 | 60.7 | 75.3 | 83.4 | 69.7 | - | 58.7 | 66.0 | 72.0 |
124
+ | DeepSWE | 8.0 | 33.6 | 70 | 54 | 24 | 18 | - | 8 |
125
+ | SWE-Bench Verified | 74.4 | 80.8 | 82.9 | 87.6 | 80.2 | - | 80.5 | 80.6 |
126
+ | SWE Atlas QnA | 31.5 | 37.9 | 45.4 | 45.2 | - | - | 37.9 | - |
127
+ | SWE Atlas RF | 30.0 | 32.9 | 44.8 | 48.6 | - | - | - | - |
128
+ | SWE Atlas TW | 23.3 | 40.0 | 42.6 | 38.2 | - | - | 30.8 | - |
129
+ | **General & Reasoning** | | | | | | | | |
130
+ | GPQA Diamond | 82.6 | 90.7 | 93.6 | 94.2 | 90.5 | 86.2 | - | 90.1 |
131
+ | IFEval | 89.1 | 94.0 | - | - | 94.5 | 94.5 | - | 91.9 |
132
+ | Apex | 9.4 | 36.5 | - | - | 24.0 | 11.5 | - | 38.3 |
133
+
134
+ ## Usage
135
+
136
+ ### Local Deployment
137
+
138
+ > **Note:** For the best performance with Nex-series models, we recommend serving them with our customized `sglang` fork.
139
+
140
+ First, install our `sglang` fork:
141
+
142
+ ```bash
143
+ # Use the customized `sglang` fork
144
+ git clone https://github.com/nex-agi/sglang.git
145
+ cd sglang
146
+
147
+ # Install the python packages
148
+ pip install --upgrade pip
149
+ pip install -e "python"
150
+ ```
151
+
152
+ #### Nex-N2-Pro
153
+
154
+ Launch the server (example on two 8× H100 servers with CUDA 13.0):
155
+
156
+ ```bash
157
+ # Multi-node (2 nodes). Run the same command on every node with:
158
+ # <node-rank> = 0 on the head node, 1 on the other node
159
+ # <node0-ip> = IP of the head node (reachable from all others)
160
+ python -m sglang.launch_server \
161
+ --model-path /path/to/your/model \
162
+ --tp 16 \
163
+ --nnodes 2 \
164
+ --node-rank <node-rank> \
165
+ --dist-init-addr <node0-ip>:20000 \
166
+ --reasoning-parser qwen3 \
167
+ --tool-call-parser qwen3_coder \
168
+ --mamba-scheduler-strategy extra_buffer
169
+ ```
170
+
171
+ #### Nex-N2-mini
172
+
173
+ Launch the server (example on one 2× H100 server with CUDA 13.0):
174
+
175
+ ```bash
176
+ python -m sglang.launch_server \
177
+ --model-path /path/to/your/model \
178
+ --tp 2 \
179
+ --reasoning-parser qwen3 \
180
+ --tool-call-parser qwen3_coder \
181
+ --mamba-scheduler-strategy extra_buffer
182
+ ```
183
+
184
+ ### Docker Deployment
185
+
186
+ We also provide a prebuilt Docker image with our customized `sglang` fork preinstalled: **`nexagi/sglang:v0.5.12`**. The launch command is the same as above.
187
+
188
+ #### Nex-N2-Pro
189
+
190
+ ```bash
191
+ # Multi-node (2 nodes). Run the same command on every node with:
192
+ # <node-rank> = 0 on the head node, 1 on the other node
193
+ # <node0-ip> = IP of the head node (reachable from all others)
194
+ docker run --gpus all --shm-size 32g --network host \
195
+ -v /path/to/your/model:/model \
196
+ nexagi/sglang:v0.5.12 \
197
+ python3 -m sglang.launch_server \
198
+ --model-path /model \
199
+ --tp 16 \
200
+ --nnodes 2 \
201
+ --node-rank <node-rank> \
202
+ --dist-init-addr <node0-ip>:20000 \
203
+ --host 0.0.0.0 --port 30000 \
204
+ --reasoning-parser qwen3 \
205
+ --tool-call-parser qwen3_coder \
206
+ --mamba-scheduler-strategy extra_buffer
207
+ ```
208
+
209
+ #### Nex-N2-mini
210
+
211
+ Single node with 2× H100:
212
+
213
+ ```bash
214
+ docker run --gpus all --shm-size 32g --ipc=host \
215
+ -p 30000:30000 \
216
+ -v /path/to/your/model:/model \
217
+ nexagi/sglang:v0.5.12 \
218
+ python3 -m sglang.launch_server \
219
+ --model-path /model \
220
+ --tp 2 \
221
+ --host 0.0.0.0 --port 30000 \
222
+ --reasoning-parser qwen3 \
223
+ --tool-call-parser qwen3_coder \
224
+ --mamba-scheduler-strategy extra_buffer
225
+ ```
226
+
227
+ ### Recommended Sampling Parameters
228
+
229
+ For the best generation quality, we recommend the following sampling parameters:
230
+
231
+ - `temperature`: 0.7
232
+ - `top_p`: 0.95
233
+ - `top_k`: 40
234
+
235
+ ### Function Calling
236
+
237
+ Nex-series models support robust function-calling capabilities. To enable function calling, add the `--tool-call-parser qwen3_coder` flag when launching the server:
238
+
239
+ ```bash
240
+ python -m sglang.launch_server --model-path /path/to/your/model --tool-call-parser qwen3_coder
241
+ ```
242
+
243
+ ### Reasoning Parser
244
+
245
+ Nex-series models emit explicit reasoning traces. Add the `--reasoning-parser qwen3` flag to parse the reasoning content separately from the final response. It can be combined with the function-calling parser above:
246
+
247
+ ```bash
248
+ python -m sglang.launch_server --model-path /path/to/your/model --tool-call-parser qwen3_coder --reasoning-parser qwen3
249
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if reasoning_content %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>' }}
153
+ {%- endif %}
154
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5MoeForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "hidden_size": 2048,
7
+ "image_token_id": 248056,
8
+ "model_type": "qwen3_5_moe",
9
+ "quantization_config": {
10
+ "bits": 4,
11
+ "checkpoint_format": "gptq",
12
+ "desc_act": false,
13
+ "dynamic": {
14
+ "-:.*attn.*": {},
15
+ "-:.*mlp\\.gate$": {},
16
+ "-:.*mtp.*": {},
17
+ "-:.*shared_expert.*": {},
18
+ "-:.*vision.*": {},
19
+ "-:.*visual.*": {},
20
+ "lm_head": {},
21
+ "model.language_model.embed_tokens": {},
22
+ "model.lm_head": {}
23
+ },
24
+ "format": "gptq",
25
+ "group_size": 128,
26
+ "lm_head": false,
27
+ "meta": {
28
+ "act_group_aware": true,
29
+ "auto_forward_data_parallel": true,
30
+ "damp_auto_increment": 0.01,
31
+ "damp_percent": 0.05,
32
+ "dense_vram_strategy": "exclusive",
33
+ "dense_vram_strategy_devices": null,
34
+ "fallback": {
35
+ "smooth": null,
36
+ "strategy": "rtn",
37
+ "threshold": "0.5%"
38
+ },
39
+ "foem": null,
40
+ "gc_mode": "interval",
41
+ "gptaq": null,
42
+ "hessian": {
43
+ "chunk_bytes": null,
44
+ "chunk_size": null,
45
+ "staging_dtype": "float32"
46
+ },
47
+ "mock_quantization": false,
48
+ "moe_vram_strategy": "exclusive",
49
+ "moe_vram_strategy_devices": null,
50
+ "mse": 0.0,
51
+ "offload_to_disk": true,
52
+ "offload_to_disk_path": "/tmp/gptqmodel_7ct0h3d0",
53
+ "pack_impl": "cpu",
54
+ "quantizer": [
55
+ "gptqmodel:7.1.0"
56
+ ],
57
+ "static_groups": false,
58
+ "true_sequential": true,
59
+ "uri": "https://github.com/modelcloud/gptqmodel",
60
+ "wait_for_submodule_finalizers": false
61
+ },
62
+ "method": "gptq",
63
+ "pack_dtype": "int32",
64
+ "quant_method": "gptq",
65
+ "sym": true
66
+ },
67
+ "rope_parameters": {
68
+ "rope_theta": 10000.0,
69
+ "rope_type": "default"
70
+ },
71
+ "text_config": {
72
+ "attention_bias": false,
73
+ "attention_dropout": 0.0,
74
+ "attn_output_gate": true,
75
+ "bos_token_id": null,
76
+ "dtype": "bfloat16",
77
+ "eos_token_id": 248044,
78
+ "full_attention_interval": 4,
79
+ "head_dim": 256,
80
+ "hidden_act": "silu",
81
+ "hidden_size": 2048,
82
+ "initializer_range": 0.02,
83
+ "layer_types": [
84
+ "linear_attention",
85
+ "linear_attention",
86
+ "linear_attention",
87
+ "full_attention",
88
+ "linear_attention",
89
+ "linear_attention",
90
+ "linear_attention",
91
+ "full_attention",
92
+ "linear_attention",
93
+ "linear_attention",
94
+ "linear_attention",
95
+ "full_attention",
96
+ "linear_attention",
97
+ "linear_attention",
98
+ "linear_attention",
99
+ "full_attention",
100
+ "linear_attention",
101
+ "linear_attention",
102
+ "linear_attention",
103
+ "full_attention",
104
+ "linear_attention",
105
+ "linear_attention",
106
+ "linear_attention",
107
+ "full_attention",
108
+ "linear_attention",
109
+ "linear_attention",
110
+ "linear_attention",
111
+ "full_attention",
112
+ "linear_attention",
113
+ "linear_attention",
114
+ "linear_attention",
115
+ "full_attention",
116
+ "linear_attention",
117
+ "linear_attention",
118
+ "linear_attention",
119
+ "full_attention",
120
+ "linear_attention",
121
+ "linear_attention",
122
+ "linear_attention",
123
+ "full_attention"
124
+ ],
125
+ "linear_conv_kernel_dim": 4,
126
+ "linear_key_head_dim": 128,
127
+ "linear_num_key_heads": 16,
128
+ "linear_num_value_heads": 32,
129
+ "linear_value_head_dim": 128,
130
+ "mamba_ssm_dtype": "float32",
131
+ "max_position_embeddings": 262144,
132
+ "mlp_only_layers": [],
133
+ "model_type": "qwen3_5_moe_text",
134
+ "moe_intermediate_size": 512,
135
+ "mtp_num_hidden_layers": 1,
136
+ "mtp_use_dedicated_embeddings": false,
137
+ "num_attention_heads": 16,
138
+ "num_experts": 256,
139
+ "num_experts_per_tok": 8,
140
+ "num_hidden_layers": 40,
141
+ "num_key_value_heads": 2,
142
+ "output_router_logits": false,
143
+ "pad_token_id": 248044,
144
+ "partial_rotary_factor": 0.25,
145
+ "rms_norm_eps": 1e-06,
146
+ "rope_parameters": {
147
+ "mrope_interleaved": true,
148
+ "mrope_section": [
149
+ 11,
150
+ 11,
151
+ 10
152
+ ],
153
+ "partial_rotary_factor": 0.25,
154
+ "rope_theta": 10000000,
155
+ "rope_type": "default"
156
+ },
157
+ "router_aux_loss_coef": 0.001,
158
+ "shared_expert_intermediate_size": 512,
159
+ "tie_word_embeddings": false,
160
+ "use_cache": true,
161
+ "vocab_size": 248320
162
+ },
163
+ "tie_word_embeddings": false,
164
+ "transformers_version": "5.10.2",
165
+ "use_cache": false,
166
+ "video_token_id": 248057,
167
+ "vision_config": {
168
+ "deepstack_visual_indexes": [],
169
+ "depth": 27,
170
+ "dtype": "bfloat16",
171
+ "hidden_act": "gelu_pytorch_tanh",
172
+ "hidden_size": 1152,
173
+ "in_channels": 3,
174
+ "initializer_range": 0.02,
175
+ "intermediate_size": 4304,
176
+ "model_type": "qwen3_5_moe_vision",
177
+ "num_heads": 16,
178
+ "num_position_embeddings": 2304,
179
+ "out_hidden_size": 2048,
180
+ "patch_size": 16,
181
+ "spatial_merge_size": 2,
182
+ "temporal_patch_size": 2
183
+ },
184
+ "vision_end_token_id": 248054,
185
+ "vision_start_token_id": 248053
186
+ }
figures/NEX_logo.svg ADDED
figures/Nex-N2-Benchmark-white.png ADDED

Git LFS Details

  • SHA256: 3fba33987e529cc9fffe491128389f7c162bab9b6cc0199cdab60c3c349a0a93
  • Pointer size: 131 Bytes
  • Size of remote file: 590 kB
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "do_sample": true,
4
+ "eos_token_id": 248044,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "transformers_version": "5.10.2",
8
+ "use_cache": true
9
+ }
model-00001-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70437bfbe9e018bd9e69538033214041b6c1665c1f419cc434f17836914ee04e
3
+ size 4291974936
model-00002-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6463268cda07b1e9c6a2b35dd5081df6f81e1b9d57ae1ef56e148d37b71f0468
3
+ size 4297721744
model-00003-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f771678087a6cfe3b56b72c163a1b70cbdb8f258b8efaf0594c15ac13cd765c7
3
+ size 4299157440
model-00004-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4491c61b7890a95bb379a747b51f5a7245cfaea7c2b91266cac76e5d74e07d88
3
+ size 4299149176
model-00005-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5206f0f2359256923ccfc6e367ba118690f91742b6332e012e8b3a2ed9dbdcf4
3
+ size 4299142712
model-00006-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8de28582ce1a84127340f51b766e2370073ea53df978a0353e1c1988fd117c77
3
+ size 1243499560
model.safetensors.index.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:483170bd31d6eebd8e322b1742dfe0435791105bff74846a8f158201037b1f56
3
+ size 13071821
processor_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "Qwen2VLImageProcessor",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "merge_size": 2,
20
+ "patch_size": 16,
21
+ "resample": 3,
22
+ "rescale_factor": 0.00392156862745098,
23
+ "size": {
24
+ "longest_edge": 16777216,
25
+ "shortest_edge": 65536
26
+ },
27
+ "temporal_patch_size": 2
28
+ },
29
+ "processor_class": "Qwen3VLProcessor",
30
+ "video_processor": {
31
+ "data_format": "channels_first",
32
+ "default_to_square": true,
33
+ "do_convert_rgb": true,
34
+ "do_normalize": true,
35
+ "do_rescale": true,
36
+ "do_resize": true,
37
+ "do_sample_frames": true,
38
+ "fps": 2,
39
+ "image_mean": [
40
+ 0.5,
41
+ 0.5,
42
+ 0.5
43
+ ],
44
+ "image_std": [
45
+ 0.5,
46
+ 0.5,
47
+ 0.5
48
+ ],
49
+ "max_frames": 768,
50
+ "merge_size": 2,
51
+ "min_frames": 4,
52
+ "patch_size": 16,
53
+ "resample": 3,
54
+ "rescale_factor": 0.00392156862745098,
55
+ "return_metadata": false,
56
+ "size": {
57
+ "longest_edge": 234881024,
58
+ "shortest_edge": 4096
59
+ },
60
+ "temporal_patch_size": 2,
61
+ "video_processor_type": "Qwen3VLVideoProcessor"
62
+ }
63
+ }
quant_log.csv ADDED
The diff for this file is too large to render. See raw diff
 
quantize_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "dynamic": {
4
+ "-:.*visual.*": {},
5
+ "-:.*vision.*": {},
6
+ "-:.*attn.*": {},
7
+ "-:.*shared_expert.*": {},
8
+ "-:.*mtp.*": {},
9
+ "-:.*mlp\\.gate$": {},
10
+ "lm_head": {},
11
+ "model.lm_head": {},
12
+ "model.language_model.embed_tokens": {}
13
+ },
14
+ "group_size": 128,
15
+ "desc_act": false,
16
+ "lm_head": false,
17
+ "method": "gptq",
18
+ "quant_method": "gptq",
19
+ "format": "gptq",
20
+ "checkpoint_format": "gptq",
21
+ "pack_dtype": "int32",
22
+ "meta": {
23
+ "quantizer": [
24
+ "gptqmodel:7.1.0"
25
+ ],
26
+ "uri": "https://github.com/modelcloud/gptqmodel",
27
+ "damp_percent": 0.05,
28
+ "damp_auto_increment": 0.01,
29
+ "static_groups": false,
30
+ "true_sequential": true,
31
+ "mse": 0.0,
32
+ "gptaq": null,
33
+ "foem": null,
34
+ "act_group_aware": true,
35
+ "fallback": {
36
+ "strategy": "rtn",
37
+ "threshold": "0.5%",
38
+ "smooth": null
39
+ },
40
+ "offload_to_disk": true,
41
+ "offload_to_disk_path": "/tmp/gptqmodel_7ct0h3d0",
42
+ "pack_impl": "cpu",
43
+ "gc_mode": "interval",
44
+ "wait_for_submodule_finalizers": false,
45
+ "auto_forward_data_parallel": true,
46
+ "dense_vram_strategy": "exclusive",
47
+ "dense_vram_strategy_devices": null,
48
+ "moe_vram_strategy": "exclusive",
49
+ "moe_vram_strategy_devices": null,
50
+ "mock_quantization": false,
51
+ "hessian": {
52
+ "chunk_size": null,
53
+ "chunk_bytes": null,
54
+ "staging_dtype": "float32"
55
+ }
56
+ },
57
+ "sym": true
58
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4
3
+ size 19989343
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": true,
13
+ "local_files_only": false,
14
+ "model_max_length": 262144,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
+ "processor_class": "Qwen3VLProcessor",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "TokenizersBackendFast",
29
+ "unk_token": null,
30
+ "video_token": "<|video_pad|>",
31
+ "vision_bos_token": "<|vision_start|>",
32
+ "vision_eos_token": "<|vision_end|>",
33
+ "_commit_hash": null
34
+ }