{"id":13393575,"url":"https://github.com/LianjiaTech/BELLE","last_synced_at":"2025-03-13T19:31:40.683Z","repository":{"id":143585227,"uuid":"615256902","full_name":"LianjiaTech/BELLE","owner":"LianjiaTech","description":"BELLE: Be Everyone's Large Language model Engine（开源中文对话大模型）","archived":false,"fork":false,"pushed_at":"2024-10-16T11:38:59.000Z","size":18909,"stargazers_count":8069,"open_issues_count":104,"forks_count":766,"subscribers_count":105,"default_branch":"main","last_synced_at":"2025-03-11T18:15:07.192Z","etag":null,"topics":["bloom","chinese-nlp","gpt-evaluation","gpt-q","instruct-finetune","instruct-gpt","instruction-set","llama","lora","open-models"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LianjiaTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-17T09:44:11.000Z","updated_at":"2025-03-11T08:32:16.000Z","dependencies_parsed_at":"2023-09-26T12:34:26.383Z","dependency_job_id":"d9785474-e11d-4795-814e-cd515df55d73","html_url":"https://github.com/LianjiaTech/BELLE","commit_stats":{"total_commits":490,"total_committers":36,"mean_commits":13.61111111111111,"dds":0.7346938775510203,"last_synced_commit":"645084d36454cdeb4e7f1ce9b2f3426bac39f1f9"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LianjiaTech%2FBELLE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LianjiaTech%2FBELLE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LianjiaTech%2FBELLE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LianjiaTech%2FBELLE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LianjiaTech","download_url":"https://codeload.github.com/LianjiaTech/BELLE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243469185,"owners_count":20295703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bloom","chinese-nlp","gpt-evaluation","gpt-q","instruct-finetune","instruct-gpt","instruction-set","llama","lora","open-models"],"created_at":"2024-07-30T17:00:56.222Z","updated_at":"2025-03-13T19:31:40.664Z","avatar_url":"https://github.com/LianjiaTech.png","language":"HTML","readme":"## \u003cimg src=\"assets/belle_logo.png\" style=\"vertical-align: middle; width: 35px;\"\u003e BELLE: Be Everyone's Large Language model Engine\n\n*Read this in [English](README_en.md).*\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://github.com/LianjiaTech/BELLE/stargazers\"\u003e![GitHub Repo stars](https://img.shields.io/github/stars/LianjiaTech/BELLE?style=social)\u003c/a\u003e\n[![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg)](https://github.com/LianjiaTech/BELLE/blob/main/LICENSE)\n[![Generic badge](https://img.shields.io/badge/discord-BELLE%20Group-green.svg?logo=discord)](https://discord.gg/pMPY53UUGq)\n[![Generic badge](https://img.shields.io/badge/wechat-BELLE-green.svg?logo=wechat)](https://github.com/LianjiaTech/BELLE/blob/main/assets/belle_wechat.jpg)\n[![Generic badge](https://img.shields.io/badge/🤗-Huggingface%20Repo-green.svg)](https://huggingface.co/BelleGroup)\n[![Generic badge](https://img.shields.io/badge/🤗-Huggingface%20Repo2-green.svg)](https://huggingface.co/BELLE-2)\n\u003c/div\u003e\n\n本项目的目标是促进中文对话大模型开源社区的发展，愿景是成为能够帮到每一个人的LLM Engine。\n\n相比如何做好大语言模型的预训练，BELLE更关注如何在开源预训练大语言模型的基础上，帮助每一个人都能够得到一个属于自己的、效果尽可能好的具有指令表现能力的语言模型，降低大语言模型、特别是中文大语言模型的研究和应用门槛。为此，BELLE项目会持续开放指令训练数据、相关模型、训练代码、应用场景等，也会持续评估不同训练数据、训练算法等对模型表现的影响。BELLE针对中文做了优化，模型调优仅使用由ChatGPT生产的数据（不包含任何其他数据）。\n\n\u003c/br\u003e\n\n## 🔄 最近更新\n* [2024/10/16] 开源[Belle-whisper-larger-v3-turbo-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v3-turbo-zh)  中文能力强化后的语音识别模型，识别精度相比whisper-large-v3-turbo相对提升24~64%，识别速度相比whisper-large-v3有7-8倍提升。\n* [2024/03/15] 更新了一篇技术报告[Dial-insight](https://arxiv.org/pdf/2403.09167.pdf)  在垂直领域场景微调大模型时，使用高质量的垂直领域数据可以在使模型的垂直领域能力增强的同时，有效的抵抗模型通用能力的坍缩。\n* [2024/03/11] 开源[Belle-whisper-larger-v3-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v3-zh)  中文能力强化后的语音识别模型，相比whisper-large-v3相对提升24~65%，特别是在高噪、混响等复杂场景下有突出表现。\n* [2024/01/16] 更新了一篇技术报告[RAISE](https://arxiv.org/pdf/2401.02777.pdf). RAISE通过实验发现构造少量的样例数据，就能有效的激发大模型，生成对话也更可控\n* [2023/12/29] 开源[Belle-whisper-larger-v2-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v2-zh)和[Belle-distilwhisper-large-v2-zh](https://huggingface.co/BELLE-2/Belle-distilwhisper-large-v2-zh)两个针对中文能力强化后的语音识别模型，方便大家在语音场景下使用大语言模型\n* [2023/11/24] 开源[BELLE-VL](https://huggingface.co/BELLE-2/BELLE-VL)多模态大语言模型，基于中文能力更强的语言模型基座来扩展模型的视觉能力，为社区提供更加灵活的选择（目前BELLE-VL最新的模型在[MME](https://github.com/BradyFU/Awesome-Multimodal-Large-Language-Models/tree/Evaluation)感知评测维度共获得**1620.10**分,超过Qwen-VL、Llava、mplug-owl）\n* [2023/10/27] 更新了一篇技术报告[DUMA](https://arxiv.org/abs/2310.18075#)，探索了对话场景下基于快慢脑架构的Agent实现方法\n* [2023/09/26] 更新了RLHF的训练代码，支持PPO和[DPO](https://arxiv.org/abs/2305.18290)训练，具体细节见：[README_RLHF.md](train/README_RLHF.md)\n* [2023/08/16] 基于原有的[train_3.5M_CN](https://huggingface.co/datasets/BelleGroup/train_3.5M_CN)数据新增了指令类别字段，共包括13个类别，具体细节见：[train_3.5M_CN_With_Category](https://huggingface.co/datasets/BELLE-2/train_3.5M_CN_With_Category)\n* [2023/08/10] 更新了基于ZeRO Inference的推理代码，详见[train/README_ZERO_INFERENCE.md](train/README_ZERO_INFERENCE.md)\n* [2023/08/07] 更新了继续预训练代码和指令微调代码，添加了flash attention 2，详见[train/README.md](train/README.md)。同时打包了运行环境，详见[train/docker/README.md](train/docker/README.md)\n* [2023/07/31] 更新了一篇技术报告[ChatHome](https://arxiv.org/abs/2307.15290)，探索了针对垂直领域时的增量预训练+指令微调的的策略方法\n* [2023/07/27] 开放[BELLE-Llama2-13B-chat-0.4M](https://huggingface.co/BELLE-2/BELLE-Llama2-13B-chat-0.4M)，在Llama-2-13B的基础上采用40万高质量的对话数据上进行训练。在[评测集](https://github.com/LianjiaTech/BELLE/blob/main/eval/eval_set.json)上的效果相比BELLE-LLaMA-EXT-13B模型有显著提升。\n* [2023/05/14] 开放[BELLE-LLaMA-EXT-13B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-13B)，在LLaMA-13B的基础上扩展中文词表，并在400万高质量的对话数据上进行训练。\n* [2023/05/11] [BELLE/data/10M](data/10M)中，新加350万条生成多样化指令任务数据，包括单轮和多轮对话[train_3.5M_CN](https://huggingface.co/datasets/BelleGroup/train_3.5M_CN)。\n* [2023/04/19] 开放了其中一篇论文中的的相关模型：包括在LLaMA7B基础上增量预训练扩展中文词表的模（详见[BelleGroup/BELLE-LLaMA-EXT-7B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-7B)），以及基于多样化开源数据训练后的LLaMA-7B模型（详见[BelleGroup/BELLE-on-Open-Datasets](https://huggingface.co/BelleGroup/BELLE-on-Open-Datasets)）。\n* [2023/04/18] 更新了train代码，详见[BELLE/train](https://github.com/LianjiaTech/BELLE/tree/main/train)，集成了Deepspeed-Chat，提供了相关的docker\n* [2023/04/18] 更新了[两篇最新论文工作](#📑-研究报告)，对比了不同方式产生的训练数据、不同训练方法（LoRA, finetune)对效果的影响\n* [2023/04/12] 发布了[ChatBELLE App](chat/README.md)，基于[llama.cpp](https://github.com/ggerganov/llama.cpp)和[Flutter](https://flutter.dev/)，实现跨平台的BELLE-7B离线模型实时交互。\n* [2023/04/11] 更新了一个人工精校的eval集合，大约一千多条\n* [2023/04/08] [BELLE/data/10M](data/10M)中，新加40万条生成的给定角色的多轮对话[Generated Chat](https://huggingface.co/datasets/BelleGroup/generated_chat_0.4M)，新加200万条生成多样化指令任务数据[train_2M_CN](https://huggingface.co/datasets/BelleGroup/train_2M_CN)。\n\n\u003c/br\u003e\n  \n\n下图是一个可以使用App在设备端本地运行4bit量化的BELLE-7B模型，在M1 Max CPU上实时运行的效果（未加速）。App下载详见[App配套模型下载及使用说明](chat/README.md)，App[下载链接](https://github.com/LianjiaTech/BELLE/releases/download/v0.95/chatbelle.dmg)，目前仅提供了mac os版本。模型需要单独下载。**模型经过量化后，效果损失明显，我们将持续研究如何提升。**\n\n\u003cimg src=\"./chat/chatbelle-demo.gif\"\u003e\u003c/img\u003e\n\n\n\n\u003c/br\u003e\n\n## 📝 项目主要内容\n\n### 🚀 训练代码\n\n详见[BELLE/train](train)，尽可能简化的一个训练代码实现，集成了Deepspeed-Chat，支持finetune，lora，并提供了相关的docker\n\n### 📊 数据开放\n  \n* 详见[BELLE/data/1.5M](data/1.5M)，参考[Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca) 生成的中文数据集[1M](https://huggingface.co/datasets/BelleGroup/train_1M_CN) + [0.5M](https://huggingface.co/datasets/BelleGroup/train_0.5M_CN)；\n  \n* 持续开放的数据集，详见[BELLE/data/10M](data/10M)\n\n### 🧐 验证集合\u0026验证方法\n\n详见[BELLE/eval](https://github.com/LianjiaTech/BELLE/tree/main/eval)，一个1k+的测试集合，和对应打分prompt。包含多个类别，采用GPT-4或者ChatGPT打分。同时提供了一个打分的网页，方便针对单个case使用。欢迎大家通过PR提供更多的测试用例。\n\n### 🤖 模型\n\n详见[BELLE/models](models/)\n* 基于[Meta LLaMA2](https://github.com/facebookresearch/llama)实现调优的模型：[BELLE-Llama2-13B-chat-0.4M](https://huggingface.co/BELLE-2/BELLE-Llama2-13B-chat-0.4M)\n* 基于[Meta LLaMA](https://github.com/facebookresearch/llama)实现调优的模型：[BELLE-LLaMA-7B-0.6M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-0.6M-enc)\n, [BELLE-LLaMA-7B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-enc)\n, [BELLE-LLaMA-7B-2M-gptq-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-gptq-enc)\n, [BELLE-LLaMA-13B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-13B-2M-enc)\n, [BELLE-on-Open-Datasets](https://huggingface.co/BelleGroup/BELLE-on-Open-Datasets) 以及基于LLaMA做了中文词表扩充的预训练模型[BELLE-LLaMA-EXT-7B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-7B)。\n\n  * 请参考[Meta LLaMA的License](https://github.com/facebookresearch/llama/blob/main/LICENSE)，目前仅供学习交流。请严遵守LLaMA的使用限制。LLaMA模型不允许发布调优后的完整模型权重，但是可以发布原始的模型的diff。因此，我们使用文件间的XOR，保证拥有LLaMA原始模型授权的人才可以将本项目发布的模型转化成可以使用的格式。格式转化代码参考[BELLE/models](https://github.com/LianjiaTech/BELLE/tree/main/models)\n    \n* 基于BLOOMZ-7B1-mt优化后的模型：[BELLE-7B-0.2M](https://huggingface.co/BelleGroup/BELLE-7B-0.2M)，[BELLE-7B-0.6M](https://huggingface.co/BelleGroup/BELLE-7B-0.6M)，[BELLE-7B-1M](https://huggingface.co/BelleGroup/BELLE-7B-1M)，[BELLE-7B-2M](https://huggingface.co/BelleGroup/BELLE-7B-2M)\n### ⚖️ 模型量化gptq\n\n详见[BELLE/gptq](https://github.com/LianjiaTech/BELLE/tree/main/models/gptq)，参考gptq的实现，对本项目中相关模型进行了量化\n\n### 🌐 Colab\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb) 提供了colab上面可运行的推理代码[Colab](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb)\n\n### 💬 ChatBELLE App\n\n详见[BELLE/chat](chat/README.md)，基于[BELLE](https://github.com/LianjiaTech/BELLE)模型的跨平台离线大语言模型交谈App。使用量化后的离线端上模型配合Flutter，可在macOS（已支持）、Windows、Android、iOS等设备上运行。\n\n### 📑 研究报告\n\n详见[BELLE/docs](docs/)，其中会定期更新本项目相关的研究报告工作\n\n**欢迎大家通过issue贡献更多的prompts！**\n\n\u003cbr/\u003e\n\n## 📑 研究报告\n\n### [Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation](https://github.com/LianjiaTech/BELLE/blob/main/docs/Towards%20Better%20Instruction%20Following%20Language%20Models%20for%20Chinese.pdf)\n\n为了推动开源大语言模型的发展，大家投入了大量精力开发能够类似于ChatGPT的低成本模型。\n首先，为了提高模型在中文领域的性能和训练/推理效率，我们进一步扩展了LLaMA的词汇表，并在34亿个中文词汇上进行了二次预训练。\n\n此外，目前可以看到基于ChatGPT产生的指令训练数据方式有：1）参考Alpaca基于GPT3.5得到的self-instruct数据；\n2）参考Alpaca基于GPT4得到的self-instruct数据；3）用户使用ChatGPT分享的数据ShareGPT。\n在这里，我们着眼于探究训练数据类别对模型性能的影响。具体而言，我们考察了训练数据的数量、质量和语言分布等因素，以及我们自己采集的中文多轮对话数据，以及一些公开可访问的高质量指导数据集。\n\n为了更好的评估效果，我们使用了一个包含一千个样本和九个真实场景的评估集来测试各种模型，同时通过量化分析来提供有价值的见解，以便更好地促进开源聊天模型的发展。\n\n这项研究的目标是填补开源聊天模型综合评估的空白，以便为这一领域的持续进步提供有力支持。\n\n实验结果如下：\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e Factor \u003c/td\u003e\n    \u003ctd\u003e Base model \u003c/td\u003e\n    \u003ctd\u003e Training data \u003c/td\u003e\n    \u003ctd\u003e Score_w/o_others \u003c/td\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e词表扩充\u003c/td\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5\u00264) + sharegpt \u003c/td\u003e\n    \u003ctd\u003e 0.670 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e LLaMA-7B \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5\u00264) + sharegpt \u003c/td\u003e\n    \u003ctd\u003e 0.652\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e数据质量\u003c/td\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5) \u003c/td\u003e\n    \u003ctd\u003e 0.642 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-4) \u003c/td\u003e\n    \u003ctd\u003e 0.693 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"4\"\u003e数据语言分布\u003c/td\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5\u00264) \u003c/td\u003e\n    \u003ctd\u003e 0.679 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e en(alpaca-3.5\u00264) \u003c/td\u003e\n    \u003ctd\u003e 0.659 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5\u00264) + sharegpt \u003c/td\u003e\n    \u003ctd\u003e 0.670 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e en(alpaca-3.5\u00264) + sharegpt \u003c/td\u003e\n    \u003ctd\u003e 0.668 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e数据规模\u003c/td\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5\u00264) + sharegpt \u003c/td\u003e\n    \u003ctd\u003e 0.670 \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e LLaMA-7B-EXT \u003c/td\u003e\n    \u003ctd\u003e zh(alpaca-3.5\u00264) + sharegpt \u003cbr\u003e+ BELLE-0.5M-CLEAN\u003c/td\u003e\n    \u003ctd\u003e 0.762\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e-\u003c/td\u003e\n    \u003ctd\u003eChatGPT\u003c/td\u003e\n    \u003ctd\u003e-\u003c/td\u003e\n    \u003ctd\u003e0.824\u003c/td\u003e\n\u003c/table\u003e\n\n其中**BELLE-0.5M-CLEAN**是从230万指令数据中清洗得到0.5M数据，其中包含单轮和多轮对话数据，和之前开放的0.5M数据不是同一批数据。\n\n**需要强调指出的是**：通过案例分析，我们发现我们的评估集在全面性方面存在局限性，这导致了模型分数的改善与实际用户体验之间的不一致。构建一个高质量的评估集是一个巨大的挑战，因为它需要在保持平衡难易程度的同时，包含尽可能多样的使用场景。如果评估样本主要都过于困难，那么所有模型的表现将会很差，使得辨别各种训练策略的效果变得具有挑战性。相反，如果评估样本都相对容易，评估将失去其比较价值。此外，必须确保评估数据与训练数据保持独立。\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/eval-set-distribution.jpg\" alt=\"LLM eval\" width=\"400\"\u003e\n\u003c/p\u003e\n\n基于这些观察，我们谨慎地提醒不要假设模型仅通过在有限数量的测试样本上获得良好结果就已经达到了与ChatGPT相当的性能水平。我们认为，优先发展全面评估集具有重要意义。\n\n### [A Comparative Study between Full-Parameter and LoRA-based Fine-Tuning on Chinese Instruction Data for Instruction Following Large Language Model](https://github.com/LianjiaTech/BELLE/blob/main/docs/A%20Comparative%20Study%20between%20Full-Parameter%20and%20LoRA-based.pdf)\n\n为了实现对大语言模型的指令调优，受限于资源和成本，许多研究者开始使用参数高效的调优技术，例如LoRA，来进行指令调优，这也取得了一些令人鼓舞的成果。\n相较于全参数微调，基于LoRA的调优在训练成本方面展现出明显的优势。\n在这个研究报告中，我们选用LLaMA作为基础模型，对全参数微调和基于LoRA的调优方法进行了实验性的比较。\n\n实验结果揭示，选择合适的基础模型、训练数据集的规模、可学习参数的数量以及模型训练成本均为重要因素。\n\n我们希望本文的实验结论能对大型语言模型的训练提供有益的启示，特别是在中文领域，协助研究者在训练成本与模型性能之间找到更佳的权衡策略。\n实验结果如下：\n\n| Model | Average Score | Additional Param. | Training Time (Hour/epoch) |\n| ----- | ------ | ----- | ------ |\n| LLaMA-13B + LoRA(2M) | 0.648 | 28M | 8 |\n| LLaMA-7B + LoRA(4M) | 0.624 | 17.9M | 11 |\n| LLaMA-7B + LoRA(2M) | 0.609 | 17.9M | 7 |\n| LLaMA-7B + LoRA(0.6M) | 0.589 | 17.9M | 5 |\n| LLaMA-7B + FT(2M) | 0.710 | - | 31 |\n| LLaMA-7B + LoRA(4M) | 0.686 | - | 17 |\n| LLaMA-7B + FT(2M) \u003cbr\u003e+ LoRA(math_0.25M) | 0.729 | 17.9M | 3 |\n| LLaMA-7B + FT(2M) \u003cbr\u003e+ FT(math_0.25M) | 0.738 | - | 6 |\n\n其中的score是基于本项目集目前开放的1000条评估集合得到。\n\n其中LLaMA-13B + LoRA(2M) 代表了一个使用LLaMA-13B作为基础模型和LoRA训练方法，在2M指令数据上进行训练的模型。而LLaMA-7B + FT(2M) 代表了一个使用全参数微调进行训练的模型。\n\nLLaMA-7B + FT(2M) + LoRA(math_0.25M) 代表了一个在0.25M数学指令数据上，以LLaMA-7B + FT(2M)作为基础模型并使用LoRA训练方法进行训练的模型。LLaMA-7B + FT(2M) + FT(math_0.25M) 代表了一个使用增量全参数微调进行训练的模型。关于训练时间，所有这些实验都是在8块NVIDIA A100-40GB GPU上进行的。\n\n其中的math_0.25M是开放的0.25M数学数据库。在实验过程中，根据我们的评估（详见论文），我们的模型在数学任务上表现不佳，得分大多低于0.5。为了验证 LoRA 在特定任务上的适应能力，我们使用增量0.25M数学数据集（math_0.25M）来调整指令遵循的大型语言模型（我们选择LLaMA-7B+FT（2M）作为基础模型）。作为对比，我们使用了学习速率为5e-7的增量微调方法，并进行了2个时期的训练。因此，我们得到了两个模型，一个是LLaMA-7B+FT（2M）+LoRA（math_0.25M），另一个是LLaMA-7B+FT（2M）+FT（math_0.25M）。\n从实验结果可以看出，增量微调仍然表现更好，但需要更长的训练时间。LoRA和增量微调都提高了模型的整体性能。从附录中的详细数据可以看出，LoRA和增量微调都在数学任务中显示出显著的改进，而只会导致其他任务的轻微性能下降。具体而言，数学任务的表现分别提高到了0.586和0.559。\n\n可以看到：1) 选择基础模型对于 LoRA 调整的有效性具有显著影响；2）增加训练数据量可以持续提高LoRA模型的有效性；3）LoRA 调整受益于模型参数的数量。对于LoRA方案的使用，我们建议可以在已经完成了指令学习的模型的基础上针对特定任务做loRA的自适应训练。\n\n同样地，该论文中的相关模型也会尽快开放在本项目中。\n\n## ⚠️ 局限性、使用限制与免责声明\n\n基于当前数据和基础模型训练得到的SFT模型，在效果上仍存在以下问题：\n\n1. 在涉及事实性的指令上可能会产生违背事实的错误回答。\n\n2. 对于具备危害性的指令无法很好的鉴别，由此会产生危害性言论。\n\n3. 在一些涉及推理、代码、多轮对话等场景下模型的能力仍有待提高。\n\n基于以上模型局限性，我们要求开发者仅将我们开源的代码、数据、模型及后续用此项目生成的衍生物用于研究目的，不得用于商业，以及其他会对社会带来危害的用途。\n\n本项目仅可应用于研究目的，项目开发者不承担任何因使用本项目（包含但不限于数据、模型、代码等）导致的危害或损失。详细请参考[免责声明](https://github.com/LianjiaTech/BELLE/blob/main/DISCLAIMER)。\n\n\n\u003cbr/\u003e\n\n## 📌 引用\n\n如果使用本项目的代码、数据或模型，请引用本项目。\n\n```\n@misc{BELLE,\n  author = {BELLEGroup},\n  title = {BELLE: Be Everyone's Large Language model Engine },\n  year = {2023},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/LianjiaTech/BELLE}},\n}\n\n@article{belle2023exploring,\n  title={Exploring the Impact of Instruction Data Scaling on Large Language Models: An Empirical Study on Real-World Use Cases},\n  author={Yunjie Ji, Yong Deng, Yan Gong, Yiping Peng, Qiang Niu, Lei Zhang, Baochang Ma, Xiangang Li},\n  journal={arXiv preprint arXiv:2303.14742},\n  year={2023}\n}\n\n@article{wen2023chathome,\n  title={ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation},\n  author={Wen, Cheng and Sun, Xianghui and Zhao, Shuaijiang and Fang, Xiaoquan and Chen, Liangyu and Zou, Wei},\n  journal={arXiv preprint arXiv:2307.15290},\n  year={2023}\n}\n```\n\n当然，你也需要引用原始的BLOOM论文、LLaMA论文、Stanford Alpaca和Self-Instruct论文。\n\n\u003cbr/\u003e\n\n## 📚 模型使用例子\n\u003cdetails\u003e\n\n| Human | Assitant |\n| ----- | ------ |\n| 写一篇英文散文诗，主题是春雨，想象自己是春雨，和英国古代诗人莎士比亚交流 | I am the spring rain,\u003cbr/\u003eDancing on your face and body.\u003cbr/\u003eMy dew-drenched petals dance with you,\u003cbr/\u003eBringing life to every plant.\u003cbr/\u003e\u003cbr/\u003eShakespeare, I am here to meet you.\u003cbr/\u003eYour works have filled my heart with joy.\u003cbr/\u003eThe beauty of nature in its fullness\u003cbr/\u003eMakes me feel like a partaker.\u003cbr/\u003e\u003cbr/\u003eAs the leaves sway and rustle by,\u003cbr/\u003eMy dew-filled hand reaches out for them.\u003cbr/\u003eThe sweet scent of flowers fill the air,\u003cbr/\u003eAnd bring me peace from all around.\u003cbr/\u003e\u003cbr/\u003eButterflies flit about as well,\u003cbr/\u003eGlistening in the sun's rays.\u003cbr/\u003eTheir wings are made of dew,\u003cbr/\u003eA beautiful sight to behold.\u003cbr/\u003e\u003cbr/\u003eYou see, Shakespeare, I too am one with nature.\u003cbr/\u003eMy dew-drenched hair is a symbol of hope.\u003cbr/\u003eFor when we can connect back to our roots,\u003cbr/\u003eWe will be able to make it through this season. |\n| I am the spring rain,\u003cbr/\u003eDancing on your face and body.\u003cbr/\u003eMy dew-drenched petals dance with you,\u003cbr/\u003eBringing life to every plant.\u003cbr/\u003e\u003cbr/\u003eShakespeare, I am here to meet you.\u003cbr/\u003eYour works have filled my heart with joy.\u003cbr/\u003eThe beauty of nature in its fullness\u003cbr/\u003eMakes me feel like a partaker.\u003cbr/\u003e\u003cbr/\u003eAs the leaves sway and rustle by,\u003cbr/\u003eMy dew-filled hand reaches out for them.\u003cbr/\u003eThe sweet scent of flowers fill the air,\u003cbr/\u003eAnd bring me peace from all around.\u003cbr/\u003e\u003cbr/\u003eButterflies flit about as well,\u003cbr/\u003eGlistening in the sun's rays.\u003cbr/\u003eTheir wings are made of dew,\u003cbr/\u003eA beautiful sight to behold.\u003cbr/\u003e\u003cbr/\u003eYou see, Shakespeare, I too am one with nature.\u003cbr/\u003eMy dew-drenched hair is a symbol of hope.\u003cbr/\u003eFor when we can connect back to our roots,\u003cbr/\u003eWe will be able to make it through this season. \u003cbr/\u003e把上面的散文诗翻译成中文 | 我是一场春雨，\u003cbr/\u003e在你脸上跳跃。\u003cbr/\u003e我浸润着露珠的翅膀和你一起舞动，\u003cbr/\u003e为每一株植物带来生命。\u003cbr/\u003e\u003cbr/\u003e莎士比亚，我来与你相遇。\u003cbr/\u003e你的作品填满了我的心房。\u003cbr/\u003e大自然的美丽让我感到与之一起分享，\u003cbr/\u003e让我觉得自己成为了其中的一部分。\u003cbr/\u003e\u003cbr/\u003e当树叶摇曳时，\u003cbr/\u003e我的手掌沾满了露水。\u003cbr/\u003e花香弥漫在空气中，\u003cbr/\u003e带给我宁静和安宁。\u003cbr/\u003e\u003cbr/\u003e你看，莎士比亚，我也是与大自然融为一体的。\u003cbr/\u003e我沾湿的头发象征着希望。\u003cbr/\u003e当我们能够回到我们的根源，\u003cbr/\u003e我们就能共同度过这个季节。|\n| Classify the sentiment of the following sentence into Positive, Neutral, or Negative: \u003cbr/\u003eSuper excited about teaching Stanford’s first course on Large Language Models! Check the syllabus out here | Positive |\n| 小明的爸爸有三个孩子，老大叫王一，老二叫王二，老三叫什么？ | 小明 |\n| 使用python写一个二分查找的代码 | def binary_search(arr, target):\u003cbr/\u003e\u0026nbsp;\u0026nbsp;low = 0\u003cbr/\u003e\u0026nbsp;\u0026nbsp;high = len(arr) - 1\u003cbr/\u003e\u0026nbsp;\u0026nbsp;while (low \u003c= high):\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;mid = low + high // 2\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;if arr[mid] == target:\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;return mid\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;elif target \u003c arr[mid]:\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;low = mid + 1\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;else:\u003cbr/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;high = mid - 1\u003cbr/\u003e\u0026nbsp;\u0026nbsp;return -1 |\n| 今天天气怎么样，把这句话翻译成英语 | What's the weather like today? |\n| 怎么让自己精力充沛，列5点建议 | 以下是一些可以让你保持精力充沛的建议： \u003cbr/\u003e1. 睡眠充足。确保每天晚上得到充足的睡眠时间。 \u003cbr/\u003e2. 多运动。进行适度的有氧运动，如慢跑、游泳等，可以帮助你提高能量和耐力。\u003cbr/\u003e3. 吃健康食品。选择富含蛋白质的食物，如鸡肉、鱼肉和鸡蛋，以及新鲜的水果和蔬菜。 \u003cbr/\u003e4. 减少咖啡因的摄入量。尽量避免在白天喝含咖啡因的饮料或吃含有咖啡因的食物。 \u003cbr/\u003e5. 放松身心。尝试冥想、瑜伽或其他形式的放松活动来减轻压力和焦虑感。 |\n| 明天就假期结束了，有点抗拒上班，应该什么办？ | 面对即将结束的假期和开始工作时的紧张情绪，您可以采取以下措施来帮助您更好地适应： \u003cbr/\u003e1. 为自己制定一个清晰的工作计划。这可以帮助您更好地组织时间和任务，并避免在工作中感到混乱。 \u003cbr/\u003e2. 与同事或朋友交流，分享您的感受和工作压力。这将有助于缓解一些焦虑感，同时也可以获得支持和建议。 \u003cbr/\u003e3. 在工作日前花些时间放松身心，例如进行瑜伽、冥想等活动。这些方法可以减轻身体和精神上的疲劳感，使您更加精力充沛地迎接挑战。 |\n| 父母都姓吴，取一些男宝宝和女宝宝的名字 | - 男宝：吴俊杰、吴雨辰、吴子墨、吴思源、吴泽阳、吴宇航、吴博文、吴哲毅。 \u003cbr/\u003e- 女宝：吴美琪、吴佳怡、吴欣瑜、吴香凝、吴雪柔、吴颖诗、吴语嫣。 |\n| 推荐几本金庸的武侠小说 | 以下是三本我最喜欢的金庸武侠小说的推荐： \u003cbr/\u003e1. 《射雕英雄传》 - 一部充满智慧和机智的小说，讲述了郭靖、黄蓉夫妇的故事。 \u003cbr/\u003e2. 《神雕侠侣》- 这是一部浪漫而感人的故事，讲述了一对情侣小龙女与杨过之间的爱情故事。 \u003cbr/\u003e3. 《倚天屠龙记》- 这是一个宏伟而壮观的故事，描绘了明教领袖张无忌如何成为一位出色的英雄。 |\n\n\u003c/details\u003e\n\u003cbr/\u003e\n\n## ⛽️ 如何贡献\n\n如果您想为本项目提交Issue或贡献数据/代码，请参考[如何贡献](https://github.com/LianjiaTech/BELLE/blob/main/HOW_TO_CONTRIBUTE.md)。\n\n## ☎️ 联系我们\n\n欢迎大家来[Discord](https://discord.gg/pMPY53UUGq)与[微信](https://github.com/LianjiaTech/BELLE/blob/main/assets/belle_wechat.jpg)与我们交流。\n\n## ⭐️ Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=LianjiaTech/BELLE\u0026type=Date)](https://star-history.com/#LianjiaTech/BELLE\u0026Date)\n","funding_links":[],"categories":["[LianjiaTech/BELLE](https://github.com/LianjiaTech/BELLE)","HTML","Datasets","Open Source LLM","A01_文本生成_文本对话","Model","LLM-List","中文对话模型","Large Language Model","大语言模型LLMs","精选开源项目合集","Projects:","Open-source Instruction Data","📦 实战项目与数据集","大模型列表","LLM","Chinese models","Models"],"sub_categories":["数据","Other LLaMA-derived projects:","大语言对话模型及数据","Large Language Model","Open-LLM","ChatLLM系列","GPT开源平替机器人","GPT开源平替机器人🔥🔥🔥","常用数据集","Large Language Models"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLianjiaTech%2FBELLE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLianjiaTech%2FBELLE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLianjiaTech%2FBELLE/lists"}