Files
nexus/wiki/entities/Ollama.md
2026-04-14 16:02:50 +08:00

39 lines
980 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: "Ollama"
type: entity
tags: [ollama, local-llm, ai, python]
last_updated: 2026-04-13
---
## Overview
Ollama是本地大语言模型运行平台支持一键部署和管理LLM。
## Attributes
| 属性 | 值 |
|------|-----|
| 安装方式 | 官方安装脚本 |
| 默认端口 | 11434 |
| 默认监听 | 127.0.0.1 |
| 模型存储 | ~/.ollama/models |
## 支持的模型
| 模型 | 大小 | 用途 |
|------|------|------|
| qwen2.5-coder:7b | 4.6GB | 代码生成 |
| qwen2.5-coder:3b | ~2GB | 轻量代码生成 |
## API接口
- REST API: http://localhost:11434
- API列表: http://localhost:11434/api/tags
- 聊天: http://localhost:11434/api/chat
## 远程访问配置
编辑`/etc/systemd/system/ollama.service`
```ini
Environment="OLLAMA_HOST=0.0.0.0"
```
然后重启服务使其他机器可访问。
## 相关文档
- [[在 Ubuntu 安装 Ollama 并运行 Qwen2.5-Coder 7B]]
- [[可自动化、可扩展、AI增强的电商数据采集与处理系统]]