我们用 ollama 下载 deepseek-r1 3B 执行命令:
$ ollama pull models/unsloth/DeepSeek-R1-Distill-Qwen-32B-GGUF
下载完成后 我们就要重新更改目录和文件了
deepseek-r1/gguf (这是目录结构)
然后我把 gguf文件 更名成 DeepSeek-R1.gguf (就是目录下最大的那个文件)
接着我创建 config.json
{
"verison":"0.1",
"architectures":["Qwen2ForCausalLM", "LLM"],
"bin":"DeepSeek-R1.gguf",
"license":["LICENSE"],
"templates":{"default":"template"},
"params":{"--ctx-size":"8192","--temp":"0.1"}
}
接着我们再创建 template
{% if exists("System") %}<|im_start|>system
{% if length(System) > 0 %}{{ System }}{% else %}You are a helpful assistant.{% endif %}<|im_end|>
{% endif%}{% if exists("Prompt") %}<|im_start|>user
{{ Prompt }}<|im_end|>
{% endif %}{% if exists("Tool") %}<|im_start|>tool
{{ Tool }}<|im_end|>
{% endif %}<|im_start|>assistant{% if exists("Response") %}
{{ Response }}<|im_end|>{% endif %}
这些文件都在deepseek-r1/gguf 这个目录下。
最后我 把整个deepseek 移到 /home/用户名/.local/share/deepin-modelhub/models/
好了 这样你打开 UOS AI 就可以尽情使用了 我主要用于让ai写代码