Skip to main content
Back

Alibaba Cloud's Qwen-72B Beats LLaMA2 on Math, Code, and 16 Languages

Alibaba's 72B open-weight base model ships with 32K context, a 150K multilingual vocabulary, and benchmark scores that top LLaMA2-70B across the board.

Pro

  • Alibaba released Qwen-72B, a 72B dense Transformer trained on 3T+ tokens with 32K context.
  • Average score 66.4 across 10 benchmarks, outperforming LLaMA2-70B (45.7) and Yi-34B (58.0).
  • 150K-token vocabulary built on GPT-4's cl100k_base BPE for strong multilingual compression.
  • Architecture uses RoPE, SwiGLU, RMSNorm, 80 layers, 64 heads, d_model 8192, with Flash Attention 2 support.
  • Requires 144GB GPU memory in BF16, or 48GB in Int4; supported by vLLM, SGLang, and Ollama.
  • Weights available under the Tongyi Qianwen license, permitting research and commercial use via GitHub.

Alibaba Cloud has released Qwen-72B, the 72-billion-parameter flagship of its Tongyi Qianwen series, and pushed the weights to Hugging Face under a license that permits both research and commercial use. It is a dense Transformer trained on more than three trillion tokens, and its benchmark numbers put it well above LLaMA2-70B on every task the team measured, including MMLU, GSM8K, HumanEval, and a battery of Chinese exams.

At the time it landed, most open-weight models at this scale were tuned primarily for English. Qwen-72B ships with a 150K-token vocabulary built on top of GPT-4's cl100k_base BPE, which changes what you can do in Chinese, Japanese, Korean, Arabic, and a long tail of other languages without ever touching the tokenizer.

What is actually inside the box

The architecture is conventional but well-tuned. Qwen-72B is a Transformer with 80 layers, 64 attention heads, a hidden size of 8192, a vocabulary of 151,851 tokens, and a sequence length of 32,768. On the modeling side, the team uses the current standard stack: RoPE for positional encoding, SwiGLU activations, and RMSNorm, with optional Flash Attention 2 for speed and memory.

The data recipe is where the model earns its scores. Pretraining covers over 3 trillion tokens spanning Chinese, English, other multilingual texts, code, and mathematics, across both general and professional domains. The distribution of the corpus was tuned through a large number of ablation experiments, which is a polite way of saying the team ran many comparisons to figure out how much code, math, and multilingual text to mix in.

Context length gets special attention. Qwen-72B extends the RoPE base to support extrapolation out to 32k, and the team reports perplexity on arXiv data of 2.828 at 8k, 2.734 at 16k, and 2.717 at 32k, meaning quality actually holds up as the window grows rather than degrading.

Where it wins, where it does not

The comparison table in the model card is the clearest picture of what changed. Averaged across ten benchmarks, Qwen-72B lands at 66.4, versus 45.7 for LLaMA2-70B and 58.0 for Yi-34B. A few specific numbers worth noting:

  • MMLU: 77.4 (5-shot), against 69.7 for LLaMA2-70B
  • GSM8K math word problems: 78.9 (8-shot), against 63.5 for LLaMA2-70B
  • MATH: 35.2 (4-shot), roughly 3x LLaMA2-70B's 12.0
  • HumanEval: 35.4 (0-shot), against 26.2 for LLaMA2-70B
  • C-Eval Chinese exams: 83.3, against 50.1 for LLaMA2-70B
  • GaokaoBench: 87.6, the largest single gap in the table

The pattern is that Qwen-72B is a real step up in math and coding for a base model, and dominant on Chinese-language evaluations. Its lead on English general knowledge (MMLU) is real but smaller. There is no long-form agent, tool-use, or RLHF chat benchmark in the released card, so if you care about assistant-style behavior you probably want the Qwen-72B-Chat variant, which has been aligned separately.

Tokenizer compression ratio comparison across Qwen and other open models

The tokenizer is doing quiet work

Most 70B-class open models at the time shipped with vocabularies in the 32K to 65K range, tuned for English and, in some cases, a little Chinese. Qwen-72B goes wider. The team randomly sampled a million documents per language and measured how efficiently each tokenizer encoded them, using XLM-R as the baseline. The chart in the model card shows Qwen compressing Thai, Hebrew, Arabic, Korean, Vietnamese, Japanese, Turkish, Indonesian, Polish, Russian, Dutch, Portuguese, Italian, German, Spanish, and French markedly better than LLaMA-7B or ChatGLM2-6B.

That efficiency has practical consequences. A better compression ratio means fewer tokens per sentence, which means cheaper inference, longer effective context, and better modeling because gradients see more of a document per step. It also means you can fine-tune on a new language without expanding the vocabulary, which is where most multilingual extensions get expensive and brittle.

What it takes to run

This is a large dense model, so hardware requirements are non-trivial. Running Qwen-72B-Chat in bf16/fp16 requires at least 144GB of GPU memory (for example, 2xA100-80G or 5xV100-32G). Running it in int4 requires at least 48GB of GPU memory (for example, 1xA100-80G or 2xV100-32G). Community quantizations for llama.cpp, Ollama, and LM Studio are listed on the Hugging Face page, which brings inference down to a single high-end consumer or workstation GPU.

Serving is straightforward if you are already on the modern stack. vLLM and SGLang both have first-party recipes:

pip install vllm
vllm serve "Qwen/Qwen-72B"

The Transformers path needs trust_remote_code=True because the model ships with a custom code file, and the recommended dependencies pin transformers==4.32.0 plus tiktoken, einops, and optionally flash-attention.

License and access

The weights are governed by the Tongyi Qianwen License Agreement. The code and checkpoints are open for research, and commercial use is permitted after filling out an application form. That is a lighter constraint than the Meta-style monthly active user cap but heavier than an unqualified Apache 2.0. The model is mirrored on ModelScope and served through Alibaba's DashScope API for teams that would rather rent than host.

Why it matters

Qwen-72B is one of the first cases where a Chinese lab shipped an open dense model that is competitive with the best Western open weights at its scale, ahead of them on math, code, and multilingual coverage, and at parity or better on English knowledge. The Qwen technical report lays out the design choices in more detail, and the GitHub repository hosts the training and evaluation scripts.

For anyone choosing a base model to fine-tune for a bilingual assistant, a Chinese-English retrieval system, or a code and math tutor, this release changed the default. And the 32K context, actually validated with perplexity numbers rather than just advertised, made it usable for long-document workloads out of the box.