‘<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com\“ style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-repeat: repeat, repeat;background-size: 20px 20px, 20px 20px;width: auto;font-family: Optima, PingFangSC-light, serif;font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left" data-pm-slice="0 0 []"><section class="mp_profile_iframe_wrp">
DeepSeek-V4-Flash 本地部署<span data-pm-slice="1 1 ["para",{"tagName":"section","attributes":{"data-tool":"mdnice编辑器","data-website":"https://www.mdnice.com","style":"margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.03) 0%, rgba(255, 255, 255, 0) 11.49%), linear-gradient(360deg, rgba(50, 0, 0, 0.04) 0%, rgba(255, 255, 255, 0) 12.16%);background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: repeat, repeat;background-size: 20px 20px, 20px 20px;width: auto;font-family: Optima, PingFangSC-light, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;overflow-wrap: break-word;text-align: left;","data-pm-slice":"0 0 []"},"namespaceURI":"http://www.w3.org/1999/xhtml"},"para",{"tagName":"p","attributes":{"data-tool":"mdnice编辑器","style":"color: rgb(43, 43, 43);font-size: 16px;line-height: 1.8em;letter-spacing: 0.02em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"},"namespaceURI":"http://www.w3.org/1999/xhtml"}]\">(相对)低成本方案终于来了

Unsloth 的GGUF 量化版已就位,还顺手把 llama.cpp 里那个让 V4 说胡话的 bug 给修了

<a class="normal_text_link mp_article_text_link" target="_blank" href="https://mp.weixin.qq.com/s?__biz=MzA4MjYwMTc5Nw==&mid=2649014945&idx=1&sn=4cfaf0b365db455c9c3aee624224f232&scene=21#wechat_redirect\“ data-itemshowtype="0" data-linktype="2">给本地部署的大模型装上手脚,Unsloth 把MCP 这条路打通了

<a class="normal_text_link mp_article_text_link" target="_blank" href="https://mp.weixin.qq.com/s?__biz=MzA4MjYwMTc5Nw==&mid=2649015241&idx=1&sn=36f967f4ba8fc81b1b561d8792c71f84&scene=21#wechat_redirect\“ data-itemshowtype="0" data-linktype="2">谷歌最新大模型 DiffusionGemma 续集:Unsloth 把它压到 18GB,单卡飙到 2000+ Token/s

这篇我就带大家把 DeepSeek-V4-Flash 从里到外捋一遍:它牛在哪、跑分什么水平、想在自己机器上跑起来要注意哪些坑

<span style="font-size: 17px;line-height: 1.5em;letter-spacing: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 10px;align-items: unset;background-attachment: scroll;background-color: transparent;background-image: linear-gradient(0deg, rgb(231, 247, 252) 40%, transparent 40%);background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;font-weight: bold;font-style: normal;flex-direction: unset;float: unset;height: auto;justify-content: unset;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;transform: none;width: auto">简介

<a class="normal_text_link mp_article_text_link" target="_blank" href="https://mp.weixin.qq.com/s?__biz=MzA4MjYwMTc5Nw==&mid=2649015696&idx=1&sn=53d48ac84d8b8590ba9b137bcbf3f83d&scene=21#wechat_redirect\“ data-itemshowtype="8" data-linktype="2">DeepSeek 最新开源 V4 加速版,直接起飞

<a class="normal_text_link mp_article_text_link" target="_blank" href="https://mp.weixin.qq.com/s?__biz=MzA4MjYwMTc5Nw==&mid=2649014777&idx=1&sn=001090b79701d1ec887bc1c7064f2b73&scene=21#wechat_redirect\“ data-itemshowtype="0" data-linktype="2">vLLM 0.22大版本升级,DeepSeek V4 生产级优化,KV Cache 极致压缩

先说清楚 DeepSeek-V4 这一代到底是什么

它是一个 MoE(混合专家) 系列,一口气给了两个模型:

  • **DeepSeek-V4-Pro**:1.6T 总参数,激活 49B,冲的是开源天花板
  • **DeepSeek-V4-Flash**:284B 总参数,激活只有 13B,主打高效轻量

注意这个激活参数,Flash 每次前向只点亮 13B,这是它能被普通玩家惦记着本地部署的根本原因,两个模型都原生支持 100 万 token 的上下文长度

