Skip to content

骆驼:A Chinese finetuned instruction LLaMA. Developed by 陈启源 @ 华中师范大学 & 李鲁鲁 @ 商汤科技 & 冷子昂 @ 商汤科技

License

Notifications You must be signed in to change notification settings

jianantian/Chinese-alpaca-lora

 
 

Repository files navigation

骆驼(Luotuo): Open Sourced Chinese Language Models

Project 骆驼(Luotuo) was founded by 冷子昂 @ 商汤科技, 陈启源 @ 华中师范大学 and 李鲁鲁 @ 商汤科技

( Notice: 陈启源 is now pursuing a PhD position)

This is NOT an official product of SenseTime

We named project in Luotuo(Camel) because both LLaMA and alpaca are all belongs to Artiodactyla-Camelidae(偶蹄目-骆驼科)

News [ ... ]

[2023-4-2] We have first version of Magic Silk Book, which recording many prompts on Wenxin & GPT.

[2023-4-1] Added docker files and also added a tutorial on docker deployment.

[2023-3-31] New Project Page.

[2023-3-30] We released Chinese Summarization Model, CamelBell-C (驼铃-C), try in this Open In Colab. More result see in CamelBell-repo.

[2023-3-27] We plan to train a ChatHarryPotter, we've just finished the prelimiary experiment and have ver. 0.1 model, but it did not meet our expectation, see this report, and we are pursuing a Harry Potter enthusiast Pythoner to join.

A Quick Start

Evaluating our model on Colab at first, which we strongly recommended.

Luotuo-Vanilla

If you are seeking a better performance on Chinese, check CamelBell(驼铃), which finetuned Chinese data on Chinese base model Chat-GLM-6B.

CamelBell-B (驼铃-B) will be ChatHarryPotter

Example Output of CamelBell-B (click on me)
Instruction: 斯内普和伏地魔之间是什么关系?
Answer: 斯内普和伏地魔之间是非常复杂的关系。伏地魔是斯内普的雇主,他利用斯内普来执行他的计划。斯内普一开始是斯莱特林的学生,但他后来加入了伏地魔的阵营,成为了他的追随者。斯内普和伏地魔之间的关系非常紧张,他们互相对抗,但也有一些共同的利益。

CamelBell-C (驼铃-C) is a Chinese Text Summarization Model Open In Colab

Example Output of CamelBell-C (click on me)
Instruction: 请帮我总结以下内容:
Input: 
北京时间2月13日凌晨,2023年ATP250达拉斯站男单决赛。中国球员吴易昺先输一盘后挽救4个赛点并兑现第5个冠军点,最终以6(4)-7/7-6(3)/7-6(12)逆转惊险击败赛会5号种子、美国大炮伊斯内尔,就此改写历史,成为公开赛年代首位夺得ATP巡回赛男单冠军的中国大陆球员,并创造中国大陆球员的男单最高排名!

第一盘比赛,吴易昺在第12局错过了一个盘点,并最终抢七惜败;第二盘则挽救一个赛点后抢七局3-0领先开局,且以7-6(3)扳回一盘;第三盘决胜盘,在关键的第9局15-40落后情况下凭借连续的高质量发球逆转保发,之后比赛再次进入抢七,抢七局依然胶着,吴易昺又挽救了3个赛点,并兑现了自己的第5个冠军点,就此锁定冠军!历史性一刻到来时,吴易昺瞬间躺倒在地。全场比赛,伊斯内尔轰出了44记Ace球,但最终在主场依然输给了吴易昺。

凭借具有突破意义的这一冠,吴易昺在本周入账250个积分和112125美元的冠军奖金,在周一最新一期的男单排名榜单上,创中国大陆男网历史新高排名—第58位。根据比赛计划,吴易昺原本要出战本周进行的ATP250德拉海滩站,不过在达拉斯夺冠后,吴易昺因身体疲劳退出本站赛事,他的签位由幸运落败者约翰森替代。

Answer: 男子网坛历史性一刻!中国小将吴易昺逆转击败赛会5号种子,成公开赛年代首个冠军。
Luotuo-Vanilla

