rightyonghu
commited on
Commit
•
c7cad4d
1
Parent(s):
785e6ea
init
Browse files- README.md +35 -1
- config.json +20 -0
- pytorch_model.bin +3 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,37 @@
|
|
1 |
---
|
2 |
-
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language: zh
|
3 |
---
|
4 |
+
|
5 |
+
# ERNIE-3.0-xbase-zh
|
6 |
+
|
7 |
+
## Introduction
|
8 |
+
|
9 |
+
ERNIE 3.0: Large-scale Knowledge Enhanced Pre-training for Language Understanding and Generation
|
10 |
+
More detail: https://arxiv.org/abs/2107.02137
|
11 |
+
|
12 |
+
## Released Model Info
|
13 |
+
|
14 |
+
This released pytorch model is converted from the officially released PaddlePaddle ERNIE model and
|
15 |
+
a series of experiments have been conducted to check the accuracy of the conversion.
|
16 |
+
|
17 |
+
- Official PaddlePaddle ERNIE repo:https://paddlenlp.readthedocs.io/zh/latest/model_zoo/transformers/ERNIE/contents.html
|
18 |
+
- Pytorch Conversion repo: https://github.com/nghuyong/ERNIE-Pytorch
|
19 |
+
|
20 |
+
## How to use
|
21 |
+
```Python
|
22 |
+
from transformers import BertTokenizer, ErnieModel
|
23 |
+
|
24 |
+
tokenizer = BertTokenizer.from_pretrained("nghuyong/ernie-3.0-xbase-zh")
|
25 |
+
model = ErnieModel.from_pretrained("nghuyong/ernie-3.0-xbase-zh")
|
26 |
+
```
|
27 |
+
|
28 |
+
## Citation
|
29 |
+
|
30 |
+
```bibtex
|
31 |
+
@article{sun2021ernie,
|
32 |
+
title={Ernie 3.0: Large-scale knowledge enhanced pre-training for language understanding and generation},
|
33 |
+
author={Sun, Yu and Wang, Shuohuan and Feng, Shikun and Ding, Siyu and Pang, Chao and Shang, Junyuan and Liu, Jiaxiang and Chen, Xuyi and Zhao, Yanbin and Lu, Yuxiang and others},
|
34 |
+
journal={arXiv preprint arXiv:2107.02137},
|
35 |
+
year={2021}
|
36 |
+
}
|
37 |
+
```
|
config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"attention_probs_dropout_prob": 0.1,
|
3 |
+
"hidden_act": "gelu",
|
4 |
+
"hidden_dropout_prob": 0.1,
|
5 |
+
"intermediate_size": 4096,
|
6 |
+
"hidden_size": 1024,
|
7 |
+
"initializer_range": 0.02,
|
8 |
+
"max_position_embeddings": 2048,
|
9 |
+
"num_attention_heads": 16,
|
10 |
+
"num_hidden_layers": 20,
|
11 |
+
"task_type_vocab_size": 16,
|
12 |
+
"type_vocab_size": 4,
|
13 |
+
"use_task_id": true,
|
14 |
+
"vocab_size": 40000,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"model_type": "ernie",
|
17 |
+
"architectures": [
|
18 |
+
"ErnieForMaskedLM"
|
19 |
+
]
|
20 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f75c345d47c02d321acd1a7b90f184a803fd9481c09f3b5e705cfd134d728b1d
|
3 |
+
size 1188688423
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|