Clone with HTTP
git clone https://www.modelscope.cn/zhanghuiATchina/zhangxiaobai_shishen2_full_1_8b.git
<食神2(全量版)1.8b>介绍
本模型是基于InternLM2-chat-1.8B预训练模型,通过 XiaChuFang Recipe Corpus食谱语料库进行FineTune,训练出来的微调模型。
使用了150万个菜谱进行了1个epoch的训练。
模型描述
本模型是用于实现咨询菜谱的对话。
期望模型使用方式以及适用范围
使用gradio或者streamlit调用就行了。本地也可以直接使用命令行方式调用。
如何使用
命令行一个典型的方式就是编辑一个cli_demo.py的文件:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name_or_path = "xxx"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map='auto')
model = model.eval()
messages = []
print("=============Welcome to InternLM2 chatbot, type 'exit' to exit.=============")
while True:
input_text = input("User >>> ")
if input_text == "exit":
break
response, history = model.chat(tokenizer, input_text, history=messages)
#messages.append((input_text, response))
print(f"robot >>> {response}")
然后 python cli_demo.py即可。
训练数据介绍
XiaChuFang Recipe Corpus
● 发布方:清华大学,百度,北京通用人工智能研究院
● 发布时间:2020
● 简介: 完整的食谱语料库包含1,520,327种中国食谱。其中,1,242,206食谱属于30,060菜肴。一道菜平均有41.3个食谱。食谱的平均长度是224个字符。最大长度为62,722个字符,最小长度为10个字符。食谱由415,272位作者贡献。其中,最有生产力的作者上传5,394食谱。我们提供脱敏的作者信息。
● 下载地址: https://opendatalab.org.cn/XiaChuFangRecipeCorpus
● 论文地址: https://arxiv.org//pdf/2210.114
模型训练流程
后续补充
数据评估及结果
后续补充
相关论文以及引用信息
后续补充
评论