Add model
Browse files- README.md +20 -0
- config.json +34 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
license: apache-2.0
|
4 |
+
---
|
5 |
+
|
6 |
+
# realm-orqa-wq-openqa
|
7 |
+
|
8 |
+
## Model description
|
9 |
+
|
10 |
+
The REALM checkpoint finetuned with Web Questions(WQ) dataset, converted from the TF checkpoint provided by Google Language.
|
11 |
+
|
12 |
+
The original paper, code, and checkpoints can be found [here](https://github.com/google-research/language/tree/master/language/realm).
|
13 |
+
|
14 |
+
## Usage
|
15 |
+
|
16 |
+
```python
|
17 |
+
from transformers import RealmForOpenQA
|
18 |
+
|
19 |
+
openqa = RealmForOpenQA.from_pretrained("qqaatw/realm-orqa-wq-openqa")
|
20 |
+
```
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"RealmForOpenQA"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"bos_token_id": 0,
|
7 |
+
"eos_token_id": 2,
|
8 |
+
"hidden_act": "gelu_new",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 3072,
|
13 |
+
"layer_norm_eps": 1e-12,
|
14 |
+
"max_position_embeddings": 512,
|
15 |
+
"max_span_width": 10,
|
16 |
+
"model_type": "realm",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_block_records": 13353718,
|
19 |
+
"num_candidates": 8,
|
20 |
+
"num_hidden_layers": 12,
|
21 |
+
"pad_token_id": 1,
|
22 |
+
"reader_beam_size": 5,
|
23 |
+
"reader_layer_norm_eps": 0.001,
|
24 |
+
"reader_seq_len": 320,
|
25 |
+
"retriever_proj_size": 128,
|
26 |
+
"searcher_beam_size": 5000,
|
27 |
+
"searcher_seq_len": 64,
|
28 |
+
"span_hidden_size": 256,
|
29 |
+
"torch_dtype": "float32",
|
30 |
+
"transformers_version": "4.16.0.dev0",
|
31 |
+
"type_vocab_size": 2,
|
32 |
+
"use_cache": true,
|
33 |
+
"vocab_size": 30522
|
34 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d48e0d5bc3ac7053b10e4496e1ff88d2200ba83033f1ad62dd22398602217f93
|
3 |
+
size 7907625699
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": true, "do_basic_tokenize": true, "never_split": null, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "special_tokens_map_file": null, "name_or_path": "bert-base-uncased", "tokenizer_class": "RealmTokenizer"}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|