ollama
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOllama
Ollama
Ollama makes running LLMs locally as easy as . 2025 updates include Windows/AMD support, Multimodal input, and Tool Calling.
docker runOllama让在本地运行LLM变得像一样简单。2025年更新包括Windows/AMD支持、**多模态(Multimodal)**输入以及工具调用功能。
docker runWhen to Use
使用场景
- Local Development: Coding without wifi or API costs.
- Privacy: Processing sensitive documents on-device.
- Integration: Works with LangChain, LlamaIndex, and Obsidian natively.
- 本地开发:无需网络或API费用即可进行编码工作。
- 隐私保护:在设备端处理敏感文档。
- 集成兼容:原生支持与LangChain、LlamaIndex和Obsidian协同工作。
Core Concepts
核心概念
Modelfile
Modelfile
Docker-like file to define a custom model (System prompt + Base model).
dockerfile
FROM llama3
SYSTEM You are Mario from Super Mario Bros.类似Docker的文件,用于定义自定义模型(系统提示词 + 基础模型)。
dockerfile
FROM llama3
SYSTEM You are Mario from Super Mario Bros.API
API
Ollama runs a local server () compatible with OpenAI SDK.
localhost:11434Ollama会启动一个本地服务器(),兼容OpenAI SDK。
localhost:11434Best Practices (2025)
2025年最佳实践
Do:
- Use high-speed RAM: Local LLM speed depends on memory bandwidth.
- Use Quantized Models: is the sweet spot for speed/quality balance.
q4_k_m - Unload: when done to free VRAM for games/rendering.
ollama stop
Don't:
- Don't expect GPT-4 level: Smaller local models (8B) are smart but lack deep reasoning.
建议:
- 使用高速内存:本地LLM的运行速度取决于内存带宽。
- 使用量化模型:是速度与质量平衡的最优选择。
q4_k_m - 释放资源:使用完成后执行以释放显存,供游戏/渲染使用。
ollama stop
不建议:
- 不要期望达到GPT-4水平:小型本地模型(8B参数)虽智能,但缺乏深度推理能力。