ollama_models

我要开发同款
匿名用户2024年07月31日
76阅读

技术信息

开源地址
https://modelscope.cn/models/liush99/ollama_models
授权协议
Apache License 2.0

作品详情

Ollama

官网:https://ollama.com/

Widows系统查看ollama 帮助命令

ollama.exe serve --help

模型下载到本地默认目录:

  • O Mac, the models will be dowload to ~/.ollama/models
  • O Liux (or WSL), the models will be stored at /usr/share/ollama/.ollama/models

常用命令

#Pull a model
ollama pull llama2
#Remove a model
ollama rm llama2
#Copy a model
ollama cp llama2 my-llama2
#List models o your computer
ollama list
#查看模型信息
ollama show --modelfile mistral

如何导入Model

Ollama supports importig GGUF models i the Modelfile:

#1.Create a file amed Modelfile, with a FROM istructio with the local filepath to the model you wat to import.
FROM ./vicua-33b.Q4_0.gguf
#2.Create the model i Ollama
ollama create example -f Modelfile
#3.Ru the model
ollama ru example

REST API

Ollama has a REST API for ruig ad maagig models.

Geerate a respose

curl http://localhost:11434/api/geerate -d '{
  "model": "llama2",
  "prompt":"Why is the sky blue?"
}'

Chat with a model

curl http://localhost:11434/api/chat -d '{
  "model": "mistral",
  "messages": [
    { "role": "user", "cotet": "why is the sky blue?" }
  ]
}'

当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。

您可以通过如下git cloe命令,或者ModelScope SDK来下载模型

SDK下载

#安装ModelScope
pip istall modelscope
#SDK模型下载
from modelscope import sapshot_dowload
model_dir = sapshot_dowload('liush99/ollama_models')

Git下载

#Git模型下载
git cloe https://www.modelscope.c/liush99/ollama_models.git

如果您是本模型的贡献者,我们邀请您根据模型贡献文档,及时完善模型卡片内容。

功能介绍

Ollama 官网:https://ollama.com/ Windows系统查看ollama 帮助命令 ollama.exe serve --help 模型下载到本地默认目录: On Mac,

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论