本地部署运行一下deepseek r1尝鲜

发布于:2025-02-10 ⋅ 阅读:(33) ⋅ 点赞:(0)

2025-01-20正式发布 DeepSeek-R1,并同步开源模型权重。

DeepSeek-R1 遵循 MIT License,允许用户通过蒸馏技术借助 R1 训练其他模型。 DeepSeek-R1
上线API,对用户开放思维链输出,通过设置 model='deepseek-reasoner' 即可调用。 DeepSeek 官网与
App 即日起同步更新上线。
论文地址:https://github.com/deepseek-ai/DeepSeek-R1/blob/main/DeepSeek_R1.pdf
原文链接:https://blog.csdn.net/sexy19910923/article/details/145271916

开源网站 GitHub - deepseek-ai/DeepSeek-R1Contribute to deepseek-ai/DeepSeek-R1 development by creating an account on GitHub.https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1https://github.com/deepseek-ai/DeepSeek-R1

使用ollama进行部署

Download Ollama on Linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linuxhttps://ollama.com/download/linux

不同版本下载不同的版本安装

linux使用命令行

curl -fsSL https://ollama.com/install.sh | sh 

之后会根据不同的版本进行安装

之后Ollamahttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/searchhttps://ollama.com/search

 在这里选一下deepseek r1

其中有1.5b,7b,8b等,32b以上的到671b基本就是普通用户用用不了的了。

 

 安装ollama后运行 

ollama run deepseek-r1:1.5b

ollama run deepseek-r1:7b

ollama run deepseek-r1:8b

就会自动运行了,另外如果觉得这个cmd的窗口交互太不美观,可以使用openwebui,用起来跟chatgpt的web差不多,可以使用docker 安装,下面介绍一下用pip 安装,需要安装

pip install open-webui 

另外在安装这个包后,还会联网安装其它的组件,如语音识别等,需要设定代理才行

在cmd窗口中加入

set http_proxy=http://用户名:密码@代理地址:端口
set https_proxy=http://用户名:密码@代理地址:端口
 

set http_proxy=http://127.0.0.1:7897
set https_proxy=http://127.0.0.1:7897
​export http_proxy=http://10.10.10.215:7897
export https_proxy=http://10.10.10.215:7897
​


再运行

open-webui serve

linux 部署时也可以用相同的方法

pip install open-webui 

./clash-linux-amd64 -d ./ &

export http_proxy="http://127.0.0.1:7897"
export https_proxy="http://127.0.0.1:7897"

使用别的机器上的代理

export http_proxy="http://10.10.10.251:7897"
export https_proxy="http://10.10.10.251:7897"

在下载完模型后要关闭代理,再重新运行openwebui

使用LMstudio 进行部署LM Studio - Discover, download, and run local LLMshttps://lmstudio.ai/https://lmstudio.ai/https://lmstudio.ai/https://lmstudio.ai/https://lmstudio.ai/https://lmstudio.ai/https://lmstudio.ai/

下载后,要更换一下源就是模型的下载地址,安装后进入安装目录

cd C:\LM Studio

C:\LM Studio>findstr /s /i /m /c:"huggingface.co" *.*
 得到如下 :

将非exe文件中的huggingface.co字符串替换hf-mirror.com

推荐vscode。然后就可以正常下载,不过我这边网不好,下载的慢

使用AnythingLLM ,这个可以对本地知识库进行加工,美中不足就是没有linux arm的版本,无法在rk3588上面部署。

Download AnythingLLM for Desktophttps://anythingllm.com/desktophttps://anythingllm.com/desktophttps://anythingllm.com/desktophttps://anythingllm.com/desktophttps://anythingllm.com/desktophttps://anythingllm.com/desktopGitHub - Mintplex-Labs/anything-llm: The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more. - Mintplex-Labs/anything-llmhttps://github.com/Mintplex-Labs/anything-llm/https://github.com/Mintplex-Labs/anything-llm/https://github.com/Mintplex-Labs/anything-llm/https://github.com/Mintplex-Labs/anything-llm/https://github.com/Mintplex-Labs/anything-llm/https://github.com/Mintplex-Labs/anything-llm/

使用chatbox部署 ,这个版本啥都有,可以尝试

https://github.com/Bin-Huang/chatboxhttps://github.com/Bin-Huang/chatboxhttps://github.com/Bin-Huang/chatboxhttps://github.com/Bin-Huang/chatboxhttps://github.com/Bin-Huang/chatboxhttps://github.com/Bin-Huang/chatboxhttps://github.com/Bin-Huang/chatbox

使用Cherry Studio

官网下载地址:https://cherry-ai.com

GitHub地址:https://github.com/kangfenmao/cherry-studio

在Android手机上编译一个离线版本的deepseek运行环境,使用termux安装一个虚拟的kail系统

apt install git cmake golang
git clone --depth 1 https://github.com/ollama/ollama.git
cd ollama
go generate .
go build .
等待构建完成后,目录下会有一个 Ollama的应用
运行
./Ollama server&
服务启动后运行
./Ollama run DeepSeek-r1:1.5b
注用1.5b吧,因为没有gpu加速好像慢得很一秒2个字吧

另外chatbox的arm64版本也可以运行起来
https://chatboxai.app/zh/install?download=linux-arm64
下载后
./Chatbox-1.9.8-arm64.AppImage --appimage-extract
cd squashfs-root
./AppRun --no-sandbox


网站公告

今日签到

点亮在社区的每一天
去签到