shwu
commited on
Commit
•
f3d77c9
1
Parent(s):
46280bb
doc
Browse files
README.md
CHANGED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- zh
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- chatglm
|
7 |
+
- blip2
|
8 |
+
---
|
9 |
+
|
10 |
+
# Model Card for {{ model_id | default("Model ID", true) }}
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
blip2zh-chatglm-6b是基于blip2训练的中文多模态聊天模型。
|
17 |
+
|
18 |
+
- **blip2 base model** [bert-base-chinese](https://huggingface.co/bert-base-chinese)
|
19 |
+
- **Vision encoder** [eva-clip-vit-g](https://arxiv.org/abs/2211.07636)
|
20 |
+
- **Language model** [chatglm-6b](https://huggingface.co/THUDM/chatglm-6b)
|
21 |
+
|
22 |
+
### Model Sources
|
23 |
+
|
24 |
+
- [**Training Code**](https://github.com/XiPotatonium/LAVIS): blip2训练代码,基于[LAVIS](https://github.com/salesforce/LAVIS)
|
25 |
+
- [**webui**](https://github.com/XiPotatonium/chatbot-webui): 一个由gradio实现的webui
|
26 |
+
- [**api**](https://github.com/XiPotatonium/chatbot-api): 一个由fastapi实现的api服务,可以部署在本地,同时也支持一些其他类型的本地可部署语言模型。
|
27 |
+
|
28 |
+
## Uses
|
29 |
+
|
30 |
+
模型参数不包含chatglm的参数,需要事先下载chatglm并安装其对应的依赖。
|
31 |
+
|
32 |
+
加载模型及推理可以参考[api](https://github.com/XiPotatonium/chatbot-api/blob/main/src/model/blip2chatglm/__init__.py)的实现
|
33 |
+
|
34 |
+
一些[example](https://github.com/XiPotatonium/chatbot-api/blob/main/examples.ipynb)
|
35 |
+
|
36 |
+
## Limitations
|
37 |
+
|
38 |
+
受限于中文数据集,目前图像理解能力依然有限,会产生无关或者错误的内容。
|
39 |
+
目前没有引入多轮对话训练以及指令微调。多轮对话可能会受到上下文的干扰。
|
40 |
+
并且同样受限于chatglm-6b本身的对话效果。
|
41 |
+
|
42 |
+
## Training Details
|
43 |
+
|
44 |
+
### Training Data
|
45 |
+
|
46 |
+
* [laion-2b-chinese](https://huggingface.co/datasets/IDEA-CCNL/laion2B-multi-chinese-subset): 我们仅选取了其中clip分数较高的670k图文对。
|
47 |
+
* [coco-zh](https://github.com/li-xirong/coco-cn)
|
48 |
+
* [flickr8k-zh](http://lixirong.net/datasets/flickr8kcn)
|
49 |
+
|
50 |
+
### Training Procedure
|
51 |
+
|
52 |
+
基于blip2的两阶段训练方法
|
53 |
+
|
54 |
+
## Evaluation
|
55 |
+
|
56 |
+
TODO
|