Update README.md
Browse files
README.md
CHANGED
@@ -13,11 +13,11 @@ widget:
|
|
13 |
- text: "生活的真谛是[MASK]。"
|
14 |
---
|
15 |
|
16 |
-
# autohome-roberta-
|
17 |
|
18 |
## 简介 Brief Introduction
|
19 |
|
20 |
-
善于处理NLU任务,采用全词掩码的,中文版的1.1亿参数RoBERTa-
|
21 |
|
22 |
|
23 |
## 模型分类 Model Taxonomy
|
@@ -31,7 +31,7 @@ widget:
|
|
31 |
|
32 |
参考论文:[RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692)
|
33 |
|
34 |
-
为了得到一个中文版的autohome-roberta-large(
|
35 |
|
36 |
|
37 |
## 使用 Usage
|
@@ -40,8 +40,8 @@ widget:
|
|
40 |
from transformers import AutoModelForMaskedLM, AutoTokenizer, FillMaskPipeline
|
41 |
import torch
|
42 |
|
43 |
-
tokenizer=AutoTokenizer.from_pretrained('ChaosW/autohome-roberta-
|
44 |
-
model=AutoModelForMaskedLM.from_pretrained('ChaosW/autohome-roberta-
|
45 |
text = '生活的真谛是[MASK]。'
|
46 |
fillmask_pipe = FillMaskPipeline(model, tokenizer, device=0)
|
47 |
print(fillmask_pipe(text, top_k=10))
|
|
|
13 |
- text: "生活的真谛是[MASK]。"
|
14 |
---
|
15 |
|
16 |
+
# autohome-roberta-large
|
17 |
|
18 |
## 简介 Brief Introduction
|
19 |
|
20 |
+
善于处理NLU任务,采用全词掩码的,中文版的1.1亿参数RoBERTa-large。
|
21 |
|
22 |
|
23 |
## 模型分类 Model Taxonomy
|
|
|
31 |
|
32 |
参考论文:[RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692)
|
33 |
|
34 |
+
为了得到一个中文版的autohome-roberta-large(390M),我们用autohome口碑板块语料库(1.2G)进行二次预训练。我们在MLM中使用了全词掩码(wwm)的方式。具体地,我们在二次预训练阶段中使用了[transformers框架](https://github.com/huggingface/transformers)大概花费了4张A100约11小时。
|
35 |
|
36 |
|
37 |
## 使用 Usage
|
|
|
40 |
from transformers import AutoModelForMaskedLM, AutoTokenizer, FillMaskPipeline
|
41 |
import torch
|
42 |
|
43 |
+
tokenizer=AutoTokenizer.from_pretrained('ChaosW/autohome-roberta-large')
|
44 |
+
model=AutoModelForMaskedLM.from_pretrained('ChaosW/autohome-roberta-large')
|
45 |
text = '生活的真谛是[MASK]。'
|
46 |
fillmask_pipe = FillMaskPipeline(model, tokenizer, device=0)
|
47 |
print(fillmask_pipe(text, top_k=10))
|