---
title: Nex-N2.5-mini-oQ4
canonical_url: "https://www.modelscope.cn/models/mlx-community/Nex-N2.5-mini-oQ4"
md_url: "https://www.modelscope.cn/models/mlx-community/Nex-N2.5-mini-oQ4.md"
repository: mlx-community/Nex-N2.5-mini-oQ4
last_updated: 2026-09-11
license: apache-2.0
model_type:
  - qwen3_5_moe
architectures:
  - Qwen3_5MoeForConditionalGeneration
base_model:
  - nex-agi/Nex-N2.5-mini
base_model_relation: quantized
parameters: 5.6B
tensor_type:
  - U32
  - BF16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 22
stars: 0
tags:
  - mlx
  - apple-silicon
  - text-generation
  - oq
  - oQ4
  - moe
---

# Nex-N2.5-mini-oQ4

> Nex-N2.5-mini-oQ4 - mlx-community 在 ModelScope 开源的模型。Nex-N2.5-mini oQ4 (MLX)

mlx-community/Nex-N2.5-mini-oQ4 是 ModelScope 魔搭社区上的 5.6B 参数机器学习模型，采用 apache-2.0 许可，基于 nex-agi/Nex-N2.5-mini 构建。

- **Repository**: mlx-community/Nex-N2.5-mini-oQ4
- **License**: apache-2.0
- **Parameters**: 5.6B
- **Base model**: nex-agi/Nex-N2.5-mini
- **Tags**: mlx, apple-silicon, text-generation, oq, oQ4, moe
- **Downloads**: 22
- **Stars**: 0
- **Last updated**: 2026-09-11

Source: https://www.modelscope.cn/models/mlx-community/Nex-N2.5-mini-oQ4

---

# Nex-N2.5-mini oQ4 (MLX)

oQ4 (streaming) MLX conversion of [nex-agi/Nex-N2.5-mini](https://huggingface.co/nex-agi/Nex-N2.5-mini), a 35B-parameter Mixture-of-Exerts (MoE) agentic model with 3B active parameters.

**Upstream model:** [Nex-N2.5-mini](https://huggingface.co/nex-agi/Nex-N2.5-mini) by [Nex-AGI](https://nex-agi.com/) (Shanghai Innovation Institute), released under Apache 2.0.

**Conversion:** Quantized to MLX format using [Hermes Agent](https://hermes-agent.nousresearch.com) with `oMLX` (streaming oQ4). Sensitivity-driven mixed-precision with per-layer bit allocation.

## Architecture

| Property | Value |
|----------|-------|
| Type | Qwen3.5 MoE (Hybrid Attention) |
| Total params | 35B |
| Active params | 3B (8 routed + 1 shared expert) |
| Layers | 40 |
| Experts | 256 |
| Context length | 262K tokens |
| Hidden size | 2048 |

## Quickstart

```bash
pip install -U mlx-lm

# Generate
python3 -m mlx_lm.generate \
  --model hermitdave/Nex-N2.5-mini-oQ4 \
  --prompt "Explain why long-context evaluation is difficult." \
  --max-tokens 512 --temp 1.0 --top-p 0.95

# Chat (with reasoning)
python3 -m mlx_lm.chat --model hermitdave/Nex-N2.5-mini-oQ4
```

### Via OpenAI-compatible server

```bash
omlx serve hermitdave/Nex-N2.5-mini-oQ4 --port 8000
```

```python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
response = client.chat.completions.create(
    model="hermitdave/Nex-N2.5-mini-oQ4",
    messages=[{"role": "user", "content": "Explain quantum entanglement."}],
    extra_body={"chat_template_kwargs": {"reasoning_effort": "high"}},
)
print("Reasoning:", getattr(response.choices[0].message, "reasoning_content", None))
print("Answer:", response.choices[0].message.content)
```

## Reasoning Modes

Use `reasoning_effort` to control thinking behavior:

| `reasoning_effort` | Mode | Behavior |
|--------------------|------|----------|
| `"none"` | Non-thinking | Respond directly without reasoning trace |
| `"medium"` (default) | Adaptive thinking | Model decides whether/how much to think |
| `"high"` | Thinking | Always enable thinking before responding |

## Conversion Details

- **Method:** oQ4 (streaming) via oMLX
- **Bits-per-weight:** ~4.6 (mixed precision, sensitivity-driven)
- **Router protection:** MoE router gates preserved at 8-bit
- **lm_head:** 8-bit
- **Output size:** 19 GB (27% of bf16 source)
- **Validated:** ✅ Smoke test passed (coherent generation, EOS functional)

## Performance

### Upstream Benchmarks (Nex-N2.5-mini, bf16)

| Benchmark | Score |
|-----------|-------|
| Terminal-Bench 2.1 | 73.4 |
| SWE-Bench Pro | 43.8 |
| AutomationBench v1.0.6 | 32.3 |
| Toolathlon Verified | 54.6 |
| BrowseComp | 83.4 |
| OSWorld-Verified | 71.2 |
| WebArena-Verified | 63.4 |

See [Nex-N2.5 announcement](https://nex.sii.edu.cn/) for full evaluation details.

## Deployment

- **Minimum RAM:** 24 GB (for 19 GB model + inference overhead)
- **Recommended:** Apple Silicon M1 Max or better
- **Context:** 262K tokens native, extensible to 1M

## Known Limitations

- **MTP disabled:** Source config claims MTP (`mtp_num_hidden_layers: 1`) but checkpoint has no `mtp.*` weights — speculative decoding via MTP unavailable
- **Hybrid attention:** Fine generation speed, slower long-context prefill (recurrent state layers)

## License

Apache 2.0 (same as upstream). See [Nex-N2.5 license](https://huggingface.co/nex-agi/Nex-N2.5-mini).
