Alibaba Qwen · Open-Weight · Apache 2.0
Qwen3-Coder-Next: The Best Self-Hostable Coding Model
Qwen3-Coder-Next is Alibaba Qwen's open-weight coding model for agents and local development. 80 billion total parameters, only 3 billion active per token (MoE), 256K-token context, 70.6% on SWE-Bench Verified in its own technical report, and Apache 2.0 licensed for commercial use. The 52 GB Q4 build runs on a single 80 GB GPU, 2× RTX 5090 or a 64 GB+ Mac. It is the realistic local alternative to a hosted Claude model in Cursor, without sending your code to a third party.
Why this matters: in Qwen's technical report, Qwen3-Coder-Next scores 70.6% on SWE-Bench Verified with SWE-Agent, against 76.0% for Claude Sonnet 4.5 and 70.2% for DeepSeek-V3.2 (671B) in the same harness, while running only 3B parameters per token. For routine work that gap is small enough to matter less than privacy, cost and offline operation.
Key takeaways
- →80B/3B active MoE — only 3B parameters run per token, so it generates much faster than a dense model of the same size; all 52 GB (Q4) still has to fit in memory.
- →256K context — fits most repositories, full PR diffs, and long API specs.
- →70.6% SWE-Bench Verified (SWE-Agent, Qwen technical report) — with only 3B parameters active per token, in a 52 GB Q4 build.
- →Apache 2.0 — unlimited commercial use, no royalties.
- →Drop-in for Cursor / Aider / Continue — OpenAI-compatible API via Ollama or vLLM.
Quick verdict
Qwen3-Coder-Next is the right starting point for any developer who wants serious local AI coding without sending code to a third party. It runs on a single 80 GB GPU (or 2× consumer RTX 5090), sits a few points below Anthropic's 2025 Sonnet and Opus models on the SWE-Bench scaffolds in its technical report, and costs nothing per token after the hardware investment.
Where it loses: hardest reasoning, novel algorithms, multi-file refactors with deep dependencies. For those, you keep a Claude or GPT API account on standby and route the hardest tasks there. What that saves depends on how much of your work is routine.
Specs at a glance
| Vendor | Alibaba Qwen team |
| Architecture | Hybrid Gated DeltaNet + Gated Attention, Mixture-of-Experts (512 experts, 10 routed + 1 shared active) |
| Total parameters | 80 billion |
| Active parameters | 3 billion per token |
| Context window | 262,144 tokens (256K) native |
| Mode | Non-thinking only (no <think> blocks) |
| License | Apache 2.0 |
| SWE-Bench Verified | 70.6% (SWE-Agent), 71.3% (OpenHands), per the technical report |
| Storage (BF16) | ~160 GB |
| Storage (Q4_K_M) | 52 GB (Ollama qwen3-coder-next:latest) |
| Storage (Q8_0) | 85 GB (Ollama qwen3-coder-next:q8_0) |
| Hugging Face | Qwen/Qwen3-Coder-Next |
Hardware requirements
| Hardware | Quantization | Memory headroom | Notes |
|---|---|---|---|
| 2× RTX 5090 (32GB each) | Q4_K_M (52 GB) | 64 GB VRAM, ~12 GB left for KV cache | Sweet spot for a consumer build |
| 1× H100 80GB | Q4_K_M (52 GB) | ~28 GB left for KV cache; Q8_0 (85 GB) does not fit | Best single-GPU; cleanest deployment |
| 1× M3 Ultra (96GB unified) | Q4_K_M (52 GB) | Comfortable; Q8_0 (85 GB) is tight once macOS takes its share | Apple Silicon; quiet, no cooling needed |
| 2× RTX 4090 (24GB each) | Q4_K_M (52 GB) | 48 GB VRAM is less than the 52 GB file | Part of the model spills to system RAM, so it runs well below full-GPU speed |
| 1× B200 180GB | BF16 (~160 GB) | ~20 GB left for KV cache | Production multi-user serving |
| CPU-only (Threadripper/EPYC + 256GB RAM) | Q4_K_M (52 GB) | Fits easily in RAM | Possible but slow; not for interactive use |
Sizes from the Ollama library (read November 2, 2026). We give no tokens-per-second figures here: this is a Mixture-of-Experts model, and a memory-bandwidth ceiling does not describe MoE generation speed well. Ollama has no Q5 or Q6 build of this model; the GGUF repository on Hugging Face has more quantizations if you need a size between 52 and 85 GB.
Local setup
Ollama (10-minute install)
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull Qwen3-Coder-Next at Q4_K_M (52 GB download; qwen3-coder-next:q8_0 is 85 GB)
ollama pull qwen3-coder-next
# Test it interactively
ollama run qwen3-coder-next "Write a Python function that detects palindromes"
# Or expose it as an OpenAI-compatible API
ollama serve # listens on :11434vLLM (production / multi-user)
pip install vllm
# Serve Qwen's FP8 weights (~80 GB) on 2× H100 80GB, 256K context, OpenAI-compatible.
# The BF16 weights (~160 GB) do not fit a single 80 GB GPU.
python -m vllm.entrypoints.openai.api_server \
--model Qwen/Qwen3-Coder-Next-FP8 \
--tensor-parallel-size 2 \
--max-model-len 262144 \
--gpu-memory-utilization 0.92 \
--port 8000
# Test from any OpenAI client:
# openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
# completion(model="Qwen/Qwen3-Coder-Next-FP8", messages=[...])llama.cpp (max control)
# Build with CUDA
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build -DGGML_CUDA=ON && cmake --build build --config Release -j
# Download the official GGUF
huggingface-cli download Qwen/Qwen3-Coder-Next-GGUF \
--include "Qwen3-Coder-Next-Q4_K_M/*" --local-dir models
# Serve (point at the first shard; llama.cpp loads the rest)
./build/bin/llama-server -m models/Qwen3-Coder-Next-Q4_K_M/Qwen3-Coder-Next-Q4_K_M-00001-of-00004.gguf \
-ngl 99 -c 65536 --host 0.0.0.0 --port 8080Cursor / Continue / Aider integration
Once Ollama or vLLM is serving on :11434 or :8000, you can use Qwen3-Coder-Next inside any major AI coding tool. The trick: every tool supports an “OpenAI-compatible custom endpoint”.
Cursor
Settings → Models → “OpenAI API Key” section → enable “Override OpenAI Base URL”.
Base URL: http://localhost:11434/v1
API Key: dummy
Model name: qwen3-coder-nextCursor sends custom-model requests from its own servers, so a plain localhost URL may not be reachable. If the model does not answer, expose the endpoint through a tunnel such as ngrok and use that URL instead.
Continue.dev
Edit ~/.continue/config.json:
{
"models": [{
"title": "Qwen3-Coder-Next",
"provider": "openai",
"model": "qwen3-coder-next",
"apiBase": "http://localhost:11434/v1",
"apiKey": "dummy"
}]
}Aider (CLI)
export OPENAI_API_BASE=http://localhost:11434/v1
export OPENAI_API_KEY=dummy
aider --model openai/qwen3-coder-next your-file.pyCoding benchmarks
Every number below comes from the Qwen3-Coder-Next technical report, which ran all models through the same agent scaffold for each column. That makes the rows comparable with each other, which vendor-by-vendor leaderboard numbers usually are not. Scores are vendor-reported, not independent.
| Benchmark (scaffold) | Qwen3-Coder-Next (80B, 3B active) | DeepSeek-V3.2 (671B, 37B active) | GLM-4.7 (358B, 32B active) | Claude Sonnet 4.5 | Claude Opus 4.5 |
|---|---|---|---|---|---|
| SWE-Bench Verified (SWE-Agent) | 70.6% | 70.2% | 74.2% | 76.0% | 78.2% |
| SWE-Bench Verified (OpenHands) | 71.3% | 72.6% | 70.6% | 74.6% | 79.0% |
| SWE-Bench Multilingual (OpenHands) | 64.3% | 61.8% | 60.8% | 66.0% | 75.2% |
| SWE-Bench Pro (SWE-Agent) | 42.7% | 46.0% | 45.1% | 50.5% | 51.6% |
| Terminal-Bench 2.0 (Terminus-2 JSON) | 36.2% | 39.3% | 37.1% | 51.7% | 57.3% |
The report also lists non-agentic coding scores, compared only with Qwen's own models: LiveCodeBench v6 58.93 (Qwen3-Coder-480B-A35B: 44.93), EvalPlus 86.56 (480B: 86.66), MultiPL-E 88.23 (480B: 88.00) and a Codeforces rating of 2100 (480B: 1800). Aider polyglot, HumanEval and MBPP scores are not published separately for Qwen3-Coder-Next.
Source: Qwen3-Coder-Next Technical Report (arXiv 2603.00729, February 28, 2026), Tables 3-6, read November 2, 2026. Some third-party listings quote other Verified figures for the same model (different scaffolds or runs), so always check which harness a number comes from. · Qwen3-Coder-Next on Hugging Face
When to pick Qwen3-Coder-Next
- ✓You write code professionally and want a self-hosted Cursor/Aider setup.
- ✓Your code or IP cannot leave your network (regulated industries, defense, IP-sensitive).
- ✓You have or can buy a single 80 GB GPU, 2× RTX 5090, or a Mac with 64 GB+ of unified memory.
- ✓You want a hybrid setup: local for routine work, a hosted API for the hardest tasks.
- ✓You're building a coding-AI product and need an Apache-2.0-licensed model in the loop.
When to use something else
- →You want a hosted frontier model for the hardest tasks → see which Claude model to use for coding (Sonnet for value, Opus for the hardest work), or compare vendors in best AI coding models.
- →Single high-end consumer GPU with no MoE complexity → Qwen3.6-27B (dense 27B, fits a 24-32 GB card at Q4, simpler deployment).
- →You need 1M context for whole-monorepo work → DeepSeek V4 or Gemini 3.1 Pro API.
- →Mixed coding + general work, more hardware → DeepSeek V4-Flash.
Frequently asked questions
What is Qwen3-Coder-Next?
How much VRAM does Qwen3-Coder-Next need?
How do I install Qwen3-Coder-Next with Ollama?
Qwen3-Coder-Next vs Claude Sonnet: how much worse is it?
What is the 256K context window good for?
Can I use Qwen3-Coder-Next with Cursor / Continue.dev / Aider?
Why Apache 2.0 license matters
Qwen3-Coder-Next vs DeepSeek V4-Flash for coding
Build a complete local coding stack
The Local AI Master deployment course walks through serving local models with vLLM, connecting them to coding tools such as Cursor and Aider, and routing the hardest tasks to a hosted model.
See the deployment course →Related models
- → Qwen3.6-27B — dense 27B for a single consumer GPU
- → DeepSeek V4 — open-weight frontier alternative, 1M context
- → Qwen3-Coder 30B & 480B — the earlier Qwen3-Coder models; the 30B fits a 24 GB card
- → Best Claude model for coding — what to reach for on the hardest tasks
- → Best local AI coding models — full comparison
- → AI model leaderboard — benchmark rankings across models
Go from reading about AI to building with AI
25 structured courses. Hands-on projects. Runs on your machine. Start free.

Written by
Barsha Mohapatra
Founder and Editor, Local AI Master · Founder, Little AI Master
Founder of Little AI Master and the editor behind every course and guide on Local AI Master. Years of tutoring students taught her where AI education actually fails.