Qwen3.6-27B
Qwen3.6-27B
Qwen Team 发布 Qwen3.6-27B open-weight 后训练权重,模型为带 Vision Encoder 的 Causal Language Model,27B 参数,原生 262,144 tokens context,可用 YaRN 扩展至 1,010,000 tokens,兼容 Transformers、vLLM、SGLang、KTransformers,并提供 API、tool use、MTP 与 preserve_thinking 用法。
Qwen3.6-27B
[!Note] 本仓库包含 Hugging Face Transformers 格式的后训练模型权重和配置文件。
这些产物兼容 Hugging Face Transformers、vLLM、SGLang、KTransformers 等。
继 2 月发布 Qwen3.5 系列之后,我们很高兴分享 Qwen3.6 的首个 open-weight 版本。Qwen3.6 基于社区的直接反馈构建,优先关注稳定性和真实场景实用性,为开发者提供更直观、响应更快、真正有助于提升生产力的编码体验。
Qwen3.6 亮点
本次发布带来了显著升级,尤其体现在:
- Agentic Coding: 模型现在能够更流畅、更精确地处理前端工作流和 repository 级推理。
- Thinking Preservation: 我们引入了一个新选项,可保留历史消息中的推理上下文,从而简化迭代式开发并降低开销。

更多细节请参阅我们的博客文章 Qwen3.6-27B。
模型概览
- 类型:带 Vision Encoder 的 Causal Language Model
- 训练阶段:Pre-training & Post-training
- Language Model
- 参数量:27B
- Hidden Dimension:5120
- Token Embedding:248320(Padded)
- 层数:64
- Hidden Layout:16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN))
- Gated DeltaNet:
- Linear Attention Heads 数量:V 为 48,QK 为 16
- Head Dimension:128
- Gated Attention:
- Attention Heads 数量:Q 为 24,KV 为 4
- Head Dimension:256
- Rotary Position Embedding Dimension:64
- Feed Forward Network:
- Intermediate Dimension:17408
- LM Output:248320(Padded)
- MTP:使用 multi-steps 训练
- Context Length:原生支持 262,144,并可扩展至 1,010,000 tokens。
Benchmark 结果
Language
| Qwen3.5-27B | Qwen3.5-397B-A17B | Gemma4-31B | Claude 4.5 Opus | Qwen3.6-35B-A3B | Qwen3.6-27B | |
|---|---|---|---|---|---|---|
| Coding Agent | ||||||
| SWE-bench Verified | 75.0 | 76.2 | 52.0 | 80.9 | 73.4 | 77.2 |
| SWE-bench Pro | 51.2 | 50.9 | 35.7 | 57.1 | 49.5 | 53.5 |
| SWE-bench Multilingual | 69.3 | 69.3 | 51.7 | 77.5 | 67.2 | 71.3 |
| Terminal-Bench 2.0 | 41.6 | 52.5 | 42.9 | 59.3 | 51.5 | 59.3 |
| SkillsBench Avg5 | 27.2 | 30.0 | 23.6 | 45.3 | 28.7 | 48.2 |
| QwenWebBench | 1068 | 1186 | 1197 | 1536 | 1397 | 1487 |
| NL2Repo | 27.3 | 32.2 | 15.5 | 43.2 | 29.4 | 36.2 |
| Claw-Eval Avg | 64.3 | 70.7 | 48.5 | 76.6 | 68.7 | 72.4 |
| Claw-Eval Pass^3 | 46.2 | 48.1 | 25.0 | 59.6 | 50.0 | 60.6 |
| QwenClawBench | 52.2 | 51.8 | 41.7 | 52.3 | 52.6 | 53.4 |
| Knowledge | ||||||
| MMLU-Pro | 86.1 | 87.8 | 85.2 | 89.5 | 85.2 | 86.2 |
| MMLU-Redux | 93.2 | 94.9 | 93.7 | 95.6 | 93.3 | 93.5 |
| SuperGPQA | 65.6 | 70.4 | 65.7 | 70.6 | 64.7 | 66.0 |
| C-Eval | 90.5 | 93.0 | 82.6 | 92.2 | 90.0 | 91.4 |
| STEM & Reasoning | ||||||
| GPQA Diamond | 85.5 | 88.4 | 84.3 | 87.0 | 86.0 | 87.8 |
| HLE | 24.3 | 28.7 | 19.5 | 30.8 | 21.4 | 24.0 |
| LiveCodeBench v6 | 80.7 | 83.6 | 80.0 | 84.8 | 80.4 | 83.9 |
| HMMT Feb 25 | 92.0 | 94.8 | 88.7 | 92.9 | 90.7 | 93.8 |
| HMMT Nov 25 | 89.8 | 92.7 | 87.5 | 93.3 | 89.1 | 90.7 |
| HMMT Feb 26 | 84.3 | 87.9 | 77.2 | 85.3 | 83.6 | 84.3 |
| IMOAnswerBench | 79.9 | 80.9 | 74.5 | 84.0 | 78.9 | 80.8 |
| AIME26 | 92.6 | 93.3 | 89.2 | 95.1 | 92.7 | 94.1 |
- SWE-Bench Series:内部 agent scaffold(bash + file-edit tools);temp=1.0,top_p=0.95,200K context window。我们修正了 SWE-bench Pro 公开集合中的部分问题任务,并在细化后的 benchmark 上评测所有 baseline。
- Terminal-Bench 2.0:Harbor/Terminus-2 harness;3h timeout,32 CPU/48 GB RAM;temp=1.0,top_p=0.95,top_k=20,max_tokens=80K,256K ctx;5 次运行平均值。
- SkillsBench:通过 OpenCode 在 78 个任务上评测(自包含子集,排除依赖 API 的任务);5 次运行平均值。
- NL2Repo:其他模型通过 Claude Code 评测(temp=1.0,top_p=0.95,max_turns=900)。
- QwenClawBench:基于真实用户分布的 Claw agent benchmark;temp=0.6,256K ctx。
- QwenWebBench:内部前端代码生成 benchmark;双语(EN/CN),7 类(Web Design、Web Apps、Games、SVG、Data Visualization、Animation、3D);自动渲染 + multimodal judge(代码/视觉正确性);BT/Elo 评分系统。
- AIME 26:我们使用完整的 AIME 2026(I & II),其分数可能与 Qwen 3.5 notes 中不同。
Vision Language
| Qwen3.5-27B | Qwen3.5-397B-A17B | Gemma4-31B | Claude 4.5 Opus | Qwen3.6-35B-A3B | Qwen3.6-27B | |
|---|---|---|---|---|---|---|
| STEM & Puzzle | ||||||
| MMMU | 82.3 | 85.0 | 80.4 | 80.7 | 81.7 | 82.9 |
| MMMU-Pro | 75.0 | 79.0 | 76.9 | 70.6 | 75.3 | 75.8 |
| MathVista mini | 87.8 | -- | 79.3 | -- | 86.4 | 87.4 |
| DynaMath | 87.7 | 86.3 | 79.5 | 79.7 | 82.8 | 85.6 |
| VlmsAreBlind | 96.9 | -- | 87.2 | -- | 96.6 | 97.0 |
| General VQA | ||||||
| RealWorldQA | 83.7 | 83.9 | 72.3 | 77.0 | 85.3 | 84.1 |
| MMStar | 81.0 | 83.8 | 77.3 | 73.2 | 80.7 | 81.4 |
| MMBenchEN-DEV-v1.1 | 92.6 | -- | 90.9 | -- | 92.8 | 92.3 |
| SimpleVQA | 56.0 | 67.1 | 52.9 | 65.7 | 58.9 | 56.1 |
| Document Understanding | ||||||
| CharXiv RQ | 79.5 | 80.8 | 67.9 | 68.5 | 78.0 | 78.4 |
| CC-OCR | 81.0 | 82.0 | 75.7 | 76.9 | 81.9 | 81.2 |
| OCRBench | 89.4 | -- | 86.1 | -- | 90.0 | 89.4 |
| Spatial Intelligence | ||||||
| ERQA | 60.5 | 67.5 | 57.5 | 46.8 | 61.8 | 62.5 |
| CountBench | 97.8 | 97.2 | 96.1 | 90.6 | 96.1 | 97.8 |
| RefCOCO avg | 90.9 | 92.3 | -- | -- | 92.0 | 92.5 |
| EmbSpatialBench | 84.5 | -- | -- | -- | 84.3 | 84.6 |
| RefSpatialBench | 67.7 | -- | 4.7 | -- | 64.3 | 70.0 |
| Video Understanding | ||||||
| VideoMME(w sub.) | 87.0 | 87.5 | -- | 77.7 | 86.6 | 87.7 |
| VideoMMMU | 82.3 | 84.7 | 81.6 | 84.4 | 83.7 | 84.4 |
| MLVU | 85.9 | 86.7 | -- | 81.7 | 86.2 | 86.6 |
| MVBench | 74.6 | 77.6 | -- | 67.2 | 74.6 | 75.5 |
| Visual Agent | ||||||
| V* | 93.7 | 95.8 | -- | 67.0 | 90.1 | 94.7 |
| AndroidWorld | 64.2 | -- | -- | -- | -- | 70.3 |
- 空单元格(--)表示分数尚不可用或不适用。
Quickstart
为简化集成,我们推荐通过 API 使用 Qwen3.6。下面是通过 OpenAI-compatible API 使用 Qwen3.6 的指南。
Serving Qwen3.6
Qwen3.6 可以通过主流 inference framework 以 API 形式提供服务。 下面展示用于为 Qwen3.6 模型启动 OpenAI-Compatible API server 的示例命令。
[!Important] 不同 framework 的 inference 效率和吞吐量差异显著。 我们建议使用最新版本的 framework,以确保最佳性能和兼容性。 对于生产工作负载或高吞吐场景,强烈推荐使用 SGLang、KTransformers 或 vLLM 等专用 serving engine。
[!Important] 模型默认 context length 为 262,144 tokens。 如果遇到 out-of-memory(OOM)错误,可考虑减小 context window。 但由于 Qwen3.6 会利用扩展 context 处理复杂任务,我们建议保持至少 128K tokens 的 context length,以保留 thinking 能力。
SGLang
SGLang 是面向 large language model 和 vision language model 的快速 serving framework。
推荐为 Qwen3.6 使用 sglang>=0.5.10,可在全新环境中使用以下命令安装:
uv pip install sglang[all]
更多细节请参阅其文档。
以下命令会在 http://localhost:8000/v1 创建 API endpoint:
标准版本:以下命令可使用 8 张 GPU 上的 tensor parallel 创建最大 context length 为 262,144 tokens 的 API endpoint。
python -m sglang.launch_server --model-path Qwen/Qwen3.6-27B --port 8000 --tp-size 8 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3Tool Use:如需支持 tool use,可使用以下命令。
python -m sglang.launch_server --model-path Qwen/Qwen3.6-27B --port 8000 --tp-size 8 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --tool-call-parser qwen3_coderMulti-Token Prediction(MTP):推荐对 MTP 使用以下命令:
python -m sglang.launch_server --model-path Qwen/Qwen3.6-27B --port 8000 --tp-size 8 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --speculative-algo NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4
详细部署指南请参阅 SGLang Qwen3.5 Cookbook。
vLLM
vLLM 是面向 LLM 的高吞吐、内存高效的 inference 与 serving engine。
推荐为 Qwen3.6 使用 vllm>=0.19.0,可在全新环境中使用以下命令安装:
uv pip install vllm --torch-backend=auto
更多细节请参阅其文档。
以下命令会在 http://localhost:8000/v1 创建 API endpoint:
标准版本:以下命令可使用 8 张 GPU 上的 tensor parallel 创建最大 context length 为 262,144 tokens 的 API endpoint。
vllm serve Qwen/Qwen3.6-27B --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3Tool Call:如需支持 tool use,可使用以下命令。
vllm serve Qwen/Qwen3.6-27B --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coderMulti-Token Prediction(MTP):推荐对 MTP 使用以下命令:
vllm serve Qwen/Qwen3.6-27B --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}'Text-Only:以下命令会跳过 vision encoder 和 multimodal profiling,以释放内存用于额外的 KV cache:
vllm serve Qwen/Qwen3.6-27B --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 --language-model-only
详细部署指南请参阅 vLLM Qwen3.5 Recipe。
KTransformers
KTransformers 是一个灵活的 framework,可通过 CPU-GPU 异构计算体验前沿 LLM inference 优化。 如需使用 KTransformers 运行 Qwen3.6,请参阅 KTransformers Deployment Guide。
Hugging Face Transformers
Hugging Face Transformers 包含一个 轻量级 server,可用于快速测试和中等负载部署。
Qwen3.6 需要最新的 transformers:
pip install "transformers[serving]"
更多细节请参阅其文档。同时请确保已安装 torchvision 和 pillow。
然后运行 transformers serve 启动 server,并在 http://localhost:8000/v1 提供 API endpoint;如有可用 accelerator,它会将模型放置到 accelerator 上:
transformers serve Qwen/Qwen3.6-27B --port 8000 --continuous-batching
通过 Chat Completions API 使用 Qwen3.6
chat completions API 可通过标准 HTTP request 或 OpenAI SDK 访问。 这里展示使用 OpenAI Python SDK 的示例。
开始前,请确保已安装 SDK,并配置 API key 和 API base URL,例如:
pip install -U openai
# Set the following accordingly
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
[!Tip] 我们建议使用以下 sampling 参数进行生成:
- 通用任务的 thinking mode:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0- 精确编码任务(如 WebDev)的 thinking mode:
temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0- Instruct(或 non-thinking)mode:
temperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0请注意,不同 inference framework 对 sampling 参数的支持有所不同。
[!Important] Qwen3.6 模型默认以 thinking mode 运行,会在生成最终回答前生成由
<think>\n...</think>\n\n标记的 thinking content。 如需禁用 thinking content 并获得直接回答,请参考这里的示例。
Text-Only Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{"role": "user", "content": "Type \"I love Qwen3.6\" backwards"},
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.6-27B",
messages=messages,
max_tokens=81920,
temperature=1.0,
top_p=0.95,
presence_penalty=0.0,
extra_body={
"top_k": 20,
},
)
print("Chat response:", chat_response)
Image Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/CI_Demo/mathv-1327.jpg"
}
},
{
"type": "text",
"text": "The centres of the four illustrated circles are in the corners of the square. The two big circles touch each other and also the two little circles. With which factor do you have to multiply the radii of the little circles to obtain the radius of the big circles?\nChoices:\n(A) $\\frac{2}{9}$\n(B) $\\sqrt{5}$\n(C) $0.8 \\cdot \\pi$\n(D) 2.5\n(E) $1+\\sqrt{2}$"
}
]
}
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.6-27B",
messages=messages,
max_tokens=81920,
temperature=1.0,
top_p=0.95,
presence_penalty=0.0,
extra_body={
"top_k": 20,
},
)
print("Chat response:", chat_response)
Video Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/video/N1cdUjctpG8.mp4"
}
},
{
"type": "text",
"text": "How many porcelain jars were discovered in the niches located in the primary chamber of the tomb?"
}
]
}
]
# When vLLM is launched with `--media-io-kwargs '{"video": {"num_frames": -1}}'`,
# video frame sampling can be configured via `extra_body` (e.g., by setting `fps`).
# This feature is currently supported only in vLLM.
#
# By default, `fps=2` and `do_sample_frames=True`.
# With `do_sample_frames=True`, you can customize the `fps` value to set your desired video sampling rate.
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.6-27B",
messages=messages,
max_tokens=81920,
temperature=1.0,
top_p=0.95,
presence_penalty=0.0,
extra_body={
"top_k": 20,
"mm_processor_kwargs": {"fps": 2, "do_sample_frames": True},
},
)
print("Chat response:", chat_response)
Instruct(或 Non-Thinking)Mode
[!Important] Qwen3.6 不正式支持 Qwen3 的 soft switch,即
/think和/nothink。
Qwen3.6 默认会先进行 thinking 再回答。 你可以通过配置 API 参数,让模型不进行 thinking 而直接回答。 例如:
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.6/demo/RealWorld/RealWorld-04.png"
}
},
{
"type": "text",
"text": "Where is this?"
}
]
}
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.6-27B",
messages=messages,
max_tokens=32768,
temperature=0.7,
top_p=0.8,
presence_penalty=1.5,
extra_body={
"top_k": 20,
"chat_template_kwargs": {"enable_thinking": False},
},
)
print("Chat response:", chat_response)
[!Note] 如果你使用 Alibaba Cloud Model Studio 的 API,除了修改
model,请使用"enable_thinking": False,而不是"chat_template_kwargs": {"enable_thinking": False}。
Preserve Thinking
默认情况下,只会保留处理最新用户消息时生成的 thinking block,形成常见的 interleaved thinking 模式。
Qwen3.6 经过额外训练,能够保留并利用历史消息中的 thinking trace。
你可以通过设置 preserve_thinking 选项启用这一行为:
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [...]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.6-27B",
messages=messages,
max_tokens=32768,
temperature=0.6,
top_p=0.95,
presence_penalty=0.0,
extra_body={
"top_k": 20,
"chat_template_kwargs": {"preserve_thinking": True},
},
)
print("Chat response:", chat_response)
[!Note] 如果你使用 Alibaba Cloud Model Studio 的 API,除了修改
model,请使用"preserve_thinking": True,而不是"chat_template_kwargs": {"preserve_thinking": False}。
这一能力对 agent 场景尤其有用:保留完整推理上下文可以增强决策一致性,并且在许多情况下通过减少重复推理来降低整体 token 消耗。此外,它还能提升 KV cache 利用率,优化 thinking 和 non-thinking mode 下的 inference 效率。
Agentic Usage
Qwen3.6 在 tool calling 能力方面表现突出。
Qwen-Agent
我们推荐使用 Qwen-Agent 快速构建基于 Qwen3.6 的 Agent 应用。
要定义可用工具,你可以使用 MCP 配置文件、使用 Qwen-Agent 的内置工具,或自行集成其他工具。
import os
from qwen_agent.agents import Assistant
# Define LLM
# Using Alibaba Cloud Model Studio
llm_cfg = {
# Use the OpenAI-compatible model service provided by DashScope:
'model': 'qwen3.6-27b',
'model_type': 'qwenvl_oai',
'model_server': 'https://dashscope.aliyuncs.com/compatible-mode/v1',
'api_key': os.getenv('DASHSCOPE_API_KEY'),
'generate_cfg': {
'use_raw_api': True,
# When using Dash Scope OAI API, pass the parameter of whether to enable thinking mode in this way
'extra_body': {
'enable_thinking': True,
'preserve_thinking': True,
},
},
}
# Using OpenAI-compatible API endpoint.
# functionality of the deployment frameworks and let Qwen-Agent automate the related operations.
#
# llm_cfg = {
# # Use your own model service compatible with OpenAI API by vLLM/SGLang:
# 'model': 'Qwen/Qwen3.6-27B',
# 'model_type': 'qwenvl_oai',
# 'model_server': 'http://localhost:8000/v1', # api_base
# 'api_key': 'EMPTY',
#
# 'generate_cfg': {
# 'use_raw_api': True,
# # When using vLLM/SGLang OAI API, pass the parameter of whether to enable thinking mode in this way
# 'extra_body': {
# 'chat_template_kwargs': {'enable_thinking': True, 'preserve_thinking': True}
# },
# },
# }
# Define Tools
tools = [
{'mcpServers': { # You can specify the MCP configuration file
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/xxxx/Desktop"]
}
}
}
]
# Define Agent
bot = Assistant(llm=llm_cfg, function_list=tools)
# Streaming generation
messages = [{'role': 'user', 'content': 'Help me organize my desktop.'}]
for responses in bot.run(messages=messages):
pass
print(responses)
# Streaming generation
messages = [{'role': 'user', 'content': 'Develop a dog website and save it on the desktop'}]
for responses in bot.run(messages=messages):
pass
print(responses)
Qwen Code
Qwen Code 是一个面向 terminal 的开源 AI agent,针对 Qwen 模型优化。它可以帮助你理解大型 codebase、自动化繁琐工作,并更快交付。
更多信息请参阅 Qwen Code。
处理超长文本
Qwen3.6 原生支持最长 262,144 tokens 的 context length。 对于总长度(包括输入和输出)超过该限制的长程任务,我们建议使用 RoPE scaling 技术有效处理长文本,例如 YaRN。
YaRN 目前已被多个 inference framework 支持,例如 transformers、vllm、ktransformers 和 sglang。
一般来说,在受支持的 framework 中启用 YaRN 有两种方式:
修改模型配置文件: 在
config.json文件中,将text_config中的rope_parameters字段改为:{ "mrope_interleaved": true, "mrope_section": [ 11, 11, 10 ], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144, }传入命令行参数:
对于
vllm,可以使用:VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1010000对于
sglang和ktransformers,可以使用:SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --context-length 1010000
[!NOTE] 所有主要开源 framework 都实现的是 static YaRN,也就是说 scaling factor 不会随输入长度变化而变化,这可能影响短文本性能。 我们建议仅在需要处理长 context 时修改
rope_parameters配置。 同时也建议按需修改factor。例如,如果你的应用典型 context length 为 524,288 tokens,将factor设为 2.0 会更合适。
Best Practices
为获得最佳性能,我们建议采用以下设置:
Sampling Parameters:
- 我们建议根据 mode 和任务类型使用以下 sampling 参数组合:
- 通用任务的 thinking mode:
temperature=1.0,top_p=0.95,top_k=20,min_p=0.0,presence_penalty=0.0,repetition_penalty=1.0 - 精确编码任务(如 WebDev)的 thinking mode:
temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,presence_penalty=0.0,repetition_penalty=1.0 - Instruct(或 non-thinking)mode:
temperature=0.7,top_p=0.80,top_k=20,min_p=0.0,presence_penalty=1.5,repetition_penalty=1.0
- 通用任务的 thinking mode:
- 对于支持的 framework,可以在 0 到 2 之间调整
presence_penalty参数,以减少无休止重复。不过,使用较高值有时可能导致语言混用,并使模型性能略有下降。
- 我们建议根据 mode 和任务类型使用以下 sampling 参数组合:
充足的输出长度:我们建议对大多数 query 使用 32,768 tokens 的输出长度。对于数学和编程竞赛中常见的高复杂度问题 benchmark,建议将最大输出长度设为 81,920 tokens。这能为模型提供足够空间生成详细、完整的回答,从而提升整体性能。
标准化输出格式:benchmark 时,我们建议使用 prompt 标准化模型输出。
- 数学题:在 prompt 中加入 “Please reason step by step, and put your final answer within \boxed{}.”
- 多选题:在 prompt 中加入以下 JSON 结构以标准化回答:“Please show your choice in the
answerfield with only the choice letter, e.g.,"answer": "C".”
长视频理解:为优化纯文本和图片的 inference 效率,发布的
video_preprocessor_config.json中的size参数采用了保守配置。建议将 video_preprocessor_config 文件中的longest_edge参数设置为 469,762,048(对应 224k video tokens),以支持小时级视频的更高帧率采样,从而获得更好性能。例如:{"longest_edge": 469762048, "shortest_edge": 4096}
Citation
如果你觉得我们的工作有帮助,欢迎引用。
@misc{qwen3.6-27b,
title = {{Qwen3.6-27B}: Flagship-Level Coding in a {27B} Dense Model},
author = {{Qwen Team}},
month = {April},
year = {2026},
url = {https://qwen.ai/blog?id=qwen3.6-27b}
}