当前位置:   article > 正文

分享一个 Llama 3 中文综合资源库 集合了Llama3 模型相关的各种资料

分享一个 Llama 3 中文综合资源库 集合了Llama3 模型相关的各种资料

Llama3 中文聊天项目综合资源库, 集合了与Llama3 模型相关的各种中文资料,包括微调版本、有趣的权重、训练、推理、评测和部署的教程视频与文档。

  • 多版本支持与创新:该仓库提供了多个版本的Llama3 模型,包括基于不同技术和偏好的微调版本,如直接中文SFT版、Instruct偏好强化学习版、趣味版等。此外,还有Phi3模型中文资料仓库的链接,和性能超越了8b版本的Llama3。

  • 部署与使用:项目提供了网页部署的代码和教程,使用户可以轻松地在网页上使用这些模型。部署教程包括如何在Streamlit上部署这些模型进行在线体验。

  • 训练与推理资源:除了已经提供的模型,仓库还包括多种训练和推理的资源,如训练教程、推理脚本、优质训练数据集的整理等。

    扩展和增强:项目还在计划中包括增加更多的扩展如角色扮演增强模型、长上下文支持等,旨在提升模型的功能和适应更多复杂场景的能力。

Base中文SFT版:

Instruct偏好强化学习版:

1. 可用Chat版模型整理

llama3相关对话版本优质权重整理:(欢迎issue补充)

  • shareAI系列:

§base预训练 + 直接中文SFT版:

  • 训练数据:https://modelscope.cn/datasets/baicai003/Llama3-Chinese-dataset/summary

  • V1版

  • OpenCSG满速下载:https://opencsg.com/models/shareAI/llama3-Chinese-chat-8b

  • WiseModel满速下载:https://wisemodel.cn/models/shareAI/llama3-Chinese-chat-8b

  • V2版

  • modelscope:https://modelscope.cn/models/baicai003/Llama3-Chinese_v2/summary

  • Instruct + 继续中文SFT版:

  • modelscope模型下载:https://modelscope.cn/models/baicai003/llama-3-8b-Instruct-chinese_v2/summary

  • 云服务器镜像在线体验(点击即用,免费 4 小时):https://www.suanyun.cn/console/share?uuid=b1ba51908f8a4bd1af37148765c293ee

  • Instruct + 强化学习中文版:

  • DPO 表情趣味版 (10分钟左右可训练好,对原多语言instruct版最小化性能损伤,实测超过大多中文大量训练版)

  • modelscope下载:https://modelscope.cn/models/baicai003/Llama3-Chinese-instruct-DPO-beta0.5/summary

