借助 DeepSeek R1 与 AnythingLLM 打造个人专属本地知识库

使用DeepSeek R1 与 AnythingLLM 搭建本地知识库

一、安装Ollama

  1. 安装Ollama

  2. 安装后浏览器访问 http://localhost:11434/ 出现 Ollama is running 提示表示安装成功

二、下载DeepSeek模型

  1. 下载DeepSeek

  2. 模型下载建议:显卡显存12G建议下载7B或者8B模型版本,7B:适合本地知识库,资源占用更低,性价比更高。命令行界面(cmd)输入下载对应的模型版本,如输入 ollama run deepseek-r1:7b 命令。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# DeepSeek-R1
ollama run deepseek-r1:671b

# DeepSeek-R1-Distill-Qwen-1.5B
ollama run deepseek-r1:1.5b

# DeepSeek-R1-Distill-Qwen-7B
ollama run deepseek-r1:7b

# DeepSeek-R1-Distill-Llama-8B
ollama run deepseek-r1:8b

# DeepSeek-R1-Distill-Qwen-14B
ollama run deepseek-r1:14b

# DeepSeek-R1-Distill-Qwen-32B
ollama run deepseek-r1:32b

# DeepSeek-R1-Distill-Llama-70B
ollama run deepseek-r1:70b
  1. 详细建议

  1. 如果正常使用魔法下载速度过慢的话请耐心等待,或者参考文章底部参考链接中提供的解决办法。魔塔社区模型库 建议下载GGUF为后缀的模型文件。

    默认模型路径:C:\Users\<Username>\.ollama\models\blobs

三、安装AnythingLLM

  1. 安装AnythingLLM

  2. 设置大模型

  1. 设置中文

  1. 聊天设置(替换为中文)

1
2
3
4
5
6
7
8
Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.

给出以下对话、相关背景和后续问题,回答用户当前提出的问题。根据上述信息,按照用户指示,仅返回您对问题的回答。

There is no relevant information in this workspace to answer your query.

此工作区中没有相关信息可以回答您的查询。

  1. 自定义本地知识库

  1. 问题测试(与文档内容一致)

四、参考链接

  1. 使用 DeepSeek R1 与 AnythingLLM 搭建本地知识库

  2. DeepSeek-R1最佳本地用法!免费开源,无痛运行高级 AI 大模型,秒建私人知识库! | 零度解说

  3. DeepSeek+AnythingLLM打造自己大模型知识库