unsloth/Qwen3.6-27B-MTP-GGUF

Hugging Face Models Trending 模型

摘要

Unsloth 发布了 Qwen3.6-27B 模型的 GGUF 权重,该模型支持多令牌预测(MTP),可实现更快的生成速度并增强了智能体(Agentic)编码能力。

任务:图像-文本转文本 标签: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/13 00:17

unsloth/Qwen3.6-27B-MTP-GGUF · Hugging Face 来源: https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF ## https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#read-our-how-to-run-qwen36-guide阅读我们的如何运行 Qwen3.6 指南! (https://unsloth.ai/docs/models/qwen3.6) 查看 Unsloth 动态 2.0 GGUFs (https://unsloth.ai/docs/basics/unsloth-dynamic-v2.0-gguf) 以获取我们的量化基准测试。 - 新增:MTP 投机解码,生成速度提升约 1.5-2 倍——从 MTP PR 分支构建 llama.cpp (https://github.com/ggml-org/llama.cpp/pull/22673): apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y git clone -b mtp-clean https://github.com/am17an/llama.cpp.git cmake llama.cpp -B llama.cpp/build -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON cmake --build llama.cpp/build --config Release -j --clean-first --target llama-cli llama-server cp llama.cpp/build/bin/llama-* llama.cpp export LLAMA_CACHE="unsloth/Qwen3.6-27B-GGUF-MTP" ./llama.cpp/llama-server \ -hf unsloth/Qwen3.6-27B-GGUF-MTP:UD-Q4_K_XL \ -ngl 99 -c 8192 -fa on -np 1 \ --spec-type mtp --spec-draft-n-max 3 对于 CPU/Metal,设置-DGGML_CUDA=OFF。目前 MTP 尚不支持-np > 1--mmproj。 - 开发者角色支持,使 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 中运行工具调用的示例:unsloth studio 中的 qwen3.6 — 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-MTP-GGUF#qwen36-highlightsQwen3.6 亮点 此次发布带来了实质性的升级,特别是在 - **智能体编码 (Agentic Coding):**模型现在能够以更流畅和精确的方式处理前端工作流程和仓库级推理。 - **思维保留 (Thinking Preservation):**我们引入了一个新选项,用于保留来自历史消息的推理上下文,从而简化迭代开发并减少开销。 基准测试结果 (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-MTP-GGUF#model-overview模型概览 - 类型:带有视觉编码器的因果语言模型 - 训练阶段:预训练 & 后训练 - 语言模型 - 参数量:27B - 隐藏维度:5120 - Token 嵌入: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 - 前馈网络 (FFN): - 中间维度:17408 - LM 输出:248320(填充后) - MTP:采用多步骤训练 - 上下文长度:原生 262,144,可扩展至 1,010,000 tokens。 ## https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#benchmark-results基准测试结果 ### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#language语言 ### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#vision-language视觉语言 ## https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#quickstart快速开始 为了实现流畅集成,我们建议通过 API 使用 Qwen3.6。以下是通过 OpenAI 兼容 API 使用 Qwen3.6 的指南。 ### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#serving-qwen36服务部署 Qwen3.6 可以通过流行的推理框架通过 API 提供服务。以下展示了启动 Qwen3.6 模型 OpenAI 兼容 API 服务器的示例命令。 > 不同框架的推理效率和吞吐量差异显著。我们建议使用最新的框架版本以确保最佳性能和兼容性。对于生产工作负载或高吞吐量场景,强烈建议使用专用服务引擎,如 SGLang、KTransformers 或 vLLM。 > 该模型的默认上下文长度为 262,144 tokens。如果遇到内存不足 (OOM) 错误,请考虑减小上下文窗口。然而,由于 Qwen3.6 利用扩展上下文来处理复杂任务,我们建议保持至少 128K tokens 的上下文长度以保留思维推理能力。 #### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#sglangSGLang SGLang (https://github.com/sgl-project/sglang) 是一个用于大型语言模型和视觉语言模型的高速服务框架。对于 Qwen3.6,推荐使用 sglang>=0.5.10,可以在新环境中使用以下命令安装: uv pip install sglang[all] 查看更多详情,请参阅其文档 (https://docs.sglang.ai/get_started/install.html)。 以下将在 http://localhost:8000/v1 创建 API 端点: - 标准版本:以下命令可用于在 8 个 GPU 上使用张量并行创建最大上下文长度为 262,144 tokens 的 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 - 多 Token 预测 (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-MTP-GGUF#vllmvLLM vLLM (https://github.com/vllm-project/vllm) 是一个针对 LLM 的高吞吐量和内存高效的推理与服务引擎。对于 Qwen3.6,推荐使用 vllm>=0.19.0,可以在新环境中使用以下命令安装: 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 tokens 的 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 - 多 Token 预测 (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 食谱 (https://docs.vllm.ai/projects/recipes/en/latest/Qwen/Qwen3.5.html)。 #### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-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-MTP-GGUF#hugging-face-transformersHugging Face Transformers Hugging Face Transformers 包含一个轻量级服务器,可用于快速测试和中度负载部署。Qwen3.6 需要最新版本的 transformerspip install "transformers[serving]" 查看更多详情,请参阅其文档 (https://huggingface.co/docs/transformers/main/serving)。请同时确保已安装 torchvision 和 pillow。然后,运行 transformers serve 以在 http://localhost:8000/v1 启动具有 API 端点的服务器;如果有可用的加速器,它会将模型放置在上面: transformers serve Qwen/Qwen3.6-27B --port 8000 --continuous-batching ### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF#using-qwen36-via-the-chat-completions-api通过 Chat Completions API 使用 Qwen3.6 聊天补全 API 可以通过标准 HTTP 请求或 OpenAI SDK 访问。此处我们展示使用 OpenAI Python 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-MTP-GGUF#instruct-or-non-thinking-mode)。 #### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-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-MTP-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": "图中四个圆的圆心位于正方形的四个角。两个大圆彼此相切,也与两个小圆相切。你需要将小圆的半径乘以多少因子才能得到大圆的半径?\n选项:\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:", chat_response) #### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-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": "在墓室主舱的壁龛中发现了多少个瓷器罐?" } ] } ] # 当 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:", chat_response) #### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-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": "这是哪里?" } ] } ] 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) > 如果你使用的是阿里云百炼 (Model Studio) 的 API,除了更改 model 外,请使用 "enable_thinking": False 代替 "chat_template_kwargs": {"enable_thinking": False}。 #### https://huggingface.co/unsloth/Qwen3.6-27B-MTP-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) > 如果你使用的是阿里云百炼 (Model Studio) 的 API,除了更改 model 外,请使用 "preserve_thinking": True 代替 "chat_template_kwargs": {"preserve_thinking": False}。 此功能特别有利于智能体场景

