n4nAI

DeepSeek V3 vs Qwen 3: performance benchmark

Practical head-to-head comparison of DeepSeek V3 and Qwen 3 on capability, cost, latency, and ergonomics to help engineers pick the right model.

n4n Team5 min read1,064 words

Audio narration

Coming soon — every post will get a voice note here.

The DeepSeek V3 vs Qwen 3 performance benchmark question comes up constantly when teams pick a default model for production inference. Both are mixture-of-experts transformers with open weights, but they diverge in training data, multilingual reach, and operational quirks that matter more than leaderboard points.

Capabilities

In any DeepSeek V3 vs Qwen 3 performance benchmark, code tasks show separation. DeepSeek V3 was trained with a heavy emphasis on code and math corpora. In practice, it produces cleaner Python and C++ completions and follows intricate multi-step instructions better than most open weights. Qwen 3 closes the gap on reasoning, especially in its larger MoE variant, but its strength skews toward general instruction following and broader knowledge recall.

Reasoning and math

Publicly disclosed scores on HumanEval and GSM8K sit in the low 80s for both, with DeepSeek V3 a few points ahead on code synthesis. For agentic loops that chain tool calls, DeepSeek V3’s stricter schema adherence reduces malformed JSON that would otherwise break parsers.

Multilingual coverage

Qwen 3 ships with explicit support for over 30 languages and demonstrates stronger non-English fluency out of the box. DeepSeek V3 handles English and Chinese competently, yet its tokenizer and fine-tuning favor those two. If your traffic is global, Qwen 3 will mangle fewer accents and honor locale-specific formatting (dates, currencies) more reliably.

Long-context behavior

DeepSeek V3 caps at 128K tokens and degrades gracefully on needle-in-haystack up to that limit. Qwen 3 offers a dedicated 1M-token variant whose recall remains stable beyond 200K. For repo-scale RAG, that difference eliminates chunking logic.

Price and Cost Model

Neither model demands enterprise contracts for API access. DeepSeek V3’s official endpoint prices input tokens at a fraction of a cent per thousand, with a cache-hit discount for repeated system prompts. Qwen 3’s Alibaba Cloud pricing tracks similarly, though regional quotas apply.

When you route through a single OpenAI-compatible gateway such as n4n.ai, you get per-token usage metering across both without reconciling separate invoices. That simplifies cost attribution when you A/B test the two.

from openai import OpenAI

client = OpenAI(base_url="https://api.n4n.ai/v1", api_key="sk-...")

for model in ["deepseek/deepseek-v3", "qwen/qwen3-235b-a22b"]:
    resp = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "Summarize the MoE paper."}],
        max_tokens=200,
    )
    print(model, resp.usage.total_tokens, resp.usage.prompt_tokens)

Cache control matters: DeepSeek V3 honors a cache_control marker on system blocks; Qwen 3 supports equivalent prefix caching on its platform. Reusing a 2K-token system prompt across 1M requests cuts cost by an order of magnitude.

Latency and Throughput

DeepSeek V3 activates roughly 37B parameters per token out of 671B total. Qwen 3’s flagship MoE uses a comparable active parameter count. Under continuous batching on A100/H100 clusters, both sustain high decode rates, but DeepSeek V3’s inference stacks (vLLM, SGLang) have seen more community tuning for prefix caching.

Time-to-first-token (TTFT) is where Qwen 3 can win on smaller variants because its dense 7B/14B models load on a single GPU and skip expert routing overhead. For the big MoE, expect 300–800 ms TTFT at batch size 1 on H100, depending on context length. Decode throughput at batch 32 typically lands in the 2–4K tokens/sec/GPU range for both, assuming FP8 weights.

Quantization shifts the curve: a 4-bit DeepSeek V3 still needs ~400GB RAM, forcing tensor parallelism across multiple cards and adding all-reduce latency. Qwen 3’s 22B-active MoE fits on one 80GB card, halving TTFT for self-hosted deployments.

Ergonomics and API Surface

Both expose an OpenAI-compatible chat completions schema. DeepSeek V3 supports function calling and JSON mode, though its tool parser is stricter about argument schemas. Qwen 3 implements native tool use across its lineup and tends to respect response_format more reliably.

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-235b-a22b",
    "messages": [{"role": "user", "content": "Explain MoE."}],
    "response_format": {"type": "json_object"}
  }'

