Back to Models

Qwen3 8B

qwenqwen/qwen3-8b

Qwen3 8B — compact and fast, ideal for lightweight tasks and high-throughput scenarios.

Qwen3-8B is a compact 8.2-billion-parameter dense causal language model from Alibaba's Qwen team — the entry-level efficient tier in the Qwen3 dense lineup. Built with 36 transformer layers and 32/8 GQA attention heads, it was released under Apache 2.0 in April 2025. According to the Qwen3 technical report, Qwen3-8B base matches the performance of Qwen2.5-14B-Base, representing a full generation of parameter efficiency gains: you get prior-generation 14B-class capability at 8B parameter count and at significantly lower inference cost.

Like all Qwen3 instruct models, Qwen3-8B ships with hybrid thinking as a native feature: a single checkpoint switches between a deep-reasoning thinking mode (step-by-step reasoning in <think> blocks) and a fast non-thinking mode, controlled per-request via enable_thinking or /think / /no_think tokens. At $0.03 / $0.06 per million input/output tokens, Qwen3-8B is the lowest-cost entry in the Qwen3 dense line — the right default for high-throughput pipelines, quick drafts, and classification tasks where the absolute reasoning ceiling is less critical than speed and cost. Teams that need a step up in quality for harder analytical or multi-step tasks can promote to qwen/qwen3-14b ($0.03/$0.06 vs $0.07/$0.21) without changing any API plumbing.

Best for
  • • High-throughput, cost-sensitive pipelines — at $0.03/$0.06 per M tokens, Qwen3-8B is the cheapest entry in the Qwen3 dense line; ideal for tasks where volume and latency matter more than reasoning depth
  • • Classification, routing, and extraction tasks — straightforward NLU workloads where Qwen3-8B's Qwen2.5-14B-class capability is well above the quality bar required
  • • Lightweight agentic loops with tool calling — supports tools and tool_choice in both thinking and non-thinking modes; lower per-call cost than Qwen3-14B for agent loops with many short turns
  • • Multilingual text tasks — 119 language and dialect support inherited from the Qwen3 family; suitable for translation, summarisation, and multilingual classification at low cost
  • • Edge, on-device, or self-hosted inference — at ~8B parameters, Qwen3-8B fits comfortably on a single consumer GPU (e.g., RTX 3090/4070 at 4-bit) or Apple Silicon with high performance-to-power efficiency; Apache 2.0 for unrestricted commercial use
Reach for something else if
  • • Hard multi-step reasoning, competition math, or complex code generation — route to qwen/qwen3-14b or qwen/qwen3-32b when reasoning depth is the bottleneck; Qwen3-8B is the entry tier, not the ceiling
  • • Highest-throughput batch jobs where even lower per-token cost matters — qwen/qwen3-30b-a3b (MoE, 3B active parameters) achieves lower serving cost per token at scale despite its larger total parameter count
  • • Native image or audio input — Qwen3-8B is text-in / text-out only; use qwen/qwen3-vl-8b for vision-language tasks at a similar model size
Context Length
131K
Max Output
33K
Input Priceper 1M tokens
$0.1944/ 1M tokens
Output Priceper 1M tokens
$0.756/ 1M tokens

Modalities

text→text

Pricing Breakdown

TypeRate
Input$0.1944 / 1M tokens
Output$0.756 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_ptoolstool_choiceresponse_formatstop

Specifications

Total parameters8.2Bhuggingface.co/Qwen ↗verified
ArchitectureDense causal transformer, 36 layers, GQA 32/8 (Q/KV heads)huggingface.co/Qwen ↗verified
Context length131,072 tokens (32,768 native; extended to 131,072 via YaRN)huggingface.co/Qwen ↗verified
Max completion tokens32,768huggingface.co/Qwen ↗verified
LicenseApache 2.0huggingface.co/Qwen ↗verified
Release dateApril 2025qwenlm.github.io ↗verified
Training stagePretraining & Post-training (instruct model)huggingface.co/Qwen ↗verified
Effective efficiency vs. prior genMatches Qwen2.5-14B-Base at 8B params — one full generation of parameter efficiency gainedqwenlm.github.io ↗verified

Benchmarks

BenchmarkDistributionScoreSource
MMLU
Base model; 5-shot
76.57%arxiv.org — Qwen3 technical report ↗
MMLU-Pro
Base model
55.92%arxiv.org — Qwen3 technical report ↗
BBH (BIG-Bench Hard)
Base model; 3-shot CoT
76.84%arxiv.org — Qwen3 technical report ↗
GSM8K
Base model; 4-shot
88.93%arxiv.org — Qwen3 technical report ↗
GPQA
Base model; graduate-level science questions
36.87%arxiv.org — Qwen3 technical report ↗

API Usage Examples

Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "qwen/qwen3-8b",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'

More from qwen

Similar models

Cross-provider sibling models

News & changes

2025-04-29

Qwen3 family released — Qwen3-8B among six open-weight dense models

