---
title: zhangxiaobai_shishen
canonical_url: "https://www.modelscope.cn/models/zhanghuiATchina/zhangxiaobai_shishen"
md_url: "https://www.modelscope.cn/models/zhanghuiATchina/zhangxiaobai_shishen.md"
repository: zhanghuiATchina/zhangxiaobai_shishen
chinese_name: "张小白的菜谱"
last_updated: 2024-01-16
license: "Apache License 2.0"
pipeline_tag: question-answering
tasks:
  - question-answering
model_type:
  - internlm
architectures:
  - InternLMForCausalLM
library_name:
  - pytorch
  - transformer
frameworks:
  - Pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "vllm 0.9.2"
downloads: 161
stars: 2
---

# zhangxiaobai_shishen

> zhangxiaobai_shishen - zhanghuiATchina 在 ModelScope 开源的模型。一个经过食谱数据集训练过的InternLM大模型，旨在回答一系列关于做菜的专业性的问题（其实只是为了做个作业）

zhanghuiATchina/zhangxiaobai_shishen 是 ModelScope 魔搭社区上的question-answering模型，采用 Apache License 2.0 许可，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: zhanghuiATchina/zhangxiaobai_shishen
- **License**: Apache License 2.0
- **Tasks**: question-answering
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, vllm 0.9.2
- **Downloads**: 161
- **Stars**: 2
- **Last updated**: 2024-01-16

Source: https://www.modelscope.cn/models/zhanghuiATchina/zhangxiaobai_shishen

---

###### 
#### Clone with HTTP
```bash
 git clone https://www.modelscope.cn/zhanghuiATchina/zhangxiaobai_shishen.git
```



# <张小白的菜谱>介绍

本模型是基于InternLM-chat-7B预训练模型，通过 XiaChuFang Recipe Corpus食谱语料库进行FineTune，训练出来的微调模型。

由于条件所限，现在的模型仅使用了10万个菜谱进行了1个epoch的训练。（其实目的是为了完成训练营的作业）

今后会逐步完善。



## 模型描述

本模型是用于实现咨询菜谱的对话。



## 期望模型使用方式以及适用范围

使用gradio或者streamlit调用就行了。本地也可以直接使用命令行方式调用。



### 如何使用

命令行一个典型的方式就是编辑一个cli_demo.py的文件：

```bash
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 InternLM 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/XiaChuFang_Recipe_Corpus](https://link.zhihu.com/?target=https%3A//opendatalab.org.cn/XiaChuFang_Recipe_Corpus%3Fsource%3DJUU3JTlGJUE1JUU0JUI5JThF)

**● 论文地址**： [https://arxiv.org//pdf/2210.114](http://arxiv.org//pdf/2210.11431.pdf)



## 模型训练流程

后续补充



## 数据评估及结果

后续补充



### 相关论文以及引用信息

后续补充
