update model and readme
Browse files- README.md +40 -0
- config.json +4 -5
- pytorch_model.bin +2 -2
- tokenizer_config.json +1 -1
README.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
tags:
|
4 |
+
- bart
|
5 |
+
- distractor
|
6 |
+
- generation
|
7 |
+
- seq2seq
|
8 |
+
datasets:
|
9 |
+
- race
|
10 |
+
metrics:
|
11 |
+
- bleu
|
12 |
+
- rouge
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
widget:
|
15 |
+
- text: "When you ' re having a holiday , one of the main questions to ask is which hotel or apartment to choose . However , when it comes to France , you have another special choice : treehouses . In France , treehouses are offered to travelers as a new choice in many places . The price may be a little higher , but you do have a chance to _ your childhood memories . Alain Laurens , one of France ' s top treehouse designers , said , ' Most of the people might have the experience of building a den when they were young . And they like that feeling of freedom when they are children . ' Its fairy - tale style gives travelers a special feeling . It seems as if they are living as a forest king and enjoying the fresh air in the morning . Another kind of treehouse is the ' star cube ' . It gives travelers the chance of looking at the stars shining in the sky when they are going to sleep . Each ' star cube ' not only offers all the comfortable things that a hotel provides for travelers , but also gives them a chance to look for stars by using a telescope . The glass roof allows you to look at the stars from your bed . </s> The passage mainly tells us </s> treehouses in france."
|
16 |
+
---
|
17 |
+
# bart-distractor-generation
|
18 |
+
|
19 |
+
## Model description
|
20 |
+
|
21 |
+
This model is a sequence-to-sequence distractor generator which takes an answer, question and context as an input, and generates a distractor as an output. It is based on a pretrained `bart-base` model.
|
22 |
+
For details, please see https://github.com/voidful/BDG.
|
23 |
+
|
24 |
+
## Intended uses & limitations
|
25 |
+
|
26 |
+
The model is trained to generate examinations-style multiple choice distractor. The model performs best with full sentence answers.
|
27 |
+
|
28 |
+
#### How to use
|
29 |
+
|
30 |
+
The model takes concatenated context, question and answers as an input sequence, and will generate a full distractor sentence as an output sequence. The max sequence length is 1024 tokens. Inputs should be organised into the following format:
|
31 |
+
```
|
32 |
+
context </s> question </s> answer
|
33 |
+
```
|
34 |
+
The input sequence can then be encoded and passed as the `input_ids` argument in the model's `generate()` method.
|
35 |
+
|
36 |
+
For details, please see https://github.com/voidful/BDG.
|
37 |
+
|
38 |
+
#### Limitations and bias
|
39 |
+
|
40 |
+
The model is limited to generating distractor in the same style as those found in [RACE](https://www.aclweb.org/anthology/D17-1082/). The generated distractors can potentially be leading or reflect biases that are present in the context. If the context is too short or completely absent, or if the context, question and answer do not match, the generated distractor is likely to be incoherent.
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "bart-
|
3 |
"activation_dropout": 0.1,
|
4 |
"activation_function": "gelu",
|
5 |
"add_bias_logits": false,
|
@@ -17,7 +17,6 @@
|
|
17 |
"decoder_layerdrop": 0.0,
|
18 |
"decoder_layers": 6,
|
19 |
"decoder_start_token_id": 2,
|
20 |
-
"do_blenderbot_90_layernorm": false,
|
21 |
"dropout": 0.1,
|
22 |
"early_stopping": true,
|
23 |
"encoder_attention_heads": 12,
|
@@ -25,8 +24,8 @@
|
|
25 |
"encoder_layerdrop": 0.0,
|
26 |
"encoder_layers": 6,
|
27 |
"eos_token_id": 2,
|
28 |
-
"
|
29 |
-
"
|
30 |
"id2label": {
|
31 |
"0": "LABEL_0",
|
32 |
"1": "LABEL_1",
|
@@ -48,7 +47,6 @@
|
|
48 |
"num_hidden_layers": 6,
|
49 |
"pad_token_id": 1,
|
50 |
"scale_embedding": false,
|
51 |
-
"static_position_embeddings": false,
|
52 |
"task_specific_params": {
|
53 |
"summarization": {
|
54 |
"length_penalty": 1.0,
|
@@ -70,6 +68,7 @@
|
|
70 |
}
|
71 |
},
|
72 |
"tie_word_embeddings": false,
|
|
|
73 |
"use_cache": true,
|
74 |
"vocab_size": 50265
|
75 |
}
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "facebook/bart-base",
|
3 |
"activation_dropout": 0.1,
|
4 |
"activation_function": "gelu",
|
5 |
"add_bias_logits": false,
|
|
|
17 |
"decoder_layerdrop": 0.0,
|
18 |
"decoder_layers": 6,
|
19 |
"decoder_start_token_id": 2,
|
|
|
20 |
"dropout": 0.1,
|
21 |
"early_stopping": true,
|
22 |
"encoder_attention_heads": 12,
|
|
|
24 |
"encoder_layerdrop": 0.0,
|
25 |
"encoder_layers": 6,
|
26 |
"eos_token_id": 2,
|
27 |
+
"forced_eos_token_id": 2,
|
28 |
+
"gradient_checkpointing": false,
|
29 |
"id2label": {
|
30 |
"0": "LABEL_0",
|
31 |
"1": "LABEL_1",
|
|
|
47 |
"num_hidden_layers": 6,
|
48 |
"pad_token_id": 1,
|
49 |
"scale_embedding": false,
|
|
|
50 |
"task_specific_params": {
|
51 |
"summarization": {
|
52 |
"length_penalty": 1.0,
|
|
|
68 |
}
|
69 |
},
|
70 |
"tie_word_embeddings": false,
|
71 |
+
"transformers_version": "4.4.2",
|
72 |
"use_cache": true,
|
73 |
"vocab_size": 50265
|
74 |
}
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a918cd9f2549427e4d15a4ab2fd59ad639712f998efacfc3fbae98cb01602954
|
3 |
+
size 712397891
|
tokenizer_config.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "model_max_length": 1024, "name_or_path": "facebook/bart-base"}
|
|
|
1 |
+
{"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "facebook/bart-base"}
|