Text Generation
Transformers
Safetensors
qwen3_5_moe
image-text-to-text
conversational
Eval Results
compressed-tensors
Instructions to use nex-agi/Nex-N2.5-Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nex-agi/Nex-N2.5-Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nex-agi/Nex-N2.5-Pro") 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.5-Pro") model = AutoModelForMultimodalLM.from_pretrained("nex-agi/Nex-N2.5-Pro", 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.5-Pro 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.5-Pro" # 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.5-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nex-agi/Nex-N2.5-Pro
- SGLang
How to use nex-agi/Nex-N2.5-Pro 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.5-Pro" \ --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.5-Pro", "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.5-Pro" \ --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.5-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nex-agi/Nex-N2.5-Pro with Docker Model Runner:
docker model run hf.co/nex-agi/Nex-N2.5-Pro
Model card: sync github.com/nex-agi/Nex-N2.5 @ 0e5ba9c (HF collection link, Thinking Control section)
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ library_name: transformers
|
|
| 12 |
<div align="center">
|
| 13 |
<p>
|
| 14 |
💻 <a href="https://github.com/nex-agi/Nex-N2.5">GitHub</a> ·
|
| 15 |
-
🤗 <a href="https://huggingface.co/nex-agi/
|
| 16 |
🌐 <a href="https://nex-agi.com/">Website</a> ·
|
| 17 |
🔀 <a href="https://openrouter.ai/nex-agi/nex-n2.5-pro">OpenRouter (Pro)</a>
|
| 18 |
</p>
|
|
@@ -46,7 +46,7 @@ Model weights for the Nex-N2.5 family will be released as open source, alongside
|
|
| 46 |
- **Nex-N2.5-Pro:** [Hugging Face](https://huggingface.co/nex-agi/Nex-N2.5-Pro) | [ModelScope](https://modelscope.cn/models/nex-agi/Nex-N2.5-Pro)
|
| 47 |
- **Nex-N2.5-mini:** [Hugging Face](https://huggingface.co/nex-agi/Nex-N2.5-mini) | [ModelScope](https://modelscope.cn/models/nex-agi/Nex-N2.5-mini)
|
| 48 |
- **Hosted Access:** [OpenRouter (Nex-N2.5-Pro)](https://openrouter.ai/nex-agi/nex-n2.5-pro)
|
| 49 |
-
- **Websites:** [Global](https://nex-agi.com/)
|
| 50 |
|
| 51 |
We welcome developers and enterprises to integrate and try Nex-N2.5 and share their feedback.
|
| 52 |
|
|
@@ -258,3 +258,23 @@ Nex-series models emit explicit reasoning traces. Add the `--reasoning-parser qw
|
|
| 258 |
```bash
|
| 259 |
python -m sglang.launch_server --model-path /path/to/your/model --tool-call-parser qwen3_coder --reasoning-parser qwen3
|
| 260 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
<div align="center">
|
| 13 |
<p>
|
| 14 |
💻 <a href="https://github.com/nex-agi/Nex-N2.5">GitHub</a> ·
|
| 15 |
+
🤗 <a href="https://huggingface.co/collections/nex-agi/nex-n25">Hugging Face</a> ·
|
| 16 |
🌐 <a href="https://nex-agi.com/">Website</a> ·
|
| 17 |
🔀 <a href="https://openrouter.ai/nex-agi/nex-n2.5-pro">OpenRouter (Pro)</a>
|
| 18 |
</p>
|
|
|
|
| 46 |
- **Nex-N2.5-Pro:** [Hugging Face](https://huggingface.co/nex-agi/Nex-N2.5-Pro) | [ModelScope](https://modelscope.cn/models/nex-agi/Nex-N2.5-Pro)
|
| 47 |
- **Nex-N2.5-mini:** [Hugging Face](https://huggingface.co/nex-agi/Nex-N2.5-mini) | [ModelScope](https://modelscope.cn/models/nex-agi/Nex-N2.5-mini)
|
| 48 |
- **Hosted Access:** [OpenRouter (Nex-N2.5-Pro)](https://openrouter.ai/nex-agi/nex-n2.5-pro)
|
| 49 |
+
- **Websites:** [Global](https://nex-agi.com/)
|
| 50 |
|
| 51 |
We welcome developers and enterprises to integrate and try Nex-N2.5 and share their feedback.
|
| 52 |
|
|
|
|
| 258 |
```bash
|
| 259 |
python -m sglang.launch_server --model-path /path/to/your/model --tool-call-parser qwen3_coder --reasoning-parser qwen3
|
| 260 |
```
|
| 261 |
+
|
| 262 |
+
### Thinking Control
|
| 263 |
+
|
| 264 |
+
Nex-N2.5 models support three thinking modes, selected per request with the OpenAI-compatible `reasoning_effort` field:
|
| 265 |
+
|
| 266 |
+
| `reasoning_effort` | Mode | Behavior |
|
| 267 |
+
|---|---|---|
|
| 268 |
+
| `"none"` | Thinking off | The model answers directly, without a reasoning trace. |
|
| 269 |
+
| `"medium"` (default) | Adaptive thinking | The model decides per request whether, and how much, to reason. |
|
| 270 |
+
| `"high"` | Thinking on | The model always produces a full reasoning trace before answering. |
|
| 271 |
+
|
| 272 |
+
```bash
|
| 273 |
+
curl http://localhost:30000/v1/chat/completions \
|
| 274 |
+
-H "Content-Type: application/json" \
|
| 275 |
+
-d '{
|
| 276 |
+
"model": "nex-agi/Nex-N2.5-Pro",
|
| 277 |
+
"messages": [{"role": "user", "content": "How many prime numbers are there below 100?"}],
|
| 278 |
+
"reasoning_effort": "high"
|
| 279 |
+
}'
|
| 280 |
+
```
|