Edit model card

介绍

  1. 模型名称:xiaoheizi小黑子),现在国内的大模型起的名字一个比一个厉害,那我们和别人做点不一样的,主打一个随意~
  2. 模型参数量:是一个参数量为3B的模型
  3. 模型:模型基于dolly_v2_3b模型,而dolly_v2_3b模型本质上就是gpt_neox模型
  4. 数据:基于BelleGroup/train_1M_CN数据做的训练
  5. 商用:可以商用
  6. GitHub仓库:本项目的训练和推理代码已经全部开源https://github.com/yuanzhoulvpi2017/zero_nlp/blob/main/chinese_dolly_v2_3b

使用方法

推理

step1

git clone git@github.com:yuanzhoulvpi2017/zero_nlp.git

cd chinese_dolly_v2_3b

step2

from transformers import GPTNeoXForCausalLM,AutoTokenizer
from dolly.generate import generate_response,load_model_tokenizer_for_generate
import torch


model, tokenizer = load_model_tokenizer_for_generate(pretrained_model_name_or_path="yuanzhoulvpi/xiaoheizi-3b")


for i in range(10):
    print("*" * 100)
    res = generate_response(instruction="列出三个在二十世纪被认为是最伟大的小说之一的书名,以及它们的作者。", model=model,tokenizer=tokenizer)
    print(res)
    torch.cuda.empty_cache()


# ****************************************************************************************************
# - 《致命招若众》 by 黄伟作为一部历史传说学者的作品,创作于 1898 年。
# - 《讲故事人生》 by 苏珊作为一部历史传说,近年的迈克尔·道尔莎尼的重装作品,创作于1999年。
# - 《金头银头》 by 洛克菲尔德·迪伊纳作为一部小说、小说之旅、花园小说家之一,创作于1958年。

训练

  1. 使用trainer_dolly.py文件训练即可
Downloads last month
13
Inference API
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Dataset used to train yuanzhoulvpi/xiaoheizi-3b