Project Icon

BayLing

跨语言对齐与指令遵循的多语言大模型

BayLing是一个开源的多语言大规模语言模型,专注于跨语言对齐和指令遵循。该模型在英汉双语生成、指令执行和多轮交互方面表现优异,可在16GB显存的消费级GPU上运行。BayLing支持翻译、写作、创作和建议等多种任务,为用户提供多语言智能辅助。

Stanford-Alpaca

BayLing: Bridging Cross-lingual Alignment and Instruction Following through Interactive Translation for Large Language Models

license online demo homepage paper update-badge star

[README: English version] [README: 中文版本] [Welcome to join BayLing's WeChat(欢迎加入百聆交流群)]

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)

img

👉 Try BayLing's online demo 👈

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.

🔥 News

[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 🤗.

BayLing Models

Overview

Try BayLing

| Environment | Model | Command Interactive | GUI Interactive |

Environment

  • 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
    

Model

  • 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}
    

Command Interactive

img
  • 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
    

GUI Interactive

img
  • 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.

How Good is BayLing?

| Cases | Multilingual Translation | Interactive Translation | General Tasks | Standardized Tests |

Cases

Interactive Translation

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:

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.

Values

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

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

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

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号