首页 > 教程攻略 > ai资讯 >短短几天,开源社区HuggingFace上已经涌现了一批基于Llama3微调的中文版本

短短几天,开源社区HuggingFace上已经涌现了一批基于Llama3微调的中文版本

来源:互联网 时间:2026-08-02 13:14:30

开源仓库

短短几天时间,开源社区HuggingFace上就冒出了一批基于Llama3微调的中文版本,速度相当惊人。

短短几天,开源社区HuggingFace上已经涌现了一批基于Llama3微调的中文版本

GitHub上llama3-Chinese-chat仓库也顺手整理了一份目前各家微调的版本列表,包括:

联通微调版:https://www.modelscope.cn/models/UnicomAI/Unichat-llama3-Chinese/summary
Openbuddy微调版:https://www.modelscope.cn/models/OpenBuddy/openbuddy-llama3-8b-v21.1-8k/summary
zhichen微调版:https://github.com/seanzhang-zhichen/llama3-chinese
Rookie微调版:https://github.com/Rookie1019/Llama-3-8B-Instruct-Chinese
shareAI-V1:https://opencsg.com/models/shareAI/llama3-Chinese-chat-8b
shareAI-V2:https://modelscope.cn/models/baicai003/Llama3-Chinese_v2/summary

Ollama部署Llama3-Chinese模型

ollama仓库里也已经出现了llama3-Chinese的模型,它基于HuggingFace上zhichen/Llama3-Chinese的q4_0量化版本。

但实际测试下来效果不太理想——不仅回答准确度堪忧,而且问第二个问题就直接没反应了。所以这个版本不推荐直接拿来用。

这里推荐使用HuggingFace社区的zhouzr/Llama3-8B-Chinese-Chat-GGUF模型,建议下载q4_k_m版本:

地址:zhouzr/Llama3-8B-Chinese-Chat-GGUF at main (huggingface.co)

把下载好的GGUF模型放到指定目录,然后编写Modelfile:

FROM ./Llama3-8B-Chinese-Chat.q4_k_m.GGUF
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"

执行 ollama create llama3-Chinese:8B -f Modelfile 创建模型:

(base) [root@localhost my_model]# ollama create llama3-Chinese:8B -f Modelfile
transferring model data
creating model layer
creating template layer
creating parameters layer
creating config layer
using already created layer sha256:74db82a06a038230371e62740a9b430140e4df3a02c5ddcbe97c9bee76d6455e
writing layer sha256:8ab4849b038cf0abc5b1c9b8ee1443dca6b93a045c2272180d985126eb40bf6f
writing layer sha256:c0aac7c7f00d8a81a8ef397cd78664957fbe0e09f87b08bc7afa8d627a8da87f
writing layer sha256:109fb4827ddd6f21dd04a405dec5e1c9e39cf139e89b98536875a782938c02f5
writing manifest
success

执行 ollama list 查看:

(base) [root@localhost my_model]# ollama list
NAME ID SIZE MODIFIED
llama3-Chinese:8B e45ad8ada59e 4.9 GB 33 seconds ago
qwen:14b-chat-v1.5-q5_K_M ba0e61d66b27 10 GB 6 weeks ago

至此,llama3-Chinese:8B已经成功导入到Ollama中,可以开始用了。

测试示例

  • • 弱智吧

  • • 安全性

  • • 撰写能力

  • • 数学能力

  • • 代码能力