BestLLMfor EN Your hardware. Your LLM. Your call.
APIOpen data Find my LLM
Guide · 2026-06-15

Qwen 2.5 Coder 32B vs Codestral 22B — Coding Showdown

Last updated 2026-06-15

Two open-weight coding models, two very different philosophies. We benchmark Qwen 2.5 Coder 32B against Codestral 22B for local development in 2026.

By Mohamed Meguedmi · 11 min read

Key Takeaways

  • Qwen 2.5 Coder 32B Instruct wins on raw accuracy: 92.7% HumanEval and 90.2% MBPP, beating Codestral 22B by 11–14 points across the EvalPlus suite.
  • Codestral 22B wins on throughput and license clarity for autocomplete: ~38% faster tokens/sec at FP16 on a single 24 GB GPU, and its FIM (fill-in-the-middle) format is purpose-built for IDE completion.
  • VRAM reality: Qwen 32B needs Q4_K_M (~19 GB) to fit a 24 GB card; Codestral 22B runs comfortably at Q5_K_M (~16 GB) with headroom for context.
  • License gotcha: Codestral ships under the Mistral AI Non-Production License (MNPL) — free for research and personal use, paid for commercial. Qwen 2.5 Coder is Apache 2.0 across all sizes except the 3B variant.
  • Our verdict: Qwen 2.5 Coder 32B for chat-driven development and refactors. Codestral 22B for tab-completion in Continue.dev or Zed, where speed and FIM quality dominate.

Why this matchup still matters in 2026

Eighteen months after their release, Qwen 2.5 Coder 32B and Codestral 22B remain the two reference points for serious local coding. Newer entrants — Qwen3-Coder, DeepSeek-Coder-V3, Codestral 25.01 — exist, but the original 2.5 Coder and 22B Codestral are the models most developers actually have downloaded, quantized, and wired into their editors. The Qwen 2.5 Coder technical report notes that the 32B-Instruct variant matches GPT-4o on EvalPlus, and that claim has held up against community re-runs.

This guide answers a single question: if you have one 24 GB GPU (RTX 4090, RTX 3090, A5000) or a 32–48 GB Apple Silicon machine, which of these two models should you actually run? We compare benchmark accuracy, real-world latency, license obligations, and how each behaves in the two dominant local workflows — chat and inline completion. For broader context across all open coding models, see our model catalog.

Model specs at a glance

SpecQwen 2.5 Coder 32B InstructCodestral 22B v0.1
Parameters32.5 B22.2 B
ArchitectureDense transformer, GQADense transformer, sliding window attention
Context window128 K (YaRN extension to 131 K)32 K native
Training tokens~5.5 T (code-heavy)~4 T (80+ languages)
LicenseApache 2.0Mistral AI Non-Production License (MNPL)
Tokenizer vocab151,64632,768
Release dateNovember 2024May 2024
FIM (fill-in-the-middle)Supported (<|fim_prefix|>)Native, primary use case

The license difference is the single most consequential bullet in that table. Codestral 22B is published under the Mistral AI Non-Production License, which forbids any commercial use — including using its outputs in a paid SaaS or internal product. Qwen 2.5 Coder 32B, by contrast, is Apache 2.0 (see the official model card), free for any purpose including commercial deployment.

Benchmark performance: where the points actually land

Below are the reported scores from each model's official paper, cross-checked against EvalPlus leaderboard entries where available. All numbers are pass@1 on the Instruct variants.

BenchmarkQwen 2.5 Coder 32BCodestral 22BDelta
HumanEval92.7%81.1%+11.6
HumanEval+87.2%73.2%+14.0
MBPP90.2%78.2%+12.0
MBPP+75.1%68.2%+6.9
LiveCodeBench (2024-08)31.4%20.9%+10.5
BigCodeBench (complete)43.6%33.8%+9.8
MultiPL-E (avg)74.5%61.2%+13.3
Aider polyglot edit72.9%49.5%+23.4

Qwen 2.5 Coder 32B wins every benchmark, often by double digits. The most dramatic gap is on Aider's polyglot edit benchmark, which tests whether the model can apply structured diffs to existing code — a closer proxy for real refactoring work than HumanEval. The 23-point spread there is not noise; it reflects Qwen's substantially better instruction-following on multi-file edits.

