Llama 3官网|llama3 本地部署|llama3下载

Ollama本地部署Llama3-Chinese模型

nidongde2024-05-16 03:18:3128

开源仓库

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

llama3-chinese

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的模型(基于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中。

测试示例

  • • 弱智吧

  • • 安全性

  • • 撰写能力

  • • 数学能力

  • • 代码能力

本文链接:https://www.hzby.vip/Llama3/41.html

llama大模型c语言版本llama模型测试llama模型 本地部署llama模型下载地址llama评分模型llama原模型下载llama2模型规模如何下载llama2模型llama 模型结构llama 2模型版本及要求

相关文章

网友评论