Upload folder using huggingface_hub
Browse files
app1.py
CHANGED
@@ -51,7 +51,7 @@ iface = gr.Interface(
|
|
51 |
inputs=[
|
52 |
gr.Textbox(label="Query", placeholder="Type your query here..."),
|
53 |
gr.Textbox(label="Context", placeholder="Provide the context here...", lines=10),
|
54 |
-
gr.Radio(choices=["Base", "Large"], label="Model Choice")
|
55 |
],
|
56 |
outputs=gr.Textbox(label="Answer"),
|
57 |
title="Retrospective Reader Demo",
|
|
|
51 |
inputs=[
|
52 |
gr.Textbox(label="Query", placeholder="Type your query here..."),
|
53 |
gr.Textbox(label="Context", placeholder="Provide the context here...", lines=10),
|
54 |
+
gr.Radio(choices=["Electra Base", "Electra Large", "Roberta", "DistilBERT"], label="Model Choice")
|
55 |
],
|
56 |
outputs=gr.Textbox(label="Answer"),
|
57 |
title="Retrospective Reader Demo",
|
configs/inference_en_distilbert.yaml
CHANGED
@@ -26,13 +26,13 @@ RetroDataModelArguments:
|
|
26 |
sketch_revision: en-distilbert-sketch
|
27 |
sketch_model_name: faori/retro_reeader
|
28 |
# sketch_model_mode: transfer
|
29 |
-
sketch_architectures:
|
30 |
|
31 |
# IntensiveModelArguments
|
32 |
intensive_revision: en-distilbert-intensive1
|
33 |
intensive_model_name: faori/retro_reeader
|
34 |
# intensive_model_mode: transfer
|
35 |
-
intensive_architectures:
|
36 |
|
37 |
|
38 |
TrainingArguments:
|
|
|
26 |
sketch_revision: en-distilbert-sketch
|
27 |
sketch_model_name: faori/retro_reeader
|
28 |
# sketch_model_mode: transfer
|
29 |
+
sketch_architectures: DistilBertForSequenceClassification
|
30 |
|
31 |
# IntensiveModelArguments
|
32 |
intensive_revision: en-distilbert-intensive1
|
33 |
intensive_model_name: faori/retro_reeader
|
34 |
# intensive_model_mode: transfer
|
35 |
+
intensive_architectures: DistilBertForQuestionAnsweringAVPool
|
36 |
|
37 |
|
38 |
TrainingArguments:
|
configs/inference_en_roberta.yaml
CHANGED
@@ -25,19 +25,17 @@ RetroDataModelArguments:
|
|
25 |
# SketchModelArguments
|
26 |
sketch_revision: en-roberta-sketch
|
27 |
sketch_model_name: faori/retro_reeader
|
28 |
-
|
29 |
-
sketch_architectures: ElectraForSequenceClassification
|
30 |
|
31 |
# IntensiveModelArguments
|
32 |
intensive_revision: en-roberta-intensive
|
33 |
intensive_model_name: faori/retro_reeader
|
34 |
-
|
35 |
-
intensive_architectures: ElectraForQuestionAnsweringAVPool
|
36 |
|
37 |
|
38 |
TrainingArguments:
|
39 |
output_dir: outputs
|
40 |
no_cuda: True # If you want to use cuda,
|
41 |
-
|
42 |
per_device_train_batch_size: 1
|
43 |
per_device_eval_batch_size: 12
|
|
|
25 |
# SketchModelArguments
|
26 |
sketch_revision: en-roberta-sketch
|
27 |
sketch_model_name: faori/retro_reeader
|
28 |
+
sketch_architectures: RobertaForSequenceClassification
|
|
|
29 |
|
30 |
# IntensiveModelArguments
|
31 |
intensive_revision: en-roberta-intensive
|
32 |
intensive_model_name: faori/retro_reeader
|
33 |
+
intensive_architectures: RobertaForQuestionAnsweringAVPool
|
|
|
34 |
|
35 |
|
36 |
TrainingArguments:
|
37 |
output_dir: outputs
|
38 |
no_cuda: True # If you want to use cuda,
|
39 |
+
# change `no_cuda` to False and `fp16` to True
|
40 |
per_device_train_batch_size: 1
|
41 |
per_device_eval_batch_size: 12
|
outputs/intensive/nbest_predictions.json
CHANGED
@@ -1,130 +1,130 @@
|
|
1 |
{
|
2 |
"id-01": [
|
3 |
{
|
4 |
-
"start_logit":
|
5 |
-
"end_logit":
|
6 |
"text": "late 1990s",
|
7 |
-
"probability": 0.
|
8 |
},
|
9 |
{
|
10 |
-
"start_logit":
|
11 |
-
"end_logit":
|
12 |
-
"text": "1990s",
|
13 |
-
"probability": 0.
|
14 |
},
|
15 |
{
|
16 |
-
"start_logit":
|
17 |
-
"end_logit":
|
18 |
"text": "the late 1990s",
|
19 |
-
"probability": 0.
|
20 |
-
},
|
21 |
-
{
|
22 |
-
"start_logit": 1.743208646774292,
|
23 |
-
"end_logit": 5.520893096923828,
|
24 |
-
"text": "in the late 1990s",
|
25 |
-
"probability": 0.020471150055527687
|
26 |
},
|
27 |
{
|
28 |
-
"start_logit":
|
29 |
-
"end_logit":
|
30 |
-
"text": "
|
31 |
-
"probability": 0.
|
32 |
},
|
33 |
{
|
34 |
-
"start_logit":
|
35 |
-
"end_logit":
|
36 |
"text": "late 1990s as lead singer of R&B girl-group Destiny's Child.",
|
37 |
-
"probability":
|
38 |
},
|
39 |
{
|
40 |
-
"start_logit":
|
41 |
-
"end_logit": -
|
42 |
"text": "late 1990s as lead singer of R&B girl-group Destiny's Child",
|
43 |
-
"probability":
|
44 |
},
|
45 |
{
|
46 |
-
"start_logit":
|
47 |
-
"end_logit":
|
48 |
-
"text": "
|
49 |
-
"probability":
|
50 |
},
|
51 |
{
|
52 |
-
"start_logit": -
|
53 |
-
"end_logit":
|
54 |
-
"text": "fame in the late 1990s",
|
55 |
-
"probability":
|
56 |
},
|
57 |
{
|
58 |
-
"start_logit":
|
59 |
-
"end_logit": -
|
60 |
"text": "late 1990s as",
|
61 |
-
"probability":
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
},
|
63 |
{
|
64 |
-
"start_logit":
|
65 |
-
"end_logit": -
|
66 |
-
"text": "late 1990s as lead singer",
|
67 |
-
"probability":
|
68 |
},
|
69 |
{
|
70 |
-
"start_logit":
|
71 |
-
"end_logit":
|
72 |
-
"text": "the late",
|
73 |
-
"probability":
|
74 |
},
|
75 |
{
|
76 |
-
"start_logit":
|
77 |
-
"end_logit":
|
78 |
-
"text": "1990s as lead singer of R&B girl-group Destiny's Child.",
|
79 |
-
"probability":
|
80 |
},
|
81 |
{
|
82 |
-
"start_logit":
|
83 |
-
"end_logit": -
|
84 |
-
"text": "1990s as lead singer of R&B girl-group Destiny's Child",
|
85 |
-
"probability":
|
86 |
},
|
87 |
{
|
88 |
-
"start_logit":
|
89 |
-
"end_logit": -3.
|
90 |
-
"text": "
|
91 |
-
"probability":
|
92 |
},
|
93 |
{
|
94 |
-
"start_logit":
|
95 |
-
"end_logit": -
|
96 |
-
"text": "1990s as",
|
97 |
-
"probability":
|
98 |
},
|
99 |
{
|
100 |
-
"start_logit":
|
101 |
-
"end_logit": -
|
102 |
-
"text": "
|
103 |
-
"probability":
|
104 |
},
|
105 |
{
|
106 |
-
"start_logit":
|
107 |
-
"end_logit":
|
108 |
-
"text": "
|
109 |
-
"probability":
|
110 |
},
|
111 |
{
|
112 |
-
"start_logit":
|
113 |
-
"end_logit": -
|
114 |
-
"text": "the late
|
115 |
-
"probability":
|
116 |
},
|
117 |
{
|
118 |
-
"start_logit":
|
119 |
-
"end_logit": -4.
|
120 |
-
"text": "
|
121 |
-
"probability":
|
122 |
},
|
123 |
{
|
124 |
-
"start_logit": -
|
125 |
-
"end_logit": -
|
126 |
"text": "",
|
127 |
-
"probability":
|
128 |
}
|
129 |
]
|
130 |
}
|
|
|
1 |
{
|
2 |
"id-01": [
|
3 |
{
|
4 |
+
"start_logit": 7.999092102050781,
|
5 |
+
"end_logit": 8.703618049621582,
|
6 |
"text": "late 1990s",
|
7 |
+
"probability": 0.9145709276199341
|
8 |
},
|
9 |
{
|
10 |
+
"start_logit": 4.969649791717529,
|
11 |
+
"end_logit": 8.703618049621582,
|
12 |
+
"text": "in the late 1990s",
|
13 |
+
"probability": 0.04421274736523628
|
14 |
},
|
15 |
{
|
16 |
+
"start_logit": 4.745737075805664,
|
17 |
+
"end_logit": 8.703618049621582,
|
18 |
"text": "the late 1990s",
|
19 |
+
"probability": 0.035343021154403687
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
},
|
21 |
{
|
22 |
+
"start_logit": 2.846527338027954,
|
23 |
+
"end_logit": 8.703618049621582,
|
24 |
+
"text": "1990s",
|
25 |
+
"probability": 0.005290384404361248
|
26 |
},
|
27 |
{
|
28 |
+
"start_logit": 7.999092102050781,
|
29 |
+
"end_logit": 0.42595237493515015,
|
30 |
"text": "late 1990s as lead singer of R&B girl-group Destiny's Child.",
|
31 |
+
"probability": 0.00023241978487931192
|
32 |
},
|
33 |
{
|
34 |
+
"start_logit": 7.999092102050781,
|
35 |
+
"end_logit": -0.1830665022134781,
|
36 |
"text": "late 1990s as lead singer of R&B girl-group Destiny's Child",
|
37 |
+
"probability": 0.00012640953355003148
|
38 |
},
|
39 |
{
|
40 |
+
"start_logit": 7.999092102050781,
|
41 |
+
"end_logit": -0.7555239200592041,
|
42 |
+
"text": "late",
|
43 |
+
"probability": 7.13123517925851e-05
|
44 |
},
|
45 |
{
|
46 |
+
"start_logit": -1.9773104190826416,
|
47 |
+
"end_logit": 8.703618049621582,
|
48 |
+
"text": "rose to fame in the late 1990s",
|
49 |
+
"probability": 4.251295831636526e-05
|
50 |
},
|
51 |
{
|
52 |
+
"start_logit": 7.999092102050781,
|
53 |
+
"end_logit": -1.7098057270050049,
|
54 |
"text": "late 1990s as",
|
55 |
+
"probability": 2.746157224464696e-05
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"start_logit": -2.8063130378723145,
|
59 |
+
"end_logit": 8.703618049621582,
|
60 |
+
"text": "fame in the late 1990s",
|
61 |
+
"probability": 1.8556229406385683e-05
|
62 |
},
|
63 |
{
|
64 |
+
"start_logit": 7.999092102050781,
|
65 |
+
"end_logit": -2.2632956504821777,
|
66 |
+
"text": "late 1990s as lead singer of R&B girl-group",
|
67 |
+
"probability": 1.5788740711286664e-05
|
68 |
},
|
69 |
{
|
70 |
+
"start_logit": 4.969649791717529,
|
71 |
+
"end_logit": 0.42595237493515015,
|
72 |
+
"text": "in the late 1990s as lead singer of R&B girl-group Destiny's Child.",
|
73 |
+
"probability": 1.1235780220886227e-05
|
74 |
},
|
75 |
{
|
76 |
+
"start_logit": 4.745737075805664,
|
77 |
+
"end_logit": 0.42595237493515015,
|
78 |
+
"text": "the late 1990s as lead singer of R&B girl-group Destiny's Child.",
|
79 |
+
"probability": 8.981716746347956e-06
|
80 |
},
|
81 |
{
|
82 |
+
"start_logit": 4.969649791717529,
|
83 |
+
"end_logit": -0.1830665022134781,
|
84 |
+
"text": "in the late 1990s as lead singer of R&B girl-group Destiny's Child",
|
85 |
+
"probability": 6.110960839578183e-06
|
86 |
},
|
87 |
{
|
88 |
+
"start_logit": 7.999092102050781,
|
89 |
+
"end_logit": -3.3915696144104004,
|
90 |
+
"text": "late 1990s as lead singer of R&B girl-group Destiny's Child. Managed by her father, Mathew Knowles",
|
91 |
+
"probability": 5.109103767608758e-06
|
92 |
},
|
93 |
{
|
94 |
+
"start_logit": 4.745737075805664,
|
95 |
+
"end_logit": -0.1830665022134781,
|
96 |
+
"text": "the late 1990s as lead singer of R&B girl-group Destiny's Child",
|
97 |
+
"probability": 4.885012003796874e-06
|
98 |
},
|
99 |
{
|
100 |
+
"start_logit": 4.969649791717529,
|
101 |
+
"end_logit": -0.7555239200592041,
|
102 |
+
"text": "in the late",
|
103 |
+
"probability": 3.4474219319236e-06
|
104 |
},
|
105 |
{
|
106 |
+
"start_logit": -4.502557277679443,
|
107 |
+
"end_logit": 8.703618049621582,
|
108 |
+
"text": "Houston, Texas, she performed in various singing and dancing competitions as a child, and rose to fame in the late 1990s",
|
109 |
+
"probability": 3.4026763842121e-06
|
110 |
},
|
111 |
{
|
112 |
+
"start_logit": 4.745737075805664,
|
113 |
+
"end_logit": -0.7555239200592041,
|
114 |
+
"text": "the late",
|
115 |
+
"probability": 2.7558182864595437e-06
|
116 |
},
|
117 |
{
|
118 |
+
"start_logit": 7.999092102050781,
|
119 |
+
"end_logit": -4.044256210327148,
|
120 |
+
"text": "late 1990s as lead singer of R&B girl-group Destiny",
|
121 |
+
"probability": 2.660028712853091e-06
|
122 |
},
|
123 |
{
|
124 |
+
"start_logit": -2.3256735801696777,
|
125 |
+
"end_logit": -1.575926661491394,
|
126 |
"text": "",
|
127 |
+
"probability": 1.0301006714286132e-09
|
128 |
}
|
129 |
]
|
130 |
}
|
outputs/intensive/null_odds.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
{
|
2 |
-
"id-01": -
|
3 |
}
|
|
|
1 |
{
|
2 |
+
"id-01": -20.60430908203125
|
3 |
}
|
outputs/sketch/cls_score.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
{
|
2 |
-
"id-01":
|
3 |
}
|
|
|
1 |
{
|
2 |
+
"id-01": 9.18770170211792
|
3 |
}
|