按官方技术报告(arxiv 编号 2606.19348)的说法,V4 这一代最关键的是三处架构与训练上的升级:

  • **混合注意力架构**:把 Compressed Sparse Attention(CSA,压缩稀疏注意力)和 Heavily Compressed Attention(HCA,重压缩注意力)揉到一起,专治长上下文的算力爆炸——在 100 万 token 场景下,V4-Pro 单 token 推理的 FLOPs 只要 V3.2 的 **27%**,KV cache 更是砍到只剩 **10%**
  • **Manifold-Constrained Hyper-Connections(mHC,流形约束超连接)**:给传统的残差连接上了个强化 buff,让信号在深层网络里传得更稳,同时不牺牲模型的表达能力
  • **Muon 优化器**:换掉老优化器,收敛更快、训练更稳

一张图看懂这三大升级到底强在哪:

\"DeepSeek-V4
DeepSeek-V4 三大核心升级
一句话总结这套设计的野心:**用更少的算力,把上下文喂到百万级,还要保住聪明程度**
\"DeepSeek-V4
DeepSeek-V4 官方 Benchmark 成绩单
在 **代码类硬指标上,V4-Pro-Max 几乎是屠榜的存在**,LiveCodeBench、Codeforces、Apex Shortlist 全部登顶,一个开源模型能把编程能力做到这个份上,DeepSeek 这波属实是给国产开源长脸了

当然要诚实:在 SimpleQA、GPQA Diamond、HLE 这些纯知识和超难推理题上,Gemini-3.1-Pro 依然领先,V4 没有全面碾压,但作为开源模型,能站在这张牌桌上已经很了不起

<span style="font-size: 17px;line-height: 1.5em;letter-spacing: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 10px;align-items: unset;background-attachment: scroll;background-color: transparent;background-image: linear-gradient(0deg, rgb(231, 247, 252) 40%, transparent 40%);background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;font-weight: bold;font-style: normal;flex-direction: unset;float: unset;height: auto;justify-content: unset;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;transform: none;width: auto">三种思考模式

V4-Pro 和 V4-Flash 都内置了三档「思考强度」,这点挺人性化的,任务简单就别浪费算力空想

模式
特点
适用场景
**Non-think**
快速、直觉式回答
日常琐事、低风险决策
**Think High**
有意识的逻辑推演,慢一点但更准
复杂问题、方案规划
**Think Max**
把推理能力拉到极限
探索模型智力边界的硬骨头
一个特别有意思的现象是:**Flash 只要给够思考预算,推理能力能追平 Pro**,官方原话是 Flash-Max 在给到更大 thinking budget 时,推理表现能逼近 Pro 版,只是参数规模摆在那,纯知识题和最复杂的 Agent 任务上会稍逊一筹

这意味着什么?小模型 + 多思考,能在很多推理任务上顶上大模型,对本地部署党简直是福音

更实在的是,这三档不是摆设,在 llama.cpp 里加个参数就能现切,默认开的是 Think High:

# 拉满推理,硬骨头就上这个 --chat-template-kwargs \'{\"reasoning_effort\":\"max\"}\' # 常规推理 --chat-template-kwargs \'{\"reasoning_effort\":\"high\"}\' # 彻底关掉思考,退回 Non-think --chat-template-kwargs \'{\"enable_thinking\":false}\'<p data-tool="mdnice编辑器" style="font-size: 16px;line-height: 1.8em;letter-spacing: 0.02em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px">新版 llama.cpp 还给了更省事的 <span>--reasoning on</span> / <span>--reasoning off</span> 一键开关,嫌命令行麻烦的直接去 Unsloth Studio,右上角下拉菜单点一下就换档,比记参数舒服

<span style="font-size: 16px;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-color: transparent;background-image: none;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;transform: none;width: auto">思考预算的魔力:Flash 三档实测

前面说 Flash 靠思考预算能追平 Pro,这可不是嘴上说说,官方给了三档模式的完整成绩单,我挑几个最能说明问题的拎出来(均为官方 benchmark,指标为 Pass@1 / Rating / EM 等):