相似文章

unsloth/Qwen3.6-35B-A3B-MTP-GGUF

Hugging Face Models Trending

本文宣布在 Hugging Face 上发布 Qwen3.6-35B-A3B 模型权重,该模型由 Unsloth 进行优化,并采用多令牌预测(MTP)技术,以通过 llama.cpp 实现更快的生成速度。文章重点介绍了其在智能体编码能力、工具调用以及推理上下文保留方面的改进。

unsloth/Qwen3.6-27B-GGUF

Hugging Face Models Trending

Unsloth 发布了 Qwen3.6-27B 模型的 GGUF 量化版本,具备更强的智能体编程能力、工具调用功能,并支持 Unsloth Studio。

Unsloth 上的 MTP

Reddit r/LocalLLaMA

Unsloth 发布了支持多 Token 预测 (MTP) 的 Qwen3.6 模型 GGUF 量化版本。

bytkim/Qwen3.6-27B-MTP-pi-tune-GGUF

Hugging Face Models Trending

bytkim 发布了 Qwen3.6-27B 的 4-bit QLoRA SFT 多令牌预测微调版本,打包为 GGUF 格式,用于本地代理编码。该无思考调优版本专为代理循环中的低延迟直接输出而设计。

havenoammo/Qwen3.6-27B-MTP-UD-GGUF

Hugging Face Models Trending

该 Hugging Face 仓库提供了 Qwen3.6-27B 的 GGUF 文件,这些文件在 Unsloth UD XL 量化版本的基础上嫁接了多 Token 预测 (MTP) 层。它还包含了构建支持 MTP 的 llama.cpp 的说明,以实现投机解码。