Qwen-Coder is the family of code-specialized large language models developed by the Qwen team at Alibaba Cloud, released mostly as open-weight models for code completion, generation, explanation, repair and agentic software tasks. In AI for coding, it is one of the leading open alternatives to proprietary coding models and is widely used in local assistants and self-hosted development tools.
The line evolved from CodeQwen1.5 through Qwen2.5-Coder to Qwen3-Coder, each built on the general Qwen base models and further trained on large code corpora. Developers can run smaller variants on a single workstation, while the largest mixture-of-experts versions target agentic coding comparable to commercial systems.
How Qwen-Coder models are built
Qwen-Coder models start from a general Qwen base model and continue pretraining on a corpus dominated by source code, code-related text and mathematics. This continued pretraining teaches syntax, library usage and repository structure across dozens of programming languages, while the general base preserves natural-language reasoning.
Pretraining includes fill-in-the-middle objectives, so the base models can complete code between a given prefix and suffix, the mode used by inline completion in editors. Repository-level training with concatenated files teaches cross-file dependencies. Instruction-tuned variants then learn to follow requests, explain code and hold multi-turn conversations, and later releases add reinforcement learning on executable tasks that rewards code which actually passes tests.
The table below summarizes the main stages that shape a Qwen-Coder release.
| Stage | Data | Capability gained |
|---|---|---|
| Base model pretraining | General multilingual text and code | Language understanding and reasoning |
| Code continued pretraining | Trillions of code-heavy tokens | Syntax, APIs, idioms in many languages |
| Repository-level training | Whole projects with long context | Cross-file references and structure |
| Instruction tuning | Curated coding dialogues and tasks | Following requests, explaining code |
| Reinforcement learning | Executable tasks with tests | Correctness and multi-step agent behavior |
Qwen-Coder generations and model sizes
Each generation of Qwen-Coder widened the range of sizes and the context length. Qwen2.5-Coder introduced a full ladder of dense models from 0.5B to 32B parameters, while Qwen3-Coder moved its flagship to a mixture-of-experts architecture that activates only part of the network for each token.
| Generation | Representative sizes | Context window | Main focus |
|---|---|---|---|
| CodeQwen1.5 | 7B dense | 64K tokens | Early open code model |
| Qwen2.5-Coder | 0.5B, 1.5B, 3B, 7B, 14B, 32B dense | Up to 128K tokens | Completion, generation, repair |
| Qwen3-Coder | 30B-A3B and 480B-A35B MoE | 256K native, extendable toward 1M | Agentic coding and tool use |
In the MoE naming, 480B-A35B means about 480 billion total parameters with roughly 35 billion active per token. This keeps inference cost closer to a mid-sized dense model while retaining the knowledge capacity of a much larger one, although the full weights still require substantial GPU memory.
Most Qwen2.5-Coder and Qwen3-Coder weights are published under the Apache 2.0 license, which allows commercial use and modification. Alongside the Qwen3-Coder release, the team also published Qwen Code, a command-line agent adapted from an open-source terminal coding tool, so that the models could be tested in realistic multi-step workflows.
How Qwen-Coder compares with other code models
Qwen-Coder sits among the open-weight code models such as Code Llama, StarCoder, DeepSeek-Coder, Codestral and Devstral. Its distinguishing features are the breadth of available sizes, a permissive license for most variants and strong results on common benchmarks such as HumanEval, MBPP, LiveCodeBench and SWE-bench.
| Model family | Developer | Notable trait |
|---|---|---|
| Qwen-Coder | Alibaba Qwen team | Wide size range, agentic MoE flagship |
| DeepSeek-Coder | DeepSeek | Strong reasoning-oriented code models |
| StarCoder | BigCode project | Transparent, documented training data |
| Code Llama | Meta | Early widely adopted open code model |
| Codestral and Devstral | Mistral AI | Fast completion and agentic variants |
Benchmark positions change with every release, so independent and recent evaluations matter more than launch claims. Scores on public benchmarks can also be inflated by training data contamination, which is one reason newer, time-bounded suites such as LiveCodeBench exist.
Using Qwen-Coder in practice
Qwen-Coder is used through three main channels: local inference with tools such as Ollama, llama.cpp or vLLM; hosted APIs from Alibaba Cloud and third-party providers; and agentic coding tools such as Qwen Code, Cline, Aider or OpenHands. The choice of size depends mainly on hardware, latency needs and task complexity.
| Situation | Suitable variant | Reason |
|---|---|---|
| Inline completion on a laptop | 1.5B to 7B base | Low latency, fill-in-the-middle |
| Private chat assistant on one GPU | 14B or 32B instruct | Good quality within consumer memory |
| Agentic tasks on a workstation | Qwen3-Coder 30B-A3B | Fast MoE with tool calling |
| Large repository refactoring | Qwen3-Coder 480B-A35B | Long context, strongest reasoning |
Quantization to 4-bit or 8-bit formats makes the mid-sized models practical on consumer hardware, usually with a modest loss of accuracy. For completion, the base model with FIM tokens often works better than the instruct model, which is tuned for conversation.
Limitations and risks
Like all code models, Qwen-Coder can produce plausible but incorrect code, invent nonexistent functions or packages, and reproduce insecure patterns from its training data. Output must pass the same tests, code review and security scanning as human-written code.
- Package hallucination can suggest dependencies that do not exist, which attackers may register as malicious packages.
- Long-context degradation means details in very large prompts are sometimes ignored.
- License terms differ between variants, so each model card must be checked before commercial use.
- Agent autonomy requires sandboxing, because a coding agent can run destructive shell commands.
Open weights also shift operational responsibility to the user. A self-hosted deployment must handle updates, monitoring, access control and prompt logging that a commercial provider would otherwise manage. Teams should also track model provenance, because fine-tuned derivatives shared on public hubs may change behavior or safety properties in ways the original model card does not describe.
Finally, strong benchmark results do not transfer automatically to a specific codebase. Internal frameworks, uncommon languages and domain conventions are underrepresented in public training data, so a short pilot evaluation on real tasks from the team’s own repositories gives a far more reliable picture than leaderboard rankings.
A plain-language summary
Qwen-Coder is an AI model that writes and fixes computer code. It was made by the Qwen team at Alibaba. Many versions are free to download.
Small versions run on an ordinary computer. Large versions run on powerful servers. A programmer can ask it to write a function, find a bug or explain a file. It works like a fast, well-read assistant. Its answers still need testing and review, because it can make mistakes.
An example from practice
A software team at a regional bank may not send source code to external cloud services. To still benefit from AI assistance, the team deploys Qwen2.5-Coder 32B Instruct in a 4-bit quantized format on an internal server with two 48 GB GPUs, served through vLLM.
Developers connect their editors to the internal endpoint for chat and code explanation, while a separate Qwen2.5-Coder 7B base model provides low-latency inline completion. All code stays inside the bank network, which satisfies the data residency requirement set by the security department.
After three months, the team uses the assistant mainly for writing unit tests, migrating legacy Java code and drafting documentation. Every suggestion still passes the existing pipeline of tests and static analysis, and reviewers report that the largest time savings come from boilerplate and test generation, not from complex business logic.