Streaming works identically. DeepSeek V3 occasionally emits a leading thinking token block that you must strip before parsing; Qwen 3 streams clean content by default. If you build a unified client, handle both shapes:

for chunk in client.chat.completions.create(model="deepseek/deepseek-v3", stream=True, ...):
    if chunk.choices[0].delta.content:
        buffer += chunk.choices[0].delta.content
# strip if present

Context windows: DeepSeek V3 caps at 128K tokens. Qwen 3 offers 128K on most sizes and a dedicated long-context build stretching to 1M. If you embed entire repos, Qwen 3’s long variant reduces chunking.

Ecosystem and Self-Hosting

DeepSeek V3 weights are MIT-licensed; you can drop them into vLLM or SGLang with a single config change. Qwen 3 weights are open but carry a custom license restricting certain commercial uses without agreement. Both run on consumer hardware at quantized levels (e.g., 4-bit GGUF), but DeepSeek V3’s 671B size needs ~400GB RAM even quantized, whereas Qwen 3’s 22B active MoE fits on a single 80GB card.

Ollama, LM Studio, and HuggingFace Transformers have first-class Qwen 3 support. DeepSeek V3 is slightly behind on desktop tooling but ahead in production serving examples. Launching DeepSeek V3 in vLLM:

vllm serve deepseek-ai/DeepSeek-V3 \
  --tensor-parallel-size 4 \
  --quantization fp8 \
  --max-model-len 131072

Qwen 3’s equivalent command swaps the model id and works on a single GPU for the 22B active variant.

Limits and Compliance

DeepSeek V3 applies stricter content filters on political topics and may refuse certain Chinese-sensitive queries even in English. Qwen 3 aligns with Alibaba’s regional compliance, which can mean softer refusals on some axes but stricter on others depending on jurisdiction.

Rate limits on first-party APIs are generous but not infinite. Both degrade to 429 under burst. A gateway that honors client routing directives and forwards provider cache-control hints will silently fall back when a provider is rate-limited, keeping your p99 stable. For example, pinning DeepSeek V3 with a routing header and letting the gateway switch to Qwen 3 on 429:

curl https://api.n4n.ai/v1/chat/completions \
  -H "x-n4n-model-prefer: deepseek/deepseek-v3" \
  -d '{"model":"auto","messages":[{"role":"user","content":"go"}]}'

Head-to-Head Comparison

Dimension DeepSeek V3 Qwen 3
Architecture 671B MoE, 37B active MoE (235B/22B active) + dense variants
License MIT Custom (commercial restrictions)
Multilingual EN/ZH strong, others weak 30+ languages, robust
Context 128K 128K–1M
Tool calling Strict schema validation Native, reliable
Self-host footprint ~400GB RAM quantized 80GB RAM for 22B active
Pricing Sub-$1/M output, cache discount Similar, regional quotas
Latency (TTFT big MoE) 300–800 ms 300–800 ms

Which to Choose

English/Chinese code generation at scale – DeepSeek V3. Its tokenizer and training yield fewer syntax errors on long functions. Use it when you already have a 128K context pipeline and care about MIT licensing.

Global customer-facing chat – Qwen 3. The broader language coverage and stable JSON mode prevent embarrassing mistranslations. The 1M context variant helps when you ingest long manuals.

Single-GPU startup – Qwen 3 dense 14B or the 22B active MoE. You avoid the 400GB memory wall and still get competitive quality.

Cost-sensitive A/B testing – Route both through one metered endpoint and flip traffic by latency. The DeepSeek V3 vs Qwen 3 performance benchmark stops being theoretical when you watch real token counts.

Regulated enterprise – Read both licenses. DeepSeek’s MIT is cleaner; Qwen’s custom terms may require legal sign-off. That often decides the debate before benchmarks do.

Tagsdeepseek-v3qwen-3performance-benchmark

Written by

n4n Team

The team building n4n — a single OpenAI-compatible API in front of 240+ models, with automatic fallback, load balancing and pay-per-token metering.

More from n4n Team →

All deepseek performance benchmarks posts →