Skip to main content
DeepSeek-R1 属于 DeepSeek 早期推出的推理模型系列。绝大多数用户选择在本地运行该模型的 蒸馏版——即基于 R1 的推理数据微调得到的体积更小的 Qwen 或 Llama 模型,如此便能在普通笔记本电脑的 GPU 上实现推理,而无需依赖多 GPU 服务器。若您需要这种低硬件配置方案,可参考本页面内容。至于 DeepSeek 当前公开发布的模型版本,涉及代码编写优化、工具调用及 1M 级上下文支持,请查阅 DeepSeek-V4-Flash-0731。将 Tokios 与所选模型搭配使用,即可通过 https://api.tokios.com 从任意设备、团队成员终端或托管代理端访问模型,全程无需开放入站端口或配置 VPN。

利用 Ollama 在本地运行模型

Ollama 提供的 deepseek-r1 标签对应蒸馏版模型,而非完整版模型。请下载并运行默认版本(目前为 7b 版本的 Qwen 蒸馏模型):
若需指定特定规格的模型,直接输入对应标签即可——例如 ollama run deepseek-r1:14b。完整的标签列表可查阅 Ollama 模型库页面。
Ollama 默认的上下文容量仅为 2048 个令牌,远低于这些模型的实际支持上限。而执行 R1 风格的推理任务时,上下文消耗速度极快。因此建议适当提升 num_ctx 数值(可通过命令行中的 /set parameter num_ctx <value> 参数,或在 Modelfile 或 API 请求中设置),使其接近下表所示的模型最大上下文容量。

模型变体与标签说明

下表所列数据均源自 Ollama 模型库及各模型在 Hugging Face 上的配置信息。随着更多量化版本陆续发布,标签、规格及默认设置均可能发生变动——在最终选定某一版本前,请务必核对 ollama.com/library/deepseek-r1 上的最新信息。 来源:ollama.com/library/deepseek-r1/tags,deepseek-ai/DeepSeek-R1 说明文档。
The 671b tags are the full DeepSeek-R1 (and R1-0528), not distills — Ollama just publishes them under the same deepseek-r1 name. Everything from 1.5b through 70b is a distill: a Qwen or Llama model fine-tuned on R1’s reasoning traces, not R1 itself shrunk down. See how inference works for what that distinction means for output quality.

量化方式与文件格式

Ollama’s default tags are GGUF Q4_K_M. Every distill size and the full 671b also publish -q8_0 and -fp16 tags on the library page for less lossy (and much larger) downloads. See Quantization formats and the hardware they need for what runs on your GPU, and what quantization is for how to read the Q4_K_M-style names.

硬件适配性

对于中等长度的上下文而言,该数值约为 Q4。所有数值仅为估算值,实际占用空间取决于模型本身的 GGUF 大小以及上下文所需的 KV 缓存容量。关于如何计算模型大小与显卡的匹配度,可参阅 如何挑选适合您显卡的模型?。 The full 671b needs roughly 404 GB just for weights at Q4_K_M — that’s multiple datacenter-class GPUs or an equivalent unified-memory cluster, not a single workstation. Everything 70b and under is realistic on the hardware hobbyists actually own.

操作指南——从初学者到高级用户

保持 Ollama 在默认的 http://127.0.0.1:11434 端口上监听即可。适当调高 num_ctx 数值可充分利用模型的上下文窗口。

功能特性

  • 逻辑推理能力: R1 版本及所有蒸馏版本都会在给出最终答案前生成一个 <think>…</think> 格式的代码块。DeepSeek 官方说明文档建议将温度参数设为 0.5–0.7(推荐值为 0.6),且无需设置系统提示词;针对数学类问题,最好明确要求模型“逐步推理”并将最终答案以方框标注出来。
  • Native tool-calling: Not reliable on the distills. Ollama’s chat template for the R1 distills doesn’t support tool/function-calling the way Llama 3.1/3.3 or Qwen3 do — see ollama/ollama#8517 (closed, unresolved for the distill template). If your workload needs an agent that calls tools, pick a model built for it — see Choose a model by task.
  • Context: 128K for every distill (1.5b through 70b); 160K for the full 671b R1 and R1-0528.
  • 视觉能力: 本页面所列的所有模型均不具备多模态能力——DeepSeek-R1 及其蒸馏版模型仅支持文本处理。

若需使用超越 R1 性能水平的模型,可选用当前处于前沿水平的 V4 Flash 0731 模型。

