微信扫码
添加专属顾问
我要投稿
与 ChatGPT 等闭源大模型不同,Ollama 提供良好的透明度和定制性,使其成为开发人员和AI爱好者的宝贵资源。
我们将在本文一起探索如何下载 Ollama 并与两个令人兴奋的开源 LLM 模型进行交互:LLaMA 2(来自 Meta 的基于文本的模型)和 LLaVA(可以处理文本和图像的多模式模型)。
Ollama 支持 3 种不同的操作系统,当前 Windows 版本尚处于预览版模式。
ollama run llama2
下载该模型时,我们应该会看到以下与此类似的输出。
请等待一段时间,需要等待片刻:
pulling manifestpulling 8934d96d3f08... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 3.8 GBpulling 8c17c2ebb0ea... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 7.0 KBpulling 7c23fb36d801... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 4.8 KBpulling 2e0493f67d0c... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 59 Bpulling fa304d675061... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 91 Bpulling 42ba7f8a01dd... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏557 Bverifying sha256 digestwriting manifestremoving any unused layerssuccess>>> Send a message (/? for help)
现在它应该要求你发送消息或相关提示。
比如我们问 llama2:“你能为我做点啥?” (其实,你想问什么都可以,中文也没问题)。
如果你问了与上面相同的问题,那么应该能得到这样的答复:
>>> What can you do for me?As a responsible AI language model, I am here to assist you with any questions or tasks you may have. Here are some examples of things I can helpwith:1. Answering questions: I can provide information on a wide range of topics, from science and technology to history and culture.2. Generating ideas: I can help you brainstorm ideas for creative projects, or provide suggestions for solving problems.3. Writing assistance: I can help you with writing tasks such as proofreading, editing, and suggesting alternative words or phrases.4. Translation: I can translate text from one language to another.5. Summarizing content: I can summarize long pieces of text, such as articles or documents, into shorter, more digestible versions.6. Creativity: I can help you generate creative ideas for stories, poems, or other forms of writing.7. Language learning: I can assist you in learning a new language by providing grammar explanations, vocabulary lists, and practice exercises.8. Chatting: I'm here to chat with you and provide a response to any question or topic you'd like to discuss.Please let me know if there is anything specific you would like me to help you with.>>> Send a message (/? for help)
上面是我从 llama2 得到的回应。
如果要退出实用程序,可以键入/exit。
现在,让我们运行一个多模式模型,你可以在其中发送图像并基于该图像提出相关的问题。
ollama run llava
成功下载模型后,你应该可能在终端中看到类似以下内容:
pulling manifestpulling 170370233dd5... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 4.1 GBpulling 72d6f08a42f6... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 624 MBpulling 43070e2d4e53... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏11 KBpulling c43332387573... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 67 Bpulling ed11eda7790d... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏ 30 Bpulling 7c658f9561e5... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████▏564 Bverifying sha256 digestwriting manifestremoving any unused layerssuccess>>> Send a message (/? for help)
我使用pexels.com上找到一张图片,下载到了本地的download的目录,然后将路径名和文件名发给了LLaVA。
以下是我从 LLaVA 得到的输出:
>>> What's in this image? ./Downloads/test-image-for-llava.jpegAdded image './Downloads/test-image-for-llava.jpeg'The image shows a person walking across a crosswalk at an intersection. There are traffic lights visible, and the street has a bus parked on oneside. The road is marked with lane markings and a pedestrian crossing signal. The area appears to be urban and there are no visible buildings orstructures in the immediate vicinity of the person.>>> Send a message (/? for help)
你将可以看到它对图像的准确解释。我们还可以随意尝试其他东西,就可以充分享受其中的美好乐趣了。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2026-02-09
Virustotal对OpenClaw恶意技能(Skills)的跟踪分析
2026-02-09
ollama v0.15.6发布:上下文限制修复、自动模型下载、Claude环境变量优化、Droid与Qwen全面更新详解
2026-02-09
【开源】港大开源“纳米级OpenClaw”:超轻量AI助手,仅4000行代码复刻OpenClaw核心战力!
2026-02-06
Qwen3-Coder-Next 上线模力方舟:仅 3B 激活参数,媲美主流大模型的 Agent 编码能力
2026-02-06
给自己搭一个 AI 搭档:OpenClaw 安装使用全记录
2026-02-06
Qwen3-TTS:2026年最强开源文本转语音模型完全指南
2026-02-06
OpenClaw 爆火之后,我们看到了这些创业信号
2026-02-05
从Clawdbot到OpenClaw:爆款本地AI Agent的产品逻辑与争议
2025-11-19
2026-01-27
2025-12-22
2026-01-12
2026-01-29
2025-11-17
2025-12-10
2026-01-28
2025-12-23
2026-01-06
2026-02-05
2026-01-28
2026-01-26
2026-01-21
2026-01-21
2026-01-20
2026-01-16
2026-01-02