指标
Flash Non-think
Flash High
Flash Max
Pro Max(参考)
MMLU-Pro
83.0
86.4
86.2
87.5
GPQA Diamond
71.2
87.4
**88.1**
90.1
HMMT 2026 Feb
40.8
91.9
**94.8**
95.2
LiveCodeBench
55.2
88.4
**91.6**
93.5
Apex Shortlist
9.3
72.1
**85.7**
90.2
Terminal Bench 2.0
49.1
56.6
56.9
67.9
看这几行数据我是真被震到了:**同一个 Flash,光靠打开思考,HMMT 数学从 40.8 直接飙到 94.8,Apex Shortlist 从 9.3 干到 85.7**,这已经不是量变是脱胎换骨

GPQA Diamond 更离谱,Flash-Max 的 88.1 贴脸 Pro-Max 的 90.1,用 13B 激活硬刚 49B,靠的就是把思考预算给足

一句话:Non-think 是它的下限,Think Max 才是它的真身,本地部署时舍得给上下文和算力,Flash 能还你一个惊喜

<span style="font-size: 17px;line-height: 1.5em;letter-spacing: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 10px;align-items: unset;background-attachment: scroll;background-color: transparent;background-image: linear-gradient(0deg, rgb(231, 247, 252) 40%, transparent 40%);background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;font-weight: bold;font-style: normal;flex-direction: unset;float: unset;height: auto;justify-content: unset;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;transform: none;width: auto">为什么要用 Unsloth 的 GGUF 版

模型再强,跑不起来也白搭,这就轮到 Unsloth 登场了

<a class="normal_text_link mp_article_text_link" target="_blank" href="https://mp.weixin.qq.com/s?__biz=MzA4MjYwMTc5Nw==&mid=2649013605&idx=1&sn=c403b633bf2e08a7785bc3a5c15b4361&scene=21#wechat_redirect\“ data-itemshowtype="0" data-linktype="2">Unsloth API 来了,24GB 显存就能在 Claude Code、Codex、OpenClaw 里跑本地 Agent

\"\"
DeepSeek 原始权重是 FP4 + FP8 混合精度(MoE 专家用 FP4,其余大部分用 FP8),想在自己的卡上跑,最省心的路子还是 GGUF + llama.cpp,Unsloth 干的就是这个活,而且干得漂亮:
  • **修好了 llama.cpp 的乱码 bug**:原版 llama.cpp 跑 V4,第二轮对话之后就开始胡言乱语(gibberish),Unsloth 定位并修复了这个问题,前提是你得用 llama.cpp 的 PR #25402
  • **重做了 chat 模板**:改进了 V4 的 chat jinja 模板,拿 **4000 多组对话**逐一验证,确认和官方 baseline 表现一致,这测试量相当扎实
  • **Dynamic 2.0 动态量化**:Unsloth 自家的 Dynamic 2.0 量化方案,精度号称超越其他主流量化
  • **Q8 几乎无损,还不占地方**:想要全精度无损效果就上 Q8(UD-Q8_K_XL),体积 162GB,关键是它只比 Q4(UD-Q4_K_XL)大了区区 **7GB**,这个性价比,能上 Q8 就别犹豫

Unsloth 官方放了几张量化对比图,我挑两张最能说明问题的。第一张是质量与体积的帕累托前沿,Unsloth 的 Q8、Q4 稳稳压在最优线上,同体积下精度更高:

\"Unsloth
Unsloth 量化质量 vs 体积的帕累托前沿
第二张是逐层量化误差,Unsloth 的 MXFP4 专家权重做到了全程零误差,普通 Q4_K 则是每个权重都得四舍五入(约 5.2% RMSE),精度差距肉眼可见:
\"MXFP4
MXFP4 逐层零误差 vs Q4_K
这里插一句:**Unsloth 现在几乎是开源模型本地化的「售后保障」**,从 gpt-oss、Qwen3、Llama 4 到 Gemma,哪个新模型出 bug 都能看到他们的修复补丁,这种生态位太重要了

<span style="font-size: 17px;line-height: 1.5em;letter-spacing: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 10px;align-items: unset;background-attachment: scroll;background-color: transparent;background-image: linear-gradient(0deg, rgb(231, 247, 252) 40%, transparent 40%);background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;font-weight: bold;font-style: normal;flex-direction: unset;float: unset;height: auto;justify-content: unset;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;transform: none;width: auto">本地怎么跑起来

给一套官方文档里的完整编译流程,核心就是必须切到 PR <a class="wx_topic_link" style="color: #576B95 !important" data-topic="1" data-recommend="">#25402 那个分支,否则前面说的乱码问题就会找上门

