微信扫码
添加专属顾问
我要投稿
短短几天,开源社区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的模型(基于https://huggingface.co/zhichen/Llama3-Chinese的quantize 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中。
• 弱智吧
• 安全性
• 撰写能力
• 数学能力
• 代码能力
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费场景POC验证,效果验证后签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2025-02-01
2025-01-01
2024-08-13
2025-02-04
2024-07-25
2024-04-25
2024-06-13
2024-09-23
2024-04-26
2024-08-21
2025-03-13
2025-03-13
2025-03-13
2025-03-13
2025-03-13
2025-03-13
2025-03-13
2025-03-12