ntphuc149 commited on
Commit
5ba7685
1 Parent(s): f977746

Upload 26 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ models/EQA_model/tokenizer.json filter=lfs diff=lfs merge=lfs -text
.streamlit/config.toml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ [server]
2
+ enableStaticServing = true
3
+
4
+ [theme]
5
+ primaryColor="#112C55"
6
+ backgroundColor="#f2f2f2"
7
+ secondaryBackgroundColor="#cacaca"
8
+ textColor="#16232e"
9
+ font="serif"
10
+
app.py ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gc
2
+ import time
3
+ import torch
4
+ import numpy as np
5
+ import streamlit as st
6
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoModelForQuestionAnswering
7
+
8
+ st.set_page_config(page_title="ViBidLawQA - Hệ thống hỏi đáp trực tuyến luật Việt Nam", page_icon="./app/static/ai.png", layout="centered", initial_sidebar_state="expanded")
9
+
10
+ with open("./static/styles.css") as f:
11
+ st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
12
+
13
+ if 'messages' not in st.session_state:
14
+ st.session_state.messages = []
15
+
16
+ st.markdown(f"""
17
+ <div class=logo_area>
18
+ <img src="./app/static/ai.png"/>
19
+ </div>
20
+ """, unsafe_allow_html=True)
21
+ st.markdown("<h2 style='text-align: center;'>ViBidLawQA_v2</h2>", unsafe_allow_html=True)
22
+
23
+ answering_method = st.sidebar.selectbox(options=['Extraction', 'Generation'], label='Chọn mô hình trả lời câu hỏi:', index=0)
24
+ context = st.sidebar.text_area(label='Nội dung văn bản pháp luật Việt Nam:', placeholder='Vui lòng nhập nội dung văn bản pháp luật Việt Nam tại đây...', height=500)
25
+
26
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
27
+
28
+
29
+ if answering_method == 'Generation' and 'aqa_model' not in st.session_state:
30
+ if 'eqa_model' and 'eqa_tokenizer' in st.session_state:
31
+ del st.session_state.eqa_model
32
+ del st.session_state.eqa_tokenizer
33
+ if torch.cuda.is_available():
34
+ torch.cuda.empty_cache()
35
+ gc.collect()
36
+ print('Switching to generative model...')
37
+ print('Loading generative model...')
38
+ st.session_state.aqa_model = AutoModelForSeq2SeqLM.from_pretrained(pretrained_model_name_or_path='./models/AQA_model').to(device)
39
+ st.session_state.aqa_tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path='./models/AQA_model')
40
+
41
+ if answering_method == 'Extraction' and 'eqa_model' not in st.session_state:
42
+ if 'aqa_model' and 'aqa_tokenizer' in st.session_state:
43
+ del st.session_state.aqa_model
44
+ del st.session_state.aqa_tokenizer
45
+ if torch.cuda.is_available():
46
+ torch.cuda.empty_cache()
47
+ gc.collect()
48
+ print('Switching to extraction model...')
49
+ print('Loading extraction model...')
50
+ st.session_state.eqa_model = AutoModelForQuestionAnswering.from_pretrained(pretrained_model_name_or_path='./models/EQA_model').to(device)
51
+ st.session_state.eqa_tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path='./models/EQA_model')
52
+
53
+ def get_abstractive_answer(context, question, max_length=1024, max_target_length=512):
54
+ inputs = st.session_state.aqa_tokenizer(question,
55
+ context,
56
+ max_length=max_length,
57
+ truncation='only_second',
58
+ padding='max_length',
59
+ return_tensors='pt')
60
+ outputs = st.session_state.aqa_model.generate(inputs=inputs['input_ids'].to(device),
61
+ attention_mask=inputs['attention_mask'].to(device),
62
+ max_length=max_target_length)
63
+ answer = st.session_state.aqa_tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_space=True)
64
+
65
+ if not answer.endswith('.'):
66
+ answer += '.'
67
+
68
+ return answer
69
+
70
+ def generate_text_effect(answer):
71
+ words = answer.split()
72
+ for i in range(len(words)):
73
+ time.sleep(0.05)
74
+ yield " ".join(words[:i+1])
75
+
76
+ def get_extractive_answer(context, question, stride=20, max_length=256, n_best=50, max_answer_length=512):
77
+ inputs = st.session_state.eqa_tokenizer(question,
78
+ context,
79
+ max_length=max_length,
80
+ truncation='only_second',
81
+ stride=stride,
82
+ return_overflowing_tokens=True,
83
+ return_offsets_mapping=True,
84
+ padding='max_length')
85
+ for i in range(len(inputs['input_ids'])):
86
+ sequence_ids = inputs.sequence_ids(i)
87
+ offset = inputs['offset_mapping'][i]
88
+ inputs['offset_mapping'][i] = [
89
+ o if sequence_ids[k] == 1 else None for k, o in enumerate(offset)
90
+ ]
91
+
92
+ input_ids = torch.tensor(inputs["input_ids"]).to(device)
93
+ attention_mask = torch.tensor(inputs["attention_mask"]).to(device)
94
+
95
+ with torch.no_grad():
96
+ outputs = st.session_state.eqa_model(input_ids=input_ids, attention_mask=attention_mask)
97
+
98
+ start_logits = outputs.start_logits.cpu().numpy()
99
+ end_logits = outputs.end_logits.cpu().numpy()
100
+
101
+ answers = []
102
+ for i in range(len(inputs["input_ids"])):
103
+ start_logit = start_logits[i]
104
+ end_logit = end_logits[i]
105
+ offsets = inputs["offset_mapping"][i]
106
+
107
+ start_indexes = np.argsort(start_logit)[-1 : -n_best - 1 : -1].tolist()
108
+ end_indexes = np.argsort(end_logit)[-1 : -n_best - 1 : -1].tolist()
109
+ for start_index in start_indexes:
110
+ for end_index in end_indexes:
111
+ if offsets[start_index] is None or offsets[end_index] is None:
112
+ continue
113
+ if end_index < start_index or end_index - start_index + 1 > max_answer_length:
114
+ continue
115
+
116
+ answer = {
117
+ "text": context[offsets[start_index][0] : offsets[end_index][1]],
118
+ "logit_score": start_logit[start_index] + end_logit[end_index],
119
+ }
120
+ answers.append(answer)
121
+
122
+ if len(answers) > 0:
123
+ best_answer = max(answers, key=lambda x: x["logit_score"])
124
+ return best_answer["text"]
125
+ else:
126
+ return ""
127
+
128
+ for message in st.session_state.messages:
129
+ if message['role'] == 'assistant':
130
+ avatar_class = "assistant-avatar"
131
+ message_class = "assistant-message"
132
+ avatar = './app/static/ai.png'
133
+ else:
134
+ avatar_class = "user-avatar"
135
+ message_class = "user-message"
136
+ avatar = './app/static/human.png'
137
+ st.markdown(f"""
138
+ <div class="{message_class}">
139
+ <img src="{avatar}" class="{avatar_class}" />
140
+ <div class="stMarkdown">{message['content']}</div>
141
+ </div>
142
+ """, unsafe_allow_html=True)
143
+
144
+ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho bạn?'):
145
+ st.markdown(f"""
146
+ <div class="user-message">
147
+ <img src="./app/static/human.png" class="user-avatar" />
148
+ <div class="stMarkdown">{prompt}</div>
149
+ </div>
150
+ """, unsafe_allow_html=True)
151
+ st.session_state.messages.append({'role': 'user', 'content': prompt})
152
+
153
+ message_placeholder = st.empty()
154
+
155
+ for _ in range(2):
156
+ for dots in ["●", "●●", "●●●"]:
157
+ time.sleep(0.2)
158
+ message_placeholder.markdown(f"""
159
+ <div class="assistant-message">
160
+ <img src="./app/static/ai.png" class="assistant-avatar" />
161
+ <div class="stMarkdown">{dots}</div>
162
+ </div>
163
+ """, unsafe_allow_html=True)
164
+
165
+ full_response = ""
166
+ if answering_method == 'Generation':
167
+ abs_answer = get_abstractive_answer(context=context, question=prompt)
168
+ for word in generate_text_effect(abs_answer):
169
+ full_response = word
170
+
171
+ message_placeholder.markdown(f"""
172
+ <div class="assistant-message">
173
+ <img src="./app/static/ai.png" class="assistant-avatar" />
174
+ <div class="stMarkdown">{full_response}●</div>
175
+ </div>
176
+ """, unsafe_allow_html=True)
177
+
178
+ else:
179
+ ext_answer = get_extractive_answer(context=context, question=prompt)
180
+ for word in generate_text_effect(ext_answer):
181
+ full_response = word
182
+
183
+ message_placeholder.markdown(f"""
184
+ <div class="assistant-message">
185
+ <img src="./app/static/ai.png" class="assistant-avatar" />
186
+ <div class="stMarkdown">{full_response}●</div>
187
+ </div>
188
+ """, unsafe_allow_html=True)
189
+
190
+ message_placeholder.markdown(f"""
191
+ <div class="assistant-message">
192
+ <img src="./app/static/ai.png" class="assistant-avatar" />
193
+ <div class="stMarkdown">{full_response}</div>
194
+ </div>
195
+ """, unsafe_allow_html=True)
196
+
197
+ st.session_state.messages.append({'role': 'assistant', 'content': full_response})
models/AQA_model/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "VietAI/vit5-base",
3
+ "architectures": [
4
+ "T5ForConditionalGeneration"
5
+ ],
6
+ "classifier_dropout": 0.0,
7
+ "d_ff": 3072,
8
+ "d_kv": 64,
9
+ "d_model": 768,
10
+ "decoder_start_token_id": 0,
11
+ "dense_act_fn": "relu",
12
+ "dropout_rate": 0.1,
13
+ "eos_token_id": 1,
14
+ "feed_forward_proj": "relu",
15
+ "initializer_factor": 1.0,
16
+ "is_encoder_decoder": true,
17
+ "is_gated_act": false,
18
+ "layer_norm_epsilon": 1e-06,
19
+ "model_type": "t5",
20
+ "n_positions": 512,
21
+ "num_decoder_layers": 12,
22
+ "num_heads": 12,
23
+ "num_layers": 12,
24
+ "output_past": true,
25
+ "pad_token_id": 0,
26
+ "relative_attention_max_distance": 128,
27
+ "relative_attention_num_buckets": 32,
28
+ "torch_dtype": "float32",
29
+ "transformers_version": "4.39.3",
30
+ "use_cache": true,
31
+ "vocab_size": 36096
32
+ }
models/AQA_model/generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "decoder_start_token_id": 0,
4
+ "eos_token_id": 1,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.39.3"
7
+ }
models/AQA_model/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d07b1d7f1a98d8aaba87ab31b6a3a12ed893e5326910276564fbb0722440f54e
3
+ size 903834408
models/AQA_model/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:888ed2e7206a18a0eaba1f74cd69f152c5871b1e1c757eed4521dbd295dce4d9
3
+ size 1807824186
models/AQA_model/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:843801a2ff5e91b6eb54f73d1abf1d6a242901dee2f57344127aa982711b3753
3
+ size 14244
models/AQA_model/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19e8a0d339d7bc6d4e15e0c0853749b9038433b79806b8050c10c5a81d13b39a
3
+ size 1064
models/AQA_model/special_tokens_map.json ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ],
100
+ "eos_token": "</s>",
101
+ "pad_token": "<pad>",
102
+ "unk_token": "<unk>"
103
+ }
models/AQA_model/spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59986b62f9f0b90edafb9b073ea7b93d21114a5841219a1ea2399ade73f729c6
3
+ size 820370
models/AQA_model/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
models/AQA_model/tokenizer_config.json ADDED
@@ -0,0 +1,902 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "36000": {
28
+ "content": "<extra_id_95>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "36001": {
36
+ "content": "<extra_id_94>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "36002": {
44
+ "content": "<extra_id_93>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "36003": {
52
+ "content": "<extra_id_92>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "36004": {
60
+ "content": "<extra_id_91>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "36005": {
68
+ "content": "<extra_id_90>",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "36006": {
76
+ "content": "<extra_id_89>",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "36007": {
84
+ "content": "<extra_id_88>",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "36008": {
92
+ "content": "<extra_id_87>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "36009": {
100
+ "content": "<extra_id_86>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "36010": {
108
+ "content": "<extra_id_85>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "36011": {
116
+ "content": "<extra_id_84>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "36012": {
124
+ "content": "<extra_id_83>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "36013": {
132
+ "content": "<extra_id_82>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "36014": {
140
+ "content": "<extra_id_81>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "36015": {
148
+ "content": "<extra_id_80>",
149
+ "lstrip": false,
150
+ "normalized": false,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "36016": {
156
+ "content": "<extra_id_79>",
157
+ "lstrip": false,
158
+ "normalized": false,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "36017": {
164
+ "content": "<extra_id_78>",
165
+ "lstrip": false,
166
+ "normalized": false,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": true
170
+ },
171
+ "36018": {
172
+ "content": "<extra_id_77>",
173
+ "lstrip": false,
174
+ "normalized": false,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": true
178
+ },
179
+ "36019": {
180
+ "content": "<extra_id_76>",
181
+ "lstrip": false,
182
+ "normalized": false,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": true
186
+ },
187
+ "36020": {
188
+ "content": "<extra_id_75>",
189
+ "lstrip": false,
190
+ "normalized": false,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": true
194
+ },
195
+ "36021": {
196
+ "content": "<extra_id_74>",
197
+ "lstrip": false,
198
+ "normalized": false,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": true
202
+ },
203
+ "36022": {
204
+ "content": "<extra_id_73>",
205
+ "lstrip": false,
206
+ "normalized": false,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": true
210
+ },
211
+ "36023": {
212
+ "content": "<extra_id_72>",
213
+ "lstrip": false,
214
+ "normalized": false,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": true
218
+ },
219
+ "36024": {
220
+ "content": "<extra_id_71>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "36025": {
228
+ "content": "<extra_id_70>",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "36026": {
236
+ "content": "<extra_id_69>",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "36027": {
244
+ "content": "<extra_id_68>",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "36028": {
252
+ "content": "<extra_id_67>",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "36029": {
260
+ "content": "<extra_id_66>",
261
+ "lstrip": false,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "36030": {
268
+ "content": "<extra_id_65>",
269
+ "lstrip": false,
270
+ "normalized": false,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "36031": {
276
+ "content": "<extra_id_64>",
277
+ "lstrip": false,
278
+ "normalized": false,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "36032": {
284
+ "content": "<extra_id_63>",
285
+ "lstrip": false,
286
+ "normalized": false,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": true
290
+ },
291
+ "36033": {
292
+ "content": "<extra_id_62>",
293
+ "lstrip": false,
294
+ "normalized": false,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": true
298
+ },
299
+ "36034": {
300
+ "content": "<extra_id_61>",
301
+ "lstrip": false,
302
+ "normalized": false,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": true
306
+ },
307
+ "36035": {
308
+ "content": "<extra_id_60>",
309
+ "lstrip": false,
310
+ "normalized": false,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": true
314
+ },
315
+ "36036": {
316
+ "content": "<extra_id_59>",
317
+ "lstrip": false,
318
+ "normalized": false,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": true
322
+ },
323
+ "36037": {
324
+ "content": "<extra_id_58>",
325
+ "lstrip": false,
326
+ "normalized": false,
327
+ "rstrip": false,
328
+ "single_word": false,
329
+ "special": true
330
+ },
331
+ "36038": {
332
+ "content": "<extra_id_57>",
333
+ "lstrip": false,
334
+ "normalized": false,
335
+ "rstrip": false,
336
+ "single_word": false,
337
+ "special": true
338
+ },
339
+ "36039": {
340
+ "content": "<extra_id_56>",
341
+ "lstrip": false,
342
+ "normalized": false,
343
+ "rstrip": false,
344
+ "single_word": false,
345
+ "special": true
346
+ },
347
+ "36040": {
348
+ "content": "<extra_id_55>",
349
+ "lstrip": false,
350
+ "normalized": false,
351
+ "rstrip": false,
352
+ "single_word": false,
353
+ "special": true
354
+ },
355
+ "36041": {
356
+ "content": "<extra_id_54>",
357
+ "lstrip": false,
358
+ "normalized": false,
359
+ "rstrip": false,
360
+ "single_word": false,
361
+ "special": true
362
+ },
363
+ "36042": {
364
+ "content": "<extra_id_53>",
365
+ "lstrip": false,
366
+ "normalized": false,
367
+ "rstrip": false,
368
+ "single_word": false,
369
+ "special": true
370
+ },
371
+ "36043": {
372
+ "content": "<extra_id_52>",
373
+ "lstrip": false,
374
+ "normalized": false,
375
+ "rstrip": false,
376
+ "single_word": false,
377
+ "special": true
378
+ },
379
+ "36044": {
380
+ "content": "<extra_id_51>",
381
+ "lstrip": false,
382
+ "normalized": false,
383
+ "rstrip": false,
384
+ "single_word": false,
385
+ "special": true
386
+ },
387
+ "36045": {
388
+ "content": "<extra_id_50>",
389
+ "lstrip": false,
390
+ "normalized": false,
391
+ "rstrip": false,
392
+ "single_word": false,
393
+ "special": true
394
+ },
395
+ "36046": {
396
+ "content": "<extra_id_49>",
397
+ "lstrip": false,
398
+ "normalized": false,
399
+ "rstrip": false,
400
+ "single_word": false,
401
+ "special": true
402
+ },
403
+ "36047": {
404
+ "content": "<extra_id_48>",
405
+ "lstrip": false,
406
+ "normalized": false,
407
+ "rstrip": false,
408
+ "single_word": false,
409
+ "special": true
410
+ },
411
+ "36048": {
412
+ "content": "<extra_id_47>",
413
+ "lstrip": false,
414
+ "normalized": false,
415
+ "rstrip": false,
416
+ "single_word": false,
417
+ "special": true
418
+ },
419
+ "36049": {
420
+ "content": "<extra_id_46>",
421
+ "lstrip": false,
422
+ "normalized": false,
423
+ "rstrip": false,
424
+ "single_word": false,
425
+ "special": true
426
+ },
427
+ "36050": {
428
+ "content": "<extra_id_45>",
429
+ "lstrip": false,
430
+ "normalized": false,
431
+ "rstrip": false,
432
+ "single_word": false,
433
+ "special": true
434
+ },
435
+ "36051": {
436
+ "content": "<extra_id_44>",
437
+ "lstrip": false,
438
+ "normalized": false,
439
+ "rstrip": false,
440
+ "single_word": false,
441
+ "special": true
442
+ },
443
+ "36052": {
444
+ "content": "<extra_id_43>",
445
+ "lstrip": false,
446
+ "normalized": false,
447
+ "rstrip": false,
448
+ "single_word": false,
449
+ "special": true
450
+ },
451
+ "36053": {
452
+ "content": "<extra_id_42>",
453
+ "lstrip": false,
454
+ "normalized": false,
455
+ "rstrip": false,
456
+ "single_word": false,
457
+ "special": true
458
+ },
459
+ "36054": {
460
+ "content": "<extra_id_41>",
461
+ "lstrip": false,
462
+ "normalized": false,
463
+ "rstrip": false,
464
+ "single_word": false,
465
+ "special": true
466
+ },
467
+ "36055": {
468
+ "content": "<extra_id_40>",
469
+ "lstrip": false,
470
+ "normalized": false,
471
+ "rstrip": false,
472
+ "single_word": false,
473
+ "special": true
474
+ },
475
+ "36056": {
476
+ "content": "<extra_id_39>",
477
+ "lstrip": false,
478
+ "normalized": false,
479
+ "rstrip": false,
480
+ "single_word": false,
481
+ "special": true
482
+ },
483
+ "36057": {
484
+ "content": "<extra_id_38>",
485
+ "lstrip": false,
486
+ "normalized": false,
487
+ "rstrip": false,
488
+ "single_word": false,
489
+ "special": true
490
+ },
491
+ "36058": {
492
+ "content": "<extra_id_37>",
493
+ "lstrip": false,
494
+ "normalized": false,
495
+ "rstrip": false,
496
+ "single_word": false,
497
+ "special": true
498
+ },
499
+ "36059": {
500
+ "content": "<extra_id_36>",
501
+ "lstrip": false,
502
+ "normalized": false,
503
+ "rstrip": false,
504
+ "single_word": false,
505
+ "special": true
506
+ },
507
+ "36060": {
508
+ "content": "<extra_id_35>",
509
+ "lstrip": false,
510
+ "normalized": false,
511
+ "rstrip": false,
512
+ "single_word": false,
513
+ "special": true
514
+ },
515
+ "36061": {
516
+ "content": "<extra_id_34>",
517
+ "lstrip": false,
518
+ "normalized": false,
519
+ "rstrip": false,
520
+ "single_word": false,
521
+ "special": true
522
+ },
523
+ "36062": {
524
+ "content": "<extra_id_33>",
525
+ "lstrip": false,
526
+ "normalized": false,
527
+ "rstrip": false,
528
+ "single_word": false,
529
+ "special": true
530
+ },
531
+ "36063": {
532
+ "content": "<extra_id_32>",
533
+ "lstrip": false,
534
+ "normalized": false,
535
+ "rstrip": false,
536
+ "single_word": false,
537
+ "special": true
538
+ },
539
+ "36064": {
540
+ "content": "<extra_id_31>",
541
+ "lstrip": false,
542
+ "normalized": false,
543
+ "rstrip": false,
544
+ "single_word": false,
545
+ "special": true
546
+ },
547
+ "36065": {
548
+ "content": "<extra_id_30>",
549
+ "lstrip": false,
550
+ "normalized": false,
551
+ "rstrip": false,
552
+ "single_word": false,
553
+ "special": true
554
+ },
555
+ "36066": {
556
+ "content": "<extra_id_29>",
557
+ "lstrip": false,
558
+ "normalized": false,
559
+ "rstrip": false,
560
+ "single_word": false,
561
+ "special": true
562
+ },
563
+ "36067": {
564
+ "content": "<extra_id_28>",
565
+ "lstrip": false,
566
+ "normalized": false,
567
+ "rstrip": false,
568
+ "single_word": false,
569
+ "special": true
570
+ },
571
+ "36068": {
572
+ "content": "<extra_id_27>",
573
+ "lstrip": false,
574
+ "normalized": false,
575
+ "rstrip": false,
576
+ "single_word": false,
577
+ "special": true
578
+ },
579
+ "36069": {
580
+ "content": "<extra_id_26>",
581
+ "lstrip": false,
582
+ "normalized": false,
583
+ "rstrip": false,
584
+ "single_word": false,
585
+ "special": true
586
+ },
587
+ "36070": {
588
+ "content": "<extra_id_25>",
589
+ "lstrip": false,
590
+ "normalized": false,
591
+ "rstrip": false,
592
+ "single_word": false,
593
+ "special": true
594
+ },
595
+ "36071": {
596
+ "content": "<extra_id_24>",
597
+ "lstrip": false,
598
+ "normalized": false,
599
+ "rstrip": false,
600
+ "single_word": false,
601
+ "special": true
602
+ },
603
+ "36072": {
604
+ "content": "<extra_id_23>",
605
+ "lstrip": false,
606
+ "normalized": false,
607
+ "rstrip": false,
608
+ "single_word": false,
609
+ "special": true
610
+ },
611
+ "36073": {
612
+ "content": "<extra_id_22>",
613
+ "lstrip": false,
614
+ "normalized": false,
615
+ "rstrip": false,
616
+ "single_word": false,
617
+ "special": true
618
+ },
619
+ "36074": {
620
+ "content": "<extra_id_21>",
621
+ "lstrip": false,
622
+ "normalized": false,
623
+ "rstrip": false,
624
+ "single_word": false,
625
+ "special": true
626
+ },
627
+ "36075": {
628
+ "content": "<extra_id_20>",
629
+ "lstrip": false,
630
+ "normalized": false,
631
+ "rstrip": false,
632
+ "single_word": false,
633
+ "special": true
634
+ },
635
+ "36076": {
636
+ "content": "<extra_id_19>",
637
+ "lstrip": false,
638
+ "normalized": false,
639
+ "rstrip": false,
640
+ "single_word": false,
641
+ "special": true
642
+ },
643
+ "36077": {
644
+ "content": "<extra_id_18>",
645
+ "lstrip": false,
646
+ "normalized": false,
647
+ "rstrip": false,
648
+ "single_word": false,
649
+ "special": true
650
+ },
651
+ "36078": {
652
+ "content": "<extra_id_17>",
653
+ "lstrip": false,
654
+ "normalized": false,
655
+ "rstrip": false,
656
+ "single_word": false,
657
+ "special": true
658
+ },
659
+ "36079": {
660
+ "content": "<extra_id_16>",
661
+ "lstrip": false,
662
+ "normalized": false,
663
+ "rstrip": false,
664
+ "single_word": false,
665
+ "special": true
666
+ },
667
+ "36080": {
668
+ "content": "<extra_id_15>",
669
+ "lstrip": false,
670
+ "normalized": false,
671
+ "rstrip": false,
672
+ "single_word": false,
673
+ "special": true
674
+ },
675
+ "36081": {
676
+ "content": "<extra_id_14>",
677
+ "lstrip": false,
678
+ "normalized": false,
679
+ "rstrip": false,
680
+ "single_word": false,
681
+ "special": true
682
+ },
683
+ "36082": {
684
+ "content": "<extra_id_13>",
685
+ "lstrip": false,
686
+ "normalized": false,
687
+ "rstrip": false,
688
+ "single_word": false,
689
+ "special": true
690
+ },
691
+ "36083": {
692
+ "content": "<extra_id_12>",
693
+ "lstrip": false,
694
+ "normalized": false,
695
+ "rstrip": false,
696
+ "single_word": false,
697
+ "special": true
698
+ },
699
+ "36084": {
700
+ "content": "<extra_id_11>",
701
+ "lstrip": false,
702
+ "normalized": false,
703
+ "rstrip": false,
704
+ "single_word": false,
705
+ "special": true
706
+ },
707
+ "36085": {
708
+ "content": "<extra_id_10>",
709
+ "lstrip": false,
710
+ "normalized": false,
711
+ "rstrip": false,
712
+ "single_word": false,
713
+ "special": true
714
+ },
715
+ "36086": {
716
+ "content": "<extra_id_9>",
717
+ "lstrip": false,
718
+ "normalized": false,
719
+ "rstrip": false,
720
+ "single_word": false,
721
+ "special": true
722
+ },
723
+ "36087": {
724
+ "content": "<extra_id_8>",
725
+ "lstrip": false,
726
+ "normalized": false,
727
+ "rstrip": false,
728
+ "single_word": false,
729
+ "special": true
730
+ },
731
+ "36088": {
732
+ "content": "<extra_id_7>",
733
+ "lstrip": false,
734
+ "normalized": false,
735
+ "rstrip": false,
736
+ "single_word": false,
737
+ "special": true
738
+ },
739
+ "36089": {
740
+ "content": "<extra_id_6>",
741
+ "lstrip": false,
742
+ "normalized": false,
743
+ "rstrip": false,
744
+ "single_word": false,
745
+ "special": true
746
+ },
747
+ "36090": {
748
+ "content": "<extra_id_5>",
749
+ "lstrip": false,
750
+ "normalized": false,
751
+ "rstrip": false,
752
+ "single_word": false,
753
+ "special": true
754
+ },
755
+ "36091": {
756
+ "content": "<extra_id_4>",
757
+ "lstrip": false,
758
+ "normalized": false,
759
+ "rstrip": false,
760
+ "single_word": false,
761
+ "special": true
762
+ },
763
+ "36092": {
764
+ "content": "<extra_id_3>",
765
+ "lstrip": false,
766
+ "normalized": false,
767
+ "rstrip": false,
768
+ "single_word": false,
769
+ "special": true
770
+ },
771
+ "36093": {
772
+ "content": "<extra_id_2>",
773
+ "lstrip": false,
774
+ "normalized": false,
775
+ "rstrip": false,
776
+ "single_word": false,
777
+ "special": true
778
+ },
779
+ "36094": {
780
+ "content": "<extra_id_1>",
781
+ "lstrip": false,
782
+ "normalized": false,
783
+ "rstrip": false,
784
+ "single_word": false,
785
+ "special": true
786
+ },
787
+ "36095": {
788
+ "content": "<extra_id_0>",
789
+ "lstrip": false,
790
+ "normalized": false,
791
+ "rstrip": false,
792
+ "single_word": false,
793
+ "special": true
794
+ }
795
+ },
796
+ "additional_special_tokens": [
797
+ "<extra_id_0>",
798
+ "<extra_id_1>",
799
+ "<extra_id_2>",
800
+ "<extra_id_3>",
801
+ "<extra_id_4>",
802
+ "<extra_id_5>",
803
+ "<extra_id_6>",
804
+ "<extra_id_7>",
805
+ "<extra_id_8>",
806
+ "<extra_id_9>",
807
+ "<extra_id_10>",
808
+ "<extra_id_11>",
809
+ "<extra_id_12>",
810
+ "<extra_id_13>",
811
+ "<extra_id_14>",
812
+ "<extra_id_15>",
813
+ "<extra_id_16>",
814
+ "<extra_id_17>",
815
+ "<extra_id_18>",
816
+ "<extra_id_19>",
817
+ "<extra_id_20>",
818
+ "<extra_id_21>",
819
+ "<extra_id_22>",
820
+ "<extra_id_23>",
821
+ "<extra_id_24>",
822
+ "<extra_id_25>",
823
+ "<extra_id_26>",
824
+ "<extra_id_27>",
825
+ "<extra_id_28>",
826
+ "<extra_id_29>",
827
+ "<extra_id_30>",
828
+ "<extra_id_31>",
829
+ "<extra_id_32>",
830
+ "<extra_id_33>",
831
+ "<extra_id_34>",
832
+ "<extra_id_35>",
833
+ "<extra_id_36>",
834
+ "<extra_id_37>",
835
+ "<extra_id_38>",
836
+ "<extra_id_39>",
837
+ "<extra_id_40>",
838
+ "<extra_id_41>",
839
+ "<extra_id_42>",
840
+ "<extra_id_43>",
841
+ "<extra_id_44>",
842
+ "<extra_id_45>",
843
+ "<extra_id_46>",
844
+ "<extra_id_47>",
845
+ "<extra_id_48>",
846
+ "<extra_id_49>",
847
+ "<extra_id_50>",
848
+ "<extra_id_51>",
849
+ "<extra_id_52>",
850
+ "<extra_id_53>",
851
+ "<extra_id_54>",
852
+ "<extra_id_55>",
853
+ "<extra_id_56>",
854
+ "<extra_id_57>",
855
+ "<extra_id_58>",
856
+ "<extra_id_59>",
857
+ "<extra_id_60>",
858
+ "<extra_id_61>",
859
+ "<extra_id_62>",
860
+ "<extra_id_63>",
861
+ "<extra_id_64>",
862
+ "<extra_id_65>",
863
+ "<extra_id_66>",
864
+ "<extra_id_67>",
865
+ "<extra_id_68>",
866
+ "<extra_id_69>",
867
+ "<extra_id_70>",
868
+ "<extra_id_71>",
869
+ "<extra_id_72>",
870
+ "<extra_id_73>",
871
+ "<extra_id_74>",
872
+ "<extra_id_75>",
873
+ "<extra_id_76>",
874
+ "<extra_id_77>",
875
+ "<extra_id_78>",
876
+ "<extra_id_79>",
877
+ "<extra_id_80>",
878
+ "<extra_id_81>",
879
+ "<extra_id_82>",
880
+ "<extra_id_83>",
881
+ "<extra_id_84>",
882
+ "<extra_id_85>",
883
+ "<extra_id_86>",
884
+ "<extra_id_87>",
885
+ "<extra_id_88>",
886
+ "<extra_id_89>",
887
+ "<extra_id_90>",
888
+ "<extra_id_91>",
889
+ "<extra_id_92>",
890
+ "<extra_id_93>",
891
+ "<extra_id_94>",
892
+ "<extra_id_95>"
893
+ ],
894
+ "clean_up_tokenization_spaces": true,
895
+ "eos_token": "</s>",
896
+ "extra_ids": 96,
897
+ "model_max_length": 1000000000000000019884624838656,
898
+ "pad_token": "<pad>",
899
+ "sp_model_kwargs": {},
900
+ "tokenizer_class": "T5Tokenizer",
901
+ "unk_token": "<unk>"
902
+ }
models/AQA_model/trainer_state.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.334722801167153,
5
+ "eval_steps": 500,
6
+ "global_step": 500,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 3.33,
13
+ "grad_norm": 2.0089468955993652,
14
+ "learning_rate": 1.0396039603960395e-05,
15
+ "loss": 0.5324,
16
+ "step": 500
17
+ },
18
+ {
19
+ "epoch": 3.33,
20
+ "eval_loss": 0.39683377742767334,
21
+ "eval_runtime": 31.7252,
22
+ "eval_samples_per_second": 15.76,
23
+ "eval_steps_per_second": 7.88,
24
+ "step": 500
25
+ }
26
+ ],
27
+ "logging_steps": 500,
28
+ "max_steps": 745,
29
+ "num_input_tokens_seen": 0,
30
+ "num_train_epochs": 5,
31
+ "save_steps": 500,
32
+ "total_flos": 1.948665249792e+16,
33
+ "train_batch_size": 2,
34
+ "trial_name": null,
35
+ "trial_params": null
36
+ }
models/AQA_model/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99f405ab37c0009ba7930cb6f3ea81ca6baebcddfdf4bb2469a2050892c79420
3
+ size 5048
models/EQA_model/bpe.codes ADDED
The diff for this file is too large to render. See raw diff
 
models/EQA_model/config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/kaggle/input/vimrclarge-3k/model",
3
+ "architectures": [
4
+ "RobertaForQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 1024,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 4096,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 16,
20
+ "num_hidden_layers": 24,
21
+ "output_past": true,
22
+ "pad_token_id": 1,
23
+ "position_embedding_type": "absolute",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.32.0.dev0",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 250002
29
+ }
models/EQA_model/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:699220e66d94f9a7af27ff8c6a9326fb9cc78791755a57f22150423e5431527b
3
+ size 2235506918
models/EQA_model/special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
models/EQA_model/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e6ec3ffd088acaa25e626dd3d4e20f9238eab3748513e9ae1d0c51d93319d8d
3
+ size 17082924
models/EQA_model/tokenizer_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "250001": {
28
+ "content": "<mask>",
29
+ "lstrip": true,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "3": {
36
+ "content": "<unk>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": {
49
+ "__type": "AddedToken",
50
+ "content": "<mask>",
51
+ "lstrip": true,
52
+ "normalized": true,
53
+ "rstrip": false,
54
+ "single_word": false
55
+ },
56
+ "model_max_length": 512,
57
+ "pad_token": "<pad>",
58
+ "sep_token": "</s>",
59
+ "tokenizer_class": "XLMRobertaTokenizer",
60
+ "unk_token": "<unk>"
61
+ }
models/EQA_model/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4786fc7a4a55dca3875e141532e587282a0ba319ce1ba59ef5fad22f96a3276c
3
+ size 4472
models/EQA_model/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ time
2
+ torch==2.3.0
3
+ numpy==1.24.3
4
+ streamlit==1.32.0
5
+ transformers==4.37.2
static/ai.png ADDED
static/human.png ADDED
static/styles.css ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .user-message {
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ align-items: center;
5
+ margin: 10px 0;
6
+ color: white;
7
+ }
8
+
9
+ .user-message .stMarkdown {
10
+ /* background: linear-gradient(0.9turn, #d46c4e, #ca8d57); */
11
+ background: linear-gradient(0.9turn, #112c55, #3578cf);
12
+ border-radius: 15px;
13
+ padding: 10px;
14
+ max-width: 80%;
15
+ word-wrap: break-word;
16
+ }
17
+
18
+ .user-avatar {
19
+ order: 2;
20
+ margin-left: 10px;
21
+ width: 38px;
22
+ height: 38px;
23
+ border-radius: 50%;
24
+ }
25
+
26
+ .assistant-message {
27
+ display: flex;
28
+ align-items: center;
29
+ margin: 10px 0;
30
+ color: black;
31
+ }
32
+
33
+ .assistant-message .stMarkdown {
34
+ background-color: #dadada;
35
+ border-radius: 15px;
36
+ padding: 10px;
37
+ max-width: 80%;
38
+ word-wrap: break-word;
39
+ }
40
+
41
+ .assistant-avatar {
42
+ margin-right: 10px;
43
+ width: 38px;
44
+ height: 38px;
45
+ border-radius: 50%;
46
+ }
47
+
48
+ .logo_area {
49
+ display: flex;
50
+ justify-content: center;
51
+ }
52
+
53
+ .logo_area img {
54
+ margin-top: 50px;
55
+ margin-left: 0px auto;
56
+ width: 149px;
57
+ }
58
+
59
+ /* [data-testid="baseButton-headerNoPadding"], */
60
+ [data-testid="stDecoration"],
61
+ /* [data-testid="baseButton-header"], */
62
+ [data-testid="stHeader"] {
63
+ display: none;
64
+ }
65
+
66
+ [data-testid="stChatInput"],
67
+ [data-testid="stChatInputSubmitButton"] {
68
+ border-radius: 15px;
69
+ }
70
+
71
+ [data-baseweb="textarea"] {
72
+ border-color: transparent;
73
+ }