dhanunjaya
commited on
Commit
•
72b7a8e
1
Parent(s):
103678d
Upload folder using huggingface_hub
Browse files- .gitattributes +8 -31
- README.md +32 -2
- added_tokens.json +1 -0
- config.json +30 -0
- flax_model.msgpack +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- spiece.model +3 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
@@ -1,34 +1,11 @@
|
|
1 |
-
*.
|
2 |
-
*.
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.
|
30 |
-
*.
|
31 |
-
*.
|
32 |
-
*.
|
33 |
-
*.
|
34 |
-
|
|
|
1 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
4 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
11 |
+
spiece.model filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,33 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
datasets:
|
3 |
+
- squad
|
4 |
+
tags:
|
5 |
+
- question-generation
|
6 |
+
widget:
|
7 |
+
- text: "<hl> 42 <hl> is the answer to life, the universe and everything. </s>"
|
8 |
+
- text: "Python is a programming language. It is developed by <hl> Guido Van Rossum <hl>. </s>"
|
9 |
+
- text: "Simple is better than <hl> complex <hl>. </s>"
|
10 |
+
license: mit
|
11 |
+
---
|
12 |
+
|
13 |
+
## T5 for question-generation
|
14 |
+
This is [t5-small](https://arxiv.org/abs/1910.10683) model trained for answer aware question generation task. The answer spans are highlighted within the text with special highlight tokens.
|
15 |
+
|
16 |
+
You can play with the model using the inference API, just highlight the answer spans with `<hl>` tokens and end the text with `</s>`. For example
|
17 |
+
|
18 |
+
`<hl> 42 <hl> is the answer to life, the universe and everything. </s>`
|
19 |
+
|
20 |
+
For more deatils see [this](https://github.com/patil-suraj/question_generation) repo.
|
21 |
+
|
22 |
+
### Model in action 🚀
|
23 |
+
|
24 |
+
You'll need to clone the [repo](https://github.com/patil-suraj/question_generation).
|
25 |
+
|
26 |
+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/patil-suraj/question_generation/blob/master/question_generation.ipynb)
|
27 |
+
|
28 |
+
```python3
|
29 |
+
from pipelines import pipeline
|
30 |
+
nlp = pipeline("question-generation")
|
31 |
+
nlp("42 is the answer to life, universe and everything.")
|
32 |
+
=> [{'answer': '42', 'question': 'What is the answer to life, universe and everything?'}]
|
33 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"<sep>": 32100, "<hl>": 32101}
|
config.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"T5ForConditionalGeneration"
|
4 |
+
],
|
5 |
+
"d_ff": 2048,
|
6 |
+
"d_kv": 64,
|
7 |
+
"d_model": 512,
|
8 |
+
"decoder_start_token_id": 0,
|
9 |
+
"dropout_rate": 0.1,
|
10 |
+
"eos_token_id": 1,
|
11 |
+
"initializer_factor": 1.0,
|
12 |
+
"is_encoder_decoder": true,
|
13 |
+
"layer_norm_epsilon": 1e-06,
|
14 |
+
"model_type": "t5",
|
15 |
+
"n_positions": 512,
|
16 |
+
"num_heads": 8,
|
17 |
+
"num_layers": 6,
|
18 |
+
"output_past": true,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"relative_attention_num_buckets": 32,
|
21 |
+
"task_specific_params": {
|
22 |
+
"translation_en_to_fr": {
|
23 |
+
"early_stopping": true,
|
24 |
+
"max_length": 32,
|
25 |
+
"num_beams": 4,
|
26 |
+
"prefix": ""
|
27 |
+
}
|
28 |
+
},
|
29 |
+
"vocab_size": 32102
|
30 |
+
}
|
flax_model.msgpack
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e82e767154152e2b04dc5c6d31ee64268f999e6c8e7383fe7aeb1ea98e59c22a
|
3 |
+
size 241978954
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b636b85f3e31a12a17ef11c1bd1e7fe0128a7edb0070fe072b37e3b267bab5f8
|
3 |
+
size 242013444
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
|
spiece.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d60acb128cf7b7f2536e8f38a5b18a05535c9e14c7a355904270e15b0945ea86
|
3 |
+
size 791656
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"model_max_length": 512, "eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1e7698f6643a2007f7249d6e843f9770c45b8d44520bf83b4f851eeb8a2f819c
|
3 |
+
size 1073
|