50 models7 providersprices scraped nightly — no estimates
Head to headMay 27, 2026

Codestral 22B vs Qwen 2.5 Coder 7B Instruct

Side-by-side on verified pricing, benchmarks, and provider availability.

DimensionCodestral 22BQwen 2.5 Coder 7B Instruct
Cheapest $/1M out
Cheapest $/1M in
Cheapest provider
Capabilities
Context window33K131K
Parameters22B7B
Licensemistral-researchqwen
Released2024-05-292024-11-12
Verdict

This is a straightforward size-versus-cost tradeoff. Codestral 22B is three times the size of Qwen 2.5 Coder 7B and scores meaningfully higher on HumanEval — roughly 81% vs ~72% for the 7B. The quality gap is real, but so is the price gap: Qwen 2.5 Coder 7B often runs under $0.20/1M tokens on commodity GPU clouds, while Codestral 22B typically lands in the $0.30–0.60/1M range. At high call volumes, that difference compounds fast.

Both models support fill-in-the-middle, and both have been trained on broad code corpora across multiple languages. Qwen 2.5 Coder 7B punches above its weight for a 7B model — Alibaba's coding-specific training pipeline closes some of the gap you'd expect from the raw parameter count difference.

The 7B shines in latency-critical, high-volume scenarios: think real-time autocomplete in a web-based editor, where response time under 200ms matters more than perfect multi-file coherence. At sub-$0.20/1M tokens, you can afford aggressive sampling and retries without blowing your budget. See provider rates on [Qwen 2.5 Coder 7B's model page](/models/alibaba--qwen-2.5-coder-7b-instruct).

Codestral 22B earns its keep on tasks requiring accurate docstring generation, test scaffold synthesis, or refactoring across non-trivial function boundaries. The benchmark gap closes for simple completions but opens up on longer, more structured outputs. Review the full provider list on [Codestral 22B's model page](/models/mistralai--codestral-22b).

**Pick Qwen 2.5 Coder 7B** if throughput and cost floor drive your decision. **Pick Codestral 22B** if output quality on complex generation tasks is the constraint.

Sample workload

5M in + 2M out / month — cheapest provider each

Codestral 22B
Qwen 2.5 Coder 7B Instruct

What changes at scale

$/mo estimate

Output tokens dominate cost above a 1:3 input/output ratio. Below 1:1, input dominates and cheaper-input providers win regardless of headline price.

1M in · 250K out ·
5M in · 2M out ·
20M in · 10M out ·
100M in · 60M out ·
Calculate cost for your workload

Compare total monthly cost across providers for Codestral 22B and Qwen 2.5 Coder 7B Instruct using your own input/output token mix.

Open workload calculator →
Full model details