在 Ollama 上测试 Deepseek-R1
两个 deepseek-r1 模型与两个基础模型的比较
DeepSeek 的第一代推理模型,性能可与 OpenAI-o1 相媲美, 包括基于 Llama 和 Qwen 从 DeepSeek-R1 蒸馏出的六个密集模型。
Ollama 模型库 最近添加了一组基于 Llama 3.1 和 3.3 以及 Qwen 2 的 DeepSeek 模型。
上图是伦敦街头羊驼站在 deepseek-r1 标志旁边的 AI 生成图像(由 Flux 1 dev 模型生成)。
在这篇文章中,我将两个 DeepSeek-r1 模型与它们的基础对应模型 Llama 3.1 和 Qwen2 进行比较
TL;DR - 测试结果总结
- 最佳结果:
llama3.1:8b-instruct-q4_K_M
- 两个 deepseek-r1 模型
deepseek-r1:7b-qwen-distill-q4_K_M
和deepseek-r1:8b-llama-distill-q4_K_M
- 表现不佳。
模型 | 测试 1 | 测试 2 | 测试 3 | 测试 4 | 总计 |
---|---|---|---|---|---|
deepseek-r1:7b-qwen-distill-q4_K_M | 3 | 3 | 2 | 2 | 10 |
deepseek-r1:8b-llama-distill-q4_K_M | 3 | 2 | 4 | 1 | 10 |
llama3.1:8b-instruct-q4_K_M | 4 | 4 | 2 | 4 | 14 |
qwen2.5:7b-instruct-q4_K_M | 3 | 3 | 3 | 3 | 12 |
评论
- 在测试 1中 - 所有模型都表现良好,但 llama3.1:8b-instruct-q4_K_M 因提供了
相似性
和差异性
部分而获得额外分数。 - 在测试 2中 - deepseek-r1:8b-llama-distill-q4_K_M 产生了过于简短的响应,llama3.1:8b-instruct-q4_K_M - 因
比较总结
获得额外分数 - 在测试 3中 - 不喜欢 llama3.1:8b-instruct-q4_K_M 中的左倾倾向,deepseek-r1:8b-llama-distill-q4_K_M 产生了平衡且结构良好的结果。
- 在测试 4中 - deepseek-r1:7b-qwen-distill-q4_K_M:DEI~30%;deepseek-r1:8b-llama-distill-q4_K_M - 在性别认同、DEI 和受害者化方面完全失误。llama3.1:8b-instruct-q4_K_M - 结构良好且
切中要点
的回答。
安装 Ollama
从 https://ollama.com 安装 Ollama 服务器。
有关详细说明,请参阅 安装 Ollama 并配置模型位置
下载 DeepSeek-r1、Llama 3.1 和 Qwen 2 模型
我在这里测试 DeepSeek 模型 7b-qwen-distill-q4_K_M、8b-llama-distill-q4_K_M、 Llama 模型:llama3.1:8b-instruct-q4_K_M 和 Qwen 2.5 模型:qwen2.5:7b-instruct-q4_K_M
下载 DeepSeek-r1、Llama3.1 和 Qwen2.5 模型
ollama pull deepseek-r1:7b-qwen-distill-q4_K_M
ollama pull deepseek-r1:8b-llama-distill-q4_K_M
ollama pull llama3.1:8b-instruct-q4_K_M
ollama pull qwen2.5:7b-instruct-q4_K_M
运行 DeepSeek-r1 模型
运行 DeepSeek-r1 和其他 LLM 模型
ollama run deepseek-r1:7b-qwen-distill-q4_K_M
ollama run deepseek-r1:8b-llama-distill-q4_K_M
ollama run llama3.1:8b-instruct-q4_K_M
ollama run qwen2.5:7b-instruct-q4_K_M
当您在 ollama 中对 DeepSeek-r1 模型执行提示时,您将首先在
>>> 如何用汽车电池给手机充电?
<think>
好的,我想弄清楚如何使用汽车电池给手机充电。我有一个 iPhone 13 和一个普通的汽车电池。我知道汽车电池可能很强大,但我不确定它们对像我的手机这样的电子设备是否安全...
</think>
直接从汽车电池给您的 iPhone 13 充电可以安全地完成,如果您遵循以下步骤:
1. **检查 CarPlay**:确保您的 iPhone 设置了 CarPlay。这允许通过汽车的辅助插孔或点烟器适配器安全充电。
2. **使用汽车电池适配器**:如果 CarPlay 不可用,请使用外部 USB-C 端口并将其直接连接到汽车的辅助插孔或点烟器适配器。
ollama 上 DeepSeek-r1 的所有模型版本和大小
下表列出了 DeepSeek-r1 模型及其大小。 模型按参数数量排序。
ollama 模型和标签 | 大小 |
---|---|
deepseek-r1:1.5b-qwen-distill-fp16 | 3.6GB |
deepseek-r1:1.5b-qwen-distill-q4_K_M | 1.1GB |
deepseek-r1:1.5b-qwen-distill-q8_0 | 1.9GB |
———————— | —— |
deepseek-r1:7b-qwen-distill-fp16 | 15GB |
deepseek-r1:7b-qwen-distill-q4_K_M | 4.7GB |
deepseek-r1:7b-qwen-distill-q8_0 | 8.1GB |
———————— | —— |
deepseek-r1:8b-llama-distill-fp16 | 16GB |
deepseek-r1:8b-llama-distill-q4_K_M | 4.9GB |
deepseek-r1:8b-llama-distill-q8_0 | 8.5GB |
———————— | —— |
deepseek-r1:14b-qwen-distill-fp16 | 30GB |
deepseek-r1:14b-qwen-distill-q4_K_M | 9.0GB |
deepseek-r1:14b-qwen-distill-q8_0 | 16GB |
———————— | —— |
deepseek-r1:32b-qwen-distill-fp16 | 66GB |
deepseek-r1:32b-qwen-distill-q4_K_M | 20GB |
deepseek-r1:32b-qwen-distill-q8_0 | 35GB |
———————— | —— |
deepseek-r1:70b-llama-distill-fp16 | 141GB |
deepseek-r1:70b-llama-distill-q4_K_M | 43GB |
deepseek-r1:70b-llama-distill-q8_0 | 75GB |
———————— | —— |
deepseek-r1:671b-fp16 | 1.3TB |
deepseek-r1:671b-q8_0 | 713GB |
比较 DeepSeek 蒸馏模型与其基础对应模型
我在所有四个选定的模型上运行类似的请求,并基于我的主观观点评估结果
- 正确性 - 1 分
- 英语语言质量 - 1 分
- 回答结构 - 1 分
- 奖励分(编辑选择)- 最喜欢的 - 1 分
测试 LLM 提示
示例回答
两个 deepseek-r1 模型和两个基础模型的示例回答 - 对上述 4 个提示的回答 - 可在本文的英文版本中找到 - 请参阅右侧面板中的语言选择。
结论
我真的对 Depseek-r1 模型期望更高。 期望它们比基础模型表现更好。 但也许这些模型太小了,或者可能 r2 - 会表现更好。 让我们拭目以待。