---
title: flan-t5-xxl-lora-chinese-spokesman
canonical_url: "https://www.modelscope.cn/models/lxj616/flan-t5-xxl-lora-chinese-spokesman"
md_url: "https://www.modelscope.cn/models/lxj616/flan-t5-xxl-lora-chinese-spokesman.md"
repository: lxj616/flan-t5-xxl-lora-chinese-spokesman
chinese_name: "flan-t5-xxl-lora教育大模型"
last_updated: 2023-04-27
license: "Apache License 2.0"
pipeline_tag: text-generation
tasks:
  - text-generation
library_name:
  - pytorch
frameworks:
  - pytorch
downloads: 57
stars: 4
---

# flan-t5-xxl-lora-chinese-spokesman

> flan-t5-xxl-lora-chinese-spokesman - lxj616 在 ModelScope 开源的模型。《在24gb显存下教育外国大模型》的示例模型和代码。包含环境Dockerfile，训练代码，生成代码，而且顺带一个QQ机器人示例

lxj616/flan-t5-xxl-lora-chinese-spokesman 是 ModelScope 魔搭社区上的text-generation模型，采用 Apache License 2.0 许可。

- **Repository**: lxj616/flan-t5-xxl-lora-chinese-spokesman
- **License**: Apache License 2.0
- **Tasks**: text-generation
- **Downloads**: 57
- **Stars**: 4
- **Last updated**: 2023-04-27

Source: https://www.modelscope.cn/models/lxj616/flan-t5-xxl-lora-chinese-spokesman

---

# flan-t5-xxl-lora #

《在24gb显存下教育外国大模型》的示例模型和代码。包含环境Dockerfile，训练代码，生成代码，而且顺带一个QQ机器人示例

[https://lxj616.github.io/jekyll/update/2023/03/10/finetune-flan-x5-xxl-under-24gb-vram.html](https://lxj616.github.io/jekyll/update/2023/03/10/finetune-flan-x5-xxl-under-24gb-vram.html)

## 技术参数 ##

基础模型：flan-t5-xxl
数据集：《外交部发言人答记者问》
训练方式：bitsandbytes 8-bit + lora + peft
训练设备：单RTX 3090Ti (24GB VRAM)
训练参数：见代码

## 使用方式 ##

参见`train_transformer.py`来进行训练
参见`inference_peft.py`来进行生成
QQ机器人示例位于`qqbot_example`，使用了nonebot2框架，不是一个完整的机器人项目

## 外交部发言人答记者问数据集 ##

`qa_translated_clean_train.jsonl` : 训练集10000条问答，全部翻译成了英文
`qa_translated_clean_test.jsonl`：测试集忘了多少条，里面有http 500错误懒得修了，训练集没有

全部数据来自于网络公开的外交部发言人答记者问，都是公开给国外记者听的，应该完全符合审核的标准，没有任何不合规的内容，毕竟是官方自己公开说的

## 环境搭建 ##

建议使用Docker进行环境搭建，参见`docker_build`文件夹下的Dockerfile

国内源都切换好了，国内不好下载的nltk数据给直接丢进去拷贝免下载了

## 效果示例 ##

`在20230427经运营提醒已河蟹删除`
