ChaosW commited on
Commit
e80be70
1 Parent(s): 6258836

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -0
README.md CHANGED
@@ -1,3 +1,49 @@
1
  ---
 
 
 
2
  license: mit
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - zh
4
+
5
  license: mit
6
+
7
+ tags:
8
+ - RoBERTa
9
+
10
+ inference: true
11
+
12
+ widget:
13
+ - text: "生活的真谛是[MASK]。"
14
  ---
15
+
16
+ # autohome-roberta-base
17
+
18
+ ## 简介 Brief Introduction
19
+
20
+ 善于处理NLU任务,采用全词掩码的,中文版的0.97亿参数DeBERTa-v2-Base。
21
+
22
+ Good at solving NLU tasks, adopting Whole Word Masking, Chinese DeBERTa-v2-Base with 97M parameters.
23
+
24
+ ## 模型分类 Model Taxonomy
25
+
26
+ | 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
27
+ | :----: | :----: | :----: | :----: | :----: | :----: |
28
+ | 通用 General | 自然语言理解 NLU | RoBERTa | RoBERTa | 390M | 中文 Chinese |
29
+
30
+
31
+ ## 模型信息 Model Information
32
+
33
+ 参考论文:[RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692)
34
+
35
+ 为了得到一个中文版的autohome-roberta-base(390M),我们用autohome语料库(1.2G)进行二次预训练。我们在MLM中使用了全词掩码(wwm)的方式。具体地,我们在预训练阶段中使用了[transformers框架](https://github.com/huggingface/transformers)大概花费了4张A100约4小时。
36
+
37
+
38
+ ## 使用 Usage
39
+
40
+ ```python
41
+ from transformers import AutoModelForMaskedLM, AutoTokenizer, FillMaskPipeline
42
+ import torch
43
+
44
+ tokenizer=AutoTokenizer.from_pretrained('ChaosW/autohome-roberta-base')
45
+ model=AutoModelForMaskedLM.from_pretrained('ChaosW/autohome-roberta-base')
46
+ text = '生活的真谛是[MASK]。'
47
+ fillmask_pipe = FillMaskPipeline(model, tokenizer, device=0)
48
+ print(fillmask_pipe(text, top_k=10))
49
+ ```