先用一张图把六步流程串起来,再看命令:

\"DeepSeek-V4-Flash
DeepSeek-V4-Flash 本地部署六步流程
`apt-get update apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y

git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
git fetch origin pull/25402/head:deepseek-v4-checkpointing-fix
git checkout deepseek-v4-checkpointing-fix
cd ..

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-mtmd-cli llama-server llama-gguf-split
cp llama.cpp/build/bin/llama-* llama.cpp</pre><p data-tool=\"mdnice编辑器\" style=\"font-size: 16px;line-height: 1.8em;letter-spacing: 0.02em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px\"><span>这个 PR <a class=\"wx_topic_link\" style=\"color: #576B95 !important\" data-topic=\"1\" data-recommend=\"\">#25402</a> 修的其实是 prompt caching(提示词缓存):在它之前,你得强制 </span>–ctx-checkpoints 0` 关掉上下文检查点,否则 V4-Flash 的缓存机制一启用就吐乱码,修复后把 V4 重新归类、处理好尾部 token 的重复问题,缓存这才能正常用起来

采样参数官方也给了建议:

  • 常规使用:`temperature = 1.0``top_p = 1.0`
  • 用 Think Max 模式:上下文窗口至少拉到 **384K**,把推理空间给足

关于 chat 模板要多提一嘴:这次发布没有带 jinja 格式的模板,官方改成提供一个 <span>encoding</span> 文件夹,里面是 Python 脚本和测试用例,教你怎么把 OpenAI 兼容格式的消息编码成模型输入,以及怎么解析输出,接入的时候记得去读那个文件夹的文档

如果嫌命令行麻烦,还有个更友好的选择——Unsloth Studio

<img src="/wp-content/uploads/2026/08/wx213_7.png" alt="deepseek-v4-flash 跑在 Unsloth Studio 里">

这是个能本地跑和训模型的 Web UI,V4-Flash 可以直接在里面跑,还带 High 和 Max thinking 的开关,点一下就切换思考强度

\"Unsloth
Unsloth Studio 的 Web UI 界面
安装也是一行命令的事:

`# macOS / Linux / WSL
curl -fsSL https://unsloth.ai/install.sh | sh

启动,端口自己定

unsloth studio -p 8888</pre><p data-tool=\"mdnice编辑器\" style=\"font-size: 16px;line-height: 1.8em;letter-spacing: 0.02em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px\"><span>Windows 用户把命令换成 </span>irm https://unsloth⋅ai/install.ps1 | iex` 即可,同一条命令还能用来更新

<span style="font-size: 17px;line-height: 1.5em;letter-spacing: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 10px;align-items: unset;background-attachment: scroll;background-color: transparent;background-image: linear-gradient(0deg, rgb(231, 247, 252) 40%, transparent 40%);background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;font-weight: bold;font-style: normal;flex-direction: unset;float: unset;height: auto;justify-content: unset;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;transform: none;width: auto">实测建议与真心话

老实交代,这么大的模型我暂时没在本地完整拉起来实测,162GB 的 Q8 对显存的要求摆在那,Flash 版即便激活只有 13B,完整权重加载依然是重量级选手,这一点大家心里要有数、

但基于对 DeepSeek 历代和 Unsloth 生态的了解,我给几个务实的判断:

  • **想尝鲜又缺卡**:先去 Unsloth Studio 里试 Flash 版,配合思考模式开关体验推理能力,比硬啃命令行舒服
  • **做长文档、长代码库分析**:百万上下文 + 长上下文效率优化是 V4 最大的差异化卖点,这类场景值得重点押注
  • **在意代码能力**:Pro-Max 的编程跑分是真的猛,有条件上 Pro 的,代码任务体验会明显不一样
  • **一定要用对分支**:再强调一次,llama.cpp 务必切到 PR #25402,不然乱码 bug 会让你怀疑人生

DeepSeek-V4 这一代,把「百万上下文」从实验室名词变成了能落地的开源现实,而 Unsloth 帮我们把落地的门槛又往下砸了一截,国产开源这条路,越走越有底气了

[source]文章来源:<a href="https://mp.weixin.qq.com/s/wGTeVsn2PbfLYNJovhOUsA\“ target="_blank" rel="nofollow" title="https://mp.weixin.qq.com/s/wGTeVsn2PbfLYNJovhOUsA\">mp.weixin.qq.com[/source]’