Instructions to use nex-agi/Nex-N2-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nex-agi/Nex-N2-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nex-agi/Nex-N2-mini") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("nex-agi/Nex-N2-mini") model = AutoModelForMultimodalLM.from_pretrained("nex-agi/Nex-N2-mini", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nex-agi/Nex-N2-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nex-agi/Nex-N2-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nex-agi/Nex-N2-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nex-agi/Nex-N2-mini
- SGLang
How to use nex-agi/Nex-N2-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nex-agi/Nex-N2-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nex-agi/Nex-N2-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nex-agi/Nex-N2-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nex-agi/Nex-N2-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nex-agi/Nex-N2-mini with Docker Model Runner:
docker model run hf.co/nex-agi/Nex-N2-mini
Link model to NexForge paper and project page
Browse filesThis PR updates the model card to link it to the official paper [NexForge: Scaling Executable Agent Tasks via Requirement-First Synthesis](https://arxiv.org/abs/2607.14186) and adds links to the project page, as well as a citation section at the end of the README. This helps users understand the context and methodology behind the Nex-N2 model family and cite your work correctly.
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
-
library_name: transformers
|
| 5 |
---
|
| 6 |
|
| 7 |
<div align="center">
|
|
@@ -13,6 +13,8 @@ library_name: transformers
|
|
| 13 |
<div align="center">
|
| 14 |
π€ <a href="https://hf.co/collections/nex-agi/nex-n2"><b>Model</b></a>   |   
|
| 15 |
π <a href="https://openrouter.ai/nex-agi/Nex-N2-Pro:free"><b>OpenRouter (Enjoy two weeks free starting June 9!)</b></a>   |   
|
|
|
|
|
|
|
| 16 |
π» <a href="https://github.com/nex-agi/Nex-N2"><b>Github</b></a>   |   
|
| 17 |
π§ <a href="https://www.modelscope.cn/collections/nex-agi/Nex-N2"><b>ModelScope</b></a>   |   
|
| 18 |
π <a href="https://nex-agi.com"><b>Nex-AGI</b></a>
|
|
@@ -22,6 +24,8 @@ library_name: transformers
|
|
| 22 |
|
| 23 |
**An agentic model with Agentic Thinking.**
|
| 24 |
|
|
|
|
|
|
|
| 25 |
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.
|
| 26 |
|
| 27 |
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.
|
|
@@ -189,3 +193,19 @@ Nex-series models emit explicit reasoning traces. Add the `--reasoning-parser qw
|
|
| 189 |
```bash
|
| 190 |
python -m sglang.launch_server --model-path /path/to/your/model --tool-call-parser qwen3_coder --reasoning-parser qwen3
|
| 191 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
pipeline_tag: text-generation
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
<div align="center">
|
|
|
|
| 13 |
<div align="center">
|
| 14 |
π€ <a href="https://hf.co/collections/nex-agi/nex-n2"><b>Model</b></a>   |   
|
| 15 |
π <a href="https://openrouter.ai/nex-agi/Nex-N2-Pro:free"><b>OpenRouter (Enjoy two weeks free starting June 9!)</b></a>   |   
|
| 16 |
+
π <a href="https://arxiv.org/abs/2607.14186"><b>Paper</b></a>   |   
|
| 17 |
+
π <a href="https://nex.sii.edu.cn/"><b>Project Page</b></a>   |   
|
| 18 |
π» <a href="https://github.com/nex-agi/Nex-N2"><b>Github</b></a>   |   
|
| 19 |
π§ <a href="https://www.modelscope.cn/collections/nex-agi/Nex-N2"><b>ModelScope</b></a>   |   
|
| 20 |
π <a href="https://nex-agi.com"><b>Nex-AGI</b></a>
|
|
|
|
| 24 |
|
| 25 |
**An agentic model with Agentic Thinking.**
|
| 26 |
|
| 27 |
+
Nex-N2 is trained using data synthesized by **NexForge**, a requirement-first framework that compiles free-form capability requirements into executable agent training data. For more details on the synthesis process and evaluation results, please refer to the paper: [NexForge: Scaling Executable Agent Tasks via Requirement-First Synthesis](https://arxiv.org/abs/2607.14186).
|
| 28 |
+
|
| 29 |
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.
|
| 30 |
|
| 31 |
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.
|
|
|
|
| 193 |
```bash
|
| 194 |
python -m sglang.launch_server --model-path /path/to/your/model --tool-call-parser qwen3_coder --reasoning-parser qwen3
|
| 195 |
```
|
| 196 |
+
|
| 197 |
+
## Citation
|
| 198 |
+
|
| 199 |
+
If you find our work or the NexForge framework useful, please cite our paper:
|
| 200 |
+
|
| 201 |
+
```bibtex
|
| 202 |
+
@misc{zhao2026nexforge,
|
| 203 |
+
title={NexForge: Scaling Executable Agent Tasks via Requirement-First Synthesis},
|
| 204 |
+
author={Jiarong Zhao and Zhikai Lei and Zhiheng Xi and Rui Zheng and Hang Yan and Jie Zhou and Qin Chen and Liang He},
|
| 205 |
+
year={2026},
|
| 206 |
+
eprint={2607.14186},
|
| 207 |
+
archivePrefix={arXiv},
|
| 208 |
+
primaryClass={cs.CL},
|
| 209 |
+
url={https://arxiv.org/abs/2607.14186}
|
| 210 |
+
}
|
| 211 |
+
```
|