Ollama 是一个开源项目,旨在简化在本地部署和运行大型语言模型(LLMs)的过程。它提供了一系列工具和功能,使得开发者和研究人员能够更容易地在自己的机器上利用这些先进的AI模型,而无需依赖云端服务。
官网:https://ollama.com
Github:https://github.com/ollama/ollama
一、运行环境准备
Docker Hub :https://hub.docker.com/r/ollama/ollama
运行 7B 模型需要至少 8GB 的 RAM,运行 13B 模型需要 16GB RAM,运行 33B 模型需要 32GB RAM。
ollamacreateselfModel-f./Modelfile
ollamapullllama3
ollamarmllama3
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.
ollamalist
ollamaserve
cmake 和 go:brewinstallcmakego
gogenerate./...
gobuild.
更详细的说明可以在开发者指南中找到。
./ollamaserve
./ollamarunllama2
详细信息查看文档
查看更多集成案例,可以查看github仓库文档
| 欢迎光临 链载Ai (https://www.lianzai.com/) | Powered by Discuz! X3.5 |