前言
重新阅读了官方文档发现了更加简单的方式能快速复制一个模型
验证后只能复制一个,复制多个后发现模型id一样,指向的还是同一个模型,需要多个的话还是参考前两篇文章吧
(有新发现的话后续更新到这一篇)
官方地址
流程
- 关键命令:
ollama show --modelfile llama3.2
(llama3.2是复制的模型名称)
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3.2:latest
FROM /Users/pdevine/.ollama/models/blobs/sha256-00e1317cbf74d901080d7100f57580ba8dd8de57203072dc6f668324ba545f29
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|>"""
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"
PARAMETER stop "<|reserved_special_token"
- 创建一个Modelfile,任意位置创建都行,拷贝上面的内容
- 执行命令:
ollama create choose-a-model-name -f Modelfile
总结
能在Modelfile中调整各个超参数
多看文档,多尝试