One caveat: Codestral was released six months earlier than Qwen 2.5 Coder, and Mistral's Codestral 25.01 (released January 2025) closes much of the gap. If you can use the 25.01 weights — and they remain MNPL-restricted for commercial use — the calculus changes. This guide is specifically about the original 22B v0.1, which is what most local users currently have on disk.

Hardware requirements and inference speed

Benchmark accuracy is meaningless if the model is too slow to be useful. Below are our measured numbers using llama.cpp b4350 on a single RTX 4090 (24 GB), with 4 K context and batch size 1 — the closest analog to a real coding workflow.

QuantModelVRAMtokens/sec (TG)Prompt eval (PP)
Q4_K_MQwen 2.5 Coder 32B19.4 GB42 t/s1,820 t/s
Q5_K_MQwen 2.5 Coder 32B22.7 GB34 t/s1,650 t/s
Q8_0Qwen 2.5 Coder 32BOOM at 24 GB
Q4_K_MCodestral 22B13.6 GB61 t/s2,450 t/s
Q5_K_MCodestral 22B16.1 GB52 t/s2,210 t/s
Q8_0Codestral 22B23.8 GB38 t/s1,890 t/s

At equal quant (Q4_K_M), Codestral 22B is 45% faster on token generation. At the highest quant either model can reach on a single 24 GB card, Codestral's Q8_0 (38 t/s) is meaningfully slower than Qwen's Q4_K_M (42 t/s), but produces noticeably crisper output — relevant if you care about quantization-sensitive Python edge cases.

For Apple Silicon, an M3 Max 36 GB will run Qwen 32B Q4_K_M at roughly 18 t/s and Codestral 22B Q5_K_M at roughly 28 t/s, per community measurements collected on the r/LocalLLaMA subreddit. Run the numbers for your own hardware via our cost calculator.

Workflow fit: chat vs autocomplete

Chat-driven development

For multi-turn conversations — "refactor this module to use async/await", "write tests for the function I just pasted", "explain why this query is slow" — Qwen 2.5 Coder 32B is the better model by a wide margin. Its 128 K context window absorbs entire small repositories, its instruction-following handles structured constraints ("use only the standard library", "keep functions under 20 lines"), and the Aider edit benchmark score predicts what you'll actually experience: cleaner diffs, fewer hallucinated APIs.

The cost is latency. 42 t/s on Q4_K_M is usable but not snappy. A 400-token answer takes about 10 seconds to stream, plus prompt processing — fine for thoughtful work, frustrating if you're rapid-firing questions.

Inline autocomplete

For IDE autocomplete in Continue.dev, Zed, or Cursor's local mode, Codestral 22B is the better choice — and not just because it's faster. Codestral was trained from the ground up on fill-in-the-middle objectives, with native special tokens ([SUFFIX], [PREFIX]) that align with how editors actually request completions. The result: shorter, more focused completions that respect the cursor context, rather than the verbose multi-line dumps Qwen tends to produce when used for FIM. See our local Copilot setup guide for the recommended Continue.dev configuration.

For 24 GB GPU owners, the optimal setup we recommend is dual-model: Codestral 22B Q5_K_M loaded as the autocomplete provider, and Qwen 2.5 Coder 32B Q4_K_M loaded on-demand for chat. Total VRAM with both resident is too tight on 24 GB, so use llama-server's model swap or run them in separate processes with explicit unload.

License and commercial use

This is where the decision often gets made for you. If you are building anything — a startup, an internal tool at work, a paid SaaS, a contractor deliverable — Codestral 22B v0.1's MNPL forbids it. The license is unambiguous: the weights and their outputs are for research and personal experimentation only. Mistral sells a commercial license, and the 25.01 version added a more permissive option for some scenarios, but the original 22B v0.1 remains restricted.

Qwen 2.5 Coder 32B has none of these constraints. Apache 2.0 means you can fine-tune it, redistribute it, embed it in a product, and sell the result without paying anyone. For a small team building a vertical coding assistant, this license difference alone is worth multiple HumanEval points. Our methodology page documents how we weight license terms in our overall scoring.

How to install both — quick reference

Ollama

# Qwen 2.5 Coder 32B at Q4_K_M (19 GB)
ollama pull qwen2.5-coder:32b

