1. 导入GGUF 类型的模型
1.1 先在huggingface 下载需要ollama部署的大模型

1.2 编写modelfile
在ollama 里面输入
ollama show --modelfile <你有的模型名称>
eg:
ollama show --modelfile qwen2.5:latest
修改其中的from 路径为自己的模型下载路径
FROM /Users/lzx/AI/llm/lmstudio-community/Llama-3-Groq-8B-Tool-Use-GGUF
TEMPLATE """{
{- if .Messages }}
{
{- if or .System .Tools }}<|im_start|>system
{
{- if .System }}
{
{ .System }}
{
{- end }}
{
{- if .Tools }}
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{
{- range
ollama导入huggingface模型并量化方法

最低0.47元/天 解锁文章
4270