偏好学习数据集:DPO-zh-en-emoji

  • Base预训练 + 海量中文优质数据增量预训练:正在进行中

  • 70b 中文版:计划中

  • 下面几个版本因对话模版格式不同暂时不支持网页部署推理,需要用fastchat体验:

  • Base + 中文SFT:https://modelscope.cn/models/zhuangxialie/Llama3_Chinese_Sft/files

  • Base + ORPO:https://modelscope.cn/models/zhuangxialie/Llama3-Chinese-ORPO/summary 偏爱长对话

  • Instruct + DPO:https://www.modelscope.cn/models/zhuangxialie/Llama3-Chinese-DPO/summary 偏爱长对话

  • llama3 Pro(加block版,推荐网友积极在该方案上做更多尝试、探索):

  • linjh1118网友(第一个ORPO偏好对齐 + 扩展2*blocks):https://github.com/linjh1118/Llama3-Chinese-ORPO

  • llama3 Moe增强版:

  • cooper12121-llama3-8x8b-MoE:https://github.com/cooper12121/llama3-8x8b-MoE

  • 长上下文版本:

  • 联通微调版v2 (中文,28k上下文):https://huggingface.co/UnicomLLM/Unichat-llama3-Chinese-8B-28K

  • 262k上下文(英文):https://huggingface.co/gradientai/Llama-3-8B-Instruct-262k

  • 262k上下文(中文):计划中

  • 无限上下文版本:计划中,参考:https://medium.com/neoxia/llm-infini-attention-with-linear-complexity-3209b87a77c3

  • 其他普通中文微调版本:

  • 联通微调版(SFT,网友尝试反馈幻觉多):https://www.modelscope.cn/models/UnicomAI/Unichat-llama3-Chinese/summary

  • Openbuddy微调版(SFT,据说不错):https://www.modelscope.cn/models/OpenBuddy/openbuddy-llama3-8b-v21.1-8k/summary

  • zhichen微调版(ORPO方法,应该是第一个orpo):https://github.com/seanzhang-zhichen/llama3-chinese

  • shenzhi-wang微调版(ORPO方法,说是第一个orpo):https://huggingface.co/shenzhi-wang/Llama3-8B-Chinese-Chat

  • Rookie微调版(SFT):https://github.com/Rookie1019/Llama-3-8B-Instruct-Chinese

  • hit-sz klc lab 微调版本:https://github.com/zyg18181818/Llama-3-Chinese

  • 破解安全限制系列(暂时只支持英文):

  • Unholy:https://huggingface.co/Undi95/Llama-3-Unholy-8B

  • neural-chat:https://hf-mirror.com/Locutusque/llama-3-neural-chat-v1-8b

  • dolphin:https://huggingface.co/cognitivecomputations/dolphin-2.9-llama3-8b

  • v-llama3 多模态图文版:(英文,支持视觉问答)

  • Bunny-Llama-3-8B-V:https://wisemodel.cn/models/BAAI/Bunny-Llama-3-8B-V

  • llava-llama-3-8b:https://huggingface.co/xtuner/llava-llama-3-8b-v1_1

  • agent工具能力增强版:

  • ModelScope Chinese Agent版V1(中文,可根据要求帮你选择工具):https://modelscope.cn/models/swift/Llama3-Chinese-8B-Instruct-Agent-v1/summary

  • 基于EmoLLM心理数据微调的Llama3-8B-Instruct 模型

  • EmoLLM 3.0 在线体验链接

  • EmoLLM Llama3 心理咨询室V3.0 https://st-app-center-006861-9746-jlroxvg.openxlab.space/

  • 或者前往OpenXLab EmoLLM3.0-Llama3启动 https://openxlab.org.cn/apps/detail/chg0901/EmoLLM-Llama3-8B-Instruct3.0

  • 模型链接

  • OpenXLab https://openxlab.org.cn/models/detail/chg0901/EmoLLM-Llama3-8B-Instruct3.0

  • ModelScope https://modelscope.cn/models/chg0901/EmoLLM-Llama3-8B-Instruct3.0/summary

  • 小说、网文、故事撰写任务增强版:计划中

  • 音乐生成任务版:计划中

  • 猫娘扮演版:计划中

  • 涩涩版:计划中

新增Phi3模型中文资料仓库(性能超越llama3 8b,以小搏大),正在适配中https://github.com/CrazyBoyM/phi3-Chinese

新增网页部署:https://github.com/CrazyBoyM/llama3-Chinese-chat/wiki/网页版推理教程#网页推理

新增趣味版,数据集已开源:https://modelscope.cn/models/baicai003/Llama3-Chinese-instruct-DPO-beta0.5/summary

2. 模型评测

llama3上下文长度简单无损三步扩张法(32K、96K)

1、直接打开任意下载后llama3微调版本模型文件夹

2、把config.json中max_position_embeddings改为32768(32k)

3、rope_theta改为1000000或者4000000
即可在几乎无性能损失情况下将llama3的上下文从8k拉长到32k,从而适配大部分长上下文任务。(该方法由群友“@岁月”分享,适用于Instruct版本,猜测可能是官方已经训练过超长上下文数据了) 评测实验:

可以看到,当长度扩展到96K时,依然没什么性能上损失。

链接源:https://github.com/OpenAccess-AI-Collective/axolotl/pull/1567

3. 可用训练工具整理

下面的库都是相当好用的,代码封装简洁又清晰,如果你也想微调个自己的llama3 中文定制版,不要错过~

  • Firefly – https://github.com/yangjianxin1/Firefly
    萤火虫 – https://github.com/yangjianxin1/Firefly

  • LLaMA-Factory – https://github.com/hiyouga/LLaMA-Factory

  • unsloth – https://github.com/unslothai/unsloth

  • Xtuner – https://github.com/SmartFlowAI/Llama3-XTuner-CN

  • SWIFT – https://github.com/modelscope/swift

4. Llama3 相关教程推荐

  • 后端API部署:https://github.com/datawhalechina/self-llm/blob/master/LLaMA3/01-LLaMA3-8B-Instruct%20FastApi%20部署调用.md

  • langchain教程文档:https://github.com/datawhalechina/self-llm/blob/master/LLaMA3/02-LLaMA3-8B-Instruct%20langchain%20接入.md

  • streamlit部署:https://github.com/datawhalechina/self-llm/blob/master/LLaMA3/03-LLaMA3-8B-Instruct%20WebDemo%20部署.md

  • 极简LoRA训练:https://github.com/datawhalechina/self-llm/blob/master/LLaMA3/04-LLaMA3-8B-Instruct%20Lora%20微调.md

GitHub 仓库地址: https://github.com/CrazyBoyM/llama3-Chinese-chat

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签