R1 是基于 DeepSeek 的 V3 架构开发且经过推理能力调优的模型版本。目前官方发布的稳定版为 deepseek-ai/DeepSeek-V4-Flash-0731,该版本已取代早期的 V4 Flash 预览版。该模型采用开源授权模式且遵循 MIT 许可协议,不过运行该模型需要配置多设备协同服务器而非普通单机工作站。在 DeepSeek 系列模型概览 中详细介绍了其面向 284B 场景设计且实际 13B 运作的架构设计、配套的 DSpark 模块、工具调用功能、高达 1M 的上下文容量以及本地硬件部署方案。

通过 Tokios 连接器实现对接

当 DeepSeek 模型已在本地成功运行后,配置 Tokios 连接器即可让 Claude Code、Cline 或其他兼容客户端通过 https://api.tokios.com 方式访问该模型,而无需仅通过 localhost:11434 进行调用。
1

完成 Tokios 连接器的配对设置

登录至 tokios.com/console 页面后,点击 Setup 选项卡并选择 Start pairing 按钮即可获取一次性使用的令牌(TKS-XXXX-XXXX)。随后在运行 Ollama 的计算机上安装并启动该连接器即可。
Windows
macOS
Linux
Then approve the device on the Setup or Connectors tab.
2

将连接器指向 Ollama 的 /v1 API 接口

Ollama 在 /v1 位置提供了兼容 OpenAI 协议的接口服务。在仅运行单一模型的情况下,控制台内的设置向导会自动填入 http://127.0.0.1:11434/v1 参数值;若需运行多个模型,则需手动在 tokios-connector.json 处指定相关参数——具体说明可参阅 连接器配置指南。
3

执行一次部署注册

在 Models 标签页中注册所需模型并设定一个公开的部署名称,例如 deepseek-r1-tunnel。客户端在 model 字段中发送的正是此名称,而非 Ollama 本地模型的 ID。
4

生成 API 密钥

回到 Keys 标签页并点击 Create key。此时请立即复制 sk-tok-… 令牌,该令牌仅显示一次。

任意位置均可调用

The model field is always your registered deployment name (deepseek-r1-tunnel above), never Ollama’s local model id. Tokios turns whatever’s running on localhost into a stable, authenticated endpoint — it doesn’t change what the model can do. See Use Claude Code and Use Cline for full client setup.

注意事项

  • R1 蒸馏版模型的工具调用功能不可靠。若您正在开发需要模型调用工具的智能体、命令行工具或 IDE 插件,建议选用经验证具备原生工具支持能力的模型,详情参见 按任务选择模型。
  • 需适当扩大上下文窗口容量。Ollama 默认的 2048 令牌容量极易截断 R1 风格的复杂推理输出;实际应用时务必调高 num_ctx 数值,最高可设为 128K(蒸馏版)或 160K(完整版 671b)。
  • A distill is not the full model. The 1.5b–70b tags are Qwen/Llama checkpoints fine-tuned on R1’s reasoning traces — they reproduce the reasoning behavior on light hardware, not R1’s full capability. Benchmark quality drops as size drops; see the DeepSeek-R1 model card for the distill evaluation table.
  • 不同蒸馏版模型适用不同授权条款。完整版 R1/R1-0528 权重文件及基于 Qwen 的蒸馏版模型(1.5b、7b、14b、32b)均遵循 MIT 授权协议;而基于 Llama 的蒸馏版模型(8b、70b)则继承其基础模型的 Meta Llama 3.1/3.3 授权条款,商业用途前务必确认相关许可要求。
  • 671B needs real multi-GPU hardware — roughly 404 GB at Q4_K_M alone — not a typical single-workstation setup. The current V4 Flash 0731 checkpoint is smaller but still needs roughly 162–167 GB before KV cache and runtime overhead; see the DeepSeek family overview.
  • Tokios 会将工具调用请求直接转发至上游模型所能支持的范围,而不会为那些本身不具备工具调用能力的模型强行添加此功能。

深度求索系列模型概览

R1版本、V3.x版本以及V4前沿版本之间的差异,以及哪一类版本最适合您的硬件配置。

依据具体任务挑选合适的模型

若您正在开发智能体,请选择具备稳定工具调用能力的模型。

依据您的显卡型号匹配适配的模型

选定标签前,请先对比不同蒸馏尺寸对应的显存需求等级。

量化技术及硬件适配

哪些格式——包括 GGUF、FP16及其他格式——能够顺利运行在您的硬件设备上。