Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pre-Training] Add tutorial for clue small 14g dataset #1555

Merged
merged 9 commits into from
Jan 15, 2022

Conversation

ZHUI
Copy link
Collaborator

@ZHUI ZHUI commented Jan 4, 2022

PR types

Others

PR changes

Docs

Description

Add tutorial for clue small 14g dataset

@@ -131,7 +131,7 @@ chinese words:
可选。是否需要WWM策略。一般而言,Bert/Ernie模型需要,GPT不需要。
--cn_seg_func {lac,seg,jieba}
Words segment function for chinese words.
默认lac,jieba速度较快
默认jieba,jieba速度较快,lac模型更复杂。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复杂这个形容词标书不准确。
应该是lac分词模型更加准确,但计算量更高。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

examples/language_model/data_tools/README.md Outdated Show resolved Hide resolved
包含如下子语料库(总共14G语料):新闻语料 news2016zh_corpus, 社区互动语料webText2019zh_corpus,维基百科语料wiki2019zh_corpus,评论数据-语料comments2019zh_corpus。

**数据集下载**:
用户可以通过官方githu网页下载,https://github.com/CLUEbenchmark/CLUE 。同时,为方便用户,我们也提供了aistudio数据集下载地址。[part1](https://aistudio.baidu.com/aistudio/datasetdetail/60598),[part2](https://aistudio.baidu.com/aistudio/datasetdetail/124357)。使用aistudio版本的数据,下载好后,可以核对md5值:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github,少了b

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

paddlenlp/transformers/ernie/modeling.py Show resolved Hide resolved
@ZHUI ZHUI requested a review from ZeyuChen January 5, 2022 06:08
@ZHUI ZHUI requested a review from wawltor January 5, 2022 13:32
@ZHUI ZHUI mentioned this pull request Jan 6, 2022
6 tasks
Copy link
Member

@ZeyuChen ZeyuChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体确认下官方名称,另外这部分预训练流程是否跟ernie-1.0的训练脚本合并呢?

@@ -0,0 +1,48 @@
# 详细介绍
本权重为使用PaddleNLP提供的ernie预训练教程,在clue corpus small 14g数据集上训练得到的权重。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ernie -> ERNIE 文档书写要区分模型官方名和api的参数名,正式名称是ERNIE/ERNIE-1.0
clue corpus small 14g. 使用正式名称

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

```python
import paddle
from paddlenlp.transformers import ErnieForMaskedLM, ErnieTokenizer
tokenizer = ErnieTokenizer.from_pretrained('zhui/cluecorpussmall_ernie-1.0')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称改为ernie-1.0-cluecorpus2020?

double confirm下使用的语料官方名称是否角CLUECOrpus2020
https://github.com/CLUEbenchmark/CLUE

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/CLUEbenchmark/CLUECorpus2020
CLUECorpus2020 是100G的数据,需要申请,咱们使用的是 CLUECorpusSmall 只有14G。是两份不同数据。

我修改为ernie-1.0-cluecorpussmall

@@ -82,6 +82,32 @@ python -u -m paddle.distributed.launch \
- 一般而言, `global_batch_size = micro_batch_size * sharding_degree * dp_degree`。可以使用梯度累积的方式增大`global_batch_size`。设置`global_batch_size`为理论值的整数倍是,默认启用梯度累积。
- 训练断点重启,直接启动即可,程序会找到最新的checkpoint,开始重启训练。


### Clue corpus small 数据集训练结果
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLUECorpus2020 Small?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ZHUI
Copy link
Collaborator Author

ZHUI commented Jan 13, 2022

整体确认下官方名称,另外这部分预训练流程是否跟ernie-1.0的训练脚本合并呢?

数据集应为CLUECorpusSmall 共14G。另CLUECorpus2020 100G未开放下载。

是指的CLUECorpusSmall数处理流程,和ernie-1.0训练脚本文档合并一起吗?

@ZeyuChen
Copy link
Member

整体确认下官方名称,另外这部分预训练流程是否跟ernie-1.0的训练脚本合并呢?

数据集应为CLUECorpusSmall 共14G。另CLUECorpus2020 100G未开放下载。

是指的CLUECorpusSmall数处理流程,和ernie-1.0训练脚本文档合并一起吗?

是的,是否作为ERNIE-1.0默认的数据训练流程?

Copy link
Member

@ZeyuChen ZeyuChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZeyuChen ZeyuChen merged commit a5f8a3e into PaddlePaddle:develop Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants