Paper commentary
Qwen2.5 Technical Report
- Problem Open-weight LLMs of a given size tend to trail larger or proprietary models, and the Qwen2.5 report asks whether a larger pre-training corpus, staged data mixing and a multi-stage post-training pipeline can narrow that gap.
- Method Qwen2.5 keeps the Qwen2 dense Transformer design, adds fine-grained and shared-expert MoE layers for the hosted models, scales pre-training data to 18 trillion tokens, chooses batch size and learning rate with scaling laws, and post-trains with SFT followed by offline DPO and online GRPO.
- Results Qwen2.5-72B-Instruct reached 83.1 on MATH and 81.2 on Arena-Hard in the reported evaluation, and Qwen2.5-Turbo reached 100% passkey retrieval accuracy at 1M tokens.
What changed from Qwen2
Qwen2.5 changes both the scale of pre-training data and the structure of post-training. Its predecessor Qwen2 was trained on 7 trillion tokens, while Qwen2.5 uses 18 trillion tokens with more emphasis on knowledge, coding and mathematics. The pre-training is split into stages so that the data mixture can change over the course of training.
The release covers dense open-weight models from 0.5B to 72B parameters, both base and instruction-tuned, together with two hosted MoE models, Qwen2.5-Turbo and Qwen2.5-Plus. The central question is whether this combination of data scale, staged mixing and post-training brings open models close to larger or proprietary systems. The comparisons in the later sections test that question against Llama-3.1-405B-Instruct, GPT-4o-mini and GPT-4o.
Architecture and tokenizer
The dense models keep the Transformer-based decoder used in Qwen2. Each block uses Grouped Query Attention, which shares key and value heads across query heads to save KV cache memory, together with SwiGLU in the feed-forward layers, Rotary Positional Embeddings for position information, QKV bias in attention, and RMSNorm applied with pre-normalization for stable training.
Table 1 lists the depth, head layout, embedding tying, context length and license of each open-weight size. The 0.5B model has 24 layers with 14 query heads and 2 key-value heads and ties its embedding, while the 72B model has 80 layers with 64 query heads and 8 key-value heads and does not tie it.
For the MoE models, the standard feed-forward layers are replaced with MoE layers. Each layer holds several FFN experts and a router that sends each token to its top-K experts. Two design choices follow the Qwen1.5-MoE approach: fine-grained expert segmentation and shared experts routing. The authors state that these choices gave substantial gains across downstream tasks, although the report does not isolate that effect in a separate ablation.
The tokenizer is Qwen's byte-level byte-pair encoding with 151,643 regular tokens. The control token set grows from 3 to 22, with two new tokens for tool functionality and the rest reserved for other capabilities. One vocabulary is shared across all Qwen2.5 models, which the authors say makes the family more consistent and reduces compatibility problems.
How the 18-trillion-token corpus is built
Quality scoring relies on Qwen2-Instruct models that rate training samples across several dimensions. The authors state that this filter improves on the Qwen2 version because the scorer was itself pre-trained on a larger multilingual corpus. Math and code data from Qwen2.5-Math and Qwen2.5-Coder are added to the pre-training mix, and synthetic data in mathematics, code and knowledge comes from Qwen2-72B-Instruct and Qwen2-Math-72B-Instruct, filtered with a general reward model and Qwen2-Math-RM-72B.
Data mixing addresses the imbalance of web-scale data. Domains such as e-commerce, social media and entertainment are described as over-represented and often repetitive or machine-generated, so they are down-sampled, while technology, science and academic content is up-sampled. Combining these steps produces the 18-trillion-token corpus that replaces the 7 trillion tokens used for Qwen2.
Choosing batch size and learning rate with scaling laws
Earlier scaling-law work used the laws mainly to choose model size for a compute budget. Here the laws are used to predict the optimal learning rate and batch size for each architecture, which matters for both dense and MoE models. The fitted relationship links the optimal learning rate and batch size to model size N and pre-training data size D.
The fitted predictions are then used to model the final loss as a function of architecture and training data scale.
The same analysis predicts how MoE models with different parameter counts compare with dense models. The authors use it to tune activated and total parameters so that MoE variants reach the performance of specific dense models, such as Qwen2.5-72B and Qwen2.5-14B.
Extending context length in pre-training and at inference
Pre-training runs in two phases. The first phase uses a 4,096-token context. In the final stage, the context is extended to 32,768 tokens for every model except Qwen2.5-Turbo, and the RoPE base frequency rises from 10,000 to 1,000,000 using the ABF technique.
Qwen2.5-Turbo uses a different schedule with four stages, growing the context from 32,768 to 65,536, then 131,072, and finally 262,144 tokens, with a RoPE base frequency of 10,000,000. At each stage, 40% of sequences are at the current maximum length and 60% are shorter, which the authors present as a way to adapt to longer contexts without losing performance on shorter ones.
The authors also report that these methods reduce perplexity on long sequences while keeping performance on short sequences.
Post-training: SFT, offline RL and online RL
The SFT stage uses more than one million examples. Each category targets a gap that Qwen2 showed, including long outputs, math, coding, instruction following, structured data, logical reasoning, cross-lingual transfer and system prompts. Long-response data is built by back-translating queries from pre-training corpora and filtering the pairs with Qwen2, with outputs up to 8,192 tokens.
Math data reuses Qwen2.5-Math chain-of-thought data filtered by rejection sampling, reward modeling and annotated answers. Coding data follows Qwen2.5-Coder and is checked with static analysis and unit tests in a multilingual sandbox. Instruction-following data is checked by code. LLMs produce each instruction together with verification code and unit tests, and only examples that pass execution feedback are kept.
The SFT run covers two epochs at a sequence length of 32,768 tokens. The learning rate decays from 7×10−6 to 7×10−7, with a weight decay of 0.1 and gradient norm clipping at 1.0.
Offline RL targets objective domains where the answer can be checked, such as math, coding, instruction following and logic. The pipeline resamples responses from the SFT model, keeps passing responses as positives and failing ones as negatives, and trains with DPO on approximately 150,000 pairs. That DPO run is one epoch with the Online Merging Optimizer at a learning rate of 7×10−7.
Online RL uses a reward model that scores responses against labeling criteria covering truthfulness, helpfulness, conciseness, relevance, harmlessness and debiasing. Training data comes from Qwen checkpoints sampled at different temperatures, mixing public and proprietary queries. GRPO is the policy optimizer. Eight responses are sampled per query, queries with higher variance in reward-model scores are processed first, and each episode uses a 2048 global batch size with 2048 samples.
For Qwen2.5-Turbo, the long-context SFT stage first uses short instructions of up to 32,768 tokens, then mixes them with long instructions of up to 262,144 tokens. The RL stage for this model uses only short instructions. The authors give two reasons: RL on long contexts is expensive, and reward models suited to long-context signals are scarce.
They also report that short-instruction RL still improves alignment on long-context tasks.
Base model results across sizes
In Table 2, Qwen2.5-72B scores 62.1 on MATH and 91.5 on GSM8K, against 53.8 for Llama-3-405B on MATH and 89.0 on GSM8K. These are 4-shot and 4-shot scores as listed in the evaluation setup of the same section.
Qwen2.5-Plus reaches 64.0 on MMLU-Pro, which the authors state is 5.9 points above Qwen2.5-72B. Qwen2.5-Plus also outperforms the other listed baselines on HellaSwag, TheoremQA, MATH, GSM8K, MultiPL-E, Multi-Mathematics and Multi-Translation.
Qwen2.5-Turbo's MMLU-Pro score is 55.6 in Table 3, which the text describes as higher than the 55.1 for Qwen2.5-32B.
At 7B, Qwen2.5-7B reaches 74.2 on MMLU, 49.8 on MATH and 57.9 on HumanEval. The authors note that its non-embedding parameters are 6.5B, compared with 8.2B for Gemma2-9B. At the smallest sizes, Qwen2.5-0.5B outperforms Gemma2-2.6B on several math and coding tasks, while the 1.5B and 3B models continue the same trend across most benchmarks.
Instruction-tuned results and comparisons
Qwen2.5-72B-Instruct is reported to surpass Llama-3.1-405B-Instruct on MMLU-redux, MATH, MBPP, MultiPL-E, LiveCodeBench, Arena-Hard and MTBench. In Table 6 it reaches 83.1 on MATH against 73.8 for Llama-3.1-405B-Instruct, and 81.2 on Arena-Hard against 69.3.
Qwen2.5-Plus outperforms Qwen2.5-72B-Instruct on 9 of 13 benchmarks, and in Table 6 it reaches 72.5 on MMLU-Pro against 71.1 for the 72B instruct model.
Long-context and inference-speed results
Three benchmarks are used: RULER, LV-Eval and LongBench-Chat. LV-Eval is scored with keyword recall to reduce false negatives in the original metric. In RULER, Qwen2.5-72B-Instruct averages 95.1 with DCA and YARN, against 90.8 without them. At 128K the scores are 88.4 with the methods and 67.0 without.
The DCA and YARN ablation rows do not change behavior within 32K tokens, which Table 16 states. The gap appears only at longer lengths, for example 64K and 128K.
Qwen2.5-Turbo reaches 100% accuracy on the 1M-token passkey retrieval task. The authors build sparse attention on Minference to speed up long-context inference.
Reward model benchmarks and cultural nuance
The reward model is compared on Reward Bench, RMB, PPE and an internal Chinese human-preference set. Nemotron-4-340B-Reward, Llama-3.1-Nemotron-70B-Reward and Athene-RM-70B are the baselines. In Table 15, Qwen2.5-RM-72B scores 91.59 on Reward Bench against 94.10 for Llama-3.1-Nemotron-70B-Reward. It scores 69.85 on PPE Objective-Avg against 69.09 for Athene-RM-70B, and 61.27 on Human-Preference-Chinese against 61.11 for Athene-RM-70B.
The authors argue that tuning to one reward benchmark can cause over-optimization that hurts other benchmarks and downstream alignment, so several benchmarks are needed. They also find that reward model benchmark scores do not reliably predict how well an RL model trained with that reward model performs.
On cultural nuance, the authors report improvement over Qwen2 while stating that this area still needs refinement. The BLEnD scores in Table 13 show this gap against GPT4o-mini and Mistral-Large.
Limitations
Reward model evaluations are not treated as a reliable signal for RL outcomes, so the authors call for more predictive evaluation methods. Long-context RL uses only short instructions, because long-context RL is expensive and suitable reward models are scarce. The gain on long-context alignment is therefore reported from a design that skips RL on long data.
The 1M-token results come from Qwen2.5-Turbo alone and rest on the passkey retrieval task and the TTFT measurements, while the RULER and LV-Eval comparisons stop at the claimed lengths listed in Tables 16 and 17. Qwen2.5-72B-Instruct does not lead on IFEval against Llama-3.1-405B-Instruct, and the cultural nuance results still need work.
Paper info
- Authors
- Qwen, :, An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin, Kai Dang, Keming Lu, Keqin Bao, Kexin Yang, Le Yu, Mei Li, Mingfeng Xue, Pei Zhang, Qin Zhu, Rui Men, Runji Lin, Tianhao Li, Tianyi Tang, Tingyu Xia, Xingzhang Ren, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yu Wan, Yuqiong Liu, Zeyu Cui, Zhenru Zhang, Zihan Qiu
- Venue
- arXiv · Preprint
- First published
- 2024-12-19
- Added
- 2026-10-20
- Updated
- 2025-1-3
- Version
- v2
- arXiv
- 2412.15115
- Category
- cs.CL
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Qwen, :, An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin et al. (2024). Qwen2.5 Technical Report. arXiv:2412.15115v2. https://arxiv.org/abs/2412.15115v2
BibTeX
@misc{qwen2024qwen2,
title = {{Qwen2.5 Technical Report}},
author = {Qwen and : and An Yang and Baosong Yang and Beichen Zhang and Binyuan Hui and Bo Zheng and Bowen Yu and Chengyuan Li and Dayiheng Liu and Fei Huang and Haoran Wei and Huan Lin and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Yang and Jiaxi Yang and Jingren Zhou and Junyang Lin and Kai Dang and Keming Lu and Keqin Bao and Kexin Yang and Le Yu and Mei Li and Mingfeng Xue and Pei Zhang and Qin Zhu and Rui Men and Runji Lin and Tianhao Li and Tianyi Tang and Tingyu Xia and Xingzhang Ren and Xuancheng Ren and Yang Fan and Yang Su and Yichang Zhang and Yu Wan and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zihan Qiu},
year = {2024},
eprint = {2412.15115},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2412.15115v2}
}