本地部署大模型

部署运行你感兴趣的模型镜像

安装ollama

官网,选择操作系统版本Linux
curl -fsSL https://ollama.com/install.sh | sh
网络不行,可以离线下载: https://github.com/ollama/ollama/releases/


解压安装包:
tar -C /usr -xzf ollama-linux-amd64-rocm.tgz

运行ollama

代码如下(示例):
启动ollama服务:ollama serve
运行模型:ollama run qwen2:7b

Hello, what is Ollama?
It appears there might be some confusion in your question as “Ollama” doesn’t seem to refer to anything widely recognized or commonly used…

python 调用qwen

import requests
import json

url = "http://localhost:11434/api/generate"
data = {
    "model": "qwen2:7b",
    "prompt": " what is Ollama?"
}

response = requests.post(url, json=data, stream=True)

for line in response.iter_lines():
    if line:
        content = json.loads(line.decode("utf-8"))
        print(content.get("response", ""), end="", flush=True)

结果演示

It appears there might be some confusion in your question as "Ollama" doesn't seem to refer to anything widely recognized or commonly used. However, if you're referring to an online platform that provides educational resources, it could possibly be OLMAA (Open Learning Media and Animation Academy) or another learning management system designed for education purposes. 

If "Ollama" is specific to a software application, website, or service not widely known, I might need more details to provide accurate information.

Please clarify your question so I can assist you better. If OLMAA (Open Learning Media and Animation Academy) is what you meant, it's an educational institution that offers training courses in media production and animation, providing students with both practical skills and theoretical knowledge they'll need for careers in these fields.

If you're referring to something else by "Ollama," please provide more context or details so I can assist you appropriately.

您可能感兴趣的与本文相关的镜像

Llama Factory

Llama Factory

模型微调
LLama-Factory

LLaMA Factory 是一个简单易用且高效的大型语言模型(Large Language Model)训练与微调平台。通过 LLaMA Factory,可以在无需编写任何代码的前提下,在本地完成上百种预训练模型的微调

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值