中文性能媲美GPT-4!这个中文版 Llama3-70B 模型现已上线 Gitee AI

继日前发布 Llama3-8B 中文聊天模型后,王慎执及郑耀威团队趁热打铁,正式发布了 Llama3-70B-Chinese-Chat,成为了首批专为中文微调的 Llama3-70B 模型之一

现已上线 Gitee AI

该模型现已全量同步至 Gitee AI 及 Gitee,您可部署至本地体验,复制下方链接或点击末尾阅读原文即可访问:

Gitee AI 模型地址:
https://ai.gitee.com/shenzhi-wang/llama3-70b-chinese-chat

Gitee 地址:
https://gitee.com/shenzhi-wang/llama3-70b-chinese-chat

模型详情

根据王慎执及郑耀威团队介绍,Llama3-70B-Chinese-Chat 以
meta-llama/Meta-Llama-3-70B-Instruct 为基座模型,使用 ORPO 微调算法,具有角色扮演、工具使用和数学计算等各种能力。

Benchmark

根据 C-Eval 和 CMMLU 的结果,Llama3-70B-Chinese-Chat 的中文性能明显超过 ChatGPT,可与 GPT-4 相媲美

用法

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "shenzhi-wang/Llama3-70B-Chinese-Chat"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id, torch_dtype="auto", device_map="auto"
)

messages = [
    {"role": "user", "content": "写一首诗吧"},
]

input_ids = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)

outputs = model.generate(
    input_ids,
    max_new_tokens=8192,
    do_sample=True,
    temperature=0.6,
    top_p=0.9,
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))

示例

角色扮演

弱智吧问答

数学计算

函数调用

代码能力

点击链接:
https://ai.gitee.com/shenzhi-wang/llama3-70b-chinese-chat,前往 Gitee AI 下载使用 Llama3-70B-Chinese-Chat 吧!

原文链接:,转发请注明来源!