mohdelgaar commited on
Commit
0bdbfac
·
1 Parent(s): 2ac88c4

move to hub

Browse files
app.py CHANGED
@@ -1,8 +1,8 @@
1
- # import spacy
2
- # import nltk
3
- # nltk.download('wordnet', quiet=True)
4
- # spacy.cli.download('en_core_web_sm')
5
- # from compute_lng import compute_lng
6
 
7
  import torch
8
  import joblib, json
@@ -25,7 +25,7 @@ def process_examples(samples):
25
  processed.append(example)
26
  return processed
27
 
28
- args, args_list, lng_names = parse_args(ckpt='./ckpt/model.pt')
29
 
30
  tokenizer = T5Tokenizer.from_pretrained(args.model_name)
31
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
@@ -46,16 +46,14 @@ ling_collection_scaled = scaler.transform(ling_collection)
46
 
47
  model, ling_disc, sem_emb = get_model(args, tokenizer, device)
48
 
49
- state = torch.load(args.ckpt, map_location=torch.device('cpu'))
50
- model.load_state_dict(state['model'], strict=True)
51
- model.eval()
52
- ling_disc.eval()
53
 
54
- state = torch.load(args.sem_ckpt, map_location=torch.device('cpu'))
55
- sem_emb.load_state_dict(state['model'], strict=True)
56
- sem_emb.eval()
57
-
58
- device = model.backbone.device
59
 
60
  ############# Start demo code
61
  def round_ling(x):
@@ -139,6 +137,7 @@ def generate_with_feedback(sent1, approx):
139
  'sentence1_attention_mask': torch.ones_like(input_ids)
140
  }
141
 
 
142
  pred, (pred_text, interpolations) = model.infer_with_feedback_BP(ling_disc, sem_emb, inputs, tokenizer)
143
 
144
  interpolation = '-- ' + '\n-- '.join(interpolations)
@@ -158,16 +157,24 @@ def generate_random(sent1, count, approx):
158
  success = False
159
  patience = 0
160
  while not success:
 
161
  pred, interpolation = generate_with_feedback(sent1, approx)[:2]
 
162
  if pred not in preds:
163
  success = True
164
- elif patience < 3:
165
- add_to_target()
166
  patience += 1
 
 
 
 
 
 
167
  else:
168
  idx = np.random.randint(0, len(ling_collection))
169
  ling_ex = ling_collection[idx]
170
  shared_state.target = ling_ex.copy()
 
171
  preds.append(pred)
172
  interpolations.append(interpolation)
173
  shared_state.active_indices = orig_active_indices
@@ -187,7 +194,10 @@ def estimate_gen(sent1, sent2, approx):
187
  ling_pred = round_ling(ling_pred)
188
  shared_state.target = ling_pred.copy()
189
 
 
 
190
  gen = generate_with_feedback(sent1, approx)[:2]
 
191
  return gen + [gr.update(value=val) for val in shared_state.target]
192
 
193
  def estimate_tgt(sent2, ling_dict, approx):
 
1
+ import spacy
2
+ import nltk
3
+ nltk.download('wordnet', quiet=True)
4
+ spacy.cli.download('en_core_web_sm')
5
+ from compute_lng import compute_lng
6
 
7
  import torch
8
  import joblib, json
 
25
  processed.append(example)
26
  return processed
27
 
28
+ args, args_list, lng_names = parse_args(ckpt='./ckpt/model_fixed.pt')
29
 
30
  tokenizer = T5Tokenizer.from_pretrained(args.model_name)
31
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
 
46
 
47
  model, ling_disc, sem_emb = get_model(args, tokenizer, device)
48
 
49
+ # state = torch.load(args.ckpt, map_location=torch.device('cpu'))
50
+ # model.load_state_dict(state['model'], strict=True)
51
+ # model.eval()
52
+ # ling_disc.eval()
53
 
54
+ # state = torch.load(args.sem_ckpt, map_location=torch.device('cpu'))
55
+ # sem_emb.load_state_dict(state['model'], strict=True)
56
+ # sem_emb.eval()
 
 
57
 
58
  ############# Start demo code
59
  def round_ling(x):
 
137
  'sentence1_attention_mask': torch.ones_like(input_ids)
138
  }
139
 
140
+ print('generating...')
141
  pred, (pred_text, interpolations) = model.infer_with_feedback_BP(ling_disc, sem_emb, inputs, tokenizer)
142
 
143
  interpolation = '-- ' + '\n-- '.join(interpolations)
 
157
  success = False
158
  patience = 0
159
  while not success:
160
+ print(c, patience)
161
  pred, interpolation = generate_with_feedback(sent1, approx)[:2]
162
+ print(pred)
163
  if pred not in preds:
164
  success = True
165
+ elif patience < 10:
 
166
  patience += 1
167
+ if np.random.rand() < 0.5:
168
+ for _ in range(patience):
169
+ add_to_target()
170
+ else:
171
+ for _ in range(patience):
172
+ subtract_from_target()
173
  else:
174
  idx = np.random.randint(0, len(ling_collection))
175
  ling_ex = ling_collection[idx]
176
  shared_state.target = ling_ex.copy()
177
+ patience = 0
178
  preds.append(pred)
179
  interpolations.append(interpolation)
180
  shared_state.active_indices = orig_active_indices
 
194
  ling_pred = round_ling(ling_pred)
195
  shared_state.target = ling_pred.copy()
196
 
197
+ orig_active_indices = shared_state.active_indices
198
+ shared_state.active_indices = set(range(len(lng_names)))
199
  gen = generate_with_feedback(sent1, approx)[:2]
200
+ shared_state.active_indices = orig_active_indices
201
  return gen + [gr.update(value=val) for val in shared_state.target]
202
 
203
  def estimate_tgt(sent2, ling_dict, approx):
