rightyonghu commited on
Commit
678a303
1 Parent(s): 8e854f8
Files changed (3) hide show
  1. README.md +2 -9
  2. config.json +2 -2
  3. pytorch_model.bin +2 -2
README.md CHANGED
@@ -18,18 +18,11 @@ a series of experiments have been conducted to check the accuracy of the convers
18
  - Pytorch Conversion repo: https://github.com/nghuyong/ERNIE-Pytorch
19
 
20
  ## How to use
21
- If you want to use ernie-3.0 series models, you need to add `task_type_id` to BERT model following this [MR](https://github.com/huggingface/transformers/pull/18686/files)
22
- **OR** you can re-install the transformers from my changed branch.
23
- ```bash
24
- pip uninstall transformers # optional
25
- pip install git+https://github.com/nghuyong/transformers@add_task_type_id # reinstall
26
- ```
27
- Then you can load ERNIE-3.0 model as before:
28
  ```Python
29
- from transformers import BertTokenizer, BertModel
30
 
31
  tokenizer = BertTokenizer.from_pretrained("nghuyong/ernie-3.0-mini-zh")
32
- model = BertModel.from_pretrained("nghuyong/ernie-3.0-mini-zh")
33
  ```
34
 
35
  ## Citation
 
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-mini-zh")
25
+ model = ErnieModel.from_pretrained("nghuyong/ernie-3.0-mini-zh")
26
  ```
27
 
28
  ## Citation
config.json CHANGED
@@ -13,8 +13,8 @@
13
  "use_task_id": true,
14
  "vocab_size": 40000,
15
  "layer_norm_eps": 1e-05,
16
- "model_type": "bert",
17
  "architectures": [
18
- "BertModel"
19
  ]
20
  }
 
13
  "use_task_id": true,
14
  "vocab_size": 40000,
15
  "layer_norm_eps": 1e-05,
16
+ "model_type": "ernie",
17
  "architectures": [
18
+ "ErnieModel"
19
  ]
20
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4bd8aa94b5d744d8fa6ac8988b5f96bce3d9df5e729cf4315d77baa98b1095f3
3
- size 107238517
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5ed30a38a7708656b2eb552ddeb58c787f82ab4cd6ed2a6258cdd2406e88150
3
+ size 107238645