guoqiang wang
commited on
Commit
•
190ff42
1
Parent(s):
2a5111e
Create README.md
Browse files
README.md
CHANGED
@@ -1,220 +1,146 @@
|
|
1 |
-
#
|
2 |
|
3 |
-
|
4 |
-
various natural language understanding and generation tasks.
|
5 |
|
6 |
-
Please refer to our paper for a detailed description of GLM:
|
7 |
|
8 |
-
[All NLP Tasks Are Generation Tasks: A General Pretraining Framework](https://arxiv.org/abs/2103.10360)
|
9 |
|
10 |
-
Zhengxiao Du*, Yujie Qian*, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, Jie Tang (*: equal contribution)
|
11 |
-
|
12 |
-
Part of the code is based on [Megatron-LM](https://github.com/NVIDIA/Megatron-LM) and [PET](https://github.com/timoschick/pet).
|
13 |
-
|
14 |
-
## Pretrained Models
|
15 |
-
You can download the pretrained models used in the paper [here](https://mailstsinghuaeducn-my.sharepoint.com/:f:/g/personal/duzx16_mails_tsinghua_edu_cn/Eg8MZe62MlVFs_mK2tHaH-sBC-UC01jpGPZop08pID7sOw?e=MsevNR).
|
16 |
-
|
17 |
-
| Name | Params | File | Config
|
18 |
-
| ----- | ---- | ---- | ----
|
19 |
-
| GLM-Base | 110M | glm-base-blank.tar.bz2 | model_blocklm_base.sh
|
20 |
-
| GLM-Large | 335M | glm-large-blank.tar.bz2 | model_blocklm_large.sh
|
21 |
-
| GLM-Large-Chinese | 335M | glm-large-chinese.tar.bz2 | model_blocklm_large_chinese
|
22 |
-
.sh
|
23 |
-
| GLM-Large (multi-task) | 335M | glm-large-generation.tar.bz2 | model_blocklm_large_generation.sh
|
24 |
-
| GLM-410M (multi-task) | 410M | glm-1.25-generation.tar.bz2 | model_blocklm_1.25_generation.sh
|
25 |
-
| GLM-515M (multi-task) | 515M | glm-1.5-generation.tar.bz2 | model_blocklm_1.5_generation.sh
|
26 |
-
| GLM-RoBERTa | 335M | glm-roberta-large-blank.tar.bz2 | model_blocklm_roberta_large.sh
|
27 |
-
| GLM-XXLarge | 10B | [apply here](https://resource.wudaoai.cn/home?ind=2&name=WuDao%20WenHui&id=1399364355975327744) | model_blocklm_10B.sh
|
28 |
-
| GLM-XXLarge-Chinese | 10B | - | model_blocklm_10B_chinese.sh
|
29 |
-
|
30 |
-
## Results
|
31 |
-
|
32 |
-
### [SuperGLUE](https://super.gluebenchmark.com)
|
33 |
-
dev set, single model, single-task finetuning
|
34 |
-
|
35 |
-
| Model | COPA | WSC | RTE | WiC | CB | MultiRC | BoolQ | ReCoRD |
|
36 |
-
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
|
37 |
-
| GLM-XXLarge | 98.0 | 95.2 | 93.1 | 75.7 | 98.7/98.2 | 88.1/63.3 | 88.7 | 94.4/94.0 |
|
38 |
-
| [RoBERTa-Large](https://github.com/pytorch/fairseq/tree/master/examples/roberta) | 94.0 | 91.3 | 86.6 | 75.6 | 98.2/- | 85.7/- | 86.9 |89.5/89.0|
|
39 |
-
| [DeBERTa-XXLarge-v2](https://github.com/microsoft/DeBERTa/tree/master/experiments/superglue) | 97.0 | - | 93.5 | - | - | 87.8/63.6 | 88.3 | 94.1/93.7 |
|
40 |
-
|
41 |
-
### Seq2Seq
|
42 |
-
[CNN/Daily Mail](https://github.com/abisee/cnn-dailymail) (test set, no additional data used)
|
43 |
-
|
44 |
-
| Model | ROUGE-1 | ROUGE-2 | ROUGE-L |
|
45 |
-
| ---- | ---- | ---- | ---- |
|
46 |
-
| GLM-XXLarge | **44.7** | 21.4 | **41.4** |
|
47 |
-
| T5-11B | 43.5 | **21.6** | 40.7 |
|
48 |
-
| PEGASUS-Large | 44.2 | 21.5 | **41.4** |
|
49 |
-
| BART-Large | 44.2 | 21.3 | 40.9 |
|
50 |
-
|
51 |
-
[XSum](https://github.com/EdinburghNLP/XSum) (test set, no additional data used)
|
52 |
-
|
53 |
-
| Model | ROUGE-1 | ROUGE-2 | ROUGE-L |
|
54 |
-
| ---- | ---- | ---- | ---- |
|
55 |
-
| GLM-XXLarge | **48.9** | **25.7** | **40.4** |
|
56 |
-
| PEGASUS-Large | 47.2 | 24.6 | 39.3 |
|
57 |
-
| BART-Large | 45.1 | 22.3 | 37.3 |
|
58 |
-
|
59 |
-
### Language Modeling
|
60 |
-
test set, zero-shot
|
61 |
-
|
62 |
-
| Model | LAMBADA (accuracy) | Wikitext103 (perplexity) |
|
63 |
-
| ---- | ---- | ---- |
|
64 |
-
| GLM-XXLarge (bi) | 72.35 | 11.33 |
|
65 |
-
| GLM-XXLarge (uni) | 67.18 | 12.22 |
|
66 |
-
| GPT-2 | 52.66 | 17.48 |
|
67 |
-
| Megatron-LM (8.3B) | 66.51 | 10.81 |
|
68 |
-
| Turing-NLG | 67.98 | 10.21 |
|
69 |
|
70 |
## Get Started
|
71 |
### Docker Image
|
72 |
-
We prepare two docker images based on CUDA 10.2 and CUDA 11.2. You can pull the pre-built images from Docker Hub and run with docker v19.03+
|
73 |
```shell
|
74 |
-
docker run
|
|
|
|
|
|
|
75 |
```
|
76 |
-
or replace `
|
77 |
|
78 |
-
You can also modify the image according to your requirements in [docker/cuda102.dockerfile](docker/cuda102.dockerfile) and build the image yourself
|
79 |
```shell
|
80 |
-
docker build -f cuda102.dockerfile
|
81 |
```
|
82 |
-
|
83 |
-
Please first install PyTorch (we use 1.7.0) and [apex](https://github.com/NVIDIA/apex), and then install other dependencies by `pip install -r requirements.txt`
|
84 |
### Clone this repo
|
85 |
```shell
|
86 |
-
git clone https://github.com/
|
87 |
-
cd
|
|
|
88 |
```
|
89 |
|
90 |
-
##
|
|
|
|
|
|
|
|
|
91 |
We provide scripts for finetuning GLM on some downstream tasks.
|
92 |
|
93 |
-
|
94 |
|
95 |
- Download the [SuperGlue](https://super.gluebenchmark.com/tasks) data and check the experiment setup in
|
96 |
-
[scripts/ds_finetune_superglue.sh](scripts/ds_finetune_superglue.sh). Note that `DATA_ROOT, CHECKPOINT_PATH, SAVE_PATH`
|
97 |
need to be changed to your local path. You may also change the `batch-size` and `nproc_per_node` according to your
|
98 |
available hardware.
|
99 |
|
100 |
-
- Run the following script (use the
|
101 |
|
102 |
```
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
106 |
```
|
107 |
-
- We also implement [P-Tuning](https://arxiv.org/abs/2103.10385) in our code. Run the following script to integrate p-tuning:
|
108 |
-
```shell
|
109 |
-
bash scripts/ds_finetune_superglue_prompt.sh \
|
110 |
-
config_tasks/model_blocklm_10B.sh \
|
111 |
-
config_tasks/task_copa.sh
|
112 |
-
```
|
113 |
-
|
114 |
-
- To apply GLM to a new NLU dataset with cloze-filling finetuning, implement a `DataProcessor` in
|
115 |
-
[tasks/superglue/dataset.py](tasks/superglue/dataset.py) for data loading and add a `PVP` in
|
116 |
-
[tasks/superglue/pvp.py](tasks/superglue/pvp.py) for the cloze question. More details can be found
|
117 |
-
[here](tasks/superglue/README.md).
|
118 |
-
|
119 |
-
### Text Summarization
|
120 |
|
121 |
-
- Download the [Gigaword](https://github.com/harvardnlp/sent-summary), [CNN/Daily Mail](https://github.com/artmatsak/cnn-dailymail) or [XSum](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset) dataset and check the experiment setup in
|
122 |
-
[scripts/ds_finetune_seq2seq.sh](scripts/ds_finetune_seq2seq.sh). Change `DATA_ROOT, CHECKPOINT_PATH, SAVE_PATH` to your
|
123 |
-
local path.
|
124 |
-
|
125 |
-
- Run the following script (use the CNN/Daily Mail dataset as an example)
|
126 |
|
127 |
-
|
128 |
-
bash scripts/ds_finetune_seq2seq.sh \
|
129 |
-
config_tasks/model_blocklm_10B.sh \
|
130 |
-
config_tasks/seq_cnndm_org.sh
|
131 |
-
```
|
132 |
-
- The summaries are written into `./runs/experiment_name/test.jsonl.hyps`. The references are written into `test.jsonl.refs` in the same directory. For calculating rouge, install [file2rouge](https://github.com/pltrdy/files2rouge) and download Stanford CoreNLP from [here](http://nlp.stanford.edu/software/stanford-corenlp-full-2016-10-31.zip). Run the following script
|
133 |
-
```
|
134 |
-
bash scripts/evaluate_seq2seq.sh \
|
135 |
-
./runs/experiment_name/test.jsonl.hyps ./runs/experiment_name/test.jsonl.refs
|
136 |
-
```
|
137 |
|
138 |
-
### Language Modeling
|
139 |
-
#### LAMBADA Cloze Accuracy
|
140 |
-
* Download the [LAMBADA](https://github.com/cybertronai/bflm/blob/master/lambada_test.jsonl) data and change
|
141 |
-
`DATA_ROOT, CHECKPOINT_PATH` in [scripts/evaluate_lm.sh](scripts/evaluate_lm.sh)
|
142 |
-
* Run the following script
|
143 |
-
```shell
|
144 |
-
bash scripts/evaluate_lm.sh \
|
145 |
-
config_tasks/model_blocklm_large_generation.sh \
|
146 |
-
config_tasks/zero_lambada.sh
|
147 |
```
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
bash scripts/evaluate_lm.sh \
|
154 |
-
config_tasks/model_blocklm_large_generation.sh \
|
155 |
-
config_tasks/zero_wikitext.sh
|
156 |
-
```
|
157 |
|
158 |
-
|
159 |
-
- Download the [Yahoo](https://github.com/Varal7/blank_language_model) dataset and check the experiment setup in
|
160 |
-
[scripts/finetune_blank.sh](scripts/finetune_blank.sh). Change `DATA_ROOT, CHECKPOINT_PATH, SAVE_PATH` to your
|
161 |
-
local path.
|
162 |
-
|
163 |
-
- Run the following script
|
164 |
|
165 |
```
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
169 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
-
|
|
|
172 |
* Change `CHECKPOINT_PATH` to your local path. Run the following script
|
173 |
```
|
174 |
-
bash
|
175 |
-
|
176 |
```
|
177 |
-
|
178 |
|
179 |
Context: 凯旋门位于意大利米兰市古城堡旁。1807年为纪念[MASK]而建,门高25米,顶上矗立两武士青铜古兵车铸像。
|
180 |
|
181 |
GLM:拿破仑军队攻克米兰城
|
182 |
|
183 |
-
|
184 |
Context: 工业互联网(Industrial Internet)是新一代信息通信技术与工业经济深度融合的新型基础设施、应用模式和工业生态,通过对人、机、物、系统等的全面连接,构建起覆盖全产业链、全价值链的全新制造和服务体系,为工业乃至产业数字化、网络化、智能化发展提供了实现途径,是第四次工业革命的重要基石。[sMASK]它以网络为基础、平台为中枢、数据为要素、安全为保障,既是工业数字化、网络化、智能化转型的基础设施,也是互联网、大数据、人工智能与实体经济深度融合的应用模式,同时也是一种新业态、新产业,将重塑企业形态、供应链和产业链。当前,工业互联网融合应用向国民经济重点行业广泛拓展,形成平台化设计、智能化制造、网络化协同、个性化定制、服务化延伸、数字化管理六大新模式,赋能、赋智、赋值作用不断显现,有力的促进了实体经济提质、增效、降本、绿色、安全发展。
|
185 |
|
186 |
GLM: 工业互联网是制造业技术、管理、模式的重大变革,是推动互联网、大数据、人工智能和实体经济深度融合的重要载体,是建设制造强国和网络强国的重要基础。
|
187 |
|
188 |
-
|
189 |
-
Context:
|
|
|
|
|
|
|
190 |
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
-
|
194 |
Run the following script to pre-train the GLM-Large model
|
195 |
```shell
|
|
|
196 |
bash scripts/ds_pretrain_nvidia.sh config/ds_block_large.sh
|
197 |
```
|
198 |
|
199 |
-
The script [
|
|
|
|
|
|
|
200 |
|
201 |
-
The file [config/ds_block_large.sh](config/ds_block_large.sh) defines the hyperparameters for pretraining. Most of the arguments are fairly self-explanatory. Specifically, `--train-data` can be multiple keywords defined in `NAMED_CORPORA` in [data_utils/corpora.py](data_utils/corpora.py). The hyperparameters of the optimizer are defined in the corresponding json file under `config`. The semantics of the json file can be found [here](https://www.deepspeed.ai/docs/config-json).
|
202 |
|
203 |
-
##
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
```
|
206 |
-
@article{DBLP:journals/corr/abs-2103-10360,
|
207 |
-
author = {Zhengxiao Du and
|
208 |
-
Yujie Qian and
|
209 |
-
Xiao Liu and
|
210 |
-
Ming Ding and
|
211 |
-
Jiezhong Qiu and
|
212 |
-
Zhilin Yang and
|
213 |
-
Jie Tang},
|
214 |
-
title = {All {NLP} Tasks Are Generation Tasks: {A} General Pretraining Framework},
|
215 |
-
journal = {CoRR},
|
216 |
-
volume = {abs/2103.10360},
|
217 |
-
year = {2021},
|
218 |
-
url = {https://arxiv.org/abs/2103.10360}
|
219 |
-
}
|
220 |
-
```
|
|
|
1 |
+
# WudaoSailing
|
2 |
|
3 |
+
WudaoSailing is a package for pretraining chinese Language Model and finetune tasks. Now it supports GLM, Bert, T5, Cogview and Roberta models.
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
## Get Started
|
9 |
### Docker Image
|
10 |
+
We prepare two docker images based on CUDA 10.2 and CUDA 11.2. You can build images from the docker file [docs/docker/cuda102.dockerfile](docs/docker/cuda102.dcokerfile) or pull the pre-built images from Docker Hub and run with docker v19.03+
|
11 |
```shell
|
12 |
+
nvidia-docker run -id --hostname=V100 --network=host\
|
13 |
+
--ipc=host --shm-size=16gb --name=deepspeed-cuda \
|
14 |
+
-e NVIDIA_VISIBLE_DEVICES=0,1,2,3 \
|
15 |
+
-v /DATA/disk1/docker/containers/:/data deepspeed/cuda102:lastest
|
16 |
```
|
17 |
+
or replace `cuda102` with `cuda112`.
|
18 |
|
|
|
19 |
```shell
|
20 |
+
docker build -f cuda102.dockerfile -t deepspeed/cuda102 .
|
21 |
```
|
22 |
+
|
|
|
23 |
### Clone this repo
|
24 |
```shell
|
25 |
+
git clone https://github.com/wangguojim/WudaoSailing.git
|
26 |
+
cd WudaoSailing
|
27 |
+
pip install -r requirements.txt
|
28 |
```
|
29 |
|
30 |
+
## GLM
|
31 |
+
|
32 |
+
We show some examples based on GLM model.
|
33 |
+
|
34 |
+
### finetuene
|
35 |
We provide scripts for finetuning GLM on some downstream tasks.
|
36 |
|
37 |
+
#### SuperGLUE
|
38 |
|
39 |
- Download the [SuperGlue](https://super.gluebenchmark.com/tasks) data and check the experiment setup in
|
40 |
+
[examples/glm/scripts/ds_finetune_superglue.sh](xamples/glm/scripts/ds_finetune_superglue.sh). Note that `DATA_ROOT, CHECKPOINT_PATH, SAVE_PATH`
|
41 |
need to be changed to your local path. You may also change the `batch-size` and `nproc_per_node` according to your
|
42 |
available hardware.
|
43 |
|
44 |
+
- Run the following script for text similarity finetune task (use the afqmc dataset as an example)
|
45 |
|
46 |
```
|
47 |
+
cd examples/glm/
|
48 |
+
bash scripts/ds_finetune_superglue.sh\
|
49 |
+
config/model_blocklm_large_chinese.sh\
|
50 |
+
config_tasks/task_afqmc.sh
|
51 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
- Run the following script for text classification finetune task (use the thunews and thunews dataset as an example)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
```
|
57 |
+
cd examples/glm/
|
58 |
+
bash scripts/ds_finetune_superglue.sh\
|
59 |
+
config/model_blocklm_large_chinese.sh\
|
60 |
+
config_tasks/task_tnews.sh
|
61 |
+
```
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
- Run the following script for causal inference finetune task (use the COPA dataset as an example)
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
```
|
66 |
+
cd examples/glm/
|
67 |
+
bash scripts/ds_finetune_superglue.sh\
|
68 |
+
config/model_blocklm_large_chinese.sh\
|
69 |
+
config_tasks/task_copa.sh
|
70 |
```
|
71 |
+
|
72 |
+
- To apply GLM to a new NLU dataset with cloze-filling finetuning, implement a `DataProcessor` in
|
73 |
+
[examples/glm/tasks/superglue/dataset.py](examples/glm/tasks/superglue/dataset.py) for data loading and add a `PVP` in
|
74 |
+
[examples/glm/tasks/superglue/pvp.py](examples/glm/tasks/superglue/pvp.py) for the cloze question. More details can be found
|
75 |
+
[here](examples/glm/tasks/superglue/README.md).
|
76 |
+
|
77 |
|
78 |
+
|
79 |
+
#### Blank Filling (Interactive)
|
80 |
* Change `CHECKPOINT_PATH` to your local path. Run the following script
|
81 |
```
|
82 |
+
bash config/generate_block.sh\
|
83 |
+
config/model_blocklm_large_chinese.sh
|
84 |
```
|
85 |
+
##### Example1 (Entity Prediction):
|
86 |
|
87 |
Context: 凯旋门位于意大利米兰市古城堡旁。1807年为纪念[MASK]而建,门高25米,顶上矗立两武士青铜古兵车铸像。
|
88 |
|
89 |
GLM:拿破仑军队攻克米兰城
|
90 |
|
91 |
+
##### Example2 (Sentence Prediction)
|
92 |
Context: 工业互联网(Industrial Internet)是新一代信息通信技术与工业经济深度融合的新型基础设施、应用模式和工业生态,通过对人、机、物、系统等的全面连接,构建起覆盖全产业链、全价值链的全新制造和服务体系,为工业乃至产业数字化、网络化、智能化发展提供了实现途径,是第四次工业革命的重要基石。[sMASK]它以网络为基础、平台为中枢、数据为要素、安全为保障,既是工业数字化、网络化、智能化转型的基础设施,也是互联网、大数据、人工智能与实体经济深度融合的应用模式,同时也是一种新业态、新产业,将重塑企业形态、供应链和产业链。当前,工业互联网融合应用向国民经济重点行业广泛拓展,形成平台化设计、智能化制造、网络化协同、个性化定制、服务化延伸、数字化管理六大新模式,赋能、赋智、赋值作用不断显现,有力的促进了实体经济提质、增效、降本、绿色、安全发展。
|
93 |
|
94 |
GLM: 工业互联网是制造业技术、管理、模式的重大变革,是推动互联网、大数据、人工智能和实体经济深度融合的重要载体,是建设制造强国和网络强国的重要基础。
|
95 |
|
96 |
+
##### Example3 (Long Text Generation)
|
97 |
+
Context: 问题:高斯所在的国家有什么汽车品牌?答案:[gMASK]
|
98 |
+
|
99 |
+
GLM:答案:[gMASK]<|startofpiece|>德国奔驰、德国大众、别克、沃尔沃、斯柯达、本田、雪铁龙.
|
100 |
+
|
101 |
|
102 |
+
### Ptuning
|
103 |
+
Run the following script to integrate p-tuning with GLM:
|
104 |
+
```shell
|
105 |
+
cd algutils/ptuning/
|
106 |
+
bash finetune_zy.sh
|
107 |
+
```
|
108 |
|
109 |
+
### Pretrain
|
110 |
Run the following script to pre-train the GLM-Large model
|
111 |
```shell
|
112 |
+
cd examples/glm/
|
113 |
bash scripts/ds_pretrain_nvidia.sh config/ds_block_large.sh
|
114 |
```
|
115 |
|
116 |
+
The script [examples/glm/config/ds_pretrain_nvidia.sh](examples/glm/config/ds_pretrain_nvidia.sh) launches the training program with DeepSpeed. You should change `NUM_WORKERS` and `NUM_GPUS_PER_WORKER` to the number of workers and the number of gpus per worker. Also change `HOST_FILE_PATH` to the path to an OpenMPI-style hostfile. More details about DeepSpeed launcher can be found [here](https://www.deepspeed.ai/getting-started/#resource-configuration-multi-node).
|
117 |
+
|
118 |
+
The file [examples/glm/config/ds_block_large.sh](examples/glm/config/ds_block_large.sh) defines the hyperparameters for pretraining. Most of the arguments are fairly self-explanatory. Specifically, `--train-data` can be multiple keywords defined in `NAMED_CORPORA` in [data_utils/corpora.py](data_utils/corpora.py). The hyperparameters of the optimizer are defined in the corresponding json file under `config`. The semantics of the json file can be found [here](https://www.deepspeed.ai/docs/config-json).
|
119 |
+
|
120 |
|
|
|
121 |
|
122 |
+
## Bert
|
123 |
+
|
124 |
+
We show some examples based on GLM model.
|
125 |
+
|
126 |
+
### Pretrain
|
127 |
+
Run the following script to pre-train the Bert model
|
128 |
+
```shell
|
129 |
+
cd examples/bert/
|
130 |
+
python quick_start.py
|
131 |
+
```
|
132 |
+
|
133 |
+
## CogView
|
134 |
+
### Pretrain
|
135 |
+
Run the following script to pre-train the cogview model
|
136 |
+
```shell
|
137 |
+
cd examples/cogview/
|
138 |
+
bash config/pretrain_multiple_nodes.sh
|
139 |
+
```
|
140 |
+
|
141 |
+
### inference
|
142 |
+
Run the following script to test the ability of text2image
|
143 |
+
```shell
|
144 |
+
cd examples/cogview/
|
145 |
+
bash config/text2image_cogview.sh
|
146 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|