thefrigidliquidation
commited on
Commit
•
44baf79
1
Parent(s):
ed8ce5c
Add model
Browse files- README.md +43 -0
- config.json +27 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
- vocab.json +0 -0
README.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1 |
---
|
|
|
|
|
|
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language: en
|
3 |
+
tags:
|
4 |
+
- roberta
|
5 |
license: mit
|
6 |
---
|
7 |
+
|
8 |
+
# RoBERTa base model fine-tuned on pronoun fill masking
|
9 |
+
|
10 |
+
This is RoBERTa base fine-tuned for fill masking of just pronouns.
|
11 |
+
The model's purpose is to post process machine translated text where sentence
|
12 |
+
level translation may not have enough context to correctly deduce the correct
|
13 |
+
pronoun to use.
|
14 |
+
|
15 |
+
This model was trained on 10B tokens of literature (private light novel and book dataset as well as books1 and 20\% of books3 from The Pile).
|
16 |
+
|
17 |
+
This model achieves an 88\% top1 accuracy, evaluated with a sliding window of 512 tokens (84\% without a sliding window).
|
18 |
+
|
19 |
+
### How to use
|
20 |
+
|
21 |
+
Mask *all* pronoun tokens. The use the fill mask pipeline to get the
|
22 |
+
model's predictions.
|
23 |
+
|
24 |
+
```python
|
25 |
+
PRONOUN_TOKENS = {
|
26 |
+
'I', 'ĠI',
|
27 |
+
'you', 'You', 'Ġyou', 'ĠYou',
|
28 |
+
'he', 'He', 'Ġhe', 'ĠHe',
|
29 |
+
'she', 'She', 'Ġshe', 'ĠShe',
|
30 |
+
'it', 'It', 'Ġit', 'ĠIt',
|
31 |
+
'we', 'We', 'Ġwe', 'ĠWe',
|
32 |
+
'they', 'They', 'Ġthey', 'ĠThey',
|
33 |
+
'my', 'My', 'Ġmy', 'ĠMy',
|
34 |
+
'your', 'Your', 'Ġyour', 'ĠYour',
|
35 |
+
'his', 'His', 'Ġhis', 'ĠHis',
|
36 |
+
'her', 'Her', 'Ġher', 'ĠHer',
|
37 |
+
'its', 'Its', 'Ġits', 'ĠIts',
|
38 |
+
'our', 'Our', 'Ġour', 'ĠOur',
|
39 |
+
'their', 'Their', 'Ġtheir', 'ĠTheir',
|
40 |
+
'mine', 'Mine', 'Ġmine', 'ĠMine',
|
41 |
+
'yours', 'Yours', 'Ġyours', 'ĠYours',
|
42 |
+
'hers', 'Hers', 'Ġhers', 'ĠHers',
|
43 |
+
'ours', 'Ours', 'Ġours', 'ĠOurs',
|
44 |
+
'theirs', 'Theirs', 'Ġtheirs', 'ĠTheirs',
|
45 |
+
}
|
46 |
+
```
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "roberta-base",
|
3 |
+
"architectures": [
|
4 |
+
"RobertaForMaskedLM"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 514,
|
17 |
+
"model_type": "roberta",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 1,
|
21 |
+
"position_embedding_type": "absolute",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.22.0.dev0",
|
24 |
+
"type_vocab_size": 1,
|
25 |
+
"use_cache": false,
|
26 |
+
"vocab_size": 50265
|
27 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:735e1a4d31dcc652dcf1619c1a589aead87e6b3cd73be4ed1df2b15b9ee06a13
|
3 |
+
size 498863417
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"bos_token": "<s>",
|
4 |
+
"cls_token": "<s>",
|
5 |
+
"eos_token": "</s>",
|
6 |
+
"errors": "replace",
|
7 |
+
"mask_token": "<mask>",
|
8 |
+
"model_max_length": 512,
|
9 |
+
"name_or_path": "roberta-base",
|
10 |
+
"pad_token": "<pad>",
|
11 |
+
"sep_token": "</s>",
|
12 |
+
"special_tokens_map_file": null,
|
13 |
+
"tokenizer_class": "RobertaTokenizer",
|
14 |
+
"trim_offsets": true,
|
15 |
+
"unk_token": "<unk>"
|
16 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|