Views
No views yet

[!Note] Qwen3-Next-80B-A3B-Instruct supports only instruct (non-thinking) mode and does not generate<think></think>blocks in its output.

| Qwen3-30B-A3B-Instruct-2507 | Qwen3-32B Non-Thinking | Qwen3-235B-A22B-Instruct-2507 | Qwen3-Next-80B-A3B-Instruct | |
|---|---|---|---|---|
| Knowledge | ||||
| MMLU-Pro | 78.4 | 71.9 | 83.0 | 80.6 |
| MMLU-Redux | 89.3 | 85.7 | 93.1 | 90.9 |
| GPQA | 70.4 | 54.6 | 77.5 | 72.9 |
| SuperGPQA | 53.4 | 43.2 | 62.6 | 58.8 |
| Reasoning | ||||
| AIME25 | 61.3 | 20.2 | 70.3 | 69.5 |
| HMMT25 | 43.0 | 9.8 | 55.4 | 54.1 |
| LiveBench 20241125 | 69.0 | 59.8 | 75.4 | 75.8 |
| Coding | ||||
| LiveCodeBench v6 (25.02-25.05) | 43.2 | 29.1 | 51.8 | 56.6 |
| MultiPL-E | 83.8 | 76.9 | 87.9 | 87.8 |
| Aider-Polyglot | 35.6 | 40.0 | 57.3 | 49.8 |
| Alignment | ||||
| IFEval | 84.7 | 83.2 | 88.7 | 87.6 |
| Arena-Hard v2* | 69.0 | 34.1 | 79.2 | 82.7 |
| Creative Writing v3 | 86.0 | 78.3 | 87.5 | 85.3 |
| WritingBench | 85.5 | 75.4 | 85.2 | 87.3 |
| Agent | ||||
| BFCL-v3 | 65.1 | 63.0 | 70.9 | 70.3 |
| TAU1-Retail | 59.1 | 40.1 | 71.3 | 60.9 |
| TAU1-Airline | 40.0 | 17.0 | 44.0 | 44.0 |
| TAU2-Retail | 57.0 | 48.8 | 74.6 | 57.3 |
| TAU2-Airline | 38.0 | 24.0 | 50.0 | 45.5 |
| TAU2-Telecom | 12.3 | 24.6 | 32.5 | 13.2 |
| Multilingualism | ||||
| MultiIF | 67.9 | 70.7 | 77.5 | 75.8 |
| MMLU-ProX | 72.0 | 69.3 | 79.4 | 76.7 |
| INCLUDE | 71.9 | 70.9 | 79.5 | 78.9 |
| PolyMATH | 43.1 | 22.5 | 50.2 | 45.9 |
transformers.pip install git+https://github.com/huggingface/transformers.git@mainKeyError: 'qwen3_next'1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "Qwen/Qwen3-Next-80B-A3B-Instruct"
4
5# load the tokenizer and the model
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 dtype="auto",
10 device_map="auto",
11)
12
13# prepare the model input
14prompt = "Give me a short introduction to large language model."
15messages = [
16 {"role": "user", "content": prompt},
17]
18text = tokenizer.apply_chat_template(
19 messages,
20 tokenize=False,
21 add_generation_prompt=True,
22)
23model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
24
25# conduct text completion
26generated_ids = model.generate(
27 **model_inputs,
28 max_new_tokens=16384,
29)
30output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
31
32content = tokenizer.decode(output_ids, skip_special_tokens=True)
33
34print("content:", content)[!Note] Multi-Token Prediction (MTP) is not generally available in Hugging Face Transformers.
[!Note] The efficiency or throughput improvement depends highly on the implementation. It is recommended to adopt a dedicated inference framework, e.g., SGLang and vLLM, for inference tasks.
[!Tip] Depending on the inference settings, you may observe better efficiency withflash-linear-attentionandcausal-conv1d. See the links for detailed instructions and requirements.
sglang or vllm to create an OpenAI-compatible API endpoint.sglang>=0.5.2 is required for Qwen3-Next, which can be installed using:pip install 'sglang[all]>=0.5.2'http://localhost:30000/v1 with maximum context length 256K tokens using tensor parallel on 4 GPUs.python -m sglang.launch_server --model-path Qwen/Qwen3-Next-80B-A3B-Instruct --port 30000 --tp-size 4 --context-length 262144 --mem-fraction-static 0.8python -m sglang.launch_server --model-path Qwen/Qwen3-Next-80B-A3B-Instruct --port 30000 --tp-size 4 --context-length 262144 --mem-fraction-static 0.8 --speculative-algo NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4[!Note] The default context length is 256K. Consider reducing the context length to a smaller value, e.g.,32768, if the server fails to start.
vllm>=0.10.2 is required for Qwen3-Next, which can be installed using:pip install 'vllm>=0.10.2'http://localhost:8000/v1 with maximum context length 256K tokens using tensor parallel on 4 GPUs.vllm serve Qwen/Qwen3-Next-80B-A3B-Instruct --port 8000 --tensor-parallel-size 4 --max-model-len 262144vllm serve Qwen/Qwen3-Next-80B-A3B-Instruct --port 8000 --tensor-parallel-size 4 --max-model-len 262144 --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}'[!Note] The default context length is 256K. Consider reducing the context length to a smaller value, e.g.,32768, if the server fails to start.
1from qwen_agent.agents import Assistant
2
3# Define LLM
4llm_cfg = {
5 'model': 'Qwen3-Next-80B-A3B-Instruct',
6
7 # Use a custom endpoint compatible with OpenAI API:
8 'model_server': 'http://localhost:8000/v1', # api_base
9 'api_key': 'EMPTY',
10}
11
12# Define Tools
13tools = [
14 {'mcpServers': { # You can specify the MCP configuration file
15 'time': {
16 'command': 'uvx',
17 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
18 },
19 "fetch": {
20 "command": "uvx",
21 "args": ["mcp-server-fetch"]
22 }
23 }
24 },
25 'code_interpreter', # Built-in tools
26]
27
28# Define Agent
29bot = Assistant(llm=llm_cfg, function_list=tools)
30
31# Streaming generation
32messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
33for responses in bot.run(messages=messages):
34 pass
35print(responses)transformers, vllm and sglang.
In general, there are two approaches to enabling YaRN for supported frameworks:config.json file, add the rope_scaling fields:1{
2 ...,
3 "rope_scaling": {
4 "rope_type": "yarn",
5 "factor": 4.0,
6 "original_max_position_embeddings": 262144
7 }
8}vllm, you can useVLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --rope-scaling '{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":262144}' --max-model-len 1010000 sglang, you can useSGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling":{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":262144}}' --context-length 1010000[!NOTE] All the notable open-source frameworks implement static YaRN, which means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts. We advise adding therope_scalingconfiguration only when processing long contexts is required. It is also recommended to modify thefactoras needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to setfactoras 2.0.
| Model Name | Acc avg | 4k | 8k | 16k | 32k | 64k | 96k | 128k | 192k | 256k | 384k | 512k | 640k | 768k | 896k | 1000k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Qwen3-30B-A3B-Instruct-2507 | 86.8 | 98.0 | 96.7 | 96.9 | 97.2 | 93.4 | 91.0 | 89.1 | 89.8 | 82.5 | 83.6 | 78.4 | 79.7 | 77.6 | 75.7 | 72.8 |
| Qwen3-235B-A22B-Instruct-2507 | 92.5 | 98.5 | 97.6 | 96.9 | 97.3 | 95.8 | 94.9 | 93.9 | 94.5 | 91.0 | 92.2 | 90.9 | 87.8 | 84.8 | 86.5 | 84.5 |
| Qwen3-Next-80B-A3B-Instruct | 91.8 | 98.5 | 99.0 | 98.0 | 98.7 | 97.6 | 95.0 | 96.0 | 94.0 | 93.5 | 91.7 | 86.9 | 85.5 | 81.7 | 80.3 | 80.3 |
Temperature=0.7, TopP=0.8, TopK=20, and MinP=0.presence_penalty parameter between 0 and 2 to reduce endless repetitions. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance.answer field with only the choice letter, e.g., "answer": "C"."@misc{qwen3technicalreport,
title={Qwen3 Technical Report},
author={Qwen Team},
year={2025},
eprint={2505.09388},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2505.09388},
}
@article{qwen2.5-1m,
title={Qwen2.5-1M Technical Report},
author={An Yang and Bowen Yu and Chengyuan Li and Dayiheng Liu and Fei Huang and Haoyan Huang and Jiandong Jiang and Jianhong Tu and Jianwei Zhang and Jingren Zhou and Junyang Lin and Kai Dang and Kexin Yang and Le Yu and Mei Li and Minmin Sun and Qin Zhu and Rui Men and Tao He and Weijia Xu and Wenbiao Yin and Wenyuan Yu and Xiafei Qiu and Xingzhang Ren and Xinlong Yang and Yong Li and Zhiying Xu and Zipeng Zhang},
journal={arXiv preprint arXiv:2501.15383},
year={2025}
}