Update README.md
Browse files
README.md
CHANGED
@@ -7,11 +7,11 @@ widget:
|
|
7 |
---
|
8 |
|
9 |
|
10 |
-
# Chinese GPT2 Model
|
11 |
|
12 |
## Model description
|
13 |
|
14 |
-
The model is used to generate Chinese lyrics. You can download the model
|
15 |
|
16 |
## How to use
|
17 |
|
@@ -26,11 +26,9 @@ You can use the model directly with a pipeline for text generation:
|
|
26 |
[{'generated_text': '最美的不是下雨天,是曾与你躲过雨的屋檐 , 下 课 铃 声 响 起 的 瞬 间 , 我 们 的 笑 脸 , 有 太 多 回 忆 在 浮 现 , 是 你 总 在 我 身 边 , 不 知 道 会 不 会 再 见 , 从 现 在 开 始 到 永 远 , 想 说 的 语 言 凝 结 成 一 句 , 不 管 我 们 是 否 能 够 兑 现 , 想 说 的 语 言 凝 结'}]
|
27 |
```
|
28 |
|
29 |
-
|
30 |
-
|
31 |
## Training data
|
32 |
|
33 |
-
Training data contains 150,000 Chinese lyrics which are collected by [Chinese-Lyric-Corpus](https://github.com/gaussic/Chinese-Lyric-Corpus) and [MusicLyricChatbot](https://github.com/liuhuanyong/MusicLyricChatbot)
|
34 |
|
35 |
## Training procedure
|
36 |
|
@@ -39,12 +37,12 @@ The model is pre-trained by [UER-py](https://github.com/dbiir/UER-py/) on [Tence
|
|
39 |
```
|
40 |
python3 preprocess.py --corpus_path corpora/lyric.txt \
|
41 |
--vocab_path models/google_zh_vocab.txt \
|
42 |
-
--dataset_path
|
43 |
-
--seq_length 512 --
|
44 |
```
|
45 |
|
46 |
```
|
47 |
-
python3 pretrain.py --dataset_path
|
48 |
--pretrained_model_path gpt2-base-chinese-cluecorpussmall/pytorch_model.bin\
|
49 |
--vocab_path models/google_zh_vocab.txt \
|
50 |
--output_model_path models/lyric_gpt2_seq512_model.bin \
|
|
|
7 |
---
|
8 |
|
9 |
|
10 |
+
# Chinese GPT2 Lyric Model
|
11 |
|
12 |
## Model description
|
13 |
|
14 |
+
The model is used to generate Chinese lyrics. You can download the model either from the [GPT2-Chinese Github page](https://github.com/Morizeyao/GPT2-Chinese), or via HuggingFace from the link [gpt2-chinese-lyric](https://huggingface.co/uer/gpt2-chinese-lyric)
|
15 |
|
16 |
## How to use
|
17 |
|
|
|
26 |
[{'generated_text': '最美的不是下雨天,是曾与你躲过雨的屋檐 , 下 课 铃 声 响 起 的 瞬 间 , 我 们 的 笑 脸 , 有 太 多 回 忆 在 浮 现 , 是 你 总 在 我 身 边 , 不 知 道 会 不 会 再 见 , 从 现 在 开 始 到 永 远 , 想 说 的 语 言 凝 结 成 一 句 , 不 管 我 们 是 否 能 够 兑 现 , 想 说 的 语 言 凝 结'}]
|
27 |
```
|
28 |
|
|
|
|
|
29 |
## Training data
|
30 |
|
31 |
+
Training data contains 150,000 Chinese lyrics which are collected by [Chinese-Lyric-Corpus](https://github.com/gaussic/Chinese-Lyric-Corpus) and [MusicLyricChatbot](https://github.com/liuhuanyong/MusicLyricChatbot).
|
32 |
|
33 |
## Training procedure
|
34 |
|
|
|
37 |
```
|
38 |
python3 preprocess.py --corpus_path corpora/lyric.txt \
|
39 |
--vocab_path models/google_zh_vocab.txt \
|
40 |
+
--dataset_path lyric_dataset.pt --processes_num 32 \
|
41 |
+
--seq_length 512 --target lm
|
42 |
```
|
43 |
|
44 |
```
|
45 |
+
python3 pretrain.py --dataset_path lyric_dataset.pt \
|
46 |
--pretrained_model_path gpt2-base-chinese-cluecorpussmall/pytorch_model.bin\
|
47 |
--vocab_path models/google_zh_vocab.txt \
|
48 |
--output_model_path models/lyric_gpt2_seq512_model.bin \
|