前言

今天在群里有个小伙伴发了一个在 Ollama 上运行 deepseek 大模型的消息,最近 deepkseek 也是风头正劲,于是我就体验了一下。

发现了还不错,它相比于其它的大模型会把思考过程也显示出来。

ollama 安装

ollama 安装很简单, 到Download Ollama on macOS 下载即可,支持 macOSLinuxWindows

ollama 是我用过的本地大模型中使用最简单和方便的。

可以使用如下指令来检测是否安装成功

1
ollama -v

如果能输出版本号就算成功。

运行 deepseek 大模型

Ollama中列出了支持的大模型,可以选择你需要的,这里用 deepseek 举例

安装好后在终端中使用如下指令来把大模型下载到本地

1
ollama pull deepseek-r1:1.5b

根据自己的内存选择一个合适的,要不然可能会暴内存

下载好了就可以使用了

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ollama run deepseek-r1:14b
>>> 介绍一下你自己
<think>

</think>

您好!我是由中国的深度求索(DeepSeek)公司开发的智能助手DeepSeek-R1。如您有任何任何问题,我会尽我所能为您提供帮助。

>>> 解释一下什么是大模型
<think>
Alright, the user just asked me to "explain what a large model is." I need to provide a clear and concise explanation. First, I
should define what a large language model (LLM) is without being too technical.

I remember that LLMs are based on neural networks, so maybe I should mention that they use deep learning techniques. Also, it's
important to highlight the scale aspect—like the number of parameters and the vast amount of data they're trained on.

The user might be interested in understanding why these models are effective. So, I should explain how their size allows them to
capture complex patterns and contexts, which leads to better performance in various tasks.

I also think it's good to mention some practical applications like text generation or summarization to give examples of what
LLMs can do. This helps make the concept more relatable.

Lastly, since there's a lot of buzz around these models, I should note that they require significant computational resources and
careful management to ensure responsible use. That might address any underlying concerns about the technology's impact.

I need to structure this in a way that's easy to follow, maybe starting with the definition, then moving on to how they work,
their benefits, and some considerations.
</think>

**什么是大模型?**

“大模型”通常指的是具有大量参数的大型语言模型(Large Language Models,LLMs),这些模型基于深度学习技术构建,并通过海量数据进行训练
。它们能够捕捉到复杂的语言模式和上下文信息,从而在多种任务中表现出强大的理解与生成能力。

### 大模型的特点:
1. **规模庞大**:大模型通常拥有数亿甚至上百亿的参数,例如GPT系列(如GPT-3、GPT-4)、BERT等。
2. **深度学习基础**:基于神经网络架构,通过多层参数调整来模拟人类语言的学习过程。
3. **通用性**:经过广泛领域的数据训练,能够理解和生成多种语言及任务相关的文本内容。
4. **强大的上下文理解**:能捕捉到长距离依赖关系,理解复杂语境。
5. **多任务能力**:在问答、翻译、摘要、对话等多种任务中表现出色。

### 大模型的作用:
- **自然语言处理(NLP)**:如机器翻译、文本生成、情感分析等。
- **辅助决策**:通过分析大量数据提供洞察或建议。
- **人机交互**:提升聊天机器人、语音助手的对话能力。

### 挑战与考虑:
1. **计算资源需求高**:训练和运行大模型需要强大的算力支持。
2. **伦理与安全问题**:可能生成不准确或有害信息,需谨慎管理和引导使用。

总之,“大模型”是人工智能领域的重要进展,正在改变我们处理语言任务的方式。

可以看到输出带有一个 <think></think> 的标签,里面是一些它是怎么思考的,这个挺有意思的。

不过有时候只想要答案的话,这个就显得啰唆了。