Files
nexus/wiki/concepts/本地LLM.md
2026-04-14 16:02:50 +08:00

47 lines
1000 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "本地LLM"
type: concept
tags: [llm, ollama, local, ai]
last_updated: 2026-04-13
---
## Definition
本地LLM是在本地服务器部署运行的大语言模型不依赖外部API服务。
## 优势
- 隐私:数据不离开本地
- 成本无API调用费用
- 离线:无需互联网连接
- 定制:可微调模型
## Ollama部署流程
```bash
# 1. 安装
curl -fsSL https://ollama.com/install.sh | sh
# 2. 下载模型
ollama pull qwen2.5-coder:7b
# 3. 运行
ollama run qwen2.5-coder:7b
```
## 推荐模型
| 模型 | 大小 | 用途 |
|------|------|------|
| qwen2.5-coder:7b | 4.6GB | 代码生成、DevOps |
| qwen2.5-coder:3b | ~2GB | 轻量任务 |
## 与n8n集成
n8n通过HTTP Request调用Ollama API
```bash
POST http://localhost:11434/api/generate
{
"model": "qwen2.5-coder:7b",
"prompt": "..."
}
```
## 相关文档
- [[在 Ubuntu 安装 Ollama 并运行 Qwen2.5-Coder 7B]]
- [[可自动化、可扩展、AI增强的电商数据采集与处理系统]]