---
title: zhangxiaobai_shishen2_full_1_8b
canonical_url: "https://www.modelscope.cn/models/zhanghuiATchina/zhangxiaobai_shishen2_full_1_8b"
md_url: "https://www.modelscope.cn/models/zhanghuiATchina/zhangxiaobai_shishen2_full_1_8b.md"
repository: zhanghuiATchina/zhangxiaobai_shishen2_full_1_8b
chinese_name: "食神2（全量版）1.8b"
last_updated: 2024-03-16
license: "Apache License 2.0"
pipeline_tag: question-answering
tasks:
  - question-answering
model_type:
  - internlm2
architectures:
  - InternLM2ForCausalLM
library_name:
  - pytorch
  - transformer
frameworks:
  - Pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 81
stars: 1
---

# zhangxiaobai_shishen2_full_1_8b

> zhangxiaobai_shishen2_full_1_8b - zhanghuiATchina 在 ModelScope 开源的模型。本模型是基于InternLM2-chat-1.8B预训练模型，通过 XiaChuFang Recipe Corpus食谱语料库进行FineTune，训练出来的微调模型。使用了150万个菜谱进行了1个epoch的训练。

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

- **Repository**: zhanghuiATchina/zhangxiaobai_shishen2_full_1_8b
- **License**: Apache License 2.0
- **Tasks**: question-answering
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 81
- **Stars**: 1
- **Last updated**: 2024-03-16

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

---

###### 
#### Clone with HTTP
```bash
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的文件：

```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 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/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)



## 模型训练流程

后续补充



## 数据评估及结果

后续补充



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

后续补充