Alibaba Qwen released the full Qwen3 suite including Qwen3-8B as an 8.2B dense causal LM with hybrid thinking modes, 128K context (YaRN-extended), 119-language support, and Apache 2.0 licensing. The announcement highlighted that Qwen3-8B base achieves parity with Qwen2.5-14B-Base, representing a full generation of parameter-efficiency improvement. At $0.03/$0.06 per million input/output tokens, it is the most cost-accessible entry in the dense Qwen3 line.

re-authored by TheRouterqwenlm.github.io ↗
2025-05-15

Qwen3 technical report published on arXiv

The Qwen Team released the full technical report (arXiv 2505.09388) covering pretraining, post-training, hybrid thinking architecture, multilingual capability, and comparative benchmarks across the Qwen3 model family including Qwen3-8B. The report documents base model benchmarks showing Qwen3-8B at MMLU 76.57, BBH 76.84, GSM8K 88.93, and GPQA 36.87.

re-authored by TheRouterarxiv.org ↗

Frequently asked

How does Qwen3-8B compare to Qwen3-14B?

Qwen3-8B (36 layers, GQA 32/8, 8.2B params) is the entry tier; Qwen3-14B (40 layers, GQA 40/8, 14.8B params) is the next size up. Both achieve hybrid thinking and 128K context. Qwen3-8B base matches Qwen2.5-14B-Base; Qwen3-14B base matches Qwen2.5-32B-Base — a full extra generation-size step in capability. In cost: Qwen3-8B at $0.03/$0.06 per M tokens vs Qwen3-14B at $0.07/$0.21. Use Qwen3-8B for high-throughput or simpler tasks; upgrade to 14B when reasoning depth or answer quality becomes the constraint.

How do I switch between thinking and non-thinking mode?

Through TheRouter, use the reasoning parameter on /v1/chat/completions. Directly, set enable_thinking=True or enable_thinking=False in the chat template when self-hosting, or prepend /think or /no_think in the system prompt or first user message. Thinking mode is the default. When thinking mode is active, responses include a <think>...</think> block that should be parsed or stripped before displaying to end users.

What is the effective context window for qwen/qwen3-8b on TheRouter?

The model's native context is 32,768 tokens, extended to 131,072 tokens via YaRN positional interpolation. TheRouter sets context_length to 131,072 and max_completion to 32,768. Performance at the far end of the YaRN range may degrade on very complex prompts; validate your largest inputs before production rollout.

Does Qwen3-8B support tool calling and structured output?

Yes. Qwen3-8B supports tools and tool_choice for function calling as well as response_format for structured output via the standard OpenAI-compatible parameters on TheRouter. Tool-calling capability is maintained in both thinking and non-thinking modes, making it suitable for lightweight agentic pipelines.

Can I use Qwen3-8B from Cursor, Cline, or another OpenAI-compatible client?

Yes. TheRouter exposes qwen/qwen3-8b through the OpenAI-compatible /v1/chat/completions endpoint. Set your client's base URL to the TheRouter endpoint, configure an API key, and set the model to qwen/qwen3-8b. Streaming, tools, and response_format are all supported.

Fact ledger — every claim on this page traces here
sourceURLretrieved
Total parametershuggingface.co/Qwen ↗2026-06-09verified
Architecturehuggingface.co/Qwen ↗2026-06-09verified
Context lengthhuggingface.co/Qwen ↗2026-06-09verified
Max completion tokenshuggingface.co/Qwen ↗2026-06-09verified
Licensehuggingface.co/Qwen ↗2026-06-09verified
Release dateqwenlm.github.io ↗2026-06-09verified
Training stagehuggingface.co/Qwen ↗2026-06-09verified
Effective efficiency vs. prior genqwenlm.github.io ↗2026-06-09verified
MMLUarxiv.org — Qwen3 technical report ↗2026-06-09verified
MMLU-Proarxiv.org — Qwen3 technical report ↗2026-06-09verified
BBH (BIG-Bench Hard)arxiv.org — Qwen3 technical report ↗2026-06-09verified
GSM8Karxiv.org — Qwen3 technical report ↗2026-06-09verified
GPQAarxiv.org — Qwen3 technical report ↗2026-06-09verified
Qwen3 family released — Qwen3-8B among six open-weight dense modelsqwenlm.github.io ↗2026-06-09verified
Qwen3 technical report published on arXivarxiv.org ↗2026-06-09verified
How does Qwen3-8B compare to Qwen3-14B?qwenlm.github.io ↗2026-06-09to verify
How do I switch between thinking and non-thinking mode?huggingface.co ↗2026-06-09to verify
What is the effective context window for qwen/qwen3-8b on TheRouter?huggingface.co ↗2026-06-09to verify
Does Qwen3-8B support tool calling and structured output?huggingface.co ↗2026-06-09to verify
Can I use Qwen3-8B from Cursor, Cline, or another OpenAI-compatible client?qwenlm.github.io ↗2026-06-09to verify
Help & contact