-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathkd_config.json
77 lines (74 loc) · 1.7 KB
/
kd_config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"name": "koelectra_kd_model",
"n_gpu": 1,
"model": {
"type": "BeepKcElectraHateModel",
"args": {
"name": "monologg/koelectra-small-v3-discriminator",
"num_classes": 3
}
},
"teacher_model": {
"type": "BeepKcElectraHateModel",
"args": {
"name": "beomi/beep-KcELECTRA-base-hate",
"num_classes": 3
}
},
"tokenizer": {
"student": {
"type": "monologg/koelectra-small-v3-discriminator"
},
"teacher": {
"type": "tokenizer/"
}
},
"data_loader": {
"type": "MnistDataLoader",
"args":{
"data_dir": "AI-it/korean-hate-speech",
"batch_size": 64,
"max_length": 64,
"shuffle": true,
"validation_split": 0.1,
"num_workers": 2
},
"data_files": {
"train": "train_hate.csv",
"valid": "dev_hate.csv"
},
"test_data_file": {
"test": "test_hate_no_label.csv"
}
},
"optimizer": {
"type": "AdamW",
"args":{
"lr": 5e-5,
"eps": 1e-8
},
"weight_decay": 0.0
},
"loss": "knowledge_distillation_loss",
"metrics": [
"macro_f1"
],
"lr_scheduler": {
"type": "CosineAnnealingLR",
"args": {
"T_max": 300,
"eta_min": 1e-5
}
},
"trainer": {
"epochs": 2,
"save": {
"dir": "saved/",
"steps": 300,
"limits": 3
},
"verbosity": 2,
"monitor": "max val/macro_f1",
"early_stop": 5
}
}