ckpt/ling_disc/checkpoint-41000/config.json DELETED
@@ -1,120 +0,0 @@
1
- {
2
- "_name_or_path": "microsoft/deberta-v3-small",
3
- "architectures": [
4
- "DebertaReplacedTokenizer"
5
- ],
6
- "attention_probs_dropout_prob": 0.1,
7
- "hidden_act": "gelu",
8
- "hidden_dropout_prob": 0.1,
9
- "hidden_size": 768,
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
- "11": "LABEL_11",
23
- "12": "LABEL_12",
24
- "13": "LABEL_13",
25
- "14": "LABEL_14",
26
- "15": "LABEL_15",
27
- "16": "LABEL_16",
28
- "17": "LABEL_17",
29
- "18": "LABEL_18",
30
- "19": "LABEL_19",
31
- "20": "LABEL_20",
32
- "21": "LABEL_21",
33
- "22": "LABEL_22",
34
- "23": "LABEL_23",
35
- "24": "LABEL_24",
36
- "25": "LABEL_25",
37
- "26": "LABEL_26",
38
- "27": "LABEL_27",
39
- "28": "LABEL_28",
40
- "29": "LABEL_29",
41
- "30": "LABEL_30",
42
- "31": "LABEL_31",
43
- "32": "LABEL_32",
44
- "33": "LABEL_33",
45
- "34": "LABEL_34",
46
- "35": "LABEL_35",
47
- "36": "LABEL_36",
48
- "37": "LABEL_37",
49
- "38": "LABEL_38",
50
- "39": "LABEL_39"
51
- },
52
- "initializer_range": 0.02,
53
- "intermediate_size": 3072,
54
- "label2id": {
55
- "LABEL_0": 0,
56
- "LABEL_1": 1,
57
- "LABEL_10": 10,
58
- "LABEL_11": 11,
59
- "LABEL_12": 12,
60
- "LABEL_13": 13,
61
- "LABEL_14": 14,
62
- "LABEL_15": 15,
63
- "LABEL_16": 16,
64
- "LABEL_17": 17,
65
- "LABEL_18": 18,
66
- "LABEL_19": 19,
67
- "LABEL_2": 2,
68
- "LABEL_20": 20,
69
- "LABEL_21": 21,
70
- "LABEL_22": 22,
71
- "LABEL_23": 23,
72
- "LABEL_24": 24,
73
- "LABEL_25": 25,
74
- "LABEL_26": 26,
75
- "LABEL_27": 27,
76
- "LABEL_28": 28,
77
- "LABEL_29": 29,
78
- "LABEL_3": 3,
79
- "LABEL_30": 30,
80
- "LABEL_31": 31,
81
- "LABEL_32": 32,
82
- "LABEL_33": 33,
83
- "LABEL_34": 34,
84
- "LABEL_35": 35,
85
- "LABEL_36": 36,
86
- "LABEL_37": 37,
87
- "LABEL_38": 38,
88
- "LABEL_39": 39,
89
- "LABEL_4": 4,
90
- "LABEL_5": 5,
91
- "LABEL_6": 6,
92
- "LABEL_7": 7,
93
- "LABEL_8": 8,
94
- "LABEL_9": 9
95
- },
96
- "layer_norm_eps": 1e-07,
97
- "max_position_embeddings": 512,
98
- "max_relative_positions": -1,
99
- "model_type": "deberta-v2",
100
- "norm_rel_ebd": "layer_norm",
101
- "num_attention_heads": 12,
102
- "num_hidden_layers": 6,
103
- "pad_token_id": 0,
104
- "pooler_dropout": 0,
105
- "pooler_hidden_act": "gelu",
106
- "pooler_hidden_size": 768,
107
- "pos_att_type": [
108
- "p2c",
109
- "c2p"
110
- ],
111
- "position_biased_input": false,
112
- "position_buckets": 256,
113
- "problem_type": "regression",
114
- "relative_attention": true,
115
- "share_att_key": true,
116
- "torch_dtype": "float32",
117
- "transformers_version": "4.39.3",
118
- "type_vocab_size": 0,
119
- "vocab_size": 128100
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/checkpoint-41000/model.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:15221fd5565118b32b1adf7b42c27cae6a3d8dd32b0ef85473b70bb072964661
3
- size 275252064
 
 
 
 
ckpt/ling_disc/checkpoint-41000/optimizer.pt DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7dce4669eb4c8d092887dca957afda50838e0d8821093ac6ec80dfc38c786041
3
- size 550568634
 
 
 
 
ckpt/ling_disc/checkpoint-41000/rng_state.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b153bd123a079b6d0ee9f3616a0498be47197aca1c9c7764282514bc91fdc08d
3
- size 14244
 
 
 
 
ckpt/ling_disc/checkpoint-41000/scheduler.pt DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7600c7adf0e16517c635d7b3eee259739a7966140efc08f2afff26d19bb4fb29
3
- size 1064
 
 
 
 
ckpt/ling_disc/checkpoint-41000/special_tokens_map.json DELETED
@@ -1,119 +0,0 @@
1
- {
2
- "additional_special_tokens": [
3
- "<extra_id_0>",
4
- "<extra_id_1>",
5
- "<extra_id_2>",
6
- "<extra_id_3>",
7
- "<extra_id_4>",
8
- "<extra_id_5>",
9
- "<extra_id_6>",
10
- "<extra_id_7>",
11
- "<extra_id_8>",
12
- "<extra_id_9>",
13
- "<extra_id_10>",
14
- "<extra_id_11>",
15
- "<extra_id_12>",
16
- "<extra_id_13>",
17
- "<extra_id_14>",
18
- "<extra_id_15>",
19
- "<extra_id_16>",
20
- "<extra_id_17>",
21
- "<extra_id_18>",
22
- "<extra_id_19>",
23
- "<extra_id_20>",
24
- "<extra_id_21>",
25
- "<extra_id_22>",
26
- "<extra_id_23>",
27
- "<extra_id_24>",
28
- "<extra_id_25>",
29
- "<extra_id_26>",
30
- "<extra_id_27>",
31
- "<extra_id_28>",
32
- "<extra_id_29>",
33
- "<extra_id_30>",
34
- "<extra_id_31>",
35
- "<extra_id_32>",
36
- "<extra_id_33>",
37
- "<extra_id_34>",
38
- "<extra_id_35>",
39
- "<extra_id_36>",
40
- "<extra_id_37>",
41
- "<extra_id_38>",
42
- "<extra_id_39>",
43
- "<extra_id_40>",
44
- "<extra_id_41>",
45
- "<extra_id_42>",
46
- "<extra_id_43>",
47
- "<extra_id_44>",
48
- "<extra_id_45>",
49
- "<extra_id_46>",
50
- "<extra_id_47>",
51
- "<extra_id_48>",
52
- "<extra_id_49>",
53
- "<extra_id_50>",
54
- "<extra_id_51>",
55
- "<extra_id_52>",
56
- "<extra_id_53>",
57
- "<extra_id_54>",
58
- "<extra_id_55>",
59
- "<extra_id_56>",
60
- "<extra_id_57>",
61
- "<extra_id_58>",
62
- "<extra_id_59>",
63
- "<extra_id_60>",
64
- "<extra_id_61>",
65
- "<extra_id_62>",
66
- "<extra_id_63>",
67
- "<extra_id_64>",
68
- "<extra_id_65>",
69
- "<extra_id_66>",
70
- "<extra_id_67>",
71
- "<extra_id_68>",
72
- "<extra_id_69>",
73
- "<extra_id_70>",
74
- "<extra_id_71>",
75
- "<extra_id_72>",
76
- "<extra_id_73>",
77
- "<extra_id_74>",
78
- "<extra_id_75>",
79
- "<extra_id_76>",
80
- "<extra_id_77>",
81
- "<extra_id_78>",
82
- "<extra_id_79>",
83
- "<extra_id_80>",
84
- "<extra_id_81>",
85
- "<extra_id_82>",
86
- "<extra_id_83>",
87
- "<extra_id_84>",
88
- "<extra_id_85>",
89
- "<extra_id_86>",
90
- "<extra_id_87>",
91
- "<extra_id_88>",
92
- "<extra_id_89>",
93
- "<extra_id_90>",
94
- "<extra_id_91>",
95
- "<extra_id_92>",
96
- "<extra_id_93>",
97
- "<extra_id_94>",
98
- "<extra_id_95>",
99
- "<extra_id_96>",
100
- "<extra_id_97>",
101
- "<extra_id_98>",
102
- "<extra_id_99>"
103
- ],
104
- "eos_token": {
105
- "content": "</s>",
106
- "lstrip": false,
107
- "normalized": false,
108
- "rstrip": false,
109
- "single_word": false
110
- },
111
- "pad_token": "</s>",
112
- "unk_token": {
113
- "content": "<unk>",
114
- "lstrip": false,
115
- "normalized": false,
116
- "rstrip": false,
117
- "single_word": false
118
- }
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/checkpoint-41000/spiece.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d60acb128cf7b7f2536e8f38a5b18a05535c9e14c7a355904270e15b0945ea86
3
- size 791656
 
 
 
 
ckpt/ling_disc/checkpoint-41000/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
ckpt/ling_disc/checkpoint-41000/tokenizer_config.json DELETED
@@ -1,938 +0,0 @@
1
- {
2
- "added_tokens_decoder": {
3
- "0": {
4
- "content": "<pad>",
5
- "lstrip": false,
6
- "normalized": false,
7
- "rstrip": false,
8
- "single_word": false,
9
- "special": true
10
- },
11
- "1": {
12
- "content": "</s>",
13
- "lstrip": false,
14
- "normalized": false,
15
- "rstrip": false,
16
- "single_word": false,
17
- "special": true
18
- },
19
- "2": {
20
- "content": "<unk>",
21
- "lstrip": false,
22
- "normalized": false,
23
- "rstrip": false,
24
- "single_word": false,
25
- "special": true
26
- },
27
- "32000": {
28
- "content": "<extra_id_99>",
29
- "lstrip": false,
30
- "normalized": false,
31
- "rstrip": false,
32
- "single_word": false,
33
- "special": true
34
- },
35
- "32001": {
36
- "content": "<extra_id_98>",
37
- "lstrip": false,
38
- "normalized": false,
39
- "rstrip": false,
40
- "single_word": false,
41
- "special": true
42
- },
43
- "32002": {
44
- "content": "<extra_id_97>",
45
- "lstrip": false,
46
- "normalized": false,
47
- "rstrip": false,
48
- "single_word": false,
49
- "special": true
50
- },
51
- "32003": {
52
- "content": "<extra_id_96>",
53
- "lstrip": false,
54
- "normalized": false,
55
- "rstrip": false,
56
- "single_word": false,
57
- "special": true
58
- },
59
- "32004": {
60
- "content": "<extra_id_95>",
61
- "lstrip": false,
62
- "normalized": false,
63
- "rstrip": false,
64
- "single_word": false,
65
- "special": true
66
- },
67
- "32005": {
68
- "content": "<extra_id_94>",
69
- "lstrip": false,
70
- "normalized": false,
71
- "rstrip": false,
72
- "single_word": false,
73
- "special": true
74
- },
75
- "32006": {
76
- "content": "<extra_id_93>",
77
- "lstrip": false,
78
- "normalized": false,
79
- "rstrip": false,
80
- "single_word": false,
81
- "special": true
82
- },
83
- "32007": {
84
- "content": "<extra_id_92>",
85
- "lstrip": false,
86
- "normalized": false,
87
- "rstrip": false,
88
- "single_word": false,
89
- "special": true
90
- },
91
- "32008": {
92
- "content": "<extra_id_91>",
93
- "lstrip": false,
94
- "normalized": false,
95
- "rstrip": false,
96
- "single_word": false,
97
- "special": true
98
- },
99
- "32009": {
100
- "content": "<extra_id_90>",
101
- "lstrip": false,
102
- "normalized": false,
103
- "rstrip": false,
104
- "single_word": false,
105
- "special": true
106
- },
107
- "32010": {
108
- "content": "<extra_id_89>",
109
- "lstrip": false,
110
- "normalized": false,
111
- "rstrip": false,
112
- "single_word": false,
113
- "special": true
114
- },
115
- "32011": {
116
- "content": "<extra_id_88>",
117
- "lstrip": false,
118
- "normalized": false,
119
- "rstrip": false,
120
- "single_word": false,
121
- "special": true
122
- },
123
- "32012": {
124
- "content": "<extra_id_87>",
125
- "lstrip": false,
126
- "normalized": false,
127
- "rstrip": false,
128
- "single_word": false,
129
- "special": true
130
- },
131
- "32013": {
132
- "content": "<extra_id_86>",
133
- "lstrip": false,
134
- "normalized": false,
135
- "rstrip": false,
136
- "single_word": false,
137
- "special": true
138
- },
139
- "32014": {
140
- "content": "<extra_id_85>",
141
- "lstrip": false,
142
- "normalized": false,
143
- "rstrip": false,
144
- "single_word": false,
145
- "special": true
146
- },
147
- "32015": {
148
- "content": "<extra_id_84>",
149
- "lstrip": false,
150
- "normalized": false,
151
- "rstrip": false,
152
- "single_word": false,
153
- "special": true
154
- },
155
- "32016": {
156
- "content": "<extra_id_83>",
157
- "lstrip": false,
158
- "normalized": false,
159
- "rstrip": false,
160
- "single_word": false,
161
- "special": true
162
- },
163
- "32017": {
164
- "content": "<extra_id_82>",
165
- "lstrip": false,
166
- "normalized": false,
167
- "rstrip": false,
168
- "single_word": false,
169
- "special": true
170
- },
171
- "32018": {
172
- "content": "<extra_id_81>",
173
- "lstrip": false,
174
- "normalized": false,
175
- "rstrip": false,
176
- "single_word": false,
177
- "special": true
178
- },
179
- "32019": {
180
- "content": "<extra_id_80>",
181
- "lstrip": false,
182
- "normalized": false,
183
- "rstrip": false,
184
- "single_word": false,
185
- "special": true
186
- },
187
- "32020": {
188
- "content": "<extra_id_79>",
189
- "lstrip": false,
190
- "normalized": false,
191
- "rstrip": false,
192
- "single_word": false,
193
- "special": true
194
- },
195
- "32021": {
196
- "content": "<extra_id_78>",
197
- "lstrip": false,
198
- "normalized": false,
199
- "rstrip": false,
200
- "single_word": false,
201
- "special": true
202
- },
203
- "32022": {
204
- "content": "<extra_id_77>",
205
- "lstrip": false,
206
- "normalized": false,
207
- "rstrip": false,
208
- "single_word": false,
209
- "special": true
210
- },
211
- "32023": {
212
- "content": "<extra_id_76>",
213
- "lstrip": false,
214
- "normalized": false,
215
- "rstrip": false,
216
- "single_word": false,
217
- "special": true
218
- },
219
- "32024": {
220
- "content": "<extra_id_75>",
221
- "lstrip": false,
222
- "normalized": false,
223
- "rstrip": false,
224
- "single_word": false,
225
- "special": true
226
- },
227
- "32025": {
228
- "content": "<extra_id_74>",
229
- "lstrip": false,
230
- "normalized": false,
231
- "rstrip": false,
232
- "single_word": false,
233
- "special": true
234
- },
235
- "32026": {
236
- "content": "<extra_id_73>",
237
- "lstrip": false,
238
- "normalized": false,
239
- "rstrip": false,
240
- "single_word": false,
241
- "special": true
242
- },
243
- "32027": {
244
- "content": "<extra_id_72>",
245
- "lstrip": false,
246
- "normalized": false,
247
- "rstrip": false,
248
- "single_word": false,
249
- "special": true
250
- },
251
- "32028": {
252
- "content": "<extra_id_71>",
253
- "lstrip": false,
254
- "normalized": false,
255
- "rstrip": false,
256
- "single_word": false,
257
- "special": true
258
- },
259
- "32029": {
260
- "content": "<extra_id_70>",
261
- "lstrip": false,
262
- "normalized": false,
263
- "rstrip": false,
264
- "single_word": false,
265
- "special": true
266
- },
267
- "32030": {
268
- "content": "<extra_id_69>",
269
- "lstrip": false,
270
- "normalized": false,
271
- "rstrip": false,
272
- "single_word": false,
273
- "special": true
274
- },
275
- "32031": {
276
- "content": "<extra_id_68>",
277
- "lstrip": false,
278
- "normalized": false,
279
- "rstrip": false,
280
- "single_word": false,
281
- "special": true
282
- },
283
- "32032": {
284
- "content": "<extra_id_67>",
285
- "lstrip": false,
286
- "normalized": false,
287
- "rstrip": false,
288
- "single_word": false,
289
- "special": true
290
- },
291
- "32033": {
292
- "content": "<extra_id_66>",
293
- "lstrip": false,
294
- "normalized": false,
295
- "rstrip": false,
296
- "single_word": false,
297
- "special": true
298
- },
299
- "32034": {
300
- "content": "<extra_id_65>",
301
- "lstrip": false,
302
- "normalized": false,
303
- "rstrip": false,
304
- "single_word": false,
305
- "special": true
306
- },
307
- "32035": {
308
- "content": "<extra_id_64>",
309
- "lstrip": false,
310
- "normalized": false,
311
- "rstrip": false,
312
- "single_word": false,
313
- "special": true
314
- },
315
- "32036": {
316
- "content": "<extra_id_63>",
317
- "lstrip": false,
318
- "normalized": false,
319
- "rstrip": false,
320
- "single_word": false,
321
- "special": true
322
- },
323
- "32037": {
324
- "content": "<extra_id_62>",
325
- "lstrip": false,
326
- "normalized": false,
327
- "rstrip": false,
328
- "single_word": false,
329
- "special": true
330
- },
331
- "32038": {
332
- "content": "<extra_id_61>",
333
- "lstrip": false,
334
- "normalized": false,
335
- "rstrip": false,
336
- "single_word": false,
337
- "special": true
338
- },
339
- "32039": {
340
- "content": "<extra_id_60>",
341
- "lstrip": false,
342
- "normalized": false,
343
- "rstrip": false,
344
- "single_word": false,
345
- "special": true
346
- },
347
- "32040": {
348
- "content": "<extra_id_59>",
349
- "lstrip": false,
350
- "normalized": false,
351
- "rstrip": false,
352
- "single_word": false,
353
- "special": true
354
- },
355
- "32041": {
356
- "content": "<extra_id_58>",
357
- "lstrip": false,
358
- "normalized": false,
359
- "rstrip": false,
360
- "single_word": false,
361
- "special": true
362
- },
363
- "32042": {
364
- "content": "<extra_id_57>",
365
- "lstrip": false,
366
- "normalized": false,
367
- "rstrip": false,
368
- "single_word": false,
369
- "special": true
370
- },
371
- "32043": {
372
- "content": "<extra_id_56>",
373
- "lstrip": false,
374
- "normalized": false,
375
- "rstrip": false,
376
- "single_word": false,
377
- "special": true
378
- },
379
- "32044": {
380
- "content": "<extra_id_55>",
381
- "lstrip": false,
382
- "normalized": false,
383
- "rstrip": false,
384
- "single_word": false,
385
- "special": true
386
- },
387
- "32045": {
388
- "content": "<extra_id_54>",
389
- "lstrip": false,
390
- "normalized": false,
391
- "rstrip": false,
392
- "single_word": false,
393
- "special": true
394
- },
395
- "32046": {
396
- "content": "<extra_id_53>",
397
- "lstrip": false,
398
- "normalized": false,
399
- "rstrip": false,
400
- "single_word": false,
401
- "special": true
402
- },
403
- "32047": {
404
- "content": "<extra_id_52>",
405
- "lstrip": false,
406
- "normalized": false,
407
- "rstrip": false,
408
- "single_word": false,
409
- "special": true
410
- },
411
- "32048": {
412
- "content": "<extra_id_51>",
413
- "lstrip": false,
414
- "normalized": false,
415
- "rstrip": false,
416
- "single_word": false,
417
- "special": true
418
- },
419
- "32049": {
420
- "content": "<extra_id_50>",
421
- "lstrip": false,
422
- "normalized": false,
423
- "rstrip": false,
424
- "single_word": false,
425
- "special": true
426
- },
427
- "32050": {
428
- "content": "<extra_id_49>",
429
- "lstrip": false,
430
- "normalized": false,
431
- "rstrip": false,
432
- "single_word": false,
433
- "special": true
434
- },
435
- "32051": {
436
- "content": "<extra_id_48>",
437
- "lstrip": false,
438
- "normalized": false,
439
- "rstrip": false,
440
- "single_word": false,
441
- "special": true
442
- },
443
- "32052": {
444
- "content": "<extra_id_47>",
445
- "lstrip": false,
446
- "normalized": false,
447
- "rstrip": false,
448
- "single_word": false,
449
- "special": true
450
- },
451
- "32053": {
452
- "content": "<extra_id_46>",
453
- "lstrip": false,
454
- "normalized": false,
455
- "rstrip": false,
456
- "single_word": false,
457
- "special": true
458
- },
459
- "32054": {
460
- "content": "<extra_id_45>",
461
- "lstrip": false,
462
- "normalized": false,
463
- "rstrip": false,
464
- "single_word": false,
465
- "special": true
466
- },
467
- "32055": {
468
- "content": "<extra_id_44>",
469
- "lstrip": false,
470
- "normalized": false,
471
- "rstrip": false,
472
- "single_word": false,
473
- "special": true
474
- },
475
- "32056": {
476
- "content": "<extra_id_43>",
477
- "lstrip": false,
478
- "normalized": false,
479
- "rstrip": false,
480
- "single_word": false,
481
- "special": true
482
- },
483
- "32057": {
484
- "content": "<extra_id_42>",
485
- "lstrip": false,
486
- "normalized": false,
487
- "rstrip": false,
488
- "single_word": false,
489
- "special": true
490
- },
491
- "32058": {
492
- "content": "<extra_id_41>",
493
- "lstrip": false,
494
- "normalized": false,
495
- "rstrip": false,
496
- "single_word": false,
497
- "special": true
498
- },
499
- "32059": {
500
- "content": "<extra_id_40>",
501
- "lstrip": false,
502
- "normalized": false,
503
- "rstrip": false,
504
- "single_word": false,
505
- "special": true
506
- },
507
- "32060": {
508
- "content": "<extra_id_39>",
509
- "lstrip": false,
510
- "normalized": false,
511
- "rstrip": false,
512
- "single_word": false,
513
- "special": true
514
- },
515
- "32061": {
516
- "content": "<extra_id_38>",
517
- "lstrip": false,
518
- "normalized": false,
519
- "rstrip": false,
520
- "single_word": false,
521
- "special": true
522
- },
523
- "32062": {
524
- "content": "<extra_id_37>",
525
- "lstrip": false,
526
- "normalized": false,
527
- "rstrip": false,
528
- "single_word": false,
529
- "special": true
530
- },
531
- "32063": {
532
- "content": "<extra_id_36>",
533
- "lstrip": false,
534
- "normalized": false,
535
- "rstrip": false,
536
- "single_word": false,
537
- "special": true
538
- },
539
- "32064": {
540
- "content": "<extra_id_35>",
541
- "lstrip": false,
542
- "normalized": false,
543
- "rstrip": false,
544
- "single_word": false,
545
- "special": true
546
- },
547
- "32065": {
548
- "content": "<extra_id_34>",
549
- "lstrip": false,
550
- "normalized": false,
551
- "rstrip": false,
552
- "single_word": false,
553
- "special": true
554
- },
555
- "32066": {
556
- "content": "<extra_id_33>",
557
- "lstrip": false,
558
- "normalized": false,
559
- "rstrip": false,
560
- "single_word": false,
561
- "special": true
562
- },
563
- "32067": {
564
- "content": "<extra_id_32>",
565
- "lstrip": false,
566
- "normalized": false,
567
- "rstrip": false,
568
- "single_word": false,
569
- "special": true
570
- },
571
- "32068": {
572
- "content": "<extra_id_31>",
573
- "lstrip": false,
574
- "normalized": false,
575
- "rstrip": false,
576
- "single_word": false,
577
- "special": true
578
- },
579
- "32069": {
580
- "content": "<extra_id_30>",
581
- "lstrip": false,
582
- "normalized": false,
583
- "rstrip": false,
584
- "single_word": false,
585
- "special": true
586
- },
587
- "32070": {
588
- "content": "<extra_id_29>",
589
- "lstrip": false,
590
- "normalized": false,
591
- "rstrip": false,
592
- "single_word": false,
593
- "special": true
594
- },
595
- "32071": {
596
- "content": "<extra_id_28>",
597
- "lstrip": false,
598
- "normalized": false,
599
- "rstrip": false,
600
- "single_word": false,
601
- "special": true
602
- },
603
- "32072": {
604
- "content": "<extra_id_27>",
605
- "lstrip": false,
606
- "normalized": false,
607
- "rstrip": false,
608
- "single_word": false,
609
- "special": true
610
- },
611
- "32073": {
612
- "content": "<extra_id_26>",
613
- "lstrip": false,
614
- "normalized": false,
615
- "rstrip": false,
616
- "single_word": false,
617
- "special": true
618
- },
619
- "32074": {
620
- "content": "<extra_id_25>",
621
- "lstrip": false,
622
- "normalized": false,
623
- "rstrip": false,
624
- "single_word": false,
625
- "special": true
626
- },
627
- "32075": {
628
- "content": "<extra_id_24>",
629
- "lstrip": false,
630
- "normalized": false,
631
- "rstrip": false,
632
- "single_word": false,
633
- "special": true
634
- },
635
- "32076": {
636
- "content": "<extra_id_23>",
637
- "lstrip": false,
638
- "normalized": false,
639
- "rstrip": false,
640
- "single_word": false,
641
- "special": true
642
- },
643
- "32077": {
644
- "content": "<extra_id_22>",
645
- "lstrip": false,
646
- "normalized": false,
647
- "rstrip": false,
648
- "single_word": false,
649
- "special": true
650
- },
651
- "32078": {
652
- "content": "<extra_id_21>",
653
- "lstrip": false,
654
- "normalized": false,
655
- "rstrip": false,
656
- "single_word": false,
657
- "special": true
658
- },
659
- "32079": {
660
- "content": "<extra_id_20>",
661
- "lstrip": false,
662
- "normalized": false,
663
- "rstrip": false,
664
- "single_word": false,
665
- "special": true
666
- },
667
- "32080": {
668
- "content": "<extra_id_19>",
669
- "lstrip": false,
670
- "normalized": false,
671
- "rstrip": false,
672
- "single_word": false,
673
- "special": true
674
- },
675
- "32081": {
676
- "content": "<extra_id_18>",
677
- "lstrip": false,
678
- "normalized": false,
679
- "rstrip": false,
680
- "single_word": false,
681
- "special": true
682
- },
683
- "32082": {
684
- "content": "<extra_id_17>",
685
- "lstrip": false,
686
- "normalized": false,
687
- "rstrip": false,
688
- "single_word": false,
689
- "special": true
690
- },
691
- "32083": {
692
- "content": "<extra_id_16>",
693
- "lstrip": false,
694
- "normalized": false,
695
- "rstrip": false,
696
- "single_word": false,
697
- "special": true
698
- },
699
- "32084": {
700
- "content": "<extra_id_15>",
701
- "lstrip": false,
702
- "normalized": false,
703
- "rstrip": false,
704
- "single_word": false,
705
- "special": true
706
- },
707
- "32085": {
708
- "content": "<extra_id_14>",
709
- "lstrip": false,
710
- "normalized": false,
711
- "rstrip": false,
712
- "single_word": false,
713
- "special": true
714
- },
715
- "32086": {
716
- "content": "<extra_id_13>",
717
- "lstrip": false,
718
- "normalized": false,
719
- "rstrip": false,
720
- "single_word": false,
721
- "special": true
722
- },
723
- "32087": {
724
- "content": "<extra_id_12>",
725
- "lstrip": false,
726
- "normalized": false,
727
- "rstrip": false,
728
- "single_word": false,
729
- "special": true
730
- },
731
- "32088": {
732
- "content": "<extra_id_11>",
733
- "lstrip": false,
734
- "normalized": false,
735
- "rstrip": false,
736
- "single_word": false,
737
- "special": true
738
- },
739
- "32089": {
740
- "content": "<extra_id_10>",
741
- "lstrip": false,
742
- "normalized": false,
743
- "rstrip": false,
744
- "single_word": false,
745
- "special": true
746
- },
747
- "32090": {
748
- "content": "<extra_id_9>",
749
- "lstrip": false,
750
- "normalized": false,
751
- "rstrip": false,
752
- "single_word": false,
753
- "special": true
754
- },
755
- "32091": {
756
- "content": "<extra_id_8>",
757
- "lstrip": false,
758
- "normalized": false,
759
- "rstrip": false,
760
- "single_word": false,
761
- "special": true
762
- },
763
- "32092": {
764
- "content": "<extra_id_7>",
765
- "lstrip": false,
766
- "normalized": false,
767
- "rstrip": false,
768
- "single_word": false,
769
- "special": true
770
- },
771
- "32093": {
772
- "content": "<extra_id_6>",
773
- "lstrip": false,
774
- "normalized": false,
775
- "rstrip": false,
776
- "single_word": false,
777
- "special": true
778
- },
779
- "32094": {
780
- "content": "<extra_id_5>",
781
- "lstrip": false,
782
- "normalized": false,
783
- "rstrip": false,
784
- "single_word": false,
785
- "special": true
786
- },
787
- "32095": {
788
- "content": "<extra_id_4>",
789
- "lstrip": false,
790
- "normalized": false,
791
- "rstrip": false,
792
- "single_word": false,
793
- "special": true
794
- },
795
- "32096": {
796
- "content": "<extra_id_3>",
797
- "lstrip": false,
798
- "normalized": false,
799
- "rstrip": false,
800
- "single_word": false,
801
- "special": true
802
- },
803
- "32097": {
804
- "content": "<extra_id_2>",
805
- "lstrip": false,
806
- "normalized": false,
807
- "rstrip": false,
808
- "single_word": false,
809
- "special": true
810
- },
811
- "32098": {
812
- "content": "<extra_id_1>",
813
- "lstrip": false,
814
- "normalized": false,
815
- "rstrip": false,
816
- "single_word": false,
817
- "special": true
818
- },
819
- "32099": {
820
- "content": "<extra_id_0>",
821
- "lstrip": false,
822
- "normalized": false,
823
- "rstrip": false,
824
- "single_word": false,
825
- "special": true
826
- }
827
- },
828
- "additional_special_tokens": [
829
- "<extra_id_0>",
830
- "<extra_id_1>",
831
- "<extra_id_2>",
832
- "<extra_id_3>",
833
- "<extra_id_4>",
834
- "<extra_id_5>",
835
- "<extra_id_6>",
836
- "<extra_id_7>",
837
- "<extra_id_8>",
838
- "<extra_id_9>",
839
- "<extra_id_10>",
840
- "<extra_id_11>",
841
- "<extra_id_12>",
842
- "<extra_id_13>",
843
- "<extra_id_14>",
844
- "<extra_id_15>",
845
- "<extra_id_16>",
846
- "<extra_id_17>",
847
- "<extra_id_18>",
848
- "<extra_id_19>",
849
- "<extra_id_20>",
850
- "<extra_id_21>",
851
- "<extra_id_22>",
852
- "<extra_id_23>",
853
- "<extra_id_24>",
854
- "<extra_id_25>",
855
- "<extra_id_26>",
856
- "<extra_id_27>",
857
- "<extra_id_28>",
858
- "<extra_id_29>",
859
- "<extra_id_30>",
860
- "<extra_id_31>",
861
- "<extra_id_32>",
862
- "<extra_id_33>",
863
- "<extra_id_34>",
864
- "<extra_id_35>",
865
- "<extra_id_36>",
866
- "<extra_id_37>",
867
- "<extra_id_38>",
868
- "<extra_id_39>",
869
- "<extra_id_40>",
870
- "<extra_id_41>",
871
- "<extra_id_42>",
872
- "<extra_id_43>",
873
- "<extra_id_44>",
874
- "<extra_id_45>",
875
- "<extra_id_46>",
876
- "<extra_id_47>",
877
- "<extra_id_48>",
878
- "<extra_id_49>",
879
- "<extra_id_50>",
880
- "<extra_id_51>",
881
- "<extra_id_52>",
882
- "<extra_id_53>",
883
- "<extra_id_54>",
884
- "<extra_id_55>",
885
- "<extra_id_56>",
886
- "<extra_id_57>",
887
- "<extra_id_58>",
888
- "<extra_id_59>",
889
- "<extra_id_60>",
890
- "<extra_id_61>",
891
- "<extra_id_62>",
892
- "<extra_id_63>",
893
- "<extra_id_64>",
894
- "<extra_id_65>",
895
- "<extra_id_66>",
896
- "<extra_id_67>",
897
- "<extra_id_68>",
898
- "<extra_id_69>",
899
- "<extra_id_70>",
900
- "<extra_id_71>",
901
- "<extra_id_72>",
902
- "<extra_id_73>",
903
- "<extra_id_74>",
904
- "<extra_id_75>",
905
- "<extra_id_76>",
906
- "<extra_id_77>",
907
- "<extra_id_78>",
908
- "<extra_id_79>",
909
- "<extra_id_80>",
910
- "<extra_id_81>",
911
- "<extra_id_82>",
912
- "<extra_id_83>",
913
- "<extra_id_84>",
914
- "<extra_id_85>",
915
- "<extra_id_86>",
916
- "<extra_id_87>",
917
- "<extra_id_88>",
918
- "<extra_id_89>",
919
- "<extra_id_90>",
920
- "<extra_id_91>",
921
- "<extra_id_92>",
922
- "<extra_id_93>",
923
- "<extra_id_94>",
924
- "<extra_id_95>",
925
- "<extra_id_96>",
926
- "<extra_id_97>",
927
- "<extra_id_98>",
928
- "<extra_id_99>"
929
- ],
930
- "clean_up_tokenization_spaces": true,
931
- "eos_token": "</s>",
932
- "extra_ids": 100,
933
- "model_max_length": 512,
934
- "pad_token": "</s>",
935
- "sp_model_kwargs": {},
936
- "tokenizer_class": "T5Tokenizer",
937
- "unk_token": "<unk>"
938
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/checkpoint-41000/trainer_state.json DELETED
@@ -1,636 +0,0 @@
1
- {
2
- "best_metric": 0.05535305291414261,
3
- "best_model_checkpoint": "/data/mohamed/checkpoints/ling_disc/deberta-v3-small_flan-t5-base_40/checkpoint-41000",
4
- "epoch": 29.306647605432453,
5
- "eval_steps": 1000,
6
- "global_step": 41000,
7
- "is_hyper_param_search": false,
8
- "is_local_process_zero": true,
9
- "is_world_process_zero": true,
10
- "log_history": [
11
- {
12
- "epoch": 0.71,
13
- "grad_norm": 0.855617344379425,
14
- "learning_rate": 1.1913271384322135e-05,
15
- "loss": 0.9117,
16
- "step": 1000
17
- },
18
- {
19
- "epoch": 0.71,
20
- "eval_loss": 0.6742472052574158,
21
- "eval_runtime": 27.0595,
22
- "eval_samples_per_second": 1111.549,
23
- "eval_steps_per_second": 5.58,
24
- "step": 1000
25
- },
26
- {
27
- "epoch": 1.43,
28
- "grad_norm": 4.203719139099121,
29
- "learning_rate": 2.382654276864427e-05,
30
- "loss": 0.4114,
31
- "step": 2000
32
- },
33
- {
34
- "epoch": 1.43,
35
- "eval_loss": 0.3266257345676422,
36
- "eval_runtime": 26.9318,
37
- "eval_samples_per_second": 1116.822,
38
- "eval_steps_per_second": 5.607,
39
- "step": 2000
40
- },
41
- {
42
- "epoch": 2.14,
43
- "grad_norm": 3.1638591289520264,
44
- "learning_rate": 3.57398141529664e-05,
45
- "loss": 0.2624,
46
- "step": 3000
47
- },
48
- {
49
- "epoch": 2.14,
50
- "eval_loss": 0.24602766335010529,
51
- "eval_runtime": 27.0604,
52
- "eval_samples_per_second": 1111.512,
53
- "eval_steps_per_second": 5.58,
54
- "step": 3000
55
- },
56
- {
57
- "epoch": 2.86,
58
- "grad_norm": 1.7417826652526855,
59
- "learning_rate": 4.765308553728854e-05,
60
- "loss": 0.2002,
61
- "step": 4000
62
- },
63
- {
64
- "epoch": 2.86,
65
- "eval_loss": 0.1770436018705368,
66
- "eval_runtime": 26.8812,
67
- "eval_samples_per_second": 1118.922,
68
- "eval_steps_per_second": 5.617,
69
- "step": 4000
70
- },
71
- {
72
- "epoch": 3.57,
73
- "grad_norm": 1.1299816370010376,
74
- "learning_rate": 4.893707145315437e-05,
75
- "loss": 0.1635,
76
- "step": 5000
77
- },
78
- {
79
- "epoch": 3.57,
80
- "eval_loss": 0.14757415652275085,
81
- "eval_runtime": 26.7857,
82
- "eval_samples_per_second": 1122.914,
83
- "eval_steps_per_second": 5.637,
84
- "step": 5000
85
- },
86
- {
87
- "epoch": 4.29,
88
- "grad_norm": 1.210856556892395,
89
- "learning_rate": 4.761337463267413e-05,
90
- "loss": 0.1404,
91
- "step": 6000
92
- },
93
- {
94
- "epoch": 4.29,
95
- "eval_loss": 0.12851941585540771,
96
- "eval_runtime": 26.9893,
97
- "eval_samples_per_second": 1114.44,
98
- "eval_steps_per_second": 5.595,
99
- "step": 6000
100
- },
101
- {
102
- "epoch": 5.0,
103
- "grad_norm": 2.0565412044525146,
104
- "learning_rate": 4.62896778121939e-05,
105
- "loss": 0.1263,
106
- "step": 7000
107
- },
108
- {
109
- "epoch": 5.0,
110
- "eval_loss": 0.12228666245937347,
111
- "eval_runtime": 26.7363,
112
- "eval_samples_per_second": 1124.987,
113
- "eval_steps_per_second": 5.648,
114
- "step": 7000
115
- },
116
- {
117
- "epoch": 5.72,
118
- "grad_norm": 1.8667607307434082,
119
- "learning_rate": 4.496598099171366e-05,
120
- "loss": 0.1127,
121
- "step": 8000
122
- },
123
- {
124
- "epoch": 5.72,
125
- "eval_loss": 0.11036147177219391,
126
- "eval_runtime": 26.7509,
127
- "eval_samples_per_second": 1124.375,
128
- "eval_steps_per_second": 5.645,
129
- "step": 8000
130
- },
131
- {
132
- "epoch": 6.43,
133
- "grad_norm": 0.7492337226867676,
134
- "learning_rate": 4.364228417123342e-05,
135
- "loss": 0.1059,
136
- "step": 9000
137
- },
138
- {
139
- "epoch": 6.43,
140
- "eval_loss": 0.10317497700452805,
141
- "eval_runtime": 27.0158,
142
- "eval_samples_per_second": 1113.349,
143
- "eval_steps_per_second": 5.589,
144
- "step": 9000
145
- },
146
- {
147
- "epoch": 7.15,
148
- "grad_norm": 0.7611485123634338,
149
- "learning_rate": 4.231858735075319e-05,
150
- "loss": 0.0993,
151
- "step": 10000
152
- },
153
- {
154
- "epoch": 7.15,
155
- "eval_loss": 0.10284282267093658,
156
- "eval_runtime": 26.795,
157
- "eval_samples_per_second": 1122.524,
158
- "eval_steps_per_second": 5.635,
159
- "step": 10000
160
- },
161
- {
162
- "epoch": 7.86,
163
- "grad_norm": 0.5870215892791748,
164
- "learning_rate": 4.099489053027295e-05,
165
- "loss": 0.0887,
166
- "step": 11000
167
- },
168
- {
169
- "epoch": 7.86,
170
- "eval_loss": 0.09789762645959854,
171
- "eval_runtime": 26.8453,
172
- "eval_samples_per_second": 1120.419,
173
- "eval_steps_per_second": 5.625,
174
- "step": 11000
175
- },
176
- {
177
- "epoch": 8.58,
178
- "grad_norm": 0.48922085762023926,
179
- "learning_rate": 3.9671193709792706e-05,
180
- "loss": 0.0842,
181
- "step": 12000
182
- },
183
- {
184
- "epoch": 8.58,
185
- "eval_loss": 0.09349656105041504,
186
- "eval_runtime": 26.8273,
187
- "eval_samples_per_second": 1121.172,
188
- "eval_steps_per_second": 5.629,
189
- "step": 12000
190
- },
191
- {
192
- "epoch": 9.29,
193
- "grad_norm": 0.4252859354019165,
194
- "learning_rate": 3.8347496889312476e-05,
195
- "loss": 0.0793,
196
- "step": 13000
197
- },
198
- {
199
- "epoch": 9.29,
200
- "eval_loss": 0.09415590018033981,
201
- "eval_runtime": 25.9362,
202
- "eval_samples_per_second": 1159.693,
203
- "eval_steps_per_second": 5.822,
204
- "step": 13000
205
- },
206
- {
207
- "epoch": 10.01,
208
- "grad_norm": 0.44548505544662476,
209
- "learning_rate": 3.702380006883224e-05,
210
- "loss": 0.076,
211
- "step": 14000
212
- },
213
- {
214
- "epoch": 10.01,
215
- "eval_loss": 0.08913980424404144,
216
- "eval_runtime": 26.7379,
217
- "eval_samples_per_second": 1124.919,
218
- "eval_steps_per_second": 5.647,
219
- "step": 14000
220
- },
221
- {
222
- "epoch": 10.72,
223
- "grad_norm": 0.2965373694896698,
224
- "learning_rate": 3.5700103248352e-05,
225
- "loss": 0.0714,
226
- "step": 15000
227
- },
228
- {
229
- "epoch": 10.72,
230
- "eval_loss": 0.08456840366125107,
231
- "eval_runtime": 26.787,
232
- "eval_samples_per_second": 1122.857,
233
- "eval_steps_per_second": 5.637,
234
- "step": 15000
235
- },
236
- {
237
- "epoch": 11.44,
238
- "grad_norm": 0.3205694854259491,
239
- "learning_rate": 3.437640642787176e-05,
240
- "loss": 0.0677,
241
- "step": 16000
242
- },
243
- {
244
- "epoch": 11.44,
245
- "eval_loss": 0.07863688468933105,
246
- "eval_runtime": 26.8242,
247
- "eval_samples_per_second": 1121.299,
248
- "eval_steps_per_second": 5.629,
249
- "step": 16000
250
- },
251
- {
252
- "epoch": 12.15,
253
- "grad_norm": 0.2736203670501709,
254
- "learning_rate": 3.3052709607391525e-05,
255
- "loss": 0.0636,
256
- "step": 17000
257
- },
258
- {
259
- "epoch": 12.15,
260
- "eval_loss": 0.07664181292057037,
261
- "eval_runtime": 26.7818,
262
- "eval_samples_per_second": 1123.077,
263
- "eval_steps_per_second": 5.638,
264
- "step": 17000
265
- },
266
- {
267
- "epoch": 12.87,
268
- "grad_norm": 0.25644680857658386,
269
- "learning_rate": 3.172901278691129e-05,
270
- "loss": 0.0618,
271
- "step": 18000
272
- },
273
- {
274
- "epoch": 12.87,
275
- "eval_loss": 0.07351888716220856,
276
- "eval_runtime": 26.8445,
277
- "eval_samples_per_second": 1120.453,
278
- "eval_steps_per_second": 5.625,
279
- "step": 18000
280
- },
281
- {
282
- "epoch": 13.58,
283
- "grad_norm": 0.2748676538467407,
284
- "learning_rate": 3.0405315966431053e-05,
285
- "loss": 0.0584,
286
- "step": 19000
287
- },
288
- {
289
- "epoch": 13.58,
290
- "eval_loss": 0.07314006239175797,
291
- "eval_runtime": 26.8333,
292
- "eval_samples_per_second": 1120.921,
293
- "eval_steps_per_second": 5.627,
294
- "step": 19000
295
- },
296
- {
297
- "epoch": 14.3,
298
- "grad_norm": 0.30235132575035095,
299
- "learning_rate": 2.9081619145950812e-05,
300
- "loss": 0.057,
301
- "step": 20000
302
- },
303
- {
304
- "epoch": 14.3,
305
- "eval_loss": 0.07568340748548508,
306
- "eval_runtime": 27.0109,
307
- "eval_samples_per_second": 1113.55,
308
- "eval_steps_per_second": 5.59,
309
- "step": 20000
310
- },
311
- {
312
- "epoch": 15.01,
313
- "grad_norm": 0.2508692145347595,
314
- "learning_rate": 2.7757922325470574e-05,
315
- "loss": 0.0558,
316
- "step": 21000
317
- },
318
- {
319
- "epoch": 15.01,
320
- "eval_loss": 0.07675843685865402,
321
- "eval_runtime": 26.9026,
322
- "eval_samples_per_second": 1118.032,
323
- "eval_steps_per_second": 5.613,
324
- "step": 21000
325
- },
326
- {
327
- "epoch": 15.73,
328
- "grad_norm": 0.3341030478477478,
329
- "learning_rate": 2.643422550499034e-05,
330
- "loss": 0.0533,
331
- "step": 22000
332
- },
333
- {
334
- "epoch": 15.73,
335
- "eval_loss": 0.07339715212583542,
336
- "eval_runtime": 26.8727,
337
- "eval_samples_per_second": 1119.278,
338
- "eval_steps_per_second": 5.619,
339
- "step": 22000
340
- },
341
- {
342
- "epoch": 16.44,
343
- "grad_norm": 0.30433303117752075,
344
- "learning_rate": 2.51105286845101e-05,
345
- "loss": 0.0516,
346
- "step": 23000
347
- },
348
- {
349
- "epoch": 16.44,
350
- "eval_loss": 0.0694783553481102,
351
- "eval_runtime": 26.8551,
352
- "eval_samples_per_second": 1120.012,
353
- "eval_steps_per_second": 5.623,
354
- "step": 23000
355
- },
356
- {
357
- "epoch": 17.16,
358
- "grad_norm": 0.39424875378608704,
359
- "learning_rate": 2.378683186402986e-05,
360
- "loss": 0.049,
361
- "step": 24000
362
- },
363
- {
364
- "epoch": 17.16,
365
- "eval_loss": 0.06750107556581497,
366
- "eval_runtime": 26.9045,
367
- "eval_samples_per_second": 1117.954,
368
- "eval_steps_per_second": 5.612,
369
- "step": 24000
370
- },
371
- {
372
- "epoch": 17.87,
373
- "grad_norm": 0.29526183009147644,
374
- "learning_rate": 2.2463135043549627e-05,
375
- "loss": 0.0478,
376
- "step": 25000
377
- },
378
- {
379
- "epoch": 17.87,
380
- "eval_loss": 0.06841529905796051,
381
- "eval_runtime": 26.9131,
382
- "eval_samples_per_second": 1117.597,
383
- "eval_steps_per_second": 5.611,
384
- "step": 25000
385
- },
386
- {
387
- "epoch": 18.58,
388
- "grad_norm": 0.2802821099758148,
389
- "learning_rate": 2.113943822306939e-05,
390
- "loss": 0.0472,
391
- "step": 26000
392
- },
393
- {
394
- "epoch": 18.58,
395
- "eval_loss": 0.0680340975522995,
396
- "eval_runtime": 26.8442,
397
- "eval_samples_per_second": 1120.467,
398
- "eval_steps_per_second": 5.625,
399
- "step": 26000
400
- },
401
- {
402
- "epoch": 19.3,
403
- "grad_norm": 0.198490172624588,
404
- "learning_rate": 1.9815741402589152e-05,
405
- "loss": 0.0445,
406
- "step": 27000
407
- },
408
- {
409
- "epoch": 19.3,
410
- "eval_loss": 0.059882719069719315,
411
- "eval_runtime": 26.9691,
412
- "eval_samples_per_second": 1115.275,
413
- "eval_steps_per_second": 5.599,
414
- "step": 27000
415
- },
416
- {
417
- "epoch": 20.01,
418
- "grad_norm": 0.3383251130580902,
419
- "learning_rate": 1.8492044582108914e-05,
420
- "loss": 0.0435,
421
- "step": 28000
422
- },
423
- {
424
- "epoch": 20.01,
425
- "eval_loss": 0.06356318295001984,
426
- "eval_runtime": 26.8538,
427
- "eval_samples_per_second": 1120.066,
428
- "eval_steps_per_second": 5.623,
429
- "step": 28000
430
- },
431
- {
432
- "epoch": 20.73,
433
- "grad_norm": 0.16571784019470215,
434
- "learning_rate": 1.7168347761628677e-05,
435
- "loss": 0.0419,
436
- "step": 29000
437
- },
438
- {
439
- "epoch": 20.73,
440
- "eval_loss": 0.06056862324476242,
441
- "eval_runtime": 27.0748,
442
- "eval_samples_per_second": 1110.924,
443
- "eval_steps_per_second": 5.577,
444
- "step": 29000
445
- },
446
- {
447
- "epoch": 21.44,
448
- "grad_norm": 0.19518467783927917,
449
- "learning_rate": 1.584465094114844e-05,
450
- "loss": 0.0409,
451
- "step": 30000
452
- },
453
- {
454
- "epoch": 21.44,
455
- "eval_loss": 0.06490638852119446,
456
- "eval_runtime": 26.8481,
457
- "eval_samples_per_second": 1120.301,
458
- "eval_steps_per_second": 5.624,
459
- "step": 30000
460
- },
461
- {
462
- "epoch": 22.16,
463
- "grad_norm": 0.15420591831207275,
464
- "learning_rate": 1.4520954120668203e-05,
465
- "loss": 0.0397,
466
- "step": 31000
467
- },
468
- {
469
- "epoch": 22.16,
470
- "eval_loss": 0.05918469280004501,
471
- "eval_runtime": 26.8143,
472
- "eval_samples_per_second": 1121.713,
473
- "eval_steps_per_second": 5.631,
474
- "step": 31000
475
- },
476
- {
477
- "epoch": 22.87,
478
- "grad_norm": 0.26854997873306274,
479
- "learning_rate": 1.3197257300187965e-05,
480
- "loss": 0.0387,
481
- "step": 32000
482
- },
483
- {
484
- "epoch": 22.87,
485
- "eval_loss": 0.06144551932811737,
486
- "eval_runtime": 26.8852,
487
- "eval_samples_per_second": 1118.757,
488
- "eval_steps_per_second": 5.616,
489
- "step": 32000
490
- },
491
- {
492
- "epoch": 23.59,
493
- "grad_norm": 0.17430314421653748,
494
- "learning_rate": 1.1873560479707728e-05,
495
- "loss": 0.0373,
496
- "step": 33000
497
- },
498
- {
499
- "epoch": 23.59,
500
- "eval_loss": 0.06159648299217224,
501
- "eval_runtime": 26.7887,
502
- "eval_samples_per_second": 1122.785,
503
- "eval_steps_per_second": 5.637,
504
- "step": 33000
505
- },
506
- {
507
- "epoch": 24.3,
508
- "grad_norm": 0.14911049604415894,
509
- "learning_rate": 1.054986365922749e-05,
510
- "loss": 0.0369,
511
- "step": 34000
512
- },
513
- {
514
- "epoch": 24.3,
515
- "eval_loss": 0.05931873992085457,
516
- "eval_runtime": 26.8571,
517
- "eval_samples_per_second": 1119.926,
518
- "eval_steps_per_second": 5.622,
519
- "step": 34000
520
- },
521
- {
522
- "epoch": 25.02,
523
- "grad_norm": 0.13620807230472565,
524
- "learning_rate": 9.226166838747254e-06,
525
- "loss": 0.0361,
526
- "step": 35000
527
- },
528
- {
529
- "epoch": 25.02,
530
- "eval_loss": 0.05695568770170212,
531
- "eval_runtime": 26.8966,
532
- "eval_samples_per_second": 1118.283,
533
- "eval_steps_per_second": 5.614,
534
- "step": 35000
535
- },
536
- {
537
- "epoch": 25.73,
538
- "grad_norm": 0.13764438033103943,
539
- "learning_rate": 7.902470018267017e-06,
540
- "loss": 0.0349,
541
- "step": 36000
542
- },
543
- {
544
- "epoch": 25.73,
545
- "eval_loss": 0.05707501247525215,
546
- "eval_runtime": 26.986,
547
- "eval_samples_per_second": 1114.578,
548
- "eval_steps_per_second": 5.595,
549
- "step": 36000
550
- },
551
- {
552
- "epoch": 26.45,
553
- "grad_norm": 0.2389635145664215,
554
- "learning_rate": 6.578773197786779e-06,
555
- "loss": 0.0343,
556
- "step": 37000
557
- },
558
- {
559
- "epoch": 26.45,
560
- "eval_loss": 0.0577365942299366,
561
- "eval_runtime": 26.9903,
562
- "eval_samples_per_second": 1114.401,
563
- "eval_steps_per_second": 5.595,
564
- "step": 37000
565
- },
566
- {
567
- "epoch": 27.16,
568
- "grad_norm": 0.15828461945056915,
569
- "learning_rate": 5.255076377306542e-06,
570
- "loss": 0.034,
571
- "step": 38000
572
- },
573
- {
574
- "epoch": 27.16,
575
- "eval_loss": 0.05767366662621498,
576
- "eval_runtime": 27.1454,
577
- "eval_samples_per_second": 1108.035,
578
- "eval_steps_per_second": 5.563,
579
- "step": 38000
580
- },
581
- {
582
- "epoch": 27.88,
583
- "grad_norm": 0.1059570387005806,
584
- "learning_rate": 3.9313795568263045e-06,
585
- "loss": 0.0332,
586
- "step": 39000
587
- },
588
- {
589
- "epoch": 27.88,
590
- "eval_loss": 0.056225307285785675,
591
- "eval_runtime": 26.9534,
592
- "eval_samples_per_second": 1115.928,
593
- "eval_steps_per_second": 5.602,
594
- "step": 39000
595
- },
596
- {
597
- "epoch": 28.59,
598
- "grad_norm": 0.1975150853395462,
599
- "learning_rate": 2.6076827363460673e-06,
600
- "loss": 0.0329,
601
- "step": 40000
602
- },
603
- {
604
- "epoch": 28.59,
605
- "eval_loss": 0.05555161088705063,
606
- "eval_runtime": 27.1187,
607
- "eval_samples_per_second": 1109.122,
608
- "eval_steps_per_second": 5.568,
609
- "step": 40000
610
- },
611
- {
612
- "epoch": 29.31,
613
- "grad_norm": 0.1037423312664032,
614
- "learning_rate": 1.28398591586583e-06,
615
- "loss": 0.0319,
616
- "step": 41000
617
- },
618
- {
619
- "epoch": 29.31,
620
- "eval_loss": 0.05535305291414261,
621
- "eval_runtime": 26.8353,
622
- "eval_samples_per_second": 1120.838,
623
- "eval_steps_per_second": 5.627,
624
- "step": 41000
625
- }
626
- ],
627
- "logging_steps": 1000,
628
- "max_steps": 41970,
629
- "num_input_tokens_seen": 0,
630
- "num_train_epochs": 30,
631
- "save_steps": 1000,
632
- "total_flos": 3.270624085088659e+16,
633
- "train_batch_size": 200,
634
- "trial_name": null,
635
- "trial_params": null
636
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/checkpoint-41000/training_args.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:deb9dc15db671f7ae0b9e7e7bc26ca9e20c0fde45babc266a60753e2b23d6328
3
- size 4984
 
 
 
 
ckpt/ling_disc/config.json DELETED
@@ -1,120 +0,0 @@
1
- {
2
- "_name_or_path": "microsoft/deberta-v3-small",
3
- "architectures": [
4
- "DebertaReplacedTokenizer"
5
- ],
6
- "attention_probs_dropout_prob": 0.1,
7
- "hidden_act": "gelu",
8
- "hidden_dropout_prob": 0.1,
9
- "hidden_size": 768,
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
- "11": "LABEL_11",
23
- "12": "LABEL_12",
24
- "13": "LABEL_13",
25
- "14": "LABEL_14",
26
- "15": "LABEL_15",
27
- "16": "LABEL_16",
28
- "17": "LABEL_17",
29
- "18": "LABEL_18",
30
- "19": "LABEL_19",
31
- "20": "LABEL_20",
32
- "21": "LABEL_21",
33
- "22": "LABEL_22",
34
- "23": "LABEL_23",
35
- "24": "LABEL_24",
36
- "25": "LABEL_25",
37
- "26": "LABEL_26",
38
- "27": "LABEL_27",
39
- "28": "LABEL_28",
40
- "29": "LABEL_29",
41
- "30": "LABEL_30",
42
- "31": "LABEL_31",
43
- "32": "LABEL_32",
44
- "33": "LABEL_33",
45
- "34": "LABEL_34",
46
- "35": "LABEL_35",
47
- "36": "LABEL_36",
48
- "37": "LABEL_37",
49
- "38": "LABEL_38",
50
- "39": "LABEL_39"
51
- },
52
- "initializer_range": 0.02,
53
- "intermediate_size": 3072,
54
- "label2id": {
55
- "LABEL_0": 0,
56
- "LABEL_1": 1,
57
- "LABEL_10": 10,
58
- "LABEL_11": 11,
59
- "LABEL_12": 12,
60
- "LABEL_13": 13,
61
- "LABEL_14": 14,
62
- "LABEL_15": 15,
63
- "LABEL_16": 16,
64
- "LABEL_17": 17,
65
- "LABEL_18": 18,
66
- "LABEL_19": 19,
67
- "LABEL_2": 2,
68
- "LABEL_20": 20,
69
- "LABEL_21": 21,
70
- "LABEL_22": 22,
71
- "LABEL_23": 23,
72
- "LABEL_24": 24,
73
- "LABEL_25": 25,
74
- "LABEL_26": 26,
75
- "LABEL_27": 27,
76
- "LABEL_28": 28,
77
- "LABEL_29": 29,
78
- "LABEL_3": 3,
79
- "LABEL_30": 30,
80
- "LABEL_31": 31,
81
- "LABEL_32": 32,
82
- "LABEL_33": 33,
83
- "LABEL_34": 34,
84
- "LABEL_35": 35,
85
- "LABEL_36": 36,
86
- "LABEL_37": 37,
87
- "LABEL_38": 38,
88
- "LABEL_39": 39,
89
- "LABEL_4": 4,
90
- "LABEL_5": 5,
91
- "LABEL_6": 6,
92
- "LABEL_7": 7,
93
- "LABEL_8": 8,
94
- "LABEL_9": 9
95
- },
96
- "layer_norm_eps": 1e-07,
97
- "max_position_embeddings": 512,
98
- "max_relative_positions": -1,
99
- "model_type": "deberta-v2",
100
- "norm_rel_ebd": "layer_norm",
101
- "num_attention_heads": 12,
102
- "num_hidden_layers": 6,
103
- "pad_token_id": 0,
104
- "pooler_dropout": 0,
105
- "pooler_hidden_act": "gelu",
106
- "pooler_hidden_size": 768,
107
- "pos_att_type": [
108
- "p2c",
109
- "c2p"
110
- ],
111
- "position_biased_input": false,
112
- "position_buckets": 256,
113
- "problem_type": "regression",
114
- "relative_attention": true,
115
- "share_att_key": true,
116
- "torch_dtype": "float32",
117
- "transformers_version": "4.39.3",
118
- "type_vocab_size": 0,
119
- "vocab_size": 128100
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/model.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:15221fd5565118b32b1adf7b42c27cae6a3d8dd32b0ef85473b70bb072964661
3
- size 275252064
 
 
 
 
ckpt/ling_disc/scaler.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1dbad9723e37379b55bb6d7300abf6ad705f320bd599ca7f583e574f4a26f4a4
3
- size 1575
 
 
 
 
ckpt/ling_disc/special_tokens_map.json DELETED
@@ -1,119 +0,0 @@
1
- {
2
- "additional_special_tokens": [
3
- "<extra_id_0>",
4
- "<extra_id_1>",
5
- "<extra_id_2>",
6
- "<extra_id_3>",
7
- "<extra_id_4>",
8
- "<extra_id_5>",
9
- "<extra_id_6>",
10
- "<extra_id_7>",
11
- "<extra_id_8>",
12
- "<extra_id_9>",
13
- "<extra_id_10>",
14
- "<extra_id_11>",
15
- "<extra_id_12>",
16
- "<extra_id_13>",
17
- "<extra_id_14>",
18
- "<extra_id_15>",
19
- "<extra_id_16>",
20
- "<extra_id_17>",
21
- "<extra_id_18>",
22
- "<extra_id_19>",
23
- "<extra_id_20>",
24
- "<extra_id_21>",
25
- "<extra_id_22>",
26
- "<extra_id_23>",
27
- "<extra_id_24>",
28
- "<extra_id_25>",
29
- "<extra_id_26>",
30
- "<extra_id_27>",
31
- "<extra_id_28>",
32
- "<extra_id_29>",
33
- "<extra_id_30>",
34
- "<extra_id_31>",
35
- "<extra_id_32>",
36
- "<extra_id_33>",
37
- "<extra_id_34>",
38
- "<extra_id_35>",
39
- "<extra_id_36>",
40
- "<extra_id_37>",
41
- "<extra_id_38>",
42
- "<extra_id_39>",
43
- "<extra_id_40>",
44
- "<extra_id_41>",
45
- "<extra_id_42>",
46
- "<extra_id_43>",
47
- "<extra_id_44>",
48
- "<extra_id_45>",
49
- "<extra_id_46>",
50
- "<extra_id_47>",
51
- "<extra_id_48>",
52
- "<extra_id_49>",
53
- "<extra_id_50>",
54
- "<extra_id_51>",
55
- "<extra_id_52>",
56
- "<extra_id_53>",
57
- "<extra_id_54>",
58
- "<extra_id_55>",
59
- "<extra_id_56>",
60
- "<extra_id_57>",
61
- "<extra_id_58>",
62
- "<extra_id_59>",
63
- "<extra_id_60>",
64
- "<extra_id_61>",
65
- "<extra_id_62>",
66
- "<extra_id_63>",
67
- "<extra_id_64>",
68
- "<extra_id_65>",
69
- "<extra_id_66>",
70
- "<extra_id_67>",
71
- "<extra_id_68>",
72
- "<extra_id_69>",
73
- "<extra_id_70>",
74
- "<extra_id_71>",
75
- "<extra_id_72>",
76
- "<extra_id_73>",
77
- "<extra_id_74>",
78
- "<extra_id_75>",
79
- "<extra_id_76>",
80
- "<extra_id_77>",
81
- "<extra_id_78>",
82
- "<extra_id_79>",
83
- "<extra_id_80>",
84
- "<extra_id_81>",
85
- "<extra_id_82>",
86
- "<extra_id_83>",
87
- "<extra_id_84>",
88
- "<extra_id_85>",
89
- "<extra_id_86>",
90
- "<extra_id_87>",
91
- "<extra_id_88>",
92
- "<extra_id_89>",
93
- "<extra_id_90>",
94
- "<extra_id_91>",
95
- "<extra_id_92>",
96
- "<extra_id_93>",
97
- "<extra_id_94>",
98
- "<extra_id_95>",
99
- "<extra_id_96>",
100
- "<extra_id_97>",
101
- "<extra_id_98>",
102
- "<extra_id_99>"
103
- ],
104
- "eos_token": {
105
- "content": "</s>",
106
- "lstrip": false,
107
- "normalized": false,
108
- "rstrip": false,
109
- "single_word": false
110
- },
111
- "pad_token": "</s>",
112
- "unk_token": {
113
- "content": "<unk>",
114
- "lstrip": false,
115
- "normalized": false,
116
- "rstrip": false,
117
- "single_word": false
118
- }
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/spiece.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d60acb128cf7b7f2536e8f38a5b18a05535c9e14c7a355904270e15b0945ea86
3
- size 791656
 
 
 
 
ckpt/ling_disc/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
ckpt/ling_disc/tokenizer_config.json DELETED
@@ -1,938 +0,0 @@
1
- {
2
- "added_tokens_decoder": {
3
- "0": {
4
- "content": "<pad>",
5
- "lstrip": false,
6
- "normalized": false,
7
- "rstrip": false,
8
- "single_word": false,
9
- "special": true
10
- },
11
- "1": {
12
- "content": "</s>",
13
- "lstrip": false,
14
- "normalized": false,
15
- "rstrip": false,
16
- "single_word": false,
17
- "special": true
18
- },
19
- "2": {
20
- "content": "<unk>",
21
- "lstrip": false,
22
- "normalized": false,
23
- "rstrip": false,
24
- "single_word": false,
25
- "special": true
26
- },
27
- "32000": {
28
- "content": "<extra_id_99>",
29
- "lstrip": false,
30
- "normalized": false,
31
- "rstrip": false,
32
- "single_word": false,
33
- "special": true
34
- },
35
- "32001": {
36
- "content": "<extra_id_98>",
37
- "lstrip": false,
38
- "normalized": false,
39
- "rstrip": false,
40
- "single_word": false,
41
- "special": true
42
- },
43
- "32002": {
44
- "content": "<extra_id_97>",
45
- "lstrip": false,
46
- "normalized": false,
47
- "rstrip": false,
48
- "single_word": false,
49
- "special": true
50
- },
51
- "32003": {
52
- "content": "<extra_id_96>",
53
- "lstrip": false,
54
- "normalized": false,
55
- "rstrip": false,
56
- "single_word": false,
57
- "special": true
58
- },
59
- "32004": {
60
- "content": "<extra_id_95>",
61
- "lstrip": false,
62
- "normalized": false,
63
- "rstrip": false,
64
- "single_word": false,
65
- "special": true
66
- },
67
- "32005": {
68
- "content": "<extra_id_94>",
69
- "lstrip": false,
70
- "normalized": false,
71
- "rstrip": false,
72
- "single_word": false,
73
- "special": true
74
- },
75
- "32006": {
76
- "content": "<extra_id_93>",
77
- "lstrip": false,
78
- "normalized": false,
79
- "rstrip": false,
80
- "single_word": false,
81
- "special": true
82
- },
83
- "32007": {
84
- "content": "<extra_id_92>",
85
- "lstrip": false,
86
- "normalized": false,
87
- "rstrip": false,
88
- "single_word": false,
89
- "special": true
90
- },
91
- "32008": {
92
- "content": "<extra_id_91>",
93
- "lstrip": false,
94
- "normalized": false,
95
- "rstrip": false,
96
- "single_word": false,
97
- "special": true
98
- },
99
- "32009": {
100
- "content": "<extra_id_90>",
101
- "lstrip": false,
102
- "normalized": false,
103
- "rstrip": false,
104
- "single_word": false,
105
- "special": true
106
- },
107
- "32010": {
108
- "content": "<extra_id_89>",
109
- "lstrip": false,
110
- "normalized": false,
111
- "rstrip": false,
112
- "single_word": false,
113
- "special": true
114
- },
115
- "32011": {
116
- "content": "<extra_id_88>",
117
- "lstrip": false,
118
- "normalized": false,
119
- "rstrip": false,
120
- "single_word": false,
121
- "special": true
122
- },
123
- "32012": {
124
- "content": "<extra_id_87>",
125
- "lstrip": false,
126
- "normalized": false,
127
- "rstrip": false,
128
- "single_word": false,
129
- "special": true
130
- },
131
- "32013": {
132
- "content": "<extra_id_86>",
133
- "lstrip": false,
134
- "normalized": false,
135
- "rstrip": false,
136
- "single_word": false,
137
- "special": true
138
- },
139
- "32014": {
140
- "content": "<extra_id_85>",
141
- "lstrip": false,
142
- "normalized": false,
143
- "rstrip": false,
144
- "single_word": false,
145
- "special": true
146
- },
147
- "32015": {
148
- "content": "<extra_id_84>",
149
- "lstrip": false,
150
- "normalized": false,
151
- "rstrip": false,
152
- "single_word": false,
153
- "special": true
154
- },
155
- "32016": {
156
- "content": "<extra_id_83>",
157
- "lstrip": false,
158
- "normalized": false,
159
- "rstrip": false,
160
- "single_word": false,
161
- "special": true
162
- },
163
- "32017": {
164
- "content": "<extra_id_82>",
165
- "lstrip": false,
166
- "normalized": false,
167
- "rstrip": false,
168
- "single_word": false,
169
- "special": true
170
- },
171
- "32018": {
172
- "content": "<extra_id_81>",
173
- "lstrip": false,
174
- "normalized": false,
175
- "rstrip": false,
176
- "single_word": false,
177
- "special": true
178
- },
179
- "32019": {
180
- "content": "<extra_id_80>",
181
- "lstrip": false,
182
- "normalized": false,
183
- "rstrip": false,
184
- "single_word": false,
185
- "special": true
186
- },
187
- "32020": {
188
- "content": "<extra_id_79>",
189
- "lstrip": false,
190
- "normalized": false,
191
- "rstrip": false,
192
- "single_word": false,
193
- "special": true
194
- },
195
- "32021": {
196
- "content": "<extra_id_78>",
197
- "lstrip": false,
198
- "normalized": false,
199
- "rstrip": false,
200
- "single_word": false,
201
- "special": true
202
- },
203
- "32022": {
204
- "content": "<extra_id_77>",
205
- "lstrip": false,
206
- "normalized": false,
207
- "rstrip": false,
208
- "single_word": false,
209
- "special": true
210
- },
211
- "32023": {
212
- "content": "<extra_id_76>",
213
- "lstrip": false,
214
- "normalized": false,
215
- "rstrip": false,
216
- "single_word": false,
217
- "special": true
218
- },
219
- "32024": {
220
- "content": "<extra_id_75>",
221
- "lstrip": false,
222
- "normalized": false,
223
- "rstrip": false,
224
- "single_word": false,
225
- "special": true
226
- },
227
- "32025": {
228
- "content": "<extra_id_74>",
229
- "lstrip": false,
230
- "normalized": false,
231
- "rstrip": false,
232
- "single_word": false,
233
- "special": true
234
- },
235
- "32026": {
236
- "content": "<extra_id_73>",
237
- "lstrip": false,
238
- "normalized": false,
239
- "rstrip": false,
240
- "single_word": false,
241
- "special": true
242
- },
243
- "32027": {
244
- "content": "<extra_id_72>",
245
- "lstrip": false,
246
- "normalized": false,
247
- "rstrip": false,
248
- "single_word": false,
249
- "special": true
250
- },
251
- "32028": {
252
- "content": "<extra_id_71>",
253
- "lstrip": false,
254
- "normalized": false,
255
- "rstrip": false,
256
- "single_word": false,
257
- "special": true
258
- },
259
- "32029": {
260
- "content": "<extra_id_70>",
261
- "lstrip": false,
262
- "normalized": false,
263
- "rstrip": false,
264
- "single_word": false,
265
- "special": true
266
- },
267
- "32030": {
268
- "content": "<extra_id_69>",
269
- "lstrip": false,
270
- "normalized": false,
271
- "rstrip": false,
272
- "single_word": false,
273
- "special": true
274
- },
275
- "32031": {
276
- "content": "<extra_id_68>",
277
- "lstrip": false,
278
- "normalized": false,
279
- "rstrip": false,
280
- "single_word": false,
281
- "special": true
282
- },
283
- "32032": {
284
- "content": "<extra_id_67>",
285
- "lstrip": false,
286
- "normalized": false,
287
- "rstrip": false,
288
- "single_word": false,
289
- "special": true
290
- },
291
- "32033": {
292
- "content": "<extra_id_66>",
293
- "lstrip": false,
294
- "normalized": false,
295
- "rstrip": false,
296
- "single_word": false,
297
- "special": true
298
- },
299
- "32034": {
300
- "content": "<extra_id_65>",
301
- "lstrip": false,
302
- "normalized": false,
303
- "rstrip": false,
304
- "single_word": false,
305
- "special": true
306
- },
307
- "32035": {
308
- "content": "<extra_id_64>",
309
- "lstrip": false,
310
- "normalized": false,
311
- "rstrip": false,
312
- "single_word": false,
313
- "special": true
314
- },
315
- "32036": {
316
- "content": "<extra_id_63>",
317
- "lstrip": false,
318
- "normalized": false,
319
- "rstrip": false,
320
- "single_word": false,
321
- "special": true
322
- },
323
- "32037": {
324
- "content": "<extra_id_62>",
325
- "lstrip": false,
326
- "normalized": false,
327
- "rstrip": false,
328
- "single_word": false,
329
- "special": true
330
- },
331
- "32038": {
332
- "content": "<extra_id_61>",
333
- "lstrip": false,
334
- "normalized": false,
335
- "rstrip": false,
336
- "single_word": false,
337
- "special": true
338
- },
339
- "32039": {
340
- "content": "<extra_id_60>",
341
- "lstrip": false,
342
- "normalized": false,
343
- "rstrip": false,
344
- "single_word": false,
345
- "special": true
346
- },
347
- "32040": {
348
- "content": "<extra_id_59>",
349
- "lstrip": false,
350
- "normalized": false,
351
- "rstrip": false,
352
- "single_word": false,
353
- "special": true
354
- },
355
- "32041": {
356
- "content": "<extra_id_58>",
357
- "lstrip": false,
358
- "normalized": false,
359
- "rstrip": false,
360
- "single_word": false,
361
- "special": true
362
- },
363
- "32042": {
364
- "content": "<extra_id_57>",
365
- "lstrip": false,
366
- "normalized": false,
367
- "rstrip": false,
368
- "single_word": false,
369
- "special": true
370
- },
371
- "32043": {
372
- "content": "<extra_id_56>",
373
- "lstrip": false,
374
- "normalized": false,
375
- "rstrip": false,
376
- "single_word": false,
377
- "special": true
378
- },
379
- "32044": {
380
- "content": "<extra_id_55>",
381
- "lstrip": false,
382
- "normalized": false,
383
- "rstrip": false,
384
- "single_word": false,
385
- "special": true
386
- },
387
- "32045": {
388
- "content": "<extra_id_54>",
389
- "lstrip": false,
390
- "normalized": false,
391
- "rstrip": false,
392
- "single_word": false,
393
- "special": true
394
- },
395
- "32046": {
396
- "content": "<extra_id_53>",
397
- "lstrip": false,
398
- "normalized": false,
399
- "rstrip": false,
400
- "single_word": false,
401
- "special": true
402
- },
403
- "32047": {
404
- "content": "<extra_id_52>",
405
- "lstrip": false,
406
- "normalized": false,
407
- "rstrip": false,
408
- "single_word": false,
409
- "special": true
410
- },
411
- "32048": {
412
- "content": "<extra_id_51>",
413
- "lstrip": false,
414
- "normalized": false,
415
- "rstrip": false,
416
- "single_word": false,
417
- "special": true
418
- },
419
- "32049": {
420
- "content": "<extra_id_50>",
421
- "lstrip": false,
422
- "normalized": false,
423
- "rstrip": false,
424
- "single_word": false,
425
- "special": true
426
- },
427
- "32050": {
428
- "content": "<extra_id_49>",
429
- "lstrip": false,
430
- "normalized": false,
431
- "rstrip": false,
432
- "single_word": false,
433
- "special": true
434
- },
435
- "32051": {
436
- "content": "<extra_id_48>",
437
- "lstrip": false,
438
- "normalized": false,
439
- "rstrip": false,
440
- "single_word": false,
441
- "special": true
442
- },
443
- "32052": {
444
- "content": "<extra_id_47>",
445
- "lstrip": false,
446
- "normalized": false,
447
- "rstrip": false,
448
- "single_word": false,
449
- "special": true
450
- },
451
- "32053": {
452
- "content": "<extra_id_46>",
453
- "lstrip": false,
454
- "normalized": false,
455
- "rstrip": false,
456
- "single_word": false,
457
- "special": true
458
- },
459
- "32054": {
460
- "content": "<extra_id_45>",
461
- "lstrip": false,
462
- "normalized": false,
463
- "rstrip": false,
464
- "single_word": false,
465
- "special": true
466
- },
467
- "32055": {
468
- "content": "<extra_id_44>",
469
- "lstrip": false,
470
- "normalized": false,
471
- "rstrip": false,
472
- "single_word": false,
473
- "special": true
474
- },
475
- "32056": {
476
- "content": "<extra_id_43>",
477
- "lstrip": false,
478
- "normalized": false,
479
- "rstrip": false,
480
- "single_word": false,
481
- "special": true
482
- },
483
- "32057": {
484
- "content": "<extra_id_42>",
485
- "lstrip": false,
486
- "normalized": false,
487
- "rstrip": false,
488
- "single_word": false,
489
- "special": true
490
- },
491
- "32058": {
492
- "content": "<extra_id_41>",
493
- "lstrip": false,
494
- "normalized": false,
495
- "rstrip": false,
496
- "single_word": false,
497
- "special": true
498
- },
499
- "32059": {
500
- "content": "<extra_id_40>",
501
- "lstrip": false,
502
- "normalized": false,
503
- "rstrip": false,
504
- "single_word": false,
505
- "special": true
506
- },
507
- "32060": {
508
- "content": "<extra_id_39>",
509
- "lstrip": false,
510
- "normalized": false,
511
- "rstrip": false,
512
- "single_word": false,
513
- "special": true
514
- },
515
- "32061": {
516
- "content": "<extra_id_38>",
517
- "lstrip": false,
518
- "normalized": false,
519
- "rstrip": false,
520
- "single_word": false,
521
- "special": true
522
- },
523
- "32062": {
524
- "content": "<extra_id_37>",
525
- "lstrip": false,
526
- "normalized": false,
527
- "rstrip": false,
528
- "single_word": false,
529
- "special": true
530
- },
531
- "32063": {
532
- "content": "<extra_id_36>",
533
- "lstrip": false,
534
- "normalized": false,
535
- "rstrip": false,
536
- "single_word": false,
537
- "special": true
538
- },
539
- "32064": {
540
- "content": "<extra_id_35>",
541
- "lstrip": false,
542
- "normalized": false,
543
- "rstrip": false,
544
- "single_word": false,
545
- "special": true
546
- },
547
- "32065": {
548
- "content": "<extra_id_34>",
549
- "lstrip": false,
550
- "normalized": false,
551
- "rstrip": false,
552
- "single_word": false,
553
- "special": true
554
- },
555
- "32066": {
556
- "content": "<extra_id_33>",
557
- "lstrip": false,
558
- "normalized": false,
559
- "rstrip": false,
560
- "single_word": false,
561
- "special": true
562
- },
563
- "32067": {
564
- "content": "<extra_id_32>",
565
- "lstrip": false,
566
- "normalized": false,
567
- "rstrip": false,
568
- "single_word": false,
569
- "special": true
570
- },
571
- "32068": {
572
- "content": "<extra_id_31>",
573
- "lstrip": false,
574
- "normalized": false,
575
- "rstrip": false,
576
- "single_word": false,
577
- "special": true
578
- },
579
- "32069": {
580
- "content": "<extra_id_30>",
581
- "lstrip": false,
582
- "normalized": false,
583
- "rstrip": false,
584
- "single_word": false,
585
- "special": true
586
- },
587
- "32070": {
588
- "content": "<extra_id_29>",
589
- "lstrip": false,
590
- "normalized": false,
591
- "rstrip": false,
592
- "single_word": false,
593
- "special": true
594
- },
595
- "32071": {
596
- "content": "<extra_id_28>",
597
- "lstrip": false,
598
- "normalized": false,
599
- "rstrip": false,
600
- "single_word": false,
601
- "special": true
602
- },
603
- "32072": {
604
- "content": "<extra_id_27>",
605
- "lstrip": false,
606
- "normalized": false,
607
- "rstrip": false,
608
- "single_word": false,
609
- "special": true
610
- },
611
- "32073": {
612
- "content": "<extra_id_26>",
613
- "lstrip": false,
614
- "normalized": false,
615
- "rstrip": false,
616
- "single_word": false,
617
- "special": true
618
- },
619
- "32074": {
620
- "content": "<extra_id_25>",
621
- "lstrip": false,
622
- "normalized": false,
623
- "rstrip": false,
624
- "single_word": false,
625
- "special": true
626
- },
627
- "32075": {
628
- "content": "<extra_id_24>",
629
- "lstrip": false,
630
- "normalized": false,
631
- "rstrip": false,
632
- "single_word": false,
633
- "special": true
634
- },
635
- "32076": {
636
- "content": "<extra_id_23>",
637
- "lstrip": false,
638
- "normalized": false,
639
- "rstrip": false,
640
- "single_word": false,
641
- "special": true
642
- },
643
- "32077": {
644
- "content": "<extra_id_22>",
645
- "lstrip": false,
646
- "normalized": false,
647
- "rstrip": false,
648
- "single_word": false,
649
- "special": true
650
- },
651
- "32078": {
652
- "content": "<extra_id_21>",
653
- "lstrip": false,
654
- "normalized": false,
655
- "rstrip": false,
656
- "single_word": false,
657
- "special": true
658
- },
659
- "32079": {
660
- "content": "<extra_id_20>",
661
- "lstrip": false,
662
- "normalized": false,
663
- "rstrip": false,
664
- "single_word": false,
665
- "special": true
666
- },
667
- "32080": {
668
- "content": "<extra_id_19>",
669
- "lstrip": false,
670
- "normalized": false,
671
- "rstrip": false,
672
- "single_word": false,
673
- "special": true
674
- },
675
- "32081": {
676
- "content": "<extra_id_18>",
677
- "lstrip": false,
678
- "normalized": false,
679
- "rstrip": false,
680
- "single_word": false,
681
- "special": true
682
- },
683
- "32082": {
684
- "content": "<extra_id_17>",
685
- "lstrip": false,
686
- "normalized": false,
687
- "rstrip": false,
688
- "single_word": false,
689
- "special": true
690
- },
691
- "32083": {
692
- "content": "<extra_id_16>",
693
- "lstrip": false,
694
- "normalized": false,
695
- "rstrip": false,
696
- "single_word": false,
697
- "special": true
698
- },
699
- "32084": {
700
- "content": "<extra_id_15>",
701
- "lstrip": false,
702
- "normalized": false,
703
- "rstrip": false,
704
- "single_word": false,
705
- "special": true
706
- },
707
- "32085": {
708
- "content": "<extra_id_14>",
709
- "lstrip": false,
710
- "normalized": false,
711
- "rstrip": false,
712
- "single_word": false,
713
- "special": true
714
- },
715
- "32086": {
716
- "content": "<extra_id_13>",
717
- "lstrip": false,
718
- "normalized": false,
719
- "rstrip": false,
720
- "single_word": false,
721
- "special": true
722
- },
723
- "32087": {
724
- "content": "<extra_id_12>",
725
- "lstrip": false,
726
- "normalized": false,
727
- "rstrip": false,
728
- "single_word": false,
729
- "special": true
730
- },
731
- "32088": {
732
- "content": "<extra_id_11>",
733
- "lstrip": false,
734
- "normalized": false,
735
- "rstrip": false,
736
- "single_word": false,
737
- "special": true
738
- },
739
- "32089": {
740
- "content": "<extra_id_10>",
741
- "lstrip": false,
742
- "normalized": false,
743
- "rstrip": false,
744
- "single_word": false,
745
- "special": true
746
- },
747
- "32090": {
748
- "content": "<extra_id_9>",
749
- "lstrip": false,
750
- "normalized": false,
751
- "rstrip": false,
752
- "single_word": false,
753
- "special": true
754
- },
755
- "32091": {
756
- "content": "<extra_id_8>",
757
- "lstrip": false,
758
- "normalized": false,
759
- "rstrip": false,
760
- "single_word": false,
761
- "special": true
762
- },
763
- "32092": {
764
- "content": "<extra_id_7>",
765
- "lstrip": false,
766
- "normalized": false,
767
- "rstrip": false,
768
- "single_word": false,
769
- "special": true
770
- },
771
- "32093": {
772
- "content": "<extra_id_6>",
773
- "lstrip": false,
774
- "normalized": false,
775
- "rstrip": false,
776
- "single_word": false,
777
- "special": true
778
- },
779
- "32094": {
780
- "content": "<extra_id_5>",
781
- "lstrip": false,
782
- "normalized": false,
783
- "rstrip": false,
784
- "single_word": false,
785
- "special": true
786
- },
787
- "32095": {
788
- "content": "<extra_id_4>",
789
- "lstrip": false,
790
- "normalized": false,
791
- "rstrip": false,
792
- "single_word": false,
793
- "special": true
794
- },
795
- "32096": {
796
- "content": "<extra_id_3>",
797
- "lstrip": false,
798
- "normalized": false,
799
- "rstrip": false,
800
- "single_word": false,
801
- "special": true
802
- },
803
- "32097": {
804
- "content": "<extra_id_2>",
805
- "lstrip": false,
806
- "normalized": false,
807
- "rstrip": false,
808
- "single_word": false,
809
- "special": true
810
- },
811
- "32098": {
812
- "content": "<extra_id_1>",
813
- "lstrip": false,
814
- "normalized": false,
815
- "rstrip": false,
816
- "single_word": false,
817
- "special": true
818
- },
819
- "32099": {
820
- "content": "<extra_id_0>",
821
- "lstrip": false,
822
- "normalized": false,
823
- "rstrip": false,
824
- "single_word": false,
825
- "special": true
826
- }
827
- },
828
- "additional_special_tokens": [
829
- "<extra_id_0>",
830
- "<extra_id_1>",
831
- "<extra_id_2>",
832
- "<extra_id_3>",
833
- "<extra_id_4>",
834
- "<extra_id_5>",
835
- "<extra_id_6>",
836
- "<extra_id_7>",
837
- "<extra_id_8>",
838
- "<extra_id_9>",
839
- "<extra_id_10>",
840
- "<extra_id_11>",
841
- "<extra_id_12>",
842
- "<extra_id_13>",
843
- "<extra_id_14>",
844
- "<extra_id_15>",
845
- "<extra_id_16>",
846
- "<extra_id_17>",
847
- "<extra_id_18>",
848
- "<extra_id_19>",
849
- "<extra_id_20>",
850
- "<extra_id_21>",
851
- "<extra_id_22>",
852
- "<extra_id_23>",
853
- "<extra_id_24>",
854
- "<extra_id_25>",
855
- "<extra_id_26>",
856
- "<extra_id_27>",
857
- "<extra_id_28>",
858
- "<extra_id_29>",
859
- "<extra_id_30>",
860
- "<extra_id_31>",
861
- "<extra_id_32>",
862
- "<extra_id_33>",
863
- "<extra_id_34>",
864
- "<extra_id_35>",
865
- "<extra_id_36>",
866
- "<extra_id_37>",
867
- "<extra_id_38>",
868
- "<extra_id_39>",
869
- "<extra_id_40>",
870
- "<extra_id_41>",
871
- "<extra_id_42>",
872
- "<extra_id_43>",
873
- "<extra_id_44>",
874
- "<extra_id_45>",
875
- "<extra_id_46>",
876
- "<extra_id_47>",
877
- "<extra_id_48>",
878
- "<extra_id_49>",
879
- "<extra_id_50>",
880
- "<extra_id_51>",
881
- "<extra_id_52>",
882
- "<extra_id_53>",
883
- "<extra_id_54>",
884
- "<extra_id_55>",
885
- "<extra_id_56>",
886
- "<extra_id_57>",
887
- "<extra_id_58>",
888
- "<extra_id_59>",
889
- "<extra_id_60>",
890
- "<extra_id_61>",
891
- "<extra_id_62>",
892
- "<extra_id_63>",
893
- "<extra_id_64>",
894
- "<extra_id_65>",
895
- "<extra_id_66>",
896
- "<extra_id_67>",
897
- "<extra_id_68>",
898
- "<extra_id_69>",
899
- "<extra_id_70>",
900
- "<extra_id_71>",
901
- "<extra_id_72>",
902
- "<extra_id_73>",
903
- "<extra_id_74>",
904
- "<extra_id_75>",
905
- "<extra_id_76>",
906
- "<extra_id_77>",
907
- "<extra_id_78>",
908
- "<extra_id_79>",
909
- "<extra_id_80>",
910
- "<extra_id_81>",
911
- "<extra_id_82>",
912
- "<extra_id_83>",
913
- "<extra_id_84>",
914
- "<extra_id_85>",
915
- "<extra_id_86>",
916
- "<extra_id_87>",
917
- "<extra_id_88>",
918
- "<extra_id_89>",
919
- "<extra_id_90>",
920
- "<extra_id_91>",
921
- "<extra_id_92>",
922
- "<extra_id_93>",
923
- "<extra_id_94>",
924
- "<extra_id_95>",
925
- "<extra_id_96>",
926
- "<extra_id_97>",
927
- "<extra_id_98>",
928
- "<extra_id_99>"
929
- ],
930
- "clean_up_tokenization_spaces": true,
931
- "eos_token": "</s>",
932
- "extra_ids": 100,
933
- "model_max_length": 512,
934
- "pad_token": "</s>",
935
- "sp_model_kwargs": {},
936
- "tokenizer_class": "T5Tokenizer",
937
- "unk_token": "<unk>"
938
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/trainer_state.json DELETED
@@ -1,645 +0,0 @@
1
- {
2
- "best_metric": 0.05535305291414261,
3
- "best_model_checkpoint": "/data/mohamed/checkpoints/ling_disc/deberta-v3-small_flan-t5-base_40/checkpoint-41000",
4
- "epoch": 30.0,
5
- "eval_steps": 1000,
6
- "global_step": 41970,
7
- "is_hyper_param_search": false,
8
- "is_local_process_zero": true,
9
- "is_world_process_zero": true,
10
- "log_history": [
11
- {
12
- "epoch": 0.71,
13
- "grad_norm": 0.855617344379425,
14
- "learning_rate": 1.1913271384322135e-05,
15
- "loss": 0.9117,
16
- "step": 1000
17
- },
18
- {
19
- "epoch": 0.71,
20
- "eval_loss": 0.6742472052574158,
21
- "eval_runtime": 27.0595,
22
- "eval_samples_per_second": 1111.549,
23
- "eval_steps_per_second": 5.58,
24
- "step": 1000
25
- },
26
- {
27
- "epoch": 1.43,
28
- "grad_norm": 4.203719139099121,
29
- "learning_rate": 2.382654276864427e-05,
30
- "loss": 0.4114,
31
- "step": 2000
32
- },
33
- {
34
- "epoch": 1.43,
35
- "eval_loss": 0.3266257345676422,
36
- "eval_runtime": 26.9318,
37
- "eval_samples_per_second": 1116.822,
38
- "eval_steps_per_second": 5.607,
39
- "step": 2000
40
- },
41
- {
42
- "epoch": 2.14,
43
- "grad_norm": 3.1638591289520264,
44
- "learning_rate": 3.57398141529664e-05,
45
- "loss": 0.2624,
46
- "step": 3000
47
- },
48
- {
49
- "epoch": 2.14,
50
- "eval_loss": 0.24602766335010529,
51
- "eval_runtime": 27.0604,
52
- "eval_samples_per_second": 1111.512,
53
- "eval_steps_per_second": 5.58,
54
- "step": 3000
55
- },
56
- {
57
- "epoch": 2.86,
58
- "grad_norm": 1.7417826652526855,
59
- "learning_rate": 4.765308553728854e-05,
60
- "loss": 0.2002,
61
- "step": 4000
62
- },
63
- {
64
- "epoch": 2.86,
65
- "eval_loss": 0.1770436018705368,
66
- "eval_runtime": 26.8812,
67
- "eval_samples_per_second": 1118.922,
68
- "eval_steps_per_second": 5.617,
69
- "step": 4000
70
- },
71
- {
72
- "epoch": 3.57,
73
- "grad_norm": 1.1299816370010376,
74
- "learning_rate": 4.893707145315437e-05,
75
- "loss": 0.1635,
76
- "step": 5000
77
- },
78
- {
79
- "epoch": 3.57,
80
- "eval_loss": 0.14757415652275085,
81
- "eval_runtime": 26.7857,
82
- "eval_samples_per_second": 1122.914,
83
- "eval_steps_per_second": 5.637,
84
- "step": 5000
85
- },
86
- {
87
- "epoch": 4.29,
88
- "grad_norm": 1.210856556892395,
89
- "learning_rate": 4.761337463267413e-05,
90
- "loss": 0.1404,
91
- "step": 6000
92
- },
93
- {
94
- "epoch": 4.29,
95
- "eval_loss": 0.12851941585540771,
96
- "eval_runtime": 26.9893,
97
- "eval_samples_per_second": 1114.44,
98
- "eval_steps_per_second": 5.595,
99
- "step": 6000
100
- },
101
- {
102
- "epoch": 5.0,
103
- "grad_norm": 2.0565412044525146,
104
- "learning_rate": 4.62896778121939e-05,
105
- "loss": 0.1263,
106
- "step": 7000
107
- },
108
- {
109
- "epoch": 5.0,
110
- "eval_loss": 0.12228666245937347,
111
- "eval_runtime": 26.7363,
112
- "eval_samples_per_second": 1124.987,
113
- "eval_steps_per_second": 5.648,
114
- "step": 7000
115
- },
116
- {
117
- "epoch": 5.72,
118
- "grad_norm": 1.8667607307434082,
119
- "learning_rate": 4.496598099171366e-05,
120
- "loss": 0.1127,
121
- "step": 8000
122
- },
123
- {
124
- "epoch": 5.72,
125
- "eval_loss": 0.11036147177219391,
126
- "eval_runtime": 26.7509,
127
- "eval_samples_per_second": 1124.375,
128
- "eval_steps_per_second": 5.645,
129
- "step": 8000
130
- },
131
- {
132
- "epoch": 6.43,
133
- "grad_norm": 0.7492337226867676,
134
- "learning_rate": 4.364228417123342e-05,
135
- "loss": 0.1059,
136
- "step": 9000
137
- },
138
- {
139
- "epoch": 6.43,
140
- "eval_loss": 0.10317497700452805,
141
- "eval_runtime": 27.0158,
142
- "eval_samples_per_second": 1113.349,
143
- "eval_steps_per_second": 5.589,
144
- "step": 9000
145
- },
146
- {
147
- "epoch": 7.15,
148
- "grad_norm": 0.7611485123634338,
149
- "learning_rate": 4.231858735075319e-05,
150
- "loss": 0.0993,
151
- "step": 10000
152
- },
153
- {
154
- "epoch": 7.15,
155
- "eval_loss": 0.10284282267093658,
156
- "eval_runtime": 26.795,
157
- "eval_samples_per_second": 1122.524,
158
- "eval_steps_per_second": 5.635,
159
- "step": 10000
160
- },
161
- {
162
- "epoch": 7.86,
163
- "grad_norm": 0.5870215892791748,
164
- "learning_rate": 4.099489053027295e-05,
165
- "loss": 0.0887,
166
- "step": 11000
167
- },
168
- {
169
- "epoch": 7.86,
170
- "eval_loss": 0.09789762645959854,
171
- "eval_runtime": 26.8453,
172
- "eval_samples_per_second": 1120.419,
173
- "eval_steps_per_second": 5.625,
174
- "step": 11000
175
- },
176
- {
177
- "epoch": 8.58,
178
- "grad_norm": 0.48922085762023926,
179
- "learning_rate": 3.9671193709792706e-05,
180
- "loss": 0.0842,
181
- "step": 12000
182
- },
183
- {
184
- "epoch": 8.58,
185
- "eval_loss": 0.09349656105041504,
186
- "eval_runtime": 26.8273,
187
- "eval_samples_per_second": 1121.172,
188
- "eval_steps_per_second": 5.629,
189
- "step": 12000
190
- },
191
- {
192
- "epoch": 9.29,
193
- "grad_norm": 0.4252859354019165,
194
- "learning_rate": 3.8347496889312476e-05,
195
- "loss": 0.0793,
196
- "step": 13000
197
- },
198
- {
199
- "epoch": 9.29,
200
- "eval_loss": 0.09415590018033981,
201
- "eval_runtime": 25.9362,
202
- "eval_samples_per_second": 1159.693,
203
- "eval_steps_per_second": 5.822,
204
- "step": 13000
205
- },
206
- {
207
- "epoch": 10.01,
208
- "grad_norm": 0.44548505544662476,
209
- "learning_rate": 3.702380006883224e-05,
210
- "loss": 0.076,
211
- "step": 14000
212
- },
213
- {
214
- "epoch": 10.01,
215
- "eval_loss": 0.08913980424404144,
216
- "eval_runtime": 26.7379,
217
- "eval_samples_per_second": 1124.919,
218
- "eval_steps_per_second": 5.647,
219
- "step": 14000
220
- },
221
- {
222
- "epoch": 10.72,
223
- "grad_norm": 0.2965373694896698,
224
- "learning_rate": 3.5700103248352e-05,
225
- "loss": 0.0714,
226
- "step": 15000
227
- },
228
- {
229
- "epoch": 10.72,
230
- "eval_loss": 0.08456840366125107,
231
- "eval_runtime": 26.787,
232
- "eval_samples_per_second": 1122.857,
233
- "eval_steps_per_second": 5.637,
234
- "step": 15000
235
- },
236
- {
237
- "epoch": 11.44,
238
- "grad_norm": 0.3205694854259491,
239
- "learning_rate": 3.437640642787176e-05,
240
- "loss": 0.0677,
241
- "step": 16000
242
- },
243
- {
244
- "epoch": 11.44,
245
- "eval_loss": 0.07863688468933105,
246
- "eval_runtime": 26.8242,
247
- "eval_samples_per_second": 1121.299,
248
- "eval_steps_per_second": 5.629,
249
- "step": 16000
250
- },
251
- {
252
- "epoch": 12.15,
253
- "grad_norm": 0.2736203670501709,
254
- "learning_rate": 3.3052709607391525e-05,
255
- "loss": 0.0636,
256
- "step": 17000
257
- },
258
- {
259
- "epoch": 12.15,
260
- "eval_loss": 0.07664181292057037,
261
- "eval_runtime": 26.7818,
262
- "eval_samples_per_second": 1123.077,
263
- "eval_steps_per_second": 5.638,
264
- "step": 17000
265
- },
266
- {
267
- "epoch": 12.87,
268
- "grad_norm": 0.25644680857658386,
269
- "learning_rate": 3.172901278691129e-05,
270
- "loss": 0.0618,
271
- "step": 18000
272
- },
273
- {
274
- "epoch": 12.87,
275
- "eval_loss": 0.07351888716220856,
276
- "eval_runtime": 26.8445,
277
- "eval_samples_per_second": 1120.453,
278
- "eval_steps_per_second": 5.625,
279
- "step": 18000
280
- },
281
- {
282
- "epoch": 13.58,
283
- "grad_norm": 0.2748676538467407,
284
- "learning_rate": 3.0405315966431053e-05,
285
- "loss": 0.0584,
286
- "step": 19000
287
- },
288
- {
289
- "epoch": 13.58,
290
- "eval_loss": 0.07314006239175797,
291
- "eval_runtime": 26.8333,
292
- "eval_samples_per_second": 1120.921,
293
- "eval_steps_per_second": 5.627,
294
- "step": 19000
295
- },
296
- {
297
- "epoch": 14.3,
298
- "grad_norm": 0.30235132575035095,
299
- "learning_rate": 2.9081619145950812e-05,
300
- "loss": 0.057,
301
- "step": 20000
302
- },
303
- {
304
- "epoch": 14.3,
305
- "eval_loss": 0.07568340748548508,
306
- "eval_runtime": 27.0109,
307
- "eval_samples_per_second": 1113.55,
308
- "eval_steps_per_second": 5.59,
309
- "step": 20000
310
- },
311
- {
312
- "epoch": 15.01,
313
- "grad_norm": 0.2508692145347595,
314
- "learning_rate": 2.7757922325470574e-05,
315
- "loss": 0.0558,
316
- "step": 21000
317
- },
318
- {
319
- "epoch": 15.01,
320
- "eval_loss": 0.07675843685865402,
321
- "eval_runtime": 26.9026,
322
- "eval_samples_per_second": 1118.032,
323
- "eval_steps_per_second": 5.613,
324
- "step": 21000
325
- },
326
- {
327
- "epoch": 15.73,
328
- "grad_norm": 0.3341030478477478,
329
- "learning_rate": 2.643422550499034e-05,
330
- "loss": 0.0533,
331
- "step": 22000
332
- },
333
- {
334
- "epoch": 15.73,
335
- "eval_loss": 0.07339715212583542,
336
- "eval_runtime": 26.8727,
337
- "eval_samples_per_second": 1119.278,
338
- "eval_steps_per_second": 5.619,
339
- "step": 22000
340
- },
341
- {
342
- "epoch": 16.44,
343
- "grad_norm": 0.30433303117752075,
344
- "learning_rate": 2.51105286845101e-05,
345
- "loss": 0.0516,
346
- "step": 23000
347
- },
348
- {
349
- "epoch": 16.44,
350
- "eval_loss": 0.0694783553481102,
351
- "eval_runtime": 26.8551,
352
- "eval_samples_per_second": 1120.012,
353
- "eval_steps_per_second": 5.623,
354
- "step": 23000
355
- },
356
- {
357
- "epoch": 17.16,
358
- "grad_norm": 0.39424875378608704,
359
- "learning_rate": 2.378683186402986e-05,
360
- "loss": 0.049,
361
- "step": 24000
362
- },
363
- {
364
- "epoch": 17.16,
365
- "eval_loss": 0.06750107556581497,
366
- "eval_runtime": 26.9045,
367
- "eval_samples_per_second": 1117.954,
368
- "eval_steps_per_second": 5.612,
369
- "step": 24000
370
- },
371
- {
372
- "epoch": 17.87,
373
- "grad_norm": 0.29526183009147644,
374
- "learning_rate": 2.2463135043549627e-05,
375
- "loss": 0.0478,
376
- "step": 25000
377
- },
378
- {
379
- "epoch": 17.87,
380
- "eval_loss": 0.06841529905796051,
381
- "eval_runtime": 26.9131,
382
- "eval_samples_per_second": 1117.597,
383
- "eval_steps_per_second": 5.611,
384
- "step": 25000
385
- },
386
- {
387
- "epoch": 18.58,
388
- "grad_norm": 0.2802821099758148,
389
- "learning_rate": 2.113943822306939e-05,
390
- "loss": 0.0472,
391
- "step": 26000
392
- },
393
- {
394
- "epoch": 18.58,
395
- "eval_loss": 0.0680340975522995,
396
- "eval_runtime": 26.8442,
397
- "eval_samples_per_second": 1120.467,
398
- "eval_steps_per_second": 5.625,
399
- "step": 26000
400
- },
401
- {
402
- "epoch": 19.3,
403
- "grad_norm": 0.198490172624588,
404
- "learning_rate": 1.9815741402589152e-05,
405
- "loss": 0.0445,
406
- "step": 27000
407
- },
408
- {
409
- "epoch": 19.3,
410
- "eval_loss": 0.059882719069719315,
411
- "eval_runtime": 26.9691,
412
- "eval_samples_per_second": 1115.275,
413
- "eval_steps_per_second": 5.599,
414
- "step": 27000
415
- },
416
- {
417
- "epoch": 20.01,
418
- "grad_norm": 0.3383251130580902,
419
- "learning_rate": 1.8492044582108914e-05,
420
- "loss": 0.0435,
421
- "step": 28000
422
- },
423
- {
424
- "epoch": 20.01,
425
- "eval_loss": 0.06356318295001984,
426
- "eval_runtime": 26.8538,
427
- "eval_samples_per_second": 1120.066,
428
- "eval_steps_per_second": 5.623,
429
- "step": 28000
430
- },
431
- {
432
- "epoch": 20.73,
433
- "grad_norm": 0.16571784019470215,
434
- "learning_rate": 1.7168347761628677e-05,
435
- "loss": 0.0419,
436
- "step": 29000
437
- },
438
- {
439
- "epoch": 20.73,
440
- "eval_loss": 0.06056862324476242,
441
- "eval_runtime": 27.0748,
442
- "eval_samples_per_second": 1110.924,
443
- "eval_steps_per_second": 5.577,
444
- "step": 29000
445
- },
446
- {
447
- "epoch": 21.44,
448
- "grad_norm": 0.19518467783927917,
449
- "learning_rate": 1.584465094114844e-05,
450
- "loss": 0.0409,
451
- "step": 30000
452
- },
453
- {
454
- "epoch": 21.44,
455
- "eval_loss": 0.06490638852119446,
456
- "eval_runtime": 26.8481,
457
- "eval_samples_per_second": 1120.301,
458
- "eval_steps_per_second": 5.624,
459
- "step": 30000
460
- },
461
- {
462
- "epoch": 22.16,
463
- "grad_norm": 0.15420591831207275,
464
- "learning_rate": 1.4520954120668203e-05,
465
- "loss": 0.0397,
466
- "step": 31000
467
- },
468
- {
469
- "epoch": 22.16,
470
- "eval_loss": 0.05918469280004501,
471
- "eval_runtime": 26.8143,
472
- "eval_samples_per_second": 1121.713,
473
- "eval_steps_per_second": 5.631,
474
- "step": 31000
475
- },
476
- {
477
- "epoch": 22.87,
478
- "grad_norm": 0.26854997873306274,
479
- "learning_rate": 1.3197257300187965e-05,
480
- "loss": 0.0387,
481
- "step": 32000
482
- },
483
- {
484
- "epoch": 22.87,
485
- "eval_loss": 0.06144551932811737,
486
- "eval_runtime": 26.8852,
487
- "eval_samples_per_second": 1118.757,
488
- "eval_steps_per_second": 5.616,
489
- "step": 32000
490
- },
491
- {
492
- "epoch": 23.59,
493
- "grad_norm": 0.17430314421653748,
494
- "learning_rate": 1.1873560479707728e-05,
495
- "loss": 0.0373,
496
- "step": 33000
497
- },
498
- {
499
- "epoch": 23.59,
500
- "eval_loss": 0.06159648299217224,
501
- "eval_runtime": 26.7887,
502
- "eval_samples_per_second": 1122.785,
503
- "eval_steps_per_second": 5.637,
504
- "step": 33000
505
- },
506
- {
507
- "epoch": 24.3,
508
- "grad_norm": 0.14911049604415894,
509
- "learning_rate": 1.054986365922749e-05,
510
- "loss": 0.0369,
511
- "step": 34000
512
- },
513
- {
514
- "epoch": 24.3,
515
- "eval_loss": 0.05931873992085457,
516
- "eval_runtime": 26.8571,
517
- "eval_samples_per_second": 1119.926,
518
- "eval_steps_per_second": 5.622,
519
- "step": 34000
520
- },
521
- {
522
- "epoch": 25.02,
523
- "grad_norm": 0.13620807230472565,
524
- "learning_rate": 9.226166838747254e-06,
525
- "loss": 0.0361,
526
- "step": 35000
527
- },
528
- {
529
- "epoch": 25.02,
530
- "eval_loss": 0.05695568770170212,
531
- "eval_runtime": 26.8966,
532
- "eval_samples_per_second": 1118.283,
533
- "eval_steps_per_second": 5.614,
534
- "step": 35000
535
- },
536
- {
537
- "epoch": 25.73,
538
- "grad_norm": 0.13764438033103943,
539
- "learning_rate": 7.902470018267017e-06,
540
- "loss": 0.0349,
541
- "step": 36000
542
- },
543
- {
544
- "epoch": 25.73,
545
- "eval_loss": 0.05707501247525215,
546
- "eval_runtime": 26.986,
547
- "eval_samples_per_second": 1114.578,
548
- "eval_steps_per_second": 5.595,
549
- "step": 36000
550
- },
551
- {
552
- "epoch": 26.45,
553
- "grad_norm": 0.2389635145664215,
554
- "learning_rate": 6.578773197786779e-06,
555
- "loss": 0.0343,
556
- "step": 37000
557
- },
558
- {
559
- "epoch": 26.45,
560
- "eval_loss": 0.0577365942299366,
561
- "eval_runtime": 26.9903,
562
- "eval_samples_per_second": 1114.401,
563
- "eval_steps_per_second": 5.595,
564
- "step": 37000
565
- },
566
- {
567
- "epoch": 27.16,
568
- "grad_norm": 0.15828461945056915,
569
- "learning_rate": 5.255076377306542e-06,
570
- "loss": 0.034,
571
- "step": 38000
572
- },
573
- {
574
- "epoch": 27.16,
575
- "eval_loss": 0.05767366662621498,
576
- "eval_runtime": 27.1454,
577
- "eval_samples_per_second": 1108.035,
578
- "eval_steps_per_second": 5.563,
579
- "step": 38000
580
- },
581
- {
582
- "epoch": 27.88,
583
- "grad_norm": 0.1059570387005806,
584
- "learning_rate": 3.9313795568263045e-06,
585
- "loss": 0.0332,
586
- "step": 39000
587
- },
588
- {
589
- "epoch": 27.88,
590
- "eval_loss": 0.056225307285785675,
591
- "eval_runtime": 26.9534,
592
- "eval_samples_per_second": 1115.928,
593
- "eval_steps_per_second": 5.602,
594
- "step": 39000
595
- },
596
- {
597
- "epoch": 28.59,
598
- "grad_norm": 0.1975150853395462,
599
- "learning_rate": 2.6076827363460673e-06,
600
- "loss": 0.0329,
601
- "step": 40000
602
- },
603
- {
604
- "epoch": 28.59,
605
- "eval_loss": 0.05555161088705063,
606
- "eval_runtime": 27.1187,
607
- "eval_samples_per_second": 1109.122,
608
- "eval_steps_per_second": 5.568,
609
- "step": 40000
610
- },
611
- {
612
- "epoch": 29.31,
613
- "grad_norm": 0.1037423312664032,
614
- "learning_rate": 1.28398591586583e-06,
615
- "loss": 0.0319,
616
- "step": 41000
617
- },
618
- {
619
- "epoch": 29.31,
620
- "eval_loss": 0.05535305291414261,
621
- "eval_runtime": 26.8353,
622
- "eval_samples_per_second": 1120.838,
623
- "eval_steps_per_second": 5.627,
624
- "step": 41000
625
- },
626
- {
627
- "epoch": 30.0,
628
- "step": 41970,
629
- "total_flos": 3.347206753110317e+16,
630
- "train_loss": 0.09860551060169176,
631
- "train_runtime": 13103.021,
632
- "train_samples_per_second": 640.368,
633
- "train_steps_per_second": 3.203
634
- }
635
- ],
636
- "logging_steps": 1000,
637
- "max_steps": 41970,
638
- "num_input_tokens_seen": 0,
639
- "num_train_epochs": 30,
640
- "save_steps": 1000,
641
- "total_flos": 3.347206753110317e+16,
642
- "train_batch_size": 200,
643
- "trial_name": null,
644
- "trial_params": null
645
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/ling_disc/training_args.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:deb9dc15db671f7ae0b9e7e7bc26ca9e20c0fde45babc266a60753e2b23d6328
3
- size 4984
 
 
 
 
ckpt/model.json DELETED
@@ -1,82 +0,0 @@
1
- {
2
- "data": "ling_conversion",
3
- "data_sources": ["qqp", "mrpc", "stsb"],
4
- "data_type": "text",
5
- "kld_annealing": "cyclic",
6
- "lingpred_annealing": "mono",
7
- "ling_embed_type": "one-layer",
8
- "combine_weight": 1,
9
- "alpha_kld": 1,
10
- "alpha_lingpred": 1,
11
- "alpha_sem": 1,
12
- "max_grad_norm": 10,
13
- "sem_loss_tao": 0.5,
14
- "sem_loss_eps": 1,
15
- "ckpt": "./ckpt/model.pt",
16
- "disc_type": "deberta",
17
- "disc_ckpt": "./ckpt/ling_disc",
18
- "sem_ckpt": "./ckpt/sem_emb.pt",
19
- "lng_ids": null,
20
- "lng_ids_idx": null,
21
- "model_name": "google/flan-t5-base",
22
- "aim_exp": "lingconv-0606",
23
- "sem_loss_type": "dedicated",
24
- "combine_method": "decoder_add_first",
25
- "train_log": 200,
26
- "val_log": 2000,
27
- "batch_size": 80,
28
- "eval_batch_size": 200,
29
- "max_eval_samples": 1000,
30
- "test_batch_size": 1,
31
- "hidden_dim": 500,
32
- "latent_dim": 150,
33
- "lng_dim": 40,
34
- "disc_lng_dim": 40,
35
- "use_lora": false,
36
- "lora_r": 64,
37
- "gpu": "4",
38
- "epochs": 20,
39
- "grad_accumulation": 1,
40
- "n_ica": 10,
41
- "max_length": 200,
42
- "total_steps": null,
43
- "kld_const": 1,
44
- "lr": 0.001,
45
- "kl_weight": 0.1,
46
- "weight_decay": 0.01,
47
- "ling_dropout": 0.1,
48
- "predict_fn": "logs/test.txt",
49
- "save_predict": false,
50
- "use_ica": false,
51
- "pretrain_gen": false,
52
- "pretrain_sem": false,
53
- "pretrain_disc": false,
54
- "linggen_type": "none",
55
- "linggen_input": "s+l",
56
- "aug_same": false,
57
- "ling_vae": false,
58
- "process_lingpred": false,
59
- "fudge_lambda": 1.0,
60
- "use_lingpred": false,
61
- "ling2_only": true,
62
- "cycle_loss": false,
63
- "disc_loss": false,
64
- "sem_loss": false,
65
- "sim_loss": false,
66
- "optuna": false,
67
- "debug": false,
68
- "demo": false,
69
- "fudge": false,
70
- "out_fn": "logs/default",
71
- "eval_only": false,
72
- "predict_with_feedback": false,
73
- "feedback_param": "s",
74
- "eval_ling": false,
75
- "seed": 0,
76
- "major_arg": 0,
77
- "quantize_lng": false,
78
- "quant_nbins": 20,
79
- "src_lng": "ling",
80
- "to_restore": [],
81
- "disc_steps": 0
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ckpt/model.pt DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a675026d23bf857c796e00fda67b500e4cc13b43db030b08fdfaef14823fbe42
3
- size 2971737146
 
 
 
 
ckpt/sem_emb.pt DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0c58f890cb0121eacf8ac99d2fac53e2962f457d8c02e0b6386a4b3e342ac10c
3
- size 1315675291
 
 
 
 
model.py CHANGED
@@ -3,7 +3,7 @@ import torch
3
  import torch.nn.functional as F
4
  import numpy as np
5
  from torch import nn
6
- from transformers import T5ForConditionalGeneration, T5EncoderModel, AutoModel, LogitsProcessor, LogitsProcessorList
7
  from functools import partial
8
  from undecorate import unwrap
9
  from types import MethodType
@@ -175,17 +175,16 @@ class LingDisc(nn.Module):
175
  output = enc_output.logits
176
  return output
177
 
178
- class SemEmb(nn.Module):
179
- def __init__(self, backbone, sep_token_id):
180
- super().__init__()
181
- self.backbone = backbone
182
  self.sep_token_id = sep_token_id
183
- hidden_dim = self.backbone.config.d_model
184
  self.projection = nn.Sequential(nn.ReLU(),
185
  nn.Dropout(0.2),
186
  nn.Linear(hidden_dim, 1))
187
 
188
- def forward(self, **batch):
189
  bs = batch['sentence1_attention_mask'].shape[0]
190
  ones = torch.ones((bs, 1), device=batch['sentence1_attention_mask'].device)
191
  sep = torch.ones((bs, 1), dtype=torch.long,
@@ -193,20 +192,20 @@ class SemEmb(nn.Module):
193
  att_mask = torch.cat([batch['sentence1_attention_mask'], ones, batch['sentence2_attention_mask']], dim=1)
194
  if 'logits' in batch:
195
  input_ids = torch.cat([batch['sentence1_input_ids'], sep], dim=1)
196
- embeds1 = self.backbone.shared(input_ids)
197
 
198
  logits = batch['logits']
199
  scores = F.softmax(logits, dim = -1)
200
  onehot = F.one_hot(logits.argmax(-1), num_classes=logits.shape[2]).float().to(logits.device)
201
  onehot_ = scores - scores.detach() + onehot
202
 
203
- embeds2 = onehot_ @ self.backbone.shared.weight
204
  embeds1_2 = torch.cat([embeds1, embeds2], dim=1)
205
- hidden_units = self.backbone(inputs_embeds=embeds1_2,
206
  attention_mask=att_mask).last_hidden_state.mean(1)
207
  elif 'sentence2_input_ids' in batch:
208
  input_ids = torch.cat([batch['sentence1_input_ids'], sep, batch['sentence2_input_ids']], dim=1)
209
- hidden_units = self.backbone(input_ids=input_ids,
210
  attention_mask=att_mask).last_hidden_state.mean(1)
211
  probs = self.projection(hidden_units)
212
  return probs
@@ -268,17 +267,16 @@ class LogitsAdd(LogitsProcessor):
268
  def __call__(self, input_ids, scores):
269
  return scores + self.sent2_ling
270
 
271
- class EncoderDecoderVAE(nn.Module):
272
- def __init__(self, args, pad_token_id, sepeos_token_id, vocab_size = 32128):
273
- super().__init__()
274
- self.backbone = T5ForConditionalGeneration.from_pretrained(args.model_name)
275
- self.backbone.prepare_inputs_for_generation = types.MethodType(
276
  partial(prepare_inputs_for_generation, args.combine_method, args.ling2_only),
277
- self.backbone)
278
  self.args = args
279
  self.pad_token_id = pad_token_id
280
  self.eos_token_id = sepeos_token_id
281
- hidden_dim = self.backbone.config.d_model if not 'logits' in args.combine_method else vocab_size
282
  if args.combine_method == 'fusion1':
283
  self.fusion = nn.Sequential(
284
  nn.Linear(hidden_dim + 2 * args.lng_dim, hidden_dim),
@@ -308,8 +306,8 @@ class EncoderDecoderVAE(nn.Module):
308
  nn.init.xavier_uniform_(self.ling_logvar.weight)
309
 
310
 
311
- generate_with_grad = unwrap(self.backbone.generate)
312
- self.backbone.generate_with_grad = MethodType(generate_with_grad, self.backbone)
313
 
314
  def get_fusion_layer(self):
315
  if 'fusion' in self.args.combine_method:
@@ -327,7 +325,7 @@ class EncoderDecoderVAE(nn.Module):
327
  if 'inputs_embeds' in batch:
328
  inputs_embeds = batch['inputs_embeds']
329
  else:
330
- inputs_embeds = self.backbone.shared(batch['sentence1_input_ids'])
331
  inputs_att_mask = batch['sentence1_attention_mask']
332
  bs = inputs_embeds.shape[0]
333
  cache = {}
@@ -369,7 +367,7 @@ class EncoderDecoderVAE(nn.Module):
369
  inputs_embeds = inputs_embeds + sent2_ling
370
  else:
371
  inputs_embeds = inputs_embeds + sent1_ling + sent2_ling
372
- return self.backbone.encoder(inputs_embeds=inputs_embeds,
373
  attention_mask=inputs_att_mask), inputs_att_mask, cache
374
 
375
  def decode(self, batch, enc_output, inputs_att_mask, generate):
@@ -432,7 +430,7 @@ class EncoderDecoderVAE(nn.Module):
432
  else:
433
  logits_processor = LogitsProcessorList()
434
 
435
- dec_output = self.backbone.generate_with_grad(
436
  attention_mask=inputs_att_mask,
437
  encoder_outputs=enc_output,
438
  sent1_ling=sent1_ling,
@@ -452,8 +450,8 @@ class EncoderDecoderVAE(nn.Module):
452
  cache.update({'scores': scores})
453
  return dec_output.sequences, cache
454
 
455
- decoder_input_ids = self.backbone._shift_right(batch['sentence2_input_ids'])
456
- decoder_inputs_embeds = self.backbone.shared(decoder_input_ids)
457
  decoder_att_mask = batch['sentence2_attention_mask']
458
  labels = batch['sentence2_input_ids'].clone()
459
  labels[labels == self.pad_token_id] = -100
@@ -475,7 +473,7 @@ class EncoderDecoderVAE(nn.Module):
475
  else:
476
  decoder_inputs_embeds = decoder_inputs_embeds + sent1_ling + sent2_ling
477
 
478
- dec_output = self.backbone(
479
  decoder_inputs_embeds=decoder_inputs_embeds,
480
  decoder_attention_mask=decoder_att_mask,
481
  encoder_outputs=enc_output,
@@ -489,14 +487,14 @@ class EncoderDecoderVAE(nn.Module):
489
  return dec_output, cache
490
 
491
 
492
- def forward(self, batch, generate=False):
493
  enc_output, enc_att_mask, cache = self.encode(batch)
494
  dec_output, cache2 = self.decode(batch, enc_output, enc_att_mask, generate)
495
  cache.update(cache2)
496
  return dec_output, enc_output, cache
497
 
498
  def infer_with_cache(self, batch):
499
- dec_output, _, cache = self(batch, generate = True)
500
  return dec_output, cache
501
 
502
  def infer(self, batch):
@@ -522,7 +520,7 @@ class EncoderDecoderVAE(nn.Module):
522
  'sentence2_input_ids': pred,
523
  'sentence2_attention_mask': sequence_mask(lens, max_len = max_len)
524
  })
525
- sem_prob = torch.sigmoid(sem_emb(**batch)).item()
526
  # if sem_prob <= 0.1:
527
  # patience -= 1
528
  if new_loss < loss and sem_prob >= 0.90 and lens.item() > 1:
@@ -555,7 +553,7 @@ class EncoderDecoderVAE(nn.Module):
555
  ling2_embed = self.ling_embed(batch['sentence2_ling'])
556
  param = torch.nn.Parameter(ling2_embed, requires_grad = True)
557
  elif self.args.feedback_param == 's':
558
- inputs_embeds = self.backbone.shared(batch['sentence1_input_ids'])
559
  param = torch.nn.Parameter(inputs_embeds, requires_grad = True)
560
  elif self.args.feedback_param == 'logits':
561
  logits = self.infer_with_cache(batch)[1]['scores']
@@ -628,39 +626,26 @@ class LingDiscPipeline():
628
 
629
  def get_model(args, tokenizer, device):
630
  if args.pretrain_disc or args.disc_loss or args.disc_ckpt:
631
- ling_disc = LingDisc(args.model_name, args.disc_type, args.disc_ckpt).to(device)
632
  else:
633
  ling_disc = None
634
  if args.linggen_type != 'none':
635
  ling_gen = LingGenerator(args).to(device)
 
 
 
 
 
 
636
  if args.sem_loss or args.sem_ckpt:
637
  if args.sem_loss_type == 'shared':
638
- sem_emb = seld.backbone.encoder
639
  elif args.sem_loss_type == 'dedicated':
640
- sem_emb = SemEmb(T5EncoderModel.from_pretrained('google/flan-t5-base'), tokenizer.eos_token_id).to(device)
641
  else:
642
  raise NotImplementedError('Semantic loss type')
643
  else:
644
  sem_emb = None
645
 
646
- if not args.pretrain_disc:
647
- model = EncoderDecoderVAE(args, tokenizer.pad_token_id, tokenizer.eos_token_id).to(device)
648
- if args.use_lora:
649
- target_modules = ["Attention.k", "Attention.q", "Attention.v", "Attention.o", "lm_head", "wi_0", "wi_1", "wo"]
650
- target_modules = '|'.join(f'(.*{module})' for module in target_modules)
651
- target_modules = f'backbone.({target_modules})'
652
- config = LoraConfig(
653
- r=args.lora_r,
654
- lora_alpha=args.lora_r * 2,
655
- target_modules=target_modules,
656
- lora_dropout=0.1,
657
- bias="lora_only",
658
- modules_to_save=['ling_embed'],
659
- )
660
- model = get_peft_model(model, config)
661
- model.print_trainable_parameters()
662
- else:
663
- model = ling_disc
664
-
665
  return model, ling_disc, sem_emb
666
 
 
3
  import torch.nn.functional as F
4
  import numpy as np
5
  from torch import nn
6
+ from transformers import T5ForConditionalGeneration, T5EncoderModel, AutoModel, LogitsProcessor, LogitsProcessorList, PreTrainedModel
7
  from functools import partial
8
  from undecorate import unwrap
9
  from types import MethodType
 
175
  output = enc_output.logits
176
  return output
177
 
178
+ class SemEmb(T5EncoderModel):
179
+ def __init__(self, config, sep_token_id):
180
+ super().__init__(config)
 
181
  self.sep_token_id = sep_token_id
182
+ hidden_dim = self.config.d_model
183
  self.projection = nn.Sequential(nn.ReLU(),
184
  nn.Dropout(0.2),
185
  nn.Linear(hidden_dim, 1))
186
 
187
+ def compare_sem(self, **batch):
188
  bs = batch['sentence1_attention_mask'].shape[0]
189
  ones = torch.ones((bs, 1), device=batch['sentence1_attention_mask'].device)
190
  sep = torch.ones((bs, 1), dtype=torch.long,
 
192
  att_mask = torch.cat([batch['sentence1_attention_mask'], ones, batch['sentence2_attention_mask']], dim=1)
193
  if 'logits' in batch:
194
  input_ids = torch.cat([batch['sentence1_input_ids'], sep], dim=1)
195
+ embeds1 = self.shared(input_ids)
196
 
197
  logits = batch['logits']
198
  scores = F.softmax(logits, dim = -1)
199
  onehot = F.one_hot(logits.argmax(-1), num_classes=logits.shape[2]).float().to(logits.device)
200
  onehot_ = scores - scores.detach() + onehot
201
 
202
+ embeds2 = onehot_ @ self.shared.weight
203
  embeds1_2 = torch.cat([embeds1, embeds2], dim=1)
204
+ hidden_units = self(inputs_embeds=embeds1_2,
205
  attention_mask=att_mask).last_hidden_state.mean(1)
206
  elif 'sentence2_input_ids' in batch:
207
  input_ids = torch.cat([batch['sentence1_input_ids'], sep, batch['sentence2_input_ids']], dim=1)
208
+ hidden_units = self(input_ids=input_ids,
209
  attention_mask=att_mask).last_hidden_state.mean(1)
210
  probs = self.projection(hidden_units)
211
  return probs
 
267
  def __call__(self, input_ids, scores):
268
  return scores + self.sent2_ling
269
 
270
+ class EncoderDecoderVAE(T5ForConditionalGeneration):
271
+ def __init__(self, config, args, pad_token_id, sepeos_token_id, vocab_size = 32128):
272
+ super().__init__(config)
273
+ self.prepare_inputs_for_generation = types.MethodType(
 
274
  partial(prepare_inputs_for_generation, args.combine_method, args.ling2_only),
275
+ self)
276
  self.args = args
277
  self.pad_token_id = pad_token_id
278
  self.eos_token_id = sepeos_token_id
279
+ hidden_dim = self.config.d_model if not 'logits' in args.combine_method else vocab_size
280
  if args.combine_method == 'fusion1':
281
  self.fusion = nn.Sequential(
282
  nn.Linear(hidden_dim + 2 * args.lng_dim, hidden_dim),
 
306
  nn.init.xavier_uniform_(self.ling_logvar.weight)
307
 
308
 
309
+ generate_with_grad = unwrap(self.generate)
310
+ self.generate_with_grad = MethodType(generate_with_grad, self)
311
 
312
  def get_fusion_layer(self):
313
  if 'fusion' in self.args.combine_method:
 
325
  if 'inputs_embeds' in batch:
326
  inputs_embeds = batch['inputs_embeds']
327
  else:
328
+ inputs_embeds = self.shared(batch['sentence1_input_ids'])
329
  inputs_att_mask = batch['sentence1_attention_mask']
330
  bs = inputs_embeds.shape[0]
331
  cache = {}
 
367
  inputs_embeds = inputs_embeds + sent2_ling
368
  else:
369
  inputs_embeds = inputs_embeds + sent1_ling + sent2_ling
370
+ return self.encoder(inputs_embeds=inputs_embeds,
371
  attention_mask=inputs_att_mask), inputs_att_mask, cache
372
 
373
  def decode(self, batch, enc_output, inputs_att_mask, generate):
 
430
  else:
431
  logits_processor = LogitsProcessorList()
432
 
433
+ dec_output = self.generate_with_grad(
434
  attention_mask=inputs_att_mask,
435
  encoder_outputs=enc_output,
436
  sent1_ling=sent1_ling,
 
450
  cache.update({'scores': scores})
451
  return dec_output.sequences, cache
452
 
453
+ decoder_input_ids = self._shift_right(batch['sentence2_input_ids'])
454
+ decoder_inputs_embeds = self.shared(decoder_input_ids)
455
  decoder_att_mask = batch['sentence2_attention_mask']
456
  labels = batch['sentence2_input_ids'].clone()
457
  labels[labels == self.pad_token_id] = -100
 
473
  else:
474
  decoder_inputs_embeds = decoder_inputs_embeds + sent1_ling + sent2_ling
475
 
476
+ dec_output = self(
477
  decoder_inputs_embeds=decoder_inputs_embeds,
478
  decoder_attention_mask=decoder_att_mask,
479
  encoder_outputs=enc_output,
 
487
  return dec_output, cache
488
 
489
 
490
+ def convert(self, batch, generate=False):
491
  enc_output, enc_att_mask, cache = self.encode(batch)
492
  dec_output, cache2 = self.decode(batch, enc_output, enc_att_mask, generate)
493
  cache.update(cache2)
494
  return dec_output, enc_output, cache
495
 
496
  def infer_with_cache(self, batch):
497
+ dec_output, _, cache = self.convert(batch, generate = True)
498
  return dec_output, cache
499
 
500
  def infer(self, batch):
 
520
  'sentence2_input_ids': pred,
521
  'sentence2_attention_mask': sequence_mask(lens, max_len = max_len)
522
  })
523
+ sem_prob = torch.sigmoid(sem_emb.compare_sem(**batch)).item()
524
  # if sem_prob <= 0.1:
525
  # patience -= 1
526
  if new_loss < loss and sem_prob >= 0.90 and lens.item() > 1:
 
553
  ling2_embed = self.ling_embed(batch['sentence2_ling'])
554
  param = torch.nn.Parameter(ling2_embed, requires_grad = True)
555
  elif self.args.feedback_param == 's':
556
+ inputs_embeds = self.shared(batch['sentence1_input_ids'])
557
  param = torch.nn.Parameter(inputs_embeds, requires_grad = True)
558
  elif self.args.feedback_param == 'logits':
559
  logits = self.infer_with_cache(batch)[1]['scores']
 
626
 
627
  def get_model(args, tokenizer, device):
628
  if args.pretrain_disc or args.disc_loss or args.disc_ckpt:
629
+ ling_disc = LingDisc(args.model_name, args.disc_type, args.disc_model_path).to(device)
630
  else:
631
  ling_disc = None
632
  if args.linggen_type != 'none':
633
  ling_gen = LingGenerator(args).to(device)
634
+
635
+ if not args.pretrain_disc:
636
+ model = EncoderDecoderVAE.from_pretrained(args.model_path, args, tokenizer.pad_token_id, tokenizer.eos_token_id).to(device)
637
+ else:
638
+ model = ling_disc
639
+
640
  if args.sem_loss or args.sem_ckpt:
641
  if args.sem_loss_type == 'shared':
642
+ sem_emb = model.encoder
643
  elif args.sem_loss_type == 'dedicated':
644
+ sem_emb = SemEmb.from_pretrained(args.sem_model_path, tokenizer.eos_token_id).to(device)
645
  else:
646
  raise NotImplementedError('Semantic loss type')
647
  else:
648
  sem_emb = None
649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  return model, ling_disc, sem_emb
651
 
options.py CHANGED
@@ -32,6 +32,10 @@ def parse_args(ckpt=None):
32
  parser.add_argument('--lng_ids_path', default='/data/mohamed/indices')
33
  parser.add_argument('--preds_dir', default='/data/mohamed/preds')
34
  parser.add_argument('--model_name', default="google/flan-t5-base")
 
 
 
 
35
  parser.add_argument('--disc_type', default="t5")
36
  parser.add_argument('--aim_exp', default='ling-conversion')
37
  parser.add_argument('--sem_loss_type', default='dedicated')
 
32
  parser.add_argument('--lng_ids_path', default='/data/mohamed/indices')
33
  parser.add_argument('--preds_dir', default='/data/mohamed/preds')
34
  parser.add_argument('--model_name', default="google/flan-t5-base")
35
+ parser.add_argument('--model_path', default="mohdelgaar/lingconv")
36
+ parser.add_argument('--sem_path', default="mohdelgaar/lingconv-semantic-classifier")
37
+ parser.add_argument('--sem_model_path', default="mohdelgaar/lingconv-semantic-classifier")
38
+ parser.add_argument('--disc_model_path', default="mohdelgaar/lingconv-discriminator")
39
  parser.add_argument('--disc_type', default="t5")
40
  parser.add_argument('--aim_exp', default='ling-conversion')
41
  parser.add_argument('--sem_loss_type', default='dedicated')