shibing624/llama-13b-belle-zh-lora

🤗 Hugging Face sourceapache-2.013B activated53 MBother✓ 1 checksumupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo shibing624/llama-13b-belle-zh-lora ./model-folder
Needs a seeder →

Chinese QA LoRA Model

llama中文问答LoRA模型

llama-13B-belle-zh-lora evaluate test data:

The overall performance of llama-13B-belle-zh-lora on QA test:

input_text predict
用一句话描述地球为什么是独一无二的\n答: 地球是独一无二的,因为它是我们的家园,它是我们的生命的基础,它是我们的星球。

在中文开放测试集中的表现优异,继承了两方面的优势:1)微调的底座是llama-13B模型,中文的表现优于LLAMA,2)微调使用的是高质量100万条中文ChatGPT指令Belle数据集,微调后的模型对话效果优于原始llama-13B。

Usage

本项目开源在textgen项目:textgen,可支持llama模型,通过如下命令调用:

Install package:

pip install -U textgen
from textgen import LlamaModel
model = LlamaModel("llama", "decapoda-research/llama-13b-hf", lora_name="shibing624/llama-13b-belle-zh-lora")
r = model.predict(["用一句话描述地球为什么是独一无二的\n答:"])
print(r) # ['地球是独一无二的,因为它是我们的家园,它是我们的生命的基础,它是我们的星球。']

模型文件组成:

llama-13b-belle-zh-lora
    ├── adapter_config.json
    └── adapter_model.bin

训练数据集

  1. 50万条中文ChatGPT指令Belle数据集:BelleGroup/train_0.5M_CN
  2. 100万条中文ChatGPT指令Belle数据集:BelleGroup/train_1M_CN
  3. 5万条英文ChatGPT指令Alpaca数据集:50k English Stanford Alpaca dataset
  4. 2万条中文ChatGPT指令Alpaca数据集:shibing624/alpaca-zh
  5. 69万条中文指令Guanaco数据集(Belle50万条+Guanaco19万条):Chinese-Vicuna/guanaco_belle_merge_v1.0

如果需要训练llama模型,请参考https://github.com/shibing624/textgen

Citation

@software{textgen,
  author = {Xu Ming},
  title = {textgen: Implementation of language model finetune},
  year = {2021},
  url = {https://github.com/shibing624/textgen},
}