Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nlpzhezhao committed Feb 14, 2024
1 parent d8d5bf3 commit 69f4413
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mv models/book_review_model.bin-5000 models/book_review_model.bin
```
Notice that the model trained by *pretrain.py* is attacted with the suffix which records the training step (*--total_steps*). We could remove the suffix for ease of use.

Then we fine-tune the pre-trained model on downstream classification dataset. We use embedding and encoder layers of *book_review_model.bin*, which is the output of *pretrain.py*:
Then we fine-tune the pre-trained model on downstream classification dataset. We use embedding and encoder layers of [*book_review_model.bin*](https://share.weiyun.com/PnxMrRwZ), which is the output of *pretrain.py*:
```
python3 finetune/run_classifier.py --pretrained_model_path models/book_review_model.bin \
--vocab_path models/google_zh_vocab.txt \
Expand All @@ -132,7 +132,7 @@ python3 inference/run_classifier_infer.py --load_model_path models/finetuned_mod
```
*--test_path* specifies the path of the file to be predicted. The file should contain text_a column.
*--prediction_path* specifies the path of the file with prediction results.
We need to explicitly specify the number of labels by *--labels_num*. Douban book review is a two-way classification dataset.
We need to explicitly specify the number of labels by *--labels_num*. The above dataset is a two-way classification dataset.

<br>

Expand Down Expand Up @@ -188,7 +188,7 @@ UER-py/
```

The code is well-organized. Users can use and extend upon it with little efforts.
The code is organized based on components (e.g. embeddings, encoders). Users can use and extend upon it with little efforts.

Comprehensive examples of using UER can be found in :arrow_right: [__instructions__](https://github.com/dbiir/UER-py/wiki/Instructions) :arrow_left: , which help users quickly implement pre-training models such as BERT, GPT-2, ELMo, T5 and fine-tune pre-trained models on a range of downstream tasks.

Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mv models/book_review_model.bin-5000 models/book_review_model.bin
```
请注意,*pretrain.py*输出的模型会带有记录训练步数的后缀(*--total_steps*),这里我们可以删除后缀以方便使用。

然后,我们在下游分类数据集上微调预训练模型,我们使用 *pretrain.py* 的输出*book_review_model.bin*(加载词向量层和编码层参数):
然后,我们在下游分类数据集上微调预训练模型,我们使用 *pretrain.py* 的输出[*book_review_model.bin*](https://share.weiyun.com/PnxMrRwZ)(加载词向量层和编码层参数):
```
python3 finetune/run_classifier.py --pretrained_model_path models/book_review_model.bin \
--vocab_path models/google_zh_vocab.txt \
Expand Down

0 comments on commit 69f4413

Please sign in to comment.