ByteNoteByteNote

字节笔记本

2026年6月9日

RTX 4090 本地部署 Claude 4.6 Opus 蒸馏版:Qwen3.6-35B 完整指南

API中转
¥120

Qwen3.6-35B-A3B 是用 Claude 4.6 Opus 蒸馏的推理模型,RTX 4090 完全可以本地跑。本文涵盖显存需求选型、LM Studio 和 llama.cpp 两种部署方式、以及对接 Claude Code 的配置方法。

量化版本与显存需求

根据显存情况选择合适的量化版本:

Quant文件大小建议场景
Q4_K_M21.2 GB24GB 显存勉强能跑,推荐
Q5_K_M24.7 GB需要 48GB(改装后)
Q6_K28.5 GB需要 48GB
Q8_036.9 GB需要 48GB

RTX 4090 原生 24GB 只能跑 Q4_K_M,改到 48GB 后可以随便选。

方式一:LM Studio 部署(最简单)

直接在 LM Studio 搜索模型名不一定能找到,建议手动下载后导入:

bash
# 安装 huggingface_hub
pip install huggingface_hub

# 下载 Q4_K_M(24GB 显存的选择)
huggingface-cli download hesamation/Qwen3.6-35B-A3B-Claude-4.6-Opus-Reasoning-Distilled-GGUF \
  --include "*.Q4_K_M.gguf" \
  --local-dir ./models/qwen3.6-distilled

下载完成后在 LM Studio 里「Load Model from file」选这个 gguf 文件。加载后对外暴露 OpenAI 兼容 API:

http://localhost:1234/v1

方式二:llama.cpp 直接部署(更灵活)

bash
# 克隆并编译 llama.cpp(CUDA 版本)
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j$(nproc)

# 启动 HTTP server
./build/bin/llama-server \
  -m ./models/Qwen3.6-35B-A3B-Claude-4.6-Opus-Reasoning-Distilled-Q4_K_M.gguf \
  --host 0.0.0.0 \
  --port 8080 \
  --n-gpu-layers 99 \    # 全部层放到 GPU
  --ctx-size 32768 \     # 最大上下文,与训练时一致
  --threads 8

测试推理:

bash
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-distilled",
    "messages": [{"role": "user", "content": "解释快速排序的原理"}],
    "temperature": 0.6
  }'

对接 Claude Code 或 AutoFlow

这个模型使用 qwen3-thinking chat template,需要开启 thinking 模式。在 LM Studio 的 system prompt 或请求里加:

开启 thinking(深度推理):

json
{
  "messages": [
    {
      "role": "system",
      "content": "/think"
    },
    {
      "role": "user",
      "content": "你的问题"
    }
  ]
}

关闭 thinking(速度更快):

json
{
  "messages": [
    {"role": "system", "content": "/no_think"},
    {"role": "user", "content": "你的问题"}
  ]
}

注意事项

基准测试仅供参考

这个模型的 MMLU-Pro 基准测试只用了每个科目 5 道题共 70 题,仅作对比参考而非完整评测。实际效果建议自己跑几个推理任务感受一下,别完全信那个 +32.85pp 的数字。

能力范围

fine-tune 只训练了文本数据,图像/视频能力是继承自 Qwen3.6 基座而非经过强化。用来做纯文本推理任务才是正确姿势。

模型来源

模型由 hesamation 发布在 HuggingFace:Qwen3.6-35B-A3B-Claude-4.6-Opus-Reasoning-Distilled-GGUF

分享: