|
Ollama 是一个开源项目,旨在简化在本地部署和运行大型语言模型(LLMs)的过程。它提供了一系列工具和功能,使得开发者和研究人员能够更容易地在自己的机器上利用这些先进的AI模型,而无需依赖云端服务。 官网:https://ollama.com Github:https://github.com/ollama/ollama 一、运行环境准备  Ollama 官方提供了 Docker 镜像安装,可以在 Docker Hub 上获取:Docker Hub :https://hub.docker.com/r/ollama/ollama  ingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.034em;">二、模型库提供商 提供商:https://ollama.com/library运行 7B 模型需要至少 8GB 的 RAM,运行 13B 模型需要 16GB RAM,运行 33B 模型需要 32GB RAM。 运行并与 Llama 3 进行交流,可以使用以下命令:
四、命令行操作 CLI 参考创建模型ollamacreateselfModel-f./Modelfile 更新模型删除模型
复制模型ollamacpllama3self-llama3
多行输入>>>"""Hello,...world!..."""I'mabasicprogramthatprintsthefamous"Hello,world!"messagetotheconsole.多模态模型>>>What'sinthisimage?/Users/aid/smile.pngTheimagefeaturesayellowsmileyface,whichislikelythecentralfocusofthepicture. 提示作为参数传入$ollamarunllama2"Summarizethisfile (catREADME.md)"Ollamaisalightweight,extensibleframeworkforbuildingandrunninglanguagemodelsonthelocalmachine.ItprovidesasimpleAPIforcreating,running,andmanagingmodels,aswellasalibraryofpre-builtmodelsthatcanbeeasilyusedinavarietyofapplications. 列出已安装模型列表
启动 Ollama
五、源码构建Ollama
更详细的说明可以在开发者指南中找到。
运行本地构建六、REST API文档提供详细信息查看文档 https://github.com/ollama/ollama/blob/main/docs/api.md查看更多集成案例,可以查看github仓库文档
|