DeepSeek DeepInfer 开源推理 SOTA
An open source “bomb” drops from China
正文為 SEO 深度以中文為主;上方要點已本地化。可用語言切換與深鏈進行全球導航。

DeepSeek DeepInfer 开源推理 SOTA
分类: 中转 摘要: An open source “bomb” drops from China slug: gc-deepseek-deepinfer-open-source 模式: feed
DeepSeek 在 2026 年 10 月 20 日开源了其生产级推理框架 DeepInfer。这是一个专为 DeepSeek-V4.1-Flash 优化的高性能推理引擎,支持 NVIDIA SM100 GPU 和华为 Ascend 950 芯片,专为大规模分布式推理设计。
如果你是开发者、AI 研究者或在追求本地部署、API 中转、模型天梯的项目中运行推理任务,这项开源项目正是你所需要的。它能显著降低算力成本,同时保留与官方 API 兼容的处理逻辑。
谁适用?
- 需要在自建集群上高效运行 DeepSeek 系列模型的团队
- 关注开源 vLLM 生态但希望获得更强吞吐和更低延迟的项目
- 计划用中国硬件(华为 Ascend)进行推理的开发者
决策建议: 与闭源推理服务相比,DeepInfer 的主要优势在于可控部署和可定制化,但它并非“即插即用”——核心 KV cache 和负载均衡组件仍在内部基础设施中。如果你主要依赖 Grok API、xAI 中转或第三方 API 中转服务,这项开源工具更适合作为补充方案,用于测试或自研中转倍率场景。
DeepInfer 作为 DeepSeek 内部推理栈的完全开源版本,核心定位是“高性能、大规模推理”。它并非通用型 LLM 框架,而是为 DeepSeek 模型量身打造的生产级解决方案。
核心特性与优势
DeepInfer 基于 vLLM 高度定制(参考 SGLang 和 TensorRT-LLM 灵感),提供了多项生产级优化:
- 超长上下文缓存:支持多小时级 KV cache 持久化,输入缓存命中率可达 96%,显著降低重复 token 计算量
- 分布式调度:prefill 与 decode 解耦,支持专家并行(MoE EP + EPLB)、异步调度、批不变性推理
- 加速技术:结合 DeepSeek 自主内核(FlashMLA、DeepGEMM)、DSpark 投机解码、SWA 有界回放(可近似减少 prefill 计算一半)
- 结构化输出:原生支持 JSON schema、EBNF 等格式约束
- 硬件兼容:NVIDIA SM100(Blackwell)和华为 Ascend 950,Hopper 及更老架构不支持
这些特性让单集群可实现每秒数千 token 的高吞吐,同时将推理成本控制在可接受范围内。相比传统 vLLM,DeepInfer 在特定工作负载下展现出更优的延迟和资源利用率,尤其适合长上下文 Agent 场景或高频推理场景。
部署与使用入门
DeepInfer 提供完整示例仓库(GitHub:deepseek-ai/DeepInfer),支持离线推理和生产级服务。
快速开始(NVIDIA 环境):
- 确保 Python 3.12、GCC 13.0+、CUDA 13
- 克隆仓库:`git clone
- 激活环境后运行
./build.sh(会编译优化内核) - 下载模型:
DEEPINFER_HF_MODEL_DIR指向 Hugging Face 的 DeepSeek-V4.1-Flash-1017 - 执行示例:
python examples/offline_inference.py
生产部署时,推荐 prefill 8 张卡规模解耦、decode 64–128 张卡 supernode 规模。你需自行处理 KV cache 存储和负载均衡(仓库 README 中明确标注“最核心功能未全部开源”)。
硬件要求
- NVIDIA SM100 GPU(推荐 4 张 prefill + 64 张 decode 测试集群)
- 华为 Ascend 950(需 CANN 9.2)
性能表现与数据对比
根据 DeepSeek 官方生产数据(未独立审计),单个集群可服务 155 万亿 token/天,平均每小时每张卡带来约 38 美元收入(off-peak 定价),整体推理边际毛利率超过 80%。这得益于 96% 输入缓存命中和异步调度。
| 指标 | DeepSeek-V4.1-Flash(官方) | vLLM 基准(匹配配置) | DeepInfer 实测 |
|---|---|---|---|
| Prefill 吞吐 | 约 1.5M tokens/s / GPU | 接近 | 支持大规模并行 |
| Decode 吞吐 | 约 14k tokens/s / GPU | 相差 <6% | 结合 DSpark 进一步提升 |
| 缓存命中率 | 96% | - | 持久块缓存 + SWA |
| 成本(每卡/小时) | 5–8 美元(off-peak) | - | 依赖硬件与集群规模 |
数据来源于 DeepSeek 公告与 vLLM 官方复现回复。以官方/挂牌页当日数据为准,实际表现需在你的硬件上验证。
与其他推理方案的对比
如果你正在对比 vLLM、SGLang 或闭源服务(如 OpenAI、Grok API、Claude Code),DeepInfer 的优势在于硬件适配性和开源可修改性,但缺点是 KV cache 和负载均衡未完全公开,需要自行搭建基础设施。这在纯 API 中转或本地部署实验室中非常实用。
推荐场景
- 自建推理集群验证模型性能
- 结合 GrokCode 中转服务实现二次开发(优化特定 Token 使用率)
- 华为 Ascend 硬件环境下的国产化推理
风险与边界
开源软件始终伴随风险:DeepInfer 核心生产组件(如 KV cache 管理、完整负载均衡)未全部开源,实际部署时可能需要额外开发或第三方工具。这不是“解锁免费档”方案,而是透明的生产级框架。
重要提醒 以上内容仅供参考,非法律意见。实际使用请以官方 GitHub 仓库和 DeepSeek 公告当日数据为准。未经授权的商业使用可能违反原协议。
延伸阅读
- 模型天梯:对比 DeepSeek-V4.1-Flash 与 Grok、Claude 等 SOTA 模型的基准表现
- API 中转:如何将 DeepInfer 输出无缝接入你的 API 中转方案
- 本地部署实验室:利用 DeepInfer 搭建私有推理环境
- 官方 API:DeepSeek 官方服务对比与集成指南
- open-models:更多开源推理模型推荐
English summary
DeepSeek has open-sourced its high-performance production inference framework DeepInfer, powering the V4.1-Flash model at scale. The engine supports NVIDIA SM100 and Huawei Ascend 950 hardware, offering distributed prefill/decode scheduling, speculative decoding via DSpark, sliding-window attention replay, and structured output generation.
In production deployments, it achieved up to 155 trillion tokens per day per cluster with 96% input cache hit rates, delivering strong economic margins on optimized hardware. While the full KV cache orchestration and load-balancing logic remain internal, the core engine is released under Apache 2.0, making it suitable for developers building custom inference stacks or integrating with API transit services.
Compared to vLLM, DeepInfer shows competitive throughput in matched benchmarks but excels in long-context agent workloads and China-based hardware ecosystems. For teams already using GrokCode’s API transit, model ladder, or local deployment tools, DeepInfer provides a transparent, customizable foundation for optimizing token usage and lowering effective inference costs.
Actual results depend on workload mix, hardware configuration, and self-managed orchestration. All claims reference DeepSeek’s official engineering disclosures and open-source repository data as of October 2026.
适用于 GrokCode 倍率榜。信息仅供参考,不构成购买、投资或法律意见。