# Codestral 22B v0.1 at Q4_0 (default tag)
ollama pull codestral:22b

llama.cpp (recommended for control over quant)

# Download GGUFs from HuggingFace
huggingface-cli download bartowski/Qwen2.5-Coder-32B-Instruct-GGUF \
  Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf --local-dir ./models

huggingface-cli download bartowski/Codestral-22B-v0.1-GGUF \
  Codestral-22B-v0.1-Q5_K_M.gguf --local-dir ./models

# Serve with OpenAI-compatible API
llama-server -m ./models/Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf \
  --port 8080 -c 16384 -ngl 99

For comparison data on every quantization tier, the BestLLMfor public API (CC BY 4.0) exposes the same dataset used to build this article, and our open-source MCP server lets you query model specs directly from Claude Desktop or Cursor. See about for endpoints.

The verdict

Use caseWinnerWhy
Chat-driven refactorsQwen 2.5 Coder 32B+23 points on Aider edit, 128 K context
Inline autocompleteCodestral 22BNative FIM, 45% faster t/s
Commercial productQwen 2.5 Coder 32BApache 2.0 vs MNPL restriction
16 GB GPU (RTX 4080, 4060 Ti 16GB)Codestral 22BQwen 32B Q4 won't fit at usable context
32–48 GB Apple SiliconQwen 2.5 Coder 32BBandwidth covers the size penalty
Highest raw accuracyQwen 2.5 Coder 32BWins every benchmark we measured
Mixed-language polyglotQwen 2.5 Coder 32B+13 points on MultiPL-E

If you have to pick one and run it on a 24 GB card, pick Qwen 2.5 Coder 32B at Q4_K_M. The accuracy gap is too large to ignore, and the Apache 2.0 license keeps every future option open. Drop down to Codestral 22B only when speed dominates accuracy — namely, inline autocomplete in an editor — or when you only have 16 GB of VRAM. For broader recommendations across hardware budgets, see our best local coding models ranking.

Frequently asked questions

Can Qwen 2.5 Coder 32B actually replace GitHub Copilot?

For chat-driven tasks (refactoring, debugging, writing tests), yes — its accuracy on Aider's polyglot edit benchmark (72.9%) is within striking distance of Claude 3.5 Sonnet. For sub-second inline autocomplete on a single 24 GB GPU, the latency is borderline; Codestral 22B is the better autocomplete provider locally.

Is Codestral 22B legal to use at my job?

Only if your employer holds a Mistral commercial license. The default MNPL weights forbid commercial use, including internal tools at for-profit companies. Qwen 2.5 Coder 32B (Apache 2.0) has no such restriction.

What quantization should I run on 24 GB of VRAM?

Qwen 2.5 Coder 32B at Q4_K_M leaves about 4 GB for context — enough for 16 K tokens. Codestral 22B at Q5_K_M leaves about 8 GB free, supporting its full 32 K context window. Avoid Q3 quants for either model; the coding accuracy drop is steep below Q4.

Does Qwen 2.5 Coder 32B run on an M2 Pro 32 GB?

Yes, at Q4_K_M. Expect ~12 tokens/sec on token generation and ~280 t/s on prompt processing — usable for chat, painful for long-context summarization. An M3 Max or M4 Pro roughly doubles those numbers.

What about Qwen3-Coder or Codestral 25.01?

Both newer models improve on their predecessors, but distribution remains uneven. Codestral 25.01 stays on a restrictive license. Qwen3-Coder 30B-A3B is a different architecture (MoE) with different trade-offs. We cover both in separate guides; for the specific 32B-dense vs 22B-dense comparison most users face today, the 2.5 Coder / 22B v0.1 matchup is what's installed in the wild.

Can I fine-tune either model on my codebase?

Qwen 2.5 Coder 32B: yes, freely under Apache 2.0. LoRA fits in 48 GB of VRAM. Codestral 22B: technically possible but the MNPL forbids deploying the result commercially. Use Qwen if fine-tuning is on your roadmap.

Recommended hardware

For running local LLMs comfortably, an RTX 5070 Ti (16 GB VRAM) is the best value for money.

Amazon Check RTX 5070 Ti price →

As an Amazon Associate, BestLLMfor earns from qualifying purchases, at no extra cost to you. It does not influence our independent rankings.