ollama导入自己微调后的模型胡言乱语

1.ollama导入自己微调后的模型胡言乱语

原因:Modelfile的模板格式不对,对的如下所示

##格式0FROM tinyllama-my-model.gguf### Set the system message
SYSTEM """
You are a super helpful helper.
"""PARAMETER stop <s>
PARAMETER stop </s>#格式0的运行方式:ollama run my-model "<s>\nQ: \nWhat is the capital of France?\nA:\n"
##格式1
FROM ./llama3-unsloth.Q8_0.ggufTEMPLATE """{{- if .System }}
<|system|>
{{ .System }}
{{- end }}
<|user|>
{{ .Prompt }}
<|assistant|>
"""SYSTEM """You are a helpful, smart, kind, and efficient AI assistant.Your name is Aila. You always fulfill the user's requests to the best of your ability."""PARAMETER temperature 0.8
PARAMETER num_ctx 8192
PARAMETER stop "<|system|>"
PARAMETER stop "<|user|>"
PARAMETER stop "<|assistant|>"##格式2
FROM GEITje-7B-chat-v2.gguf
TEMPLATE """{{- if .System }}
<|system|>
{{ .System }}
</s>
{{- end }}
<|user|>
{{ .Prompt }}
</s>
<|assistant|>
"""
PARAMETER temperature 0.2
PARAMETER num_ctx 8192
PARAMETER stop "<|system|>"
PARAMETER stop "<|user|>"
PARAMETER stop "<|assistant|>"
PARAMETER stop "</s>"
##格式3
FROM models/tinyllama-1.1b-chat-v0.3.Q6_K.gguf
PARAMETER temperature 0.7
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
TEMPLATE """
<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
SYSTEM """You are a helpful assistant."""
ollama create example -f Modelfileollama run example

 2.将safesensor转为gguf:

下载llama.cpp   

 https://github.com/ggerganov/llama.cpp
cd llama.cpp && make clean && make all -j
python convert.py /home/Ubuntu/phit/model-00001-of-00002.safetensors --outfile /home/Ubuntu/phit/your_output.gguf --pad-vocab

Import GGUF into Ollama

 微调Phi-3和Llama3!AutoGen实现Phi-3+Llama3多LLMs对话!打造自己的AI Agent!windows系统也支持_哔哩哔哩_bilibili

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/14547.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

VBA语言専攻每周通知20240524

通知20240524 各位学员∶本周MF系列VBA技术资料增加611-615讲&#xff0c;T3学员看到通知后请免费领取,领取时间5月24日晚上18:00-5月26日晚上18:00。本次增加内容&#xff1a; MF611:用InputBox录入日期 MF612:信息提示10秒后关自动关闭 MF613:只是信息提示10秒 MF614:显…

代码随想录算法跟练 | Day3 | 链表Part1

个人博客主页&#xff1a;http://myblog.nxx.nx.cn 代码GitHub地址&#xff1a;https://github.com/nx-xn2002/Data_Structure.git Day3 203.移除链表元素 题目链接&#xff1a; https://leetcode.cn/problems/remove-linked-list-elements/ 题目描述&#xff1a; 给你一个…

如何解决Nginx反向代理不生效?

目录 背景 过程 日志 检查配置文件 重启服务 检查容器内的配置文件 容器和宿主机 其他 背景 用了两年的nginx新加的反向代理不生效 Docker挂载的配置文件启动的Nginx&#xff0c;配置一切正常&#xff0c;但是反向代理不生效&#xff0c;???先自查一波 过程 日志 …

【FAQ】HarmonyOS SDK 闭源开放能力 —Ads Kit

1.问题描述&#xff1a; 开屏广告效果最好的实现方式&#xff1f; 解决方法&#xff1a; 1、动画效果和开发者的实现方式有关&#xff0c;和开屏广告页面本身没什么关系的&#xff1b; 2、示例代码中使用Router跳转的方式展示广告&#xff0c;主要是用于演示广告接口怎么集…

RDDM论文阅读笔记

CVPR2024的残差去噪模型。把diffusion 模型的加噪过程分解为残差diffusion和noise diffusion&#xff0c;其中残差diffusion模拟从target image到degraded image的过程&#xff0c;而noise diffusion则是原来的diffusion过程&#xff0c;即从图片到高斯噪声的加噪过程。前者可以…

rocketmq 学习一

官方文档&#xff1a;RocketMQ 官方网站 | RocketMQ 一 介绍 RocketMQ 诞生于 2012 年&#xff0c;诞生即开源。2012&#xff5e;2015 年&#xff0c;RocketMQ 一直在通过内部电商业务打磨自身服务能力,并在 2015 年于阿里云上线公测。2016 年&#xff0c;阿里云 RocketMQ 完…

如何让社区版IDEA变得好用

如何让社区版IDEA变得好用 背景 收费版的idea功能非常强大&#xff0c;但是费用高。社区版的免费&#xff0c;但是功能被阉割了。如何才能让社区版Idea变得好用&#xff0c;就需要各种插件支持了。经过全局配置编码&#xff0c;maven&#xff0c;jdk版本&#xff0c;在加上各…

《扑克牌游戏》

描述 有一个扑克牌游戏&#xff0c;游戏规则是不断地摸牌&#xff0c;尽可能地使手上的牌的点数接近于10&#xff0c;最完美的情况是总点数为10&#xff0c;不可以超过10&#xff0c;否则就爆了。输入10张牌的点数&#xff0c;(每张点数不超过10)&#xff0c;请你输出用户应该抓…

架构二。。

1、CAP 只能3选2 1&#xff09;一致性&#xff08;Consistency&#xff09; 客户每次读都是返回最新的写操作结果 2&#xff09;可用性&#xff08;Availability&#xff09; 非故障节点在合理的时间内返回合理的响应 3&#xff09;分区容忍性&#xff08;Partition Tolerance…

Ribbon负载均衡(自己总结的)

文章目录 Ribbon负载均衡负载均衡解决的问题不要把Ribbon负载均衡和Eureka-Server服务器集群搞混了Ribbon负载均衡代码怎么写ribbon负载均衡依赖是怎么引入的&#xff1f; Ribbon负载均衡 负载均衡解决的问题 首先Ribbon负载均衡配合Eureka注册中心一块使用。 在SpringCloud…

lua函数执行和虚拟机指令

Stack based vs Register based VM 可直接参考 Stack based vs Register based VM lua函数调用 先看一下lua函数的结构&#xff1a; /* ** Function Prototypes */ typedef struct Proto {CommonHeader;TValue *k; /* constants used by the function */Instruction *code;…

计算机网络之应用层知识点总结

6.1 网络应用模型 &#xff08;1&#xff09;应用层概述 &#xff08;2&#xff09;网络应用模型的介绍 客户/服务器&#xff08;C/S&#xff09;模型 P2P模型 6.2 域名解析系统DNS &#xff08;1&#xff09;DNS系统介绍 &#xff08;2&#xff09;域名 &#xff08;3&#…

面试字节大模型算法实习岗,感觉有点崩溃。。。

节前&#xff0c;我们组织了一场算法岗技术&面试讨论会&#xff0c;邀请了一些互联网大厂朋友、今年参加社招和校招面试的同学。 针对大模型技术趋势、大模型落地项目经验分享、新手如何入门算法岗、该如何准备面试攻略、面试常考点等热门话题进行了深入的讨论。 总结链接…

学习平台|基于Springboot+vue的学习平台系统的设计与实现(源码+数据库+文档)

学习平台系统 目录 基于Springboot&#xff0b;vue的学习平台系统的设计与实现 一、前言 二、系统设计 三、系统功能设计 1系统功能模块 2管理员功能模块 3学生功能模块 4教师功能模块 四、数据库设计 五、核心代码 六、论文参考 七、最新计算机毕设选题推荐 八…

不小心丢失mfc140u.dll文件怎么办?mfc140u.dll丢失的解决办法

当您发现mfc140u.dll文件不见了或者受损&#xff0c;别担心&#xff0c;我们可以一起解决这个问题&#xff01;首先&#xff0c;您可能会注意到一个小提示&#xff0c;当您尝试打开某些程序时&#xff0c;屏幕上会跳出一个消息说“找不到mfc140u.dll”或者“mfc140u.dll文件缺失…

解决docker中container运行闪退终止的问题

在运行bindmount-test时&#xff0c;点击完运行按钮后闪退结束运行。 第一步查看log日志&#xff1a; 2024-05-18 23:46:18 Error: Cannot find module /app/nodemon 2024-05-18 23:46:18 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15) …

2024-5-24 石群电路-15

2024-5-24&#xff0c;星期五&#xff0c;22:15&#xff0c;天气&#xff1a;晴&#xff0c;心情&#xff1a;晴。今天最后一天上班&#xff0c;终于要放返校假啦&#xff0c;开心&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;不过放假也不能耽误…

rust_使用条件变量和使用通道有什么区别_各有什么优缺点

使用条件变量&#xff08;Condvar&#xff09;和使用通道&#xff08;mpsc::channel&#xff09;在 Rust 中都有各自的用途和特点&#xff0c;选择哪种方式取决于具体的应用场景和需求。以下是两者的主要区别和各自的优缺点&#xff1a; 使用通道 (mpsc::channel) 优点 简单…

【HarmonyOS4学习笔记】《HarmonyOS4+NEXT星河版入门到企业级实战教程》课程学习笔记(八)

课程地址&#xff1a; 黑马程序员HarmonyOS4NEXT星河版入门到企业级实战教程&#xff0c;一套精通鸿蒙应用开发 &#xff08;本篇笔记对应课程第 15 节&#xff09; P15《14.ArkUI组件-状态管理state装饰器》 回到最初的 Hello World 案例&#xff0c;首先验证 如果删掉 State…

Pycharm导入所有安装包到requirements.txt文件中

Pycharm导入所有安装包到requirements.txt文件中 在pycharm的终端命令行输入下边的命令,但是必须确保位于项目的根目录下 pip freeze > requirements.txt