Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
173 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
46 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Qwen3 Foundation Models

Updated 30 June 2025
  • Qwen3 Foundation Models are open LLMs that combine dense and MoE variants to deliver advanced reasoning, code generation, and multilingual support.
  • They utilize novel techniques like Grouped Query Attention, SwiGLU, and extended RoPE for enhanced training stability and long-context handling.
  • Adaptive inference modes and scalable quantization methods enable efficient deployment across cloud and edge environments.

Qwen3 Foundation Models are a family of open LLMs designed to advance performance, efficiency, and multilingual capabilities through novel architectural choices, training strategies, and system-level innovations. They include both dense and Mixture of Experts (MoE) variants, support a broad spectrum of deployment scenarios from edge devices to large-scale cloud inference, and enable adaptive control of computational resources at inference time. Qwen3 has been empirically validated as achieving state-of-the-art results across reasoning, code generation, natural language understanding, and multilingual benchmarks. All Qwen3 models are available under the Apache 2.0 license.

1. Model Design and Architectural Innovations

Qwen3 models comprise two major families: Dense Transformers and Mixture-of-Experts (MoE). Dense models range from 0.6B to 32B parameters, while MoE versions range up to 235B total (with 22B activated per token), supporting efficient scaling without linear growth in inference computation. They employ:

  • Transformer architectures with Grouped Query Attention (GQA), SwiGLU activations, Rotary Positional Embeddings (RoPE) enhanced for long-context support, RMSNorm for normalization, and QK-Norm for training stability.
  • MoE models with 128 total experts and 8 activated per token, no shared experts, and global-batch load balancing loss for expert utilization:

Lbalance=λLoadBalancingLoss\mathcal{L}_{\text{balance}} = \lambda \cdot \text{LoadBalancingLoss}

  • A custom Byte-level Byte-Pair Encoding (BBPE) tokenizer supporting 151,669 vocabulary items.
  • Maximum context lengths up to 128k tokens, enabled by advanced position encoding (RoPE, ABF, YARN, and Dual Chunk Attention).

The series spans a range of sizes for different applications—from efficiency-focused variants (e.g., Qwen3-0.6B) to high-capacity models for demanding reasoning and multilingual tasks (e.g., Qwen3-235B-A22B MoE).

2. Unified Reasoning and Adaptive Inference

Qwen3 introduces a unified framework combining:

  • Thinking Mode: Designed for complex, multi-step reasoning, producing explicit reasoning chains (“thinking blocks”) before the final answer.
  • Non-Thinking Mode: Enables rapid context-driven responses suitable for chat and assistant applications.

Mode switching is triggered dynamically by the chat template or user/system prompt, e.g.:

1
2
3
4
5
6
7
8
9
% Thinking mode
<|im_start|>user {query} /think<|im_end|>
<|im_start|>assistant <think> {reasoning...} </think>
{answer}<|im_end|>

% Non-thinking mode
<|im_start|>user {query} /no_think<|im_end|>
<|im_start|>assistant <think> </think>
{answer}<|im_end|>
The Thinking Budget mechanism allows users to set a maximum token count for the model's reasoning process, thus directly controlling the trade-off between inference latency and answer quality. This dynamic scaling results in graceful, scalable performance improvements on benchmarks as the budget is increased.

3. Training Data Scale, Multilinguality, and Pretraining Pipeline

Qwen3 is trained on 36 trillion tokens across multiple data sources:

  • General Stage (S1): Broad coverage of 119 languages and dialects with context length up to ~4k.
  • Reasoning Stage (S2): Emphasis on STEM, code, math, and synthetic reasoning data.
  • Long Context Stage: Specialized for handling input up to 32k tokens, with context extrapolation enabled by ABF, YARN, and DCA techniques.

Compared to its predecessor (Qwen2.5, with 29 languages), Qwen3 supports 119 languages, spanning Indo-European, Sino-Tibetan, Afro-Asiatic, Austronesian, Dravidian, Turkic, Tai-Kadai, and more. Datasets are annotated for domain, educational value, and safety.

4. Knowledge Distillation and Alignment Methodologies

Qwen3 uses “strong-to-weak” knowledge distillation:

  • Smaller models learn to replicate the reasoning and mode-switching skills of large teacher models through a blend of off-policy (teacher-generated) and on-policy (student-generated) distillation.
  • Chain-of-Thought (CoT) supervision and RL are used for complex reasoning, including cold-start training on verified traces, followed by reinforcement learning with challenging queries.
  • Alignment and tool-use abilities are refined with supervised fine-tuning (SFT) and general RL using instruction, format control, and agent-task data.

This approach yields smaller models that match or exceed previous generational large models with significantly reduced training compute.

5. Empirical Performance and Benchmarks

Qwen3 establishes state-of-the-art or highly competitive results across core evaluation categories:

  • Reasoning: Outperforms or closely matches larger MoE models and proprietary systems on MMLU-Pro, GPQA, GSM8K, MATH, and high-level mathematics competitions (AIME’24/25).
  • Coding: Achieves top results on EvalPlus, LiveCodeBench, MultiPL-E, MBPP, and CodeForces.
  • Alignment and Writing: Strict alignment testing (IFEval, Arena-Hard, AlignBench) and creative writing (Creative Writing, WritingBench) show strong instruction adherence and non-English language fluency.
  • Multilingual Benchmarks: Excels in MGSM, MMMLU, INCLUDE, Multi-IF, MT-AIME2024, PolyMath, and over 80 additional languages (e.g., Belebele aggregate scores: Indo-European 90.7, Sino-Tibetan 89.7).
  • Long-context handling: Maintains high accuracy on the RULER benchmark up to 128,000-token context windows.

Performance scales smoothly with increases in both model size and thinking budget, and smaller Qwen3 variants rival or exceed prior-generation, much larger models.

6. Quantization and Efficient Deployment

Systematic evaluation of Qwen3 quantization demonstrates:

  • 8-bit quantization preserves near-full performance across benchmarks, enabling efficient deployment in production.
  • 4-bit quantization offers strong compression with minimal degradation in larger models (≥14B), though small models are more impacted.
  • Ultra-low (≤3-bit) quantization induces sharp drops in accuracy, particularly for complex reasoning, attributable to lower parameter redundancy from improved pre-training.
  • Qwen3 exhibits greater sensitivity to activation quantization than some peer LLMs, motivating research into activation outlier mitigation and advanced calibration techniques.

Multiple classic post-training quantization methods (Round-To-Nearest, GPTQ, AWQ, SmoothQuant, BiLLM) are benchmarked, with all code and models publicly available for reproducibility.

7. System Engineering and Lifecycle Considerations

Development and deployment strategies for Qwen3 adopt state-of-the-art system-level practices:

  • Hybrid parallelism (combining data, tensor, pipeline, and expert parallelism) for training at scale.
  • Memory and communication optimizations, including activation checkpointing, mixed precision, ZeRO/ZeRO-Infinity, and memory swapping.
  • Serving optimizations involving dynamic/selective batching, pipelined decoding, attention and cache sparsity, multi-model inference, and robust resource scheduling.
  • System-level challenges include privacy protection (e.g., differential privacy during training), defense against prompt injection/adversaries, and minimizing energy footprint via green computing practices.
  • Automated orchestration and model engineering facilitate modularization, adapter-based customization, distributed versioning, and scalable model merging, following the emerging paradigm of foundation model engineering.

Qwen3's open-source commitment, multilingual support, architectural flexibility, and engineering rigor position it as a practical foundation for a wide array of research and industrial applications, from information retrieval and semantic search to complex agentic and multilingual tasks.