网站空间 推荐,不重名的建筑公司名字,搜索引擎排名竞价,上海个人网站建立安装软件#xff1a; Ollama#xff0c;官方网站#xff1a;https://ollama.com/ 可以再下载win、mac和linux版本 linux安装命令为#xff1a;curl -fsSL https://ollama.com/install.sh | sh 由于我的机器是linux不联网机器#xff0c;网上没找到下载离线方式#xff0c…安装软件 Ollama官方网站https://ollama.com/ 可以再下载win、mac和linux版本 linux安装命令为curl -fsSL https://ollama.com/install.sh | sh 由于我的机器是linux不联网机器网上没找到下载离线方式查看https://ollama.com/install.sh脚本发现有这句话 https://ollama.com/download/ollama-linux-${ARCH}${VER_PARAM}修改为如下即可下载下来传输到内网机器 https://ollama.com/download/ollama-linux-amd64 传输到内网机器/usr/bin/* 下命名为ollama。运行以下修改权限
sudo chmod x /usr/bin/ollama下载模型
模型途径 1.官网下载https://ollama.com/library/llama3 2.Hugging Facehttps://huggingface.co/shenzhi-wang/Llama3-8B-Chinese-Chat-GGUF-8bit/tree/main 这里是8B的模型可自行选择 3.国内镜像推荐https://hf-mirror.com/models
下载.GGUF格式模型
部署模型 进入部署机器启动Ollama 服务
ollama serve编写Modelfile 文件 ,FORM后改成自己模型目录
FROM /home/cec/CEMC/wpw/Llama3-70B-Chinese-Chat-q4_0.gguf
TEMPLATE {{ if .System }}|start_header_id|system|end_header_id|
{{ .System }}|eot_id|{{ end }}{{ if .Prompt }}|start_header_id|user|end_header_id|
{{ .Prompt }}|eot_id|{{ end }}|start_header_id|assistant|end_header_id|
{{ .Response }}|eot_id|
SYSTEM
PARAMETER num_keep 24
PARAMETER stop |start_header_id|
PARAMETER stop |end_header_id|
PARAMETER stop |eot_id|
PARAMETER stop assistant
PARAMETER stop Assistant创建模型实例一个名为 llama3-zh-inst名字可自定义的模型实例加载 Modelfile 配置 llama3-zh-inst为实例名可随便取
ollama create llama3-zh-inst -f Modelfile运行命令开始问答
ollama run llama3-zh-inst