Diwank Singh Tomer
commited on
Commit
·
71993a6
1
Parent(s):
ac2eccb
Model files
Browse filesSigned-off-by: Diwank Singh Tomer <[email protected]>
- .ipynb_checkpoints/README-checkpoint.md +58 -0
- README.md +55 -0
- config.json +58 -0
- eval_results.txt +2 -0
- merges.txt +0 -0
- model_args.json +1 -0
- optimizer.pt +3 -0
- pytorch_model.bin +3 -0
- scheduler.pt +3 -0
- silicone-deberta-pair-report.pdf +0 -0
- special_tokens_map.json +1 -0
- tf_model.h5 +3 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.json +0 -0
.ipynb_checkpoints/README-checkpoint.md
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
---
|
4 |
+
|
5 |
+
# diwank/silicone-deberta-pair
|
6 |
+
|
7 |
+
`deberta-large`-based dialog acts classifier. Trained on [silicone-merged](https://huggingface.co/datasets/diwank/silicone-merged): a simplified dialog act datasets from the silicone collection.
|
8 |
+
|
9 |
+
Takes two sentences as inputs (one previous and one current utterance of a dialog). The previous sentence can be an empty string if this is the first utterance of a speaker in a dialog. **Outputs one of 11 labels**:
|
10 |
+
|
11 |
+
```python
|
12 |
+
[
|
13 |
+
(0, 'acknowledge')
|
14 |
+
(1, 'answer')
|
15 |
+
(2, 'backchannel')
|
16 |
+
(3, 'reply_yes')
|
17 |
+
(4, 'exclaim')
|
18 |
+
(5, 'say')
|
19 |
+
(6, 'reply_no')
|
20 |
+
(7, 'hold')
|
21 |
+
(8, 'ask')
|
22 |
+
(9, 'intent')
|
23 |
+
(10, 'ask_yes_no')
|
24 |
+
]
|
25 |
+
```
|
26 |
+
|
27 |
+
## Example:
|
28 |
+
|
29 |
+
```python
|
30 |
+
from simpletransformers.classification import (
|
31 |
+
ClassificationModel, ClassificationArgs
|
32 |
+
)
|
33 |
+
|
34 |
+
model = ClassificationModel("deberta", "diwank/dyda-deberta-pair")
|
35 |
+
convert_to_label = lambda n: [
|
36 |
+
['acknowledge',
|
37 |
+
'answer',
|
38 |
+
'backchannel',
|
39 |
+
'reply_yes',
|
40 |
+
'exclaim',
|
41 |
+
'say',
|
42 |
+
'reply_no',
|
43 |
+
'hold',
|
44 |
+
'ask',
|
45 |
+
'intent',
|
46 |
+
'ask_yes_no'
|
47 |
+
][i] for i in n
|
48 |
+
]
|
49 |
+
|
50 |
+
predictions, raw_outputs = model.predict([["Say what is the meaning of life?", "I dont know"]])
|
51 |
+
convert_to_label(predictions) # answer
|
52 |
+
|
53 |
+
```
|
54 |
+
|
55 |
+
|
56 |
+
## Report from W&B
|
57 |
+
|
58 |
+
https://wandb.ai/diwank/da-silicone-combined/reports/silicone-deberta-pair--VmlldzoxNTczNjE5?accessToken=yj1jz4c365z0y5b3olgzye7qgsl7qv9lxvqhmfhtb6300hql6veqa5xiq1skn8ys
|
README.md
CHANGED
@@ -1,3 +1,58 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
+
|
5 |
+
# diwank/silicone-deberta-pair
|
6 |
+
|
7 |
+
`deberta-large`-based dialog acts classifier. Trained on [silicone-merged](https://huggingface.co/datasets/diwank/silicone-merged): a simplified dialog act datasets from the silicone collection.
|
8 |
+
|
9 |
+
Takes two sentences as inputs (one previous and one current utterance of a dialog). The previous sentence can be an empty string if this is the first utterance of a speaker in a dialog. **Outputs one of 11 labels**:
|
10 |
+
|
11 |
+
```python
|
12 |
+
[
|
13 |
+
(0, 'acknowledge')
|
14 |
+
(1, 'answer')
|
15 |
+
(2, 'backchannel')
|
16 |
+
(3, 'reply_yes')
|
17 |
+
(4, 'exclaim')
|
18 |
+
(5, 'say')
|
19 |
+
(6, 'reply_no')
|
20 |
+
(7, 'hold')
|
21 |
+
(8, 'ask')
|
22 |
+
(9, 'intent')
|
23 |
+
(10, 'ask_yes_no')
|
24 |
+
]
|
25 |
+
```
|
26 |
+
|
27 |
+
## Example:
|
28 |
+
|
29 |
+
```python
|
30 |
+
from simpletransformers.classification import (
|
31 |
+
ClassificationModel, ClassificationArgs
|
32 |
+
)
|
33 |
+
|
34 |
+
model = ClassificationModel("deberta", "diwank/dyda-deberta-pair")
|
35 |
+
convert_to_label = lambda n: [
|
36 |
+
['acknowledge',
|
37 |
+
'answer',
|
38 |
+
'backchannel',
|
39 |
+
'reply_yes',
|
40 |
+
'exclaim',
|
41 |
+
'say',
|
42 |
+
'reply_no',
|
43 |
+
'hold',
|
44 |
+
'ask',
|
45 |
+
'intent',
|
46 |
+
'ask_yes_no'
|
47 |
+
][i] for i in n
|
48 |
+
]
|
49 |
+
|
50 |
+
predictions, raw_outputs = model.predict([["Say what is the meaning of life?", "I dont know"]])
|
51 |
+
convert_to_label(predictions) # answer
|
52 |
+
|
53 |
+
```
|
54 |
+
|
55 |
+
|
56 |
+
## Report from W&B
|
57 |
+
|
58 |
+
https://wandb.ai/diwank/da-silicone-combined/reports/silicone-deberta-pair--VmlldzoxNTczNjE5?accessToken=yj1jz4c365z0y5b3olgzye7qgsl7qv9lxvqhmfhtb6300hql6veqa5xiq1skn8ys
|
config.json
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/deberta-large",
|
3 |
+
"architectures": [
|
4 |
+
"DebertaForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 1024,
|
10 |
+
"id2label": {
|
11 |
+
"0": "LABEL_0",
|
12 |
+
"1": "LABEL_1",
|
13 |
+
"2": "LABEL_2",
|
14 |
+
"3": "LABEL_3",
|
15 |
+
"4": "LABEL_4",
|
16 |
+
"5": "LABEL_5",
|
17 |
+
"6": "LABEL_6",
|
18 |
+
"7": "LABEL_7",
|
19 |
+
"8": "LABEL_8",
|
20 |
+
"9": "LABEL_9",
|
21 |
+
"10": "LABEL_10"
|
22 |
+
},
|
23 |
+
"initializer_range": 0.02,
|
24 |
+
"intermediate_size": 4096,
|
25 |
+
"label2id": {
|
26 |
+
"LABEL_0": 0,
|
27 |
+
"LABEL_1": 1,
|
28 |
+
"LABEL_10": 10,
|
29 |
+
"LABEL_2": 2,
|
30 |
+
"LABEL_3": 3,
|
31 |
+
"LABEL_4": 4,
|
32 |
+
"LABEL_5": 5,
|
33 |
+
"LABEL_6": 6,
|
34 |
+
"LABEL_7": 7,
|
35 |
+
"LABEL_8": 8,
|
36 |
+
"LABEL_9": 9
|
37 |
+
},
|
38 |
+
"layer_norm_eps": 1e-07,
|
39 |
+
"max_position_embeddings": 512,
|
40 |
+
"max_relative_positions": -1,
|
41 |
+
"model_type": "deberta",
|
42 |
+
"num_attention_heads": 16,
|
43 |
+
"num_hidden_layers": 24,
|
44 |
+
"pad_token_id": 0,
|
45 |
+
"pooler_dropout": 0,
|
46 |
+
"pooler_hidden_act": "gelu",
|
47 |
+
"pooler_hidden_size": 1024,
|
48 |
+
"pos_att_type": [
|
49 |
+
"c2p",
|
50 |
+
"p2c"
|
51 |
+
],
|
52 |
+
"position_biased_input": false,
|
53 |
+
"relative_attention": true,
|
54 |
+
"torch_dtype": "float32",
|
55 |
+
"transformers_version": "4.16.2",
|
56 |
+
"type_vocab_size": 0,
|
57 |
+
"vocab_size": 50265
|
58 |
+
}
|
eval_results.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
eval_loss = 0.39992852896930425
|
2 |
+
mcc = 0.8192827881469071
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model_args.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"adafactor_beta1": null, "adafactor_clip_threshold": 1.0, "adafactor_decay_rate": -0.8, "adafactor_eps": [1e-30, 0.001], "adafactor_relative_step": true, "adafactor_scale_parameter": true, "adafactor_warmup_init": true, "adam_epsilon": 1e-08, "best_model_dir": "outputs/best_model", "cache_dir": "cache_dir/", "config": {}, "cosine_schedule_num_cycles": 0.5, "custom_layer_parameters": [], "custom_parameter_groups": [], "dataloader_num_workers": 0, "do_lower_case": false, "dynamic_quantize": false, "early_stopping_consider_epochs": false, "early_stopping_delta": 0, "early_stopping_metric": "eval_loss", "early_stopping_metric_minimize": true, "early_stopping_patience": 3, "encoding": null, "eval_batch_size": 80, "evaluate_during_training": true, "evaluate_during_training_silent": true, "evaluate_during_training_steps": 1000, "evaluate_during_training_verbose": true, "evaluate_each_epoch": true, "fp16": true, "gradient_accumulation_steps": 1, "learning_rate": 3e-05, "local_rank": -1, "logging_steps": 50, "loss_type": null, "loss_args": {}, "manual_seed": null, "max_grad_norm": 1.0, "max_seq_length": 128, "model_name": "microsoft/deberta-large", "model_type": "deberta", "multiprocessing_chunksize": -1, "n_gpu": 4, "no_cache": false, "no_save": false, "not_saved_args": [], "num_train_epochs": 8, "optimizer": "AdamW", "output_dir": "outputs/", "overwrite_output_dir": true, "polynomial_decay_schedule_lr_end": 1e-07, "polynomial_decay_schedule_power": 1.0, "process_count": 6, "quantized_model": false, "reprocess_input_data": true, "save_best_model": true, "save_eval_checkpoints": true, "save_model_every_epoch": true, "save_optimizer_and_scheduler": true, "save_steps": 2000, "scheduler": "polynomial_decay_schedule_with_warmup", "silent": false, "skip_special_tokens": true, "tensorboard_dir": null, "thread_count": null, "tokenizer_name": "microsoft/deberta-large", "tokenizer_type": null, "train_batch_size": 80, "train_custom_parameters_only": false, "use_cached_eval_features": false, "use_early_stopping": true, "use_hf_datasets": false, "use_multiprocessing": false, "use_multiprocessing_for_evaluation": true, "wandb_kwargs": {}, "wandb_project": "da-silicone-combined", "warmup_ratio": 0.06, "warmup_steps": 1890, "weight_decay": 0.0, "model_class": "ClassificationModel", "labels_list": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "labels_map": {}, "lazy_delimiter": "\t", "lazy_labels_column": 1, "lazy_loading": false, "lazy_loading_start_line": 1, "lazy_text_a_column": null, "lazy_text_b_column": null, "lazy_text_column": 0, "onnx": false, "regression": false, "sliding_window": false, "special_tokens_list": [], "stride": 0.8, "tie_value": 1}
|
optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd774e8ca54ca41d2965a1c0f091c7a37960eadaa6b6b78fd285345e5367e1d4
|
3 |
+
size 3250019105
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:de4a006c9aeea8b200ff7ef9259a41620d77a3eabe537ca48cf5b382b40b7cea
|
3 |
+
size 1625061487
|
scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3316684e35605f8683498fce834658644b50c870295247e6e9515a6c9ec644ae
|
3 |
+
size 623
|
silicone-deberta-pair-report.pdf
ADDED
Binary file (158 kB). View file
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": {"content": "[CLS]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "[SEP]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "[UNK]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "sep_token": {"content": "[SEP]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": {"content": "[PAD]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "cls_token": {"content": "[CLS]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "mask_token": {"content": "[MASK]", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}
|
tf_model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:88ec143a0678a3bfcaec4a45468a8a90ffe716305f8d768af992b169576c1f93
|
3 |
+
size 1249
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"errors": "replace", "unk_token": {"content": "[UNK]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "[CLS]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "[SEP]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "sep_token": {"content": "[SEP]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "cls_token": {"content": "[CLS]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "pad_token": {"content": "[PAD]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "mask_token": {"content": "[MASK]", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "do_lower_case": false, "vocab_type": "gpt2", "model_max_length": 512, "special_tokens_map_file": null, "tokenizer_file": null, "name_or_path": "microsoft/deberta-large", "tokenizer_class": "DebertaTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39bb4b4659c47156a95fb9f7f6fec8fa4d29eb5389cb0cea6f379d804d7d116b
|
3 |
+
size 3183
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|