Luotuo-Vanilla is first repo in Project Luotuo, which finetuned Chinese on LLaMA-7B. The original purpose of Luotuo is to invesgating the effect that tuning trans-lingual data on a large language model.

Check Evaluation Code Here Open In Colab

An Interface Demo via Gradio Here Open In Colab

Luotuo 1.0 is still in training, distributing on local servers taking us sometime, many bugs need to be fixed.

Example Output of Luotuo (click on me)
Input: 中国的首都在哪里?
Luotuo-Output: 中国的首都是北京。
Input: 华中师范大学在哪里
Luotuo-0.1-Output: 华中师范大学位于北京
Luotuo-0.3-Output: 华中师范大学在武汉市。
Luotuo-Vanilla

The Silk Magic Book will record the Magic Prompt on some very Large LLMs. We hope that in some day, Luotuo trained models can adapt to diverse Prompt Tasks also.

Luotuo-Vanilla

Silk Road (丝绸之路) will be the model bank of project Luotuo.

Sponsorships(赞助)

Top 3 Sponsors

Time Sponsor Amount
2023/3/28 张** 2000
2023/4/4 王* 768
2023/4/2 王** 666

balance = 7916.66 now. Detailed balance see in sponsorship_and_balance.md

这原本是我们的一个作业项目,我们原本计划训练到1.0为止。但是社区的热情超过了我们的想象。如果您愿意赞助我们的项目,可以

扫描这个二维码

并且加这个支付宝账号,留下您的姓名

项目的资金流向将被公开,所有的资金将被用于数据的标注,训练算力的购买或者后续周边产品的发放。数据和算力的捐献也会一同总结在sponsorship的表格中。备用链接 二维码 , 支付宝账号

This was originally an exercise project for us, and we originally planned to train until version 1.0. However, the enthusiasm of the community exceeded our expectations. If you are willing to sponsor our project, you can scan this QR code and add this Alipay account, leaving your name.

All funds will be used for data annotation, purchase of training computing power, or distribution of subsequent peripheral products.

Contributors

We are start to recording the contribution in contributions.md, which will detaily record each one's contribution on each milestone.

And there will be a table with both each contributor's name, afflication and profile image.

N C N C
李鲁鲁 Founder 冷子昂 Founder
陈启源 Founder Juro
黄泓森 Contributor HF

TODO and Be a Contributor

It seems that there are many follow-up tasks to be done after the basic version is completed. Many developers in the community have put forward more friendly suggestions, and I have put a longer TODO list in TODO_list.md.

inbuilding project

  • translate alpaca json data into Chinese
  • finetuning with lora(model 0.1)
  • release 0.1 model (model A)
  • model to hugging face, GUI demo
  • train lora with more alpaca data(model 0.3)
  • (In Processing) train lora with more alpaca data(model 0.9)
  • clean training code
  • write the second phase plan for Luotuo

We plan to use this Luotuo project as the git repository for the entire Chinese LLM project. After the completion of the original Luotuo: LLaMA-LoRA, it will be migrated to Luotuo-vanilla. The CamelBell, Loulan, Silk-Road and other derivative Chinese language model projects will gradually be added to the Luotuo project.

Citation

Please cite the repo if you use the data or code in this repo.

@misc{alpaca,
  author={Ziang Leng, Qiyuan Chen and Cheng Li},
  title = {Luotuo: An Instruction-following Chinese Language model, LoRA tuning on LLaMA},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/LC1332/Luotuo-Chinese-LLM}},
}

A Quick Start

Colab Link detail
CamelBell quick evaluation Open In Colab Tuoling specific Evaluation Code
A quick evaluation Open In Colab Evaluation code with standard HuggingFace pipeline
Bot with Interface Open In Colab Interactive Chatting Bot using Gradio
Training Code To be released Training code, run on colab
Data Translation Open In Colab Translation alpaca.json into Chinese

About

骆驼:A Chinese finetuned instruction LLaMA. Developed by 陈启源 @ 华中师范大学 & 李鲁鲁 @ 商汤科技 & 冷子昂 @ 商汤科技

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%