uer commited on
Commit
62fc2e8
1 Parent(s): dd3e938

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -9
README.md CHANGED
@@ -5,11 +5,13 @@ widget:
5
 
6
  ---
7
 
 
8
  # Chinese Couplet GPT2 Model
9
 
 
10
  ## Model description
11
 
12
- The model is used to generate Chinese couplets. 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-couplet][couplet].
13
 
14
  Since the parameter skip_special_tokens is used in the pipelines.py, special tokens such as [SEP], [UNK] will be deleted, the output results of Hosted inference API (right) may not be properly displayed..
15
 
@@ -51,7 +53,7 @@ The model is pre-trained by [UER-py](https://github.com/dbiir/UER-py/) on [Tence
51
  python3 preprocess.py --corpus_path corpora/couplet.txt \
52
  --vocab_path models/google_zh_vocab.txt \
53
  --dataset_path couplet_dataset.pt --processes_num 16 \
54
- --seq_length 64 --target lm
55
  ```
56
 
57
  ```
@@ -61,10 +63,7 @@ python3 pretrain.py --dataset_path couplet_dataset.pt \
61
  --output_model_path models/couplet_gpt2_model.bin \
62
  --world_size 8 --gpu_ranks 0 1 2 3 4 5 6 7 \
63
  --total_steps 25000 --save_checkpoint_steps 5000 --report_steps 1000 \
64
- --learning_rate 5e-4 --batch_size 64 \
65
- --embedding word_pos --remove_embedding_layernorm \
66
- --encoder transformer --mask causal --layernorm_positioning pre \
67
- --target lm --tie_weights
68
  ```
69
 
70
  Finally, we convert the pre-trained model into Huggingface's format:
@@ -90,6 +89,4 @@ python3 scripts/convert_gpt2_from_uer_to_huggingface.py --input_model_path coupl
90
  pages={241},
91
  year={2019}
92
  }
93
- ```
94
-
95
- [couplet]: https://huggingface.co/uer/gpt2-chinese-couplet
 
5
 
6
  ---
7
 
8
+
9
  # Chinese Couplet GPT2 Model
10
 
11
+
12
  ## Model description
13
 
14
+ The model is used to generate Chinese couplets. 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-couplet](https://huggingface.co/uer/gpt2-chinese-couplet).
15
 
16
  Since the parameter skip_special_tokens is used in the pipelines.py, special tokens such as [SEP], [UNK] will be deleted, the output results of Hosted inference API (right) may not be properly displayed..
17
 
 
53
  python3 preprocess.py --corpus_path corpora/couplet.txt \
54
  --vocab_path models/google_zh_vocab.txt \
55
  --dataset_path couplet_dataset.pt --processes_num 16 \
56
+ --seq_length 64 --data_processor lm
57
  ```
58
 
59
  ```
 
63
  --output_model_path models/couplet_gpt2_model.bin \
64
  --world_size 8 --gpu_ranks 0 1 2 3 4 5 6 7 \
65
  --total_steps 25000 --save_checkpoint_steps 5000 --report_steps 1000 \
66
+ --learning_rate 5e-4 --batch_size 64
 
 
 
67
  ```
68
 
69
  Finally, we convert the pre-trained model into Huggingface's format:
 
89
  pages={241},
90
  year={2019}
91
  }
92
+ ```