笔记
- 安装ollama平台
Download Ollama on macOSDownload Ollama for macOShttps://ollama.com/download
- 查找deepseek模型
OllamaGet up and running with large language models.https://ollama.com/search
- 以deepseek-r1为例
deepseek-r1DeepSeek's first-generation of reasoning models with comparable performance to OpenAI-o1, including six dense models distilled from DeepSeek-R1 based on Llama and Qwen.https://ollama.com/library/deepseek-r1
- 选择模型后,运行cmd,输入指令,开始安装、运行模型
ollama pull <模型>
ollama run <模型>
5. 其他相关指令
安装使用模型 | ollama run <模型> |
查询模型 | ollama list |
删除模型 | ollama rm <模型> |
退出 | ctrl+d |
6. 模型与显卡匹配关系(AI查的)
- R1-Lite:轻量级版本(如 7B/13B 参数),适合推理和轻量级训练。
- R1-Standard:标准版本(如 20B/30B 参数),适合中等规模训练和推理。
- R1-Pro:大规模版本(如 70B/130B 参数),需要高性能计算资源。
笔记本RTX4050运行deepseek-r1:8b流畅,运行deepseek-r1:14b时结果输出较慢。
DeepSeek-R1 | 推荐显卡型号 | 显存要求 | 适用场景 |
---|---|---|---|
R1-Lite | NVIDIA RTX 3060/3070/4060 | 12GB+ | 本地开发、小批量推理、轻量微调 |
NVIDIA T4 | 16GB | 云端推理、低功耗部署 | |
R1-Standard | NVIDIA RTX 3090/4090 | 24GB+ | 中等规模训练、多任务推理 |
NVIDIA A10/A30 | 24GB/48GB | 企业级推理、中等规模微调 | |
R1-Pro | NVIDIA A100 (40GB/80GB) | 40GB+ | 大规模训练、分布式计算 |
NVIDIA H100 | 80GB+ | 超大规模训练、高性能计算集群 |
7. 离线部署
安装模型,需要提前将模型文件下载到本地,再手动导入。
下载模型文件:
-
官方模型库:使用
ollama pull <模型名>
下载模型。文件一般存储在/.ollama/modelsollama pull deepseek-r1:8b
-
将/.ollama/下文件复制到离线电脑
-
离线导入模型
使用命令ollama serve
启动服务。
运行ollama list
查看可用模型。