#当前ollama管理的模型 root@controller01:/opt/code_repos/DeepSeek-R1-Distill-Llama-70B-GGUF# ollama list NAME ID SIZE MODIFIED deepseek-r1:7b 0a8c26691023 4.7 GB 4 days ago deepseek-coder:1.3b 3ddd2d3fc8d2 776 MB 3 months ago
#将GGUF文件导入到ollama时需要用到一个配置文件,命令名DeepSeek-R1-Distill-Llama-70B-Q4_config.txt,内容如下 root@controller01:/opt/code_repos/AI_models/DeepSeek-R1-Distill-Llama-70B-GGUF# tee DeepSeek-R1-Distill-Llama-70B-Q4_config.txt <<EOF FROM "./dir/DeepSeek-R1-Distill-Llama-70B-Q4_K_M.gguf"
TEMPLATE """{{- if .System }} <|im_start|>system {{ .System }}<|im_end|> {{- end }} <|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant """
#将从魔搭网站下载的大模型.GGUF文件 导入到Ollama中 root@controller01:/opt/code_repos/DeepSeek-R1-Distill-Llama-70B-GGUF# ollama create DeepSeek-R1-Distill-Llama-70B-Q4 -f ./DeepSeek-R1-Distill-Llama-70B-Q4_config.txt transferring model data using existing layer sha256:eb01fe3e90c4bd09b12f8d0849adf89a11a38174ecdaf56391267975d53e3bc9 creating new layer sha256:ecf1d3ca1fb53d793cbaac0d1928dfa4cfea479cb9c746a09823ec5875cee90c creating new layer sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 using existing layer sha256:f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216 creating new layer sha256:737eec639e0b3d8bf80c36e83f59a9a7c0fa36f5712ee33d4c3d35fc1c195e0b writing manifest success
#可以看到Ollama中管理的大模型新增了一个“DeepSeek-R1-Distill-Llama-70B-Q4:latest” root@controller01:/opt# ollama list NAME ID SIZE MODIFIED DeepSeek-R1-Distill-Llama-70B-Q4:latest 573e09a767b2 42 GB 5 hours ago deepseek-r1:7b 0a8c26691023 4.7 GB 4 days ago deepseek-coder:1.3b 3ddd2d3fc8d2 776 MB 3 months ago