Update
Browse files- README.md +23 -1
- pytorch_model.bin +1 -1
- tf_model.h5 +1 -1
README.md
CHANGED
@@ -34,7 +34,29 @@ You can use this model directly with a pipeline for masked language modeling:
|
|
34 |
```python
|
35 |
>>> from transformers import pipeline
|
36 |
>>> unmasker = pipeline('fill-mask', model='uer/roberta-base-word-chinese-cluecorpussmall')
|
37 |
-
>>> unmasker("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
```
|
39 |
|
40 |
BertTokenizer does not support sentencepiece, so we use AlbertTokenizer here.
|
|
|
34 |
```python
|
35 |
>>> from transformers import pipeline
|
36 |
>>> unmasker = pipeline('fill-mask', model='uer/roberta-base-word-chinese-cluecorpussmall')
|
37 |
+
>>> unmasker("[MASK]的首都是北京。")
|
38 |
+
[
|
39 |
+
{'sequence': '中国 的首都是北京。',
|
40 |
+
'score': 0.21525809168815613,
|
41 |
+
'token': 2873,
|
42 |
+
'token_str': '中国'},
|
43 |
+
{'sequence': '北京 的首都是北京。',
|
44 |
+
'score': 0.15194718539714813,
|
45 |
+
'token': 9502,
|
46 |
+
'token_str': '北京'},
|
47 |
+
{'sequence': '我们 的首都是北京。',
|
48 |
+
'score': 0.08854265511035919,
|
49 |
+
'token': 4215,
|
50 |
+
'token_str': '我们'},
|
51 |
+
{'sequence': '美国 的首都是北京。',
|
52 |
+
'score': 0.06808705627918243,
|
53 |
+
'token': 7810,
|
54 |
+
'token_str': '美国'},
|
55 |
+
{'sequence': '日本 的首都是北京。',
|
56 |
+
'score': 0.06071401759982109,
|
57 |
+
'token': 7788,
|
58 |
+
'token_str': '日本'}
|
59 |
+
]
|
60 |
```
|
61 |
|
62 |
BertTokenizer does not support sentencepiece, so we use AlbertTokenizer here.
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 651858439
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ca56f78443c548e0c270da2c9dcea1bdf7dae4e5e6eed60cbbc96d057cf29ea
|
3 |
size 651858439
|
tf_model.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 959243464
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5d8eb29e3ad99270ca2a3843743a1fb712b76a6083a8fd24324a2582360a7c87
|
3 |
size 959243464
|