unsloth/Qwen3.6-27B-GGUF
摘要
Unsloth 发布了 Qwen3.6-27B 模型的 GGUF 量化版本,具备更强的智能体编程能力、工具调用功能,并支持 Unsloth Studio。
任务: image-text-to-text
标签: transformers, gguf, unsloth, qwen, qwen3_5, image-text-to-text, base_model:Qwen/Qwen3.6-27B, base_model:quantized:Qwen/Qwen3.6-27B, license:apache-2.0, endpoints_compatible, region:us, imatrix, conversational
查看缓存全文
缓存时间: 2026/05/08 09:00
unsloth/Qwen3.6-27B-GGUF · Hugging Face 来源:https://huggingface.co/unsloth/Qwen3.6-27B-GGUF ## https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#read-our-how-to-run-qwen36-guide阅读我们的 Qwen3.6 运行指南!(https://unsloth.ai/docs/models/qwen3.6) 查看 Unsloth Dynamic 2.0 GGUF(https://unsloth.ai/docs/basics/unsloth-dynamic-v2.0-gguf) 了解我们的量化基准测试。 - 开发者角色支持,让 Qwen3.6 可以在 Codex、OpenCode 等工具中运行! - Qwen3.6 现可在 Unsloth Studio(https://unsloth.ai/docs/new/studio) 中运行和微调。阅读我们的指南(https://unsloth.ai/docs/models/qwen3.6)。 - 工具调用改进:优化嵌套对象的解析,提高工具调用成功率。 - Qwen3.6 35B-A3B(4-bit GGUF)在 Unsloth Studio 中运行工具调用的示例:qwen3.6 in unsloth studio — Qwen Chat (https://chat.qwen.ai/) > 本仓库包含后训练模型的权重和配置文件,采用 Hugging Face Transformers 格式。这些产物兼容 Hugging Face Transformers、vLLM、SGLang、KTransformers 等。继二月发布 Qwen3.5 系列之后,我们很高兴分享 Qwen3.6 的首个开源权重版本。Qwen3.6 基于社区直接反馈构建,优先关注稳定性和实际效用,为开发者提供更直观、响应更迅速且真正高效的编码体验。 ## https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#qwen36-highlightsQwen3.6 亮点 本次发布带来了重大升级,特别是在以下方面: - **Agentic 编码:**模型现在能更流畅、更精确地处理前端工作流和仓库级推理。 - **思考保留:**我们引入了新的选项来保留历史消息中的推理上下文,简化迭代开发并减少开销。 基准测试结果 (https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3.6/Figures/qwen3.6_27b_score.png) 更多详情请参阅我们的博客文章 Qwen3.6-27B (https://qwen.ai/blog?id=qwen3.6-27b)。 ## https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#model-overview模型概览 - 类型:带视觉编码器的因果语言模型 - 训练阶段:预训练与后训练 - 语言模型 - 参数量:27B - 隐藏维度:5120 - 词嵌入:248320(填充后) - 层数:64 - 隐藏层布局:16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN)) - Gated DeltaNet: - 线性注意力头数:V 为 48,QK 为 16 - 头维度:128 - Gated Attention: - 注意力头数:Q 为 24,KV 为 4 - 头维度:256 - 旋转位置编码维度:64 - 前馈网络: - 中间维度:17408 - LM 输出:248320(填充后) - MTP:多步训练 - 上下文长度:原生 262,144,可扩展至 1,010,000 令牌。 ## https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#benchmark-results基准结果 ### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#language语言 ### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#vision-language视觉语言 ## https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#quickstart快速开始 为简化集成,我们建议通过 API 使用 Qwen3.6。以下是通过兼容 OpenAI 的 API 使用 Qwen3.6 的指南。 ### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#serving-qwen36部署 Qwen3.6 Qwen3.6 可通过主流推理框架以 API 形式部署。以下展示启动 Qwen3.6 模型兼容 OpenAI API 服务器的示例命令。 > 推理效率和吞吐量因框架而异。建议使用最新版本以确保最佳性能和兼容性。对于生产工作负载或高吞吐量场景,强烈推荐使用专用推理引擎,如 SGLang、KTransformers 或 vLLM。 > 模型默认上下文长度为 262,144 令牌。如遇内存不足(OOM)错误,可考虑减小上下文窗口。但由于 Qwen3.6 利用扩展上下文处理复杂任务,建议保持至少 128K 令牌的上下文长度以保留思考能力。 #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#sglangSGLang SGLang (https://github.com/sgl-project/sglang) 是用于大语言模型和视觉语言模型的快速推理框架。建议使用 sglang>=0.5.10 运行 Qwen3.6,可在新环境中通过以下命令安装: uv pip install sglang[all] 更多详情请参阅其文档 (https://docs.sglang.ai/get_started/install.html)。 以下将在 http://localhost:8000/v1 创建 API 端点: - 标准版本:以下命令可用于在 8 块 GPU 上使用张量并行创建最大上下文长度 262,144 令牌的 API 端点。 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 - 工具使用:要支持工具使用,可使用以下命令。 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_coder - 多令牌预测(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 (https://lmsysorg.mintlify.app/cookbook/llm/Qwen/Qwen3.5)。 #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#vllmvLLM vLLM (https://github.com/vllm-project/vllm) 是用于 LLM 的高吞吐量、内存高效推理引擎。建议使用 vllm>=0.19.0 运行 Qwen3.6,可在新环境中通过以下命令安装: uv pip install vllm --torch-backend=auto 更多详情请参阅其文档 (https://docs.vllm.ai/en/stable/getting_started/installation/index.html)。 以下将在 http://localhost:8000/v1 创建 API 端点: - 标准版本:以下命令可用于在 8 块 GPU 上使用张量并行创建最大上下文长度 262,144 令牌的 API 端点。 vllm serve Qwen/Qwen3.6-27B --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 - 工具调用:要支持工具使用,可使用以下命令。 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_coder - 多令牌预测(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}' - 纯文本:以下命令跳过视觉编码器和多模态分析以释放内存,用于额外的 KV 缓存: 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 (https://docs.vllm.ai/projects/recipes/en/latest/Qwen/Qwen3.5.html)。 #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#ktransformersKTransformers KTransformers (https://github.com/kvcache-ai/ktransformers) 是一个灵活的框架,用于通过 CPU-GPU 异构计算体验前沿的 LLM 推理优化。有关使用 KTransformers 运行 Qwen3.6,请参阅 KTransformers 部署指南 (https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Qwen3.5.md)。 #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#hugging-face-transformersHugging Face Transformers Hugging Face Transformers 包含一个轻量级服务器,可用于快速测试和中等负载部署。运行 Qwen3.6 需要最新的 transformers: pip install "transformers[serving]" 更多详情请参阅其文档 (https://huggingface.co/docs/transformers/main/serving)。请确保已安装 torchvision 和 pillow。然后运行 transformers serve 启动服务器,API 端点位于 http://localhost:8000/v1;如有可用加速器,模型将自动放置其上: transformers serve Qwen/Qwen3.6-27B --port 8000 --continuous-batching ### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#using-qwen36-via-the-chat-completions-api通过 Chat Completions API 使用 Qwen3.6 Chat Completions API 可通过标准 HTTP 请求或 OpenAI SDK 访问。这里我们展示使用 OpenAI Python SDK 的示例。开始前,请确保已安装 SDK 并配置好 API 密钥和 API 基础 URL,例如: pip install -U openai # 按实际情况设置以下环境变量 export OPENAI_BASE_URL="http://localhost:8000/v1" export OPENAI_API_KEY="EMPTY" > 我们建议对生成任务使用以下采样参数 - 通用任务的思考模式:temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0 - 精确编码任务(如 WebDev)的思考模式:temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0 - 指令(或非思考)模式:temperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0 请注意,采样参数的支持情况因推理框架而异。 > Qwen3.6 模型默认以思考模式运行,在生成最终回复前会产生以 \n...\n\n 标记的思考内容。要禁用思考内容并直接获取回复,请参阅此处的示例 (https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#instruct-or-non-thinking-mode)。 #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#text-only-input纯文本输入 from openai import OpenAI # 通过环境变量配置 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) #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#image-input图像输入 from openai import OpenAI # 通过环境变量配置 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}$" } ] } ] 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:", response) #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#video-input视频输入 from openai import OpenAI # 通过环境变量配置 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?" } ] } ] # 当 vLLM 以 `--media-io-kwargs '{"video": {"num_frames": -1}}'` 启动时, # 可通过 `extra_body` 配置视频帧采样(例如设置 `fps`)。 # 该功能目前仅在 vLLM 中支持。 # # 默认情况下,`fps=2` 且 `do_sample_frames=True`。 # 当 `do_sample_frames=True` 时,可自定义 `fps` 值以设置所需的视频采样率。 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:", response) #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#instruct-or-non-thinking-mode指令(或非思考)模式 > Qwen3.6 不支持 Qwen3 的软切换功能,即 /think 和 /nothink。Qwen3.6 默认会在回复前进行思考。您可以通过配置 API 参数从模型获取直接回复而无需思考。例如: from openai import OpenAI # 通过环境变量配置 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=1.0, top_p=1.0, presence_penalty=2.0, extra_body={ "top_k": 40, "chat_template_kwargs": {"enable_thinking": False}, }, ) print("Chat response:", chat_response) > 如果您使用的是阿里云模型服务 API,除了更改 model 外,请使用 "enable_thinking": False 代替 "chat_template_kwargs": {"enable_thinking": False}。 #### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#preserve-thinking保留思考 默认情况下,仅保留处理最新用户消息时生成的思考块,形成常见的交错思考模式。Qwen3.6 经过额外训练,能够保留和利用历史消息中的思考痕迹。您可以通过设置 preserve_thinking 选项启用此功能: from openai import OpenAI # 通过环境变量配置 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) > 如果您使用的是阿里云模型服务 API,除了更改 model 外,请使用 "preserve_thinking": True 代替 "chat_template_kwargs": {"preserve_thinking": False}。 此功能对 Agent 场景特别有益,维护完整的推理上下文可增强决策一致性,并在许多情况下通过减少重复推理来降低总体令牌消耗。此外,它还能改善 KV 缓存利用率,优化思考和非思考模式下的推理效率。 ## https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#agentic-usageAgentic 使用 Qwen3.6 在工具调用能力方面表现出色。 ### https://huggingface.co/unsloth/Qwen3.6-27B-GGUF#qwen-agentQwen-Agent 我们建议使用 Qwen-Agent (https://github.com/QwenLM/Qwen-Agent) 快速构建基于 Qwen3.6 的 Agent 应用。要定义可用工具,可以使用 MCP 配置文件、使用 Qwen-Agent 的集成工具,或自行集成其他工具。 `` import os from qwen_agent.agents import Assistant # 定义 LLM # 使用阿里云模型服务 llm_cfg = { # 使用 OpenAI-
相似文章
unsloth/Qwen3.6-27B-MTP-GGUF
Unsloth 发布了 Qwen3.6-27B 模型的 GGUF 权重,该模型支持多令牌预测(MTP),可实现更快的生成速度并增强了智能体(Agentic)编码能力。
unsloth/Qwen3.6-35B-A3B-MTP-GGUF
本文宣布在 Hugging Face 上发布 Qwen3.6-35B-A3B 模型权重,该模型由 Unsloth 进行优化,并采用多令牌预测(MTP)技术,以通过 llama.cpp 实现更快的生成速度。文章重点介绍了其在智能体编码能力、工具调用以及推理上下文保留方面的改进。
Unsloth 上的 MTP
Unsloth 发布了支持多 Token 预测 (MTP) 的 Qwen3.6 模型 GGUF 量化版本。
Unsloth MiniMax M3 GGUF
Unsloth 正在将 MiniMax M3 模型的 GGUF 量化版本上传到 Hugging Face。
unsloth/Kimi-K2.6-GGUF
Unsloth 推出开源 1T 参数 Kimi K2.6 MoE 模型的量化 GGUF 版本,专为长程编码、自主智能体集群及生产级设计任务优化。