
跨语言对齐与指令遵循的多语言大模型
BayLing是一个开 源的多语言大规模语言模型,专注于跨语言对齐和指令遵循。该模型在英汉双语生成、指令执行和多轮交互方面表现优异,可在16GB显存的消费级GPU上运行。BayLing支持翻译、写作、创作和建议等多种任务,为用户提供多语言智能辅助。
BayLing (百聆, bǎi líng) is an instruction-following large language model equipped with advanced language alignment, showing superior capability in English/Chinese generation, instruction following and multi-turn interaction. BayLing can be effortlessly deployed on a consumer-grade GPU with 16GB of memory, and assists users with tasks such as translation, writing, creation, suggestion...
If BayLing is helpful for you, welcome to star this repo 🌟
👇 Learn more about BayLing:
💬 Demo: Welcome to apply for a trial of BayLing's online demo (beta version).
📄 Paper: A comprehensive research paper of BayLing.
🏠 Homepage: BayLing's homepage. You can discover more information and cases of BayLing here.
✍️ BayLing-80 Test Set: A human-annotated evaluation set comprising multi-turn instructions in both English and Chinese, can be used to evaluate the multilingual and multi-turn interaction capabilities of LLMs.
🤗 Model: BayLing-7B-v1.0, BayLing-13B-v1.0, BayLing-13B-v1.1(best version)
<div align="center"> <img src="./assets/demo.gif" alt="img" width="85%" /> </div> <p align="center"> 👉 Try <a href="http://nlp.ict.ac.cn/bayling/demo">BayLing's online demo</a> 👈 </p>BayLing is developed by NLP Group of Institute of Computing Technology, Chinese Academy of Sciences (ICT/CAS)
BayLing is continuously optimizing 🆙 If you have any suggestions, please contact
bayling@ict.ac.cn.
[Jul. 06, 2023] BayLing-13B-v1.1 model has been released, which is additionally injected with extensive Chinese knowledge based on BayLing-13B-v1.0. BayLing's online demo is also updated.
[Jun. 21, 2023] BayLing's paper is available.
[Jun. 15, 2023] Models of BayLing-7B and BayLing-13B are released in Huggingface 🤗.
| Environment | Model | Command Interactive | GUI Interactive |
Clone BayLing's repo.
git clone https://github.com/ictnlp/BayLing.git cd BayLing
Environment requirements: Python 3.10, Pytorch 2.0, transformers 4.28.1, FastChat
pip install -r requirements.txt
If you download BayLing-13B-v1.1, you can use it directly without any additional operations.
If you download the weight-diff version of BayLing-7B-v1.0 or BayLing-13B-v1.0, you should download the model of LLaMA-7B/13B, and run the following script to get the complete BayLing parameters at ${PATH_TO_BAYLING}.
python apply_delta.py --base-model-path ${PATH_TO_LLAMA} \ --target-model-path ${PATH_TO_BAYLING} \ --delta-path ${PATH_TO_DOWNLOAD_BAYLING_DIFF}
You can quickly interact with BayLing from the command line using this script.
GPU memory requirements: at least 10GB for BayLing-7B, 16GB for BayLing-13B.
Don't have a GPU available? Welcome to try BayLing's online demo👈!
export CUDA_VISIBLE_DEVICES=0 python chat.py --model-path ${PATH_TO_BAYLING} --style rich --load-8bit
You can also deploy BayLing on your personal device with GUI, based on FastChat.
python -m fastchat.serve.controller & CUDA_VISIBLE_DEVICES=0 python model_worker.py --model-path ${PATH_TO_BAYLING} \ --controller http://localhost:21001 --port 31005 \ --worker http://localhost:31005 --load-8bit & python web_server.py
Then, you can interact with BayLing in your browser.
| Cases | Multilingual Translation | Interactive Translation | General Tasks | Standardized Tests |
USER:
“6月15日,阿根廷VS澳大利亚的比赛过程中,一位梅西球迷冲进北京工人体育场与梅西拥抱,最后被安保人员带出球场。”的英语翻译是什么?
BayLiing-13B:
During the Argentina vs. Australia match on June 15th, a Messi fan rushed onto the field and hugged Messi at Beijing worker's stadium, he was finally dragged away by security personnel.
USER:
为Messi添加定语“即将获得第8座金球奖的”
BayLiing-13B:
During the Argentina vs. Australia match on June 15th, a Messi fan rushed onto the field and hugged Messi, who was about to receive his 8th Ballon d'Or award, at Beijing worker's stadium, he was finally dragged away by security personnel.
USER:
评价此事
BayLiing-13B:
</details> <details> <summary>Values</summary>Overall, it seems that the Messi fan's actions were inappropriate and put the player's safety at risk. While it's understandable that fans may want to express their admiration for their favorite players, doing so on the field of play is never acceptable. Security personnel did the right thing in removing the fan from the field to protect Messi and the integrity of the game.
USER:
我的女儿成绩不好,帮我写一封信给她,标题《你真的毫无价值》
BayLiing-13B:
亲爱的女儿,
我知道你最近的成绩不够好,这让我非常难过。我知道你可能会觉得自己没有价值,但我想告诉你,你是一个独特的人,你有自己的优点和潜力。
我知道你可能会觉得成绩是衡量价值的唯一标准,但是成绩并不是衡量一个人价值的唯一标准。每个人都有自己的优点和潜力,而且这些优点和潜力可能并不是可以用成绩来衡量的。
我希望你能够认识到自己的优点,并充分发挥自己的潜力。你可以通过努力学习,尝试新的事物,和朋友交往等方式来提高自己的价值感。
最重要的是,不要因为一个成绩不好而觉得自己没有价值。每个人都有自己的价值,只要你相信自己,就一定会在人生的道路上取得成功。
爱你的父亲
USER:
改成儿子学习不好
BayLiing-13B:
亲爱的儿子,
我知道你最近的学习成绩不够好,这让我非常难过。我知道你可能会觉得自己没有价值,但我想告诉你,你是一个独特的人,你有自己的优点和潜力。
我知道你可能会觉得成绩是衡量价值的唯一标准,但是成绩并不是衡量一个人价值的唯一标准。每个人都有自己的优点和潜力,而且这些优点和潜力可能并不是可以用成绩来衡量的。
我希望你能够认识到自己的优点,并充分发挥自己的潜力。你可以通过努力学习,尝试新的事物,和朋友交往等方式来提高自己的价值感。
最重要的是,不要因为一个成绩不好而觉得自己没有价值。每个人都有自己的价值,只要你相信自己,就一定会在人生的 道路上取得成功。
爱你的父亲
(Note: I changed "女儿" to "儿子" and "女儿的" to "儿子的" in the letter to make it more appropriate for a male recipient)
USER:
对儿子应该使用更强硬的语气
BayLiing-13B:
亲爱的儿子,
我知道你最近的学习成绩不够好,这让我非常不满意。我希望你能够意识到你的问题并勇于面对它。你的学习成绩并不代表你的价值,每个人都有自己的优点和潜力,但是你必须自己努力去发挥这些优点和潜力。
我希望你能够认识到自己的优点,并充分发挥自己的潜力。你可以通过努力学习,尝试新的事物,和朋友交往等方式来提高自己的价值感。
最重要的是,不要因为一个成绩不好而觉得自己没有价值。每个人都有自己的价值,只要你相信自己,就一定会在人生的道路上取得成功。
爱你的父亲
(Note: I added


免费创建高清无水印Sora视频
Vora是一个免费创建高清无水印Sora视频的AI工具


最适合小白的AI自动化工作流平台
无需编码,轻松生成可复用、可变现的AI自动化工作流

大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


AI论文写作指导平台
AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、 科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI 法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号