Drishti commited on
Commit
33ca28a
·
verified ·
1 Parent(s): a255c48

Upload cbrn_finetuning_dataset (1).ipynb

Browse files
Files changed (1) hide show
  1. cbrn_finetuning_dataset (1).ipynb +1317 -0
cbrn_finetuning_dataset (1).ipynb ADDED
@@ -0,0 +1,1317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": []
7
+ },
8
+ "kernelspec": {
9
+ "name": "python3",
10
+ "display_name": "Python 3"
11
+ },
12
+ "language_info": {
13
+ "name": "python"
14
+ },
15
+ "widgets": {
16
+ "application/vnd.jupyter.widget-state+json": {
17
+ "6e06889327f649aa9a12d894be6e605f": {
18
+ "model_module": "@jupyter-widgets/controls",
19
+ "model_name": "HBoxModel",
20
+ "model_module_version": "1.5.0",
21
+ "state": {
22
+ "_dom_classes": [],
23
+ "_model_module": "@jupyter-widgets/controls",
24
+ "_model_module_version": "1.5.0",
25
+ "_model_name": "HBoxModel",
26
+ "_view_count": null,
27
+ "_view_module": "@jupyter-widgets/controls",
28
+ "_view_module_version": "1.5.0",
29
+ "_view_name": "HBoxView",
30
+ "box_style": "",
31
+ "children": [
32
+ "IPY_MODEL_4ff9c45370664ec38e2b4db1f9e062ad",
33
+ "IPY_MODEL_6c6d64c3cc3d48dfbfdd64b6b9d59a00",
34
+ "IPY_MODEL_f07fad0ee53e418b83e1e5ec551b358c"
35
+ ],
36
+ "layout": "IPY_MODEL_e33ba296947c48af803ca64f43ac3fc1"
37
+ }
38
+ },
39
+ "4ff9c45370664ec38e2b4db1f9e062ad": {
40
+ "model_module": "@jupyter-widgets/controls",
41
+ "model_name": "HTMLModel",
42
+ "model_module_version": "1.5.0",
43
+ "state": {
44
+ "_dom_classes": [],
45
+ "_model_module": "@jupyter-widgets/controls",
46
+ "_model_module_version": "1.5.0",
47
+ "_model_name": "HTMLModel",
48
+ "_view_count": null,
49
+ "_view_module": "@jupyter-widgets/controls",
50
+ "_view_module_version": "1.5.0",
51
+ "_view_name": "HTMLView",
52
+ "description": "",
53
+ "description_tooltip": null,
54
+ "layout": "IPY_MODEL_48c7dd40b27049f68c40919b4c043224",
55
+ "placeholder": "​",
56
+ "style": "IPY_MODEL_ffa2f941c7d8423fac63c9ee4125f453",
57
+ "value": "finetuning.jsonl: 100%"
58
+ }
59
+ },
60
+ "6c6d64c3cc3d48dfbfdd64b6b9d59a00": {
61
+ "model_module": "@jupyter-widgets/controls",
62
+ "model_name": "FloatProgressModel",
63
+ "model_module_version": "1.5.0",
64
+ "state": {
65
+ "_dom_classes": [],
66
+ "_model_module": "@jupyter-widgets/controls",
67
+ "_model_module_version": "1.5.0",
68
+ "_model_name": "FloatProgressModel",
69
+ "_view_count": null,
70
+ "_view_module": "@jupyter-widgets/controls",
71
+ "_view_module_version": "1.5.0",
72
+ "_view_name": "ProgressView",
73
+ "bar_style": "success",
74
+ "description": "",
75
+ "description_tooltip": null,
76
+ "layout": "IPY_MODEL_8254631af15540e8871b2ac177c95d59",
77
+ "max": 40752096,
78
+ "min": 0,
79
+ "orientation": "horizontal",
80
+ "style": "IPY_MODEL_27ed8b4ca4c947c8940bd6323e163ee2",
81
+ "value": 40752096
82
+ }
83
+ },
84
+ "f07fad0ee53e418b83e1e5ec551b358c": {
85
+ "model_module": "@jupyter-widgets/controls",
86
+ "model_name": "HTMLModel",
87
+ "model_module_version": "1.5.0",
88
+ "state": {
89
+ "_dom_classes": [],
90
+ "_model_module": "@jupyter-widgets/controls",
91
+ "_model_module_version": "1.5.0",
92
+ "_model_name": "HTMLModel",
93
+ "_view_count": null,
94
+ "_view_module": "@jupyter-widgets/controls",
95
+ "_view_module_version": "1.5.0",
96
+ "_view_name": "HTMLView",
97
+ "description": "",
98
+ "description_tooltip": null,
99
+ "layout": "IPY_MODEL_62ac3fb065424bdf8c86af9cf44252ec",
100
+ "placeholder": "​",
101
+ "style": "IPY_MODEL_4a9e5bf75b6c41a38122d00aae6db79b",
102
+ "value": " 40.8M/40.8M [00:02<00:00, 19.3MB/s]"
103
+ }
104
+ },
105
+ "e33ba296947c48af803ca64f43ac3fc1": {
106
+ "model_module": "@jupyter-widgets/base",
107
+ "model_name": "LayoutModel",
108
+ "model_module_version": "1.2.0",
109
+ "state": {
110
+ "_model_module": "@jupyter-widgets/base",
111
+ "_model_module_version": "1.2.0",
112
+ "_model_name": "LayoutModel",
113
+ "_view_count": null,
114
+ "_view_module": "@jupyter-widgets/base",
115
+ "_view_module_version": "1.2.0",
116
+ "_view_name": "LayoutView",
117
+ "align_content": null,
118
+ "align_items": null,
119
+ "align_self": null,
120
+ "border": null,
121
+ "bottom": null,
122
+ "display": null,
123
+ "flex": null,
124
+ "flex_flow": null,
125
+ "grid_area": null,
126
+ "grid_auto_columns": null,
127
+ "grid_auto_flow": null,
128
+ "grid_auto_rows": null,
129
+ "grid_column": null,
130
+ "grid_gap": null,
131
+ "grid_row": null,
132
+ "grid_template_areas": null,
133
+ "grid_template_columns": null,
134
+ "grid_template_rows": null,
135
+ "height": null,
136
+ "justify_content": null,
137
+ "justify_items": null,
138
+ "left": null,
139
+ "margin": null,
140
+ "max_height": null,
141
+ "max_width": null,
142
+ "min_height": null,
143
+ "min_width": null,
144
+ "object_fit": null,
145
+ "object_position": null,
146
+ "order": null,
147
+ "overflow": null,
148
+ "overflow_x": null,
149
+ "overflow_y": null,
150
+ "padding": null,
151
+ "right": null,
152
+ "top": null,
153
+ "visibility": null,
154
+ "width": null
155
+ }
156
+ },
157
+ "48c7dd40b27049f68c40919b4c043224": {
158
+ "model_module": "@jupyter-widgets/base",
159
+ "model_name": "LayoutModel",
160
+ "model_module_version": "1.2.0",
161
+ "state": {
162
+ "_model_module": "@jupyter-widgets/base",
163
+ "_model_module_version": "1.2.0",
164
+ "_model_name": "LayoutModel",
165
+ "_view_count": null,
166
+ "_view_module": "@jupyter-widgets/base",
167
+ "_view_module_version": "1.2.0",
168
+ "_view_name": "LayoutView",
169
+ "align_content": null,
170
+ "align_items": null,
171
+ "align_self": null,
172
+ "border": null,
173
+ "bottom": null,
174
+ "display": null,
175
+ "flex": null,
176
+ "flex_flow": null,
177
+ "grid_area": null,
178
+ "grid_auto_columns": null,
179
+ "grid_auto_flow": null,
180
+ "grid_auto_rows": null,
181
+ "grid_column": null,
182
+ "grid_gap": null,
183
+ "grid_row": null,
184
+ "grid_template_areas": null,
185
+ "grid_template_columns": null,
186
+ "grid_template_rows": null,
187
+ "height": null,
188
+ "justify_content": null,
189
+ "justify_items": null,
190
+ "left": null,
191
+ "margin": null,
192
+ "max_height": null,
193
+ "max_width": null,
194
+ "min_height": null,
195
+ "min_width": null,
196
+ "object_fit": null,
197
+ "object_position": null,
198
+ "order": null,
199
+ "overflow": null,
200
+ "overflow_x": null,
201
+ "overflow_y": null,
202
+ "padding": null,
203
+ "right": null,
204
+ "top": null,
205
+ "visibility": null,
206
+ "width": null
207
+ }
208
+ },
209
+ "ffa2f941c7d8423fac63c9ee4125f453": {
210
+ "model_module": "@jupyter-widgets/controls",
211
+ "model_name": "DescriptionStyleModel",
212
+ "model_module_version": "1.5.0",
213
+ "state": {
214
+ "_model_module": "@jupyter-widgets/controls",
215
+ "_model_module_version": "1.5.0",
216
+ "_model_name": "DescriptionStyleModel",
217
+ "_view_count": null,
218
+ "_view_module": "@jupyter-widgets/base",
219
+ "_view_module_version": "1.2.0",
220
+ "_view_name": "StyleView",
221
+ "description_width": ""
222
+ }
223
+ },
224
+ "8254631af15540e8871b2ac177c95d59": {
225
+ "model_module": "@jupyter-widgets/base",
226
+ "model_name": "LayoutModel",
227
+ "model_module_version": "1.2.0",
228
+ "state": {
229
+ "_model_module": "@jupyter-widgets/base",
230
+ "_model_module_version": "1.2.0",
231
+ "_model_name": "LayoutModel",
232
+ "_view_count": null,
233
+ "_view_module": "@jupyter-widgets/base",
234
+ "_view_module_version": "1.2.0",
235
+ "_view_name": "LayoutView",
236
+ "align_content": null,
237
+ "align_items": null,
238
+ "align_self": null,
239
+ "border": null,
240
+ "bottom": null,
241
+ "display": null,
242
+ "flex": null,
243
+ "flex_flow": null,
244
+ "grid_area": null,
245
+ "grid_auto_columns": null,
246
+ "grid_auto_flow": null,
247
+ "grid_auto_rows": null,
248
+ "grid_column": null,
249
+ "grid_gap": null,
250
+ "grid_row": null,
251
+ "grid_template_areas": null,
252
+ "grid_template_columns": null,
253
+ "grid_template_rows": null,
254
+ "height": null,
255
+ "justify_content": null,
256
+ "justify_items": null,
257
+ "left": null,
258
+ "margin": null,
259
+ "max_height": null,
260
+ "max_width": null,
261
+ "min_height": null,
262
+ "min_width": null,
263
+ "object_fit": null,
264
+ "object_position": null,
265
+ "order": null,
266
+ "overflow": null,
267
+ "overflow_x": null,
268
+ "overflow_y": null,
269
+ "padding": null,
270
+ "right": null,
271
+ "top": null,
272
+ "visibility": null,
273
+ "width": null
274
+ }
275
+ },
276
+ "27ed8b4ca4c947c8940bd6323e163ee2": {
277
+ "model_module": "@jupyter-widgets/controls",
278
+ "model_name": "ProgressStyleModel",
279
+ "model_module_version": "1.5.0",
280
+ "state": {
281
+ "_model_module": "@jupyter-widgets/controls",
282
+ "_model_module_version": "1.5.0",
283
+ "_model_name": "ProgressStyleModel",
284
+ "_view_count": null,
285
+ "_view_module": "@jupyter-widgets/base",
286
+ "_view_module_version": "1.2.0",
287
+ "_view_name": "StyleView",
288
+ "bar_color": null,
289
+ "description_width": ""
290
+ }
291
+ },
292
+ "62ac3fb065424bdf8c86af9cf44252ec": {
293
+ "model_module": "@jupyter-widgets/base",
294
+ "model_name": "LayoutModel",
295
+ "model_module_version": "1.2.0",
296
+ "state": {
297
+ "_model_module": "@jupyter-widgets/base",
298
+ "_model_module_version": "1.2.0",
299
+ "_model_name": "LayoutModel",
300
+ "_view_count": null,
301
+ "_view_module": "@jupyter-widgets/base",
302
+ "_view_module_version": "1.2.0",
303
+ "_view_name": "LayoutView",
304
+ "align_content": null,
305
+ "align_items": null,
306
+ "align_self": null,
307
+ "border": null,
308
+ "bottom": null,
309
+ "display": null,
310
+ "flex": null,
311
+ "flex_flow": null,
312
+ "grid_area": null,
313
+ "grid_auto_columns": null,
314
+ "grid_auto_flow": null,
315
+ "grid_auto_rows": null,
316
+ "grid_column": null,
317
+ "grid_gap": null,
318
+ "grid_row": null,
319
+ "grid_template_areas": null,
320
+ "grid_template_columns": null,
321
+ "grid_template_rows": null,
322
+ "height": null,
323
+ "justify_content": null,
324
+ "justify_items": null,
325
+ "left": null,
326
+ "margin": null,
327
+ "max_height": null,
328
+ "max_width": null,
329
+ "min_height": null,
330
+ "min_width": null,
331
+ "object_fit": null,
332
+ "object_position": null,
333
+ "order": null,
334
+ "overflow": null,
335
+ "overflow_x": null,
336
+ "overflow_y": null,
337
+ "padding": null,
338
+ "right": null,
339
+ "top": null,
340
+ "visibility": null,
341
+ "width": null
342
+ }
343
+ },
344
+ "4a9e5bf75b6c41a38122d00aae6db79b": {
345
+ "model_module": "@jupyter-widgets/controls",
346
+ "model_name": "DescriptionStyleModel",
347
+ "model_module_version": "1.5.0",
348
+ "state": {
349
+ "_model_module": "@jupyter-widgets/controls",
350
+ "_model_module_version": "1.5.0",
351
+ "_model_name": "DescriptionStyleModel",
352
+ "_view_count": null,
353
+ "_view_module": "@jupyter-widgets/base",
354
+ "_view_module_version": "1.2.0",
355
+ "_view_name": "StyleView",
356
+ "description_width": ""
357
+ }
358
+ },
359
+ "fd9a55a3640d4ec5b1966656cae11e0e": {
360
+ "model_module": "@jupyter-widgets/controls",
361
+ "model_name": "HBoxModel",
362
+ "model_module_version": "1.5.0",
363
+ "state": {
364
+ "_dom_classes": [],
365
+ "_model_module": "@jupyter-widgets/controls",
366
+ "_model_module_version": "1.5.0",
367
+ "_model_name": "HBoxModel",
368
+ "_view_count": null,
369
+ "_view_module": "@jupyter-widgets/controls",
370
+ "_view_module_version": "1.5.0",
371
+ "_view_name": "HBoxView",
372
+ "box_style": "",
373
+ "children": [
374
+ "IPY_MODEL_892a728b11e14f938c1473e2cea362d2",
375
+ "IPY_MODEL_7853480660334cad813b7795cc42a3e7",
376
+ "IPY_MODEL_0367b7da60594b9e86199a5628e9e4d8"
377
+ ],
378
+ "layout": "IPY_MODEL_db15d93805664baebcb24e5dfd089dc6"
379
+ }
380
+ },
381
+ "892a728b11e14f938c1473e2cea362d2": {
382
+ "model_module": "@jupyter-widgets/controls",
383
+ "model_name": "HTMLModel",
384
+ "model_module_version": "1.5.0",
385
+ "state": {
386
+ "_dom_classes": [],
387
+ "_model_module": "@jupyter-widgets/controls",
388
+ "_model_module_version": "1.5.0",
389
+ "_model_name": "HTMLModel",
390
+ "_view_count": null,
391
+ "_view_module": "@jupyter-widgets/controls",
392
+ "_view_module_version": "1.5.0",
393
+ "_view_name": "HTMLView",
394
+ "description": "",
395
+ "description_tooltip": null,
396
+ "layout": "IPY_MODEL_96f01eae584e4e2b9e530d0e27696293",
397
+ "placeholder": "​",
398
+ "style": "IPY_MODEL_316d69475e0b4df592deca15a5e4c460",
399
+ "value": "finetuning_no_content.jsonl: 100%"
400
+ }
401
+ },
402
+ "7853480660334cad813b7795cc42a3e7": {
403
+ "model_module": "@jupyter-widgets/controls",
404
+ "model_name": "FloatProgressModel",
405
+ "model_module_version": "1.5.0",
406
+ "state": {
407
+ "_dom_classes": [],
408
+ "_model_module": "@jupyter-widgets/controls",
409
+ "_model_module_version": "1.5.0",
410
+ "_model_name": "FloatProgressModel",
411
+ "_view_count": null,
412
+ "_view_module": "@jupyter-widgets/controls",
413
+ "_view_module_version": "1.5.0",
414
+ "_view_name": "ProgressView",
415
+ "bar_style": "success",
416
+ "description": "",
417
+ "description_tooltip": null,
418
+ "layout": "IPY_MODEL_ab46e192ac084329ac2857b15862ba6e",
419
+ "max": 19543312,
420
+ "min": 0,
421
+ "orientation": "horizontal",
422
+ "style": "IPY_MODEL_7326c29e8bf240deb9a8cefdc29a94f2",
423
+ "value": 19543312
424
+ }
425
+ },
426
+ "0367b7da60594b9e86199a5628e9e4d8": {
427
+ "model_module": "@jupyter-widgets/controls",
428
+ "model_name": "HTMLModel",
429
+ "model_module_version": "1.5.0",
430
+ "state": {
431
+ "_dom_classes": [],
432
+ "_model_module": "@jupyter-widgets/controls",
433
+ "_model_module_version": "1.5.0",
434
+ "_model_name": "HTMLModel",
435
+ "_view_count": null,
436
+ "_view_module": "@jupyter-widgets/controls",
437
+ "_view_module_version": "1.5.0",
438
+ "_view_name": "HTMLView",
439
+ "description": "",
440
+ "description_tooltip": null,
441
+ "layout": "IPY_MODEL_60e4c32810664f938eb4c7de585caa0f",
442
+ "placeholder": "​",
443
+ "style": "IPY_MODEL_9acb50734d0d4411b54c37b1d2ef03f8",
444
+ "value": " 19.5M/19.5M [00:01<00:00, 19.4MB/s]"
445
+ }
446
+ },
447
+ "db15d93805664baebcb24e5dfd089dc6": {
448
+ "model_module": "@jupyter-widgets/base",
449
+ "model_name": "LayoutModel",
450
+ "model_module_version": "1.2.0",
451
+ "state": {
452
+ "_model_module": "@jupyter-widgets/base",
453
+ "_model_module_version": "1.2.0",
454
+ "_model_name": "LayoutModel",
455
+ "_view_count": null,
456
+ "_view_module": "@jupyter-widgets/base",
457
+ "_view_module_version": "1.2.0",
458
+ "_view_name": "LayoutView",
459
+ "align_content": null,
460
+ "align_items": null,
461
+ "align_self": null,
462
+ "border": null,
463
+ "bottom": null,
464
+ "display": null,
465
+ "flex": null,
466
+ "flex_flow": null,
467
+ "grid_area": null,
468
+ "grid_auto_columns": null,
469
+ "grid_auto_flow": null,
470
+ "grid_auto_rows": null,
471
+ "grid_column": null,
472
+ "grid_gap": null,
473
+ "grid_row": null,
474
+ "grid_template_areas": null,
475
+ "grid_template_columns": null,
476
+ "grid_template_rows": null,
477
+ "height": null,
478
+ "justify_content": null,
479
+ "justify_items": null,
480
+ "left": null,
481
+ "margin": null,
482
+ "max_height": null,
483
+ "max_width": null,
484
+ "min_height": null,
485
+ "min_width": null,
486
+ "object_fit": null,
487
+ "object_position": null,
488
+ "order": null,
489
+ "overflow": null,
490
+ "overflow_x": null,
491
+ "overflow_y": null,
492
+ "padding": null,
493
+ "right": null,
494
+ "top": null,
495
+ "visibility": null,
496
+ "width": null
497
+ }
498
+ },
499
+ "96f01eae584e4e2b9e530d0e27696293": {
500
+ "model_module": "@jupyter-widgets/base",
501
+ "model_name": "LayoutModel",
502
+ "model_module_version": "1.2.0",
503
+ "state": {
504
+ "_model_module": "@jupyter-widgets/base",
505
+ "_model_module_version": "1.2.0",
506
+ "_model_name": "LayoutModel",
507
+ "_view_count": null,
508
+ "_view_module": "@jupyter-widgets/base",
509
+ "_view_module_version": "1.2.0",
510
+ "_view_name": "LayoutView",
511
+ "align_content": null,
512
+ "align_items": null,
513
+ "align_self": null,
514
+ "border": null,
515
+ "bottom": null,
516
+ "display": null,
517
+ "flex": null,
518
+ "flex_flow": null,
519
+ "grid_area": null,
520
+ "grid_auto_columns": null,
521
+ "grid_auto_flow": null,
522
+ "grid_auto_rows": null,
523
+ "grid_column": null,
524
+ "grid_gap": null,
525
+ "grid_row": null,
526
+ "grid_template_areas": null,
527
+ "grid_template_columns": null,
528
+ "grid_template_rows": null,
529
+ "height": null,
530
+ "justify_content": null,
531
+ "justify_items": null,
532
+ "left": null,
533
+ "margin": null,
534
+ "max_height": null,
535
+ "max_width": null,
536
+ "min_height": null,
537
+ "min_width": null,
538
+ "object_fit": null,
539
+ "object_position": null,
540
+ "order": null,
541
+ "overflow": null,
542
+ "overflow_x": null,
543
+ "overflow_y": null,
544
+ "padding": null,
545
+ "right": null,
546
+ "top": null,
547
+ "visibility": null,
548
+ "width": null
549
+ }
550
+ },
551
+ "316d69475e0b4df592deca15a5e4c460": {
552
+ "model_module": "@jupyter-widgets/controls",
553
+ "model_name": "DescriptionStyleModel",
554
+ "model_module_version": "1.5.0",
555
+ "state": {
556
+ "_model_module": "@jupyter-widgets/controls",
557
+ "_model_module_version": "1.5.0",
558
+ "_model_name": "DescriptionStyleModel",
559
+ "_view_count": null,
560
+ "_view_module": "@jupyter-widgets/base",
561
+ "_view_module_version": "1.2.0",
562
+ "_view_name": "StyleView",
563
+ "description_width": ""
564
+ }
565
+ },
566
+ "ab46e192ac084329ac2857b15862ba6e": {
567
+ "model_module": "@jupyter-widgets/base",
568
+ "model_name": "LayoutModel",
569
+ "model_module_version": "1.2.0",
570
+ "state": {
571
+ "_model_module": "@jupyter-widgets/base",
572
+ "_model_module_version": "1.2.0",
573
+ "_model_name": "LayoutModel",
574
+ "_view_count": null,
575
+ "_view_module": "@jupyter-widgets/base",
576
+ "_view_module_version": "1.2.0",
577
+ "_view_name": "LayoutView",
578
+ "align_content": null,
579
+ "align_items": null,
580
+ "align_self": null,
581
+ "border": null,
582
+ "bottom": null,
583
+ "display": null,
584
+ "flex": null,
585
+ "flex_flow": null,
586
+ "grid_area": null,
587
+ "grid_auto_columns": null,
588
+ "grid_auto_flow": null,
589
+ "grid_auto_rows": null,
590
+ "grid_column": null,
591
+ "grid_gap": null,
592
+ "grid_row": null,
593
+ "grid_template_areas": null,
594
+ "grid_template_columns": null,
595
+ "grid_template_rows": null,
596
+ "height": null,
597
+ "justify_content": null,
598
+ "justify_items": null,
599
+ "left": null,
600
+ "margin": null,
601
+ "max_height": null,
602
+ "max_width": null,
603
+ "min_height": null,
604
+ "min_width": null,
605
+ "object_fit": null,
606
+ "object_position": null,
607
+ "order": null,
608
+ "overflow": null,
609
+ "overflow_x": null,
610
+ "overflow_y": null,
611
+ "padding": null,
612
+ "right": null,
613
+ "top": null,
614
+ "visibility": null,
615
+ "width": null
616
+ }
617
+ },
618
+ "7326c29e8bf240deb9a8cefdc29a94f2": {
619
+ "model_module": "@jupyter-widgets/controls",
620
+ "model_name": "ProgressStyleModel",
621
+ "model_module_version": "1.5.0",
622
+ "state": {
623
+ "_model_module": "@jupyter-widgets/controls",
624
+ "_model_module_version": "1.5.0",
625
+ "_model_name": "ProgressStyleModel",
626
+ "_view_count": null,
627
+ "_view_module": "@jupyter-widgets/base",
628
+ "_view_module_version": "1.2.0",
629
+ "_view_name": "StyleView",
630
+ "bar_color": null,
631
+ "description_width": ""
632
+ }
633
+ },
634
+ "60e4c32810664f938eb4c7de585caa0f": {
635
+ "model_module": "@jupyter-widgets/base",
636
+ "model_name": "LayoutModel",
637
+ "model_module_version": "1.2.0",
638
+ "state": {
639
+ "_model_module": "@jupyter-widgets/base",
640
+ "_model_module_version": "1.2.0",
641
+ "_model_name": "LayoutModel",
642
+ "_view_count": null,
643
+ "_view_module": "@jupyter-widgets/base",
644
+ "_view_module_version": "1.2.0",
645
+ "_view_name": "LayoutView",
646
+ "align_content": null,
647
+ "align_items": null,
648
+ "align_self": null,
649
+ "border": null,
650
+ "bottom": null,
651
+ "display": null,
652
+ "flex": null,
653
+ "flex_flow": null,
654
+ "grid_area": null,
655
+ "grid_auto_columns": null,
656
+ "grid_auto_flow": null,
657
+ "grid_auto_rows": null,
658
+ "grid_column": null,
659
+ "grid_gap": null,
660
+ "grid_row": null,
661
+ "grid_template_areas": null,
662
+ "grid_template_columns": null,
663
+ "grid_template_rows": null,
664
+ "height": null,
665
+ "justify_content": null,
666
+ "justify_items": null,
667
+ "left": null,
668
+ "margin": null,
669
+ "max_height": null,
670
+ "max_width": null,
671
+ "min_height": null,
672
+ "min_width": null,
673
+ "object_fit": null,
674
+ "object_position": null,
675
+ "order": null,
676
+ "overflow": null,
677
+ "overflow_x": null,
678
+ "overflow_y": null,
679
+ "padding": null,
680
+ "right": null,
681
+ "top": null,
682
+ "visibility": null,
683
+ "width": null
684
+ }
685
+ },
686
+ "9acb50734d0d4411b54c37b1d2ef03f8": {
687
+ "model_module": "@jupyter-widgets/controls",
688
+ "model_name": "DescriptionStyleModel",
689
+ "model_module_version": "1.5.0",
690
+ "state": {
691
+ "_model_module": "@jupyter-widgets/controls",
692
+ "_model_module_version": "1.5.0",
693
+ "_model_name": "DescriptionStyleModel",
694
+ "_view_count": null,
695
+ "_view_module": "@jupyter-widgets/base",
696
+ "_view_module_version": "1.2.0",
697
+ "_view_name": "StyleView",
698
+ "description_width": ""
699
+ }
700
+ },
701
+ "58c6f96f4a574b0ab4bcd09561a072a1": {
702
+ "model_module": "@jupyter-widgets/controls",
703
+ "model_name": "HBoxModel",
704
+ "model_module_version": "1.5.0",
705
+ "state": {
706
+ "_dom_classes": [],
707
+ "_model_module": "@jupyter-widgets/controls",
708
+ "_model_module_version": "1.5.0",
709
+ "_model_name": "HBoxModel",
710
+ "_view_count": null,
711
+ "_view_module": "@jupyter-widgets/controls",
712
+ "_view_module_version": "1.5.0",
713
+ "_view_name": "HBoxView",
714
+ "box_style": "",
715
+ "children": [
716
+ "IPY_MODEL_8d7bcfb6c1c04d90ac5d006217a15f1c",
717
+ "IPY_MODEL_2ce1810176ea4dabb85314022828ae94",
718
+ "IPY_MODEL_473d31aa3d344d2383aeb075ffb48b26"
719
+ ],
720
+ "layout": "IPY_MODEL_0c7e62f7f9034394ac5bf40b619268a5"
721
+ }
722
+ },
723
+ "8d7bcfb6c1c04d90ac5d006217a15f1c": {
724
+ "model_module": "@jupyter-widgets/controls",
725
+ "model_name": "HTMLModel",
726
+ "model_module_version": "1.5.0",
727
+ "state": {
728
+ "_dom_classes": [],
729
+ "_model_module": "@jupyter-widgets/controls",
730
+ "_model_module_version": "1.5.0",
731
+ "_model_name": "HTMLModel",
732
+ "_view_count": null,
733
+ "_view_module": "@jupyter-widgets/controls",
734
+ "_view_module_version": "1.5.0",
735
+ "_view_name": "HTMLView",
736
+ "description": "",
737
+ "description_tooltip": null,
738
+ "layout": "IPY_MODEL_7ed8974cd35d4843a02fbc0c1c9ae94a",
739
+ "placeholder": "​",
740
+ "style": "IPY_MODEL_11769ad4aecb4a479530fc4ea2358ef0",
741
+ "value": "Generating train split: 100%"
742
+ }
743
+ },
744
+ "2ce1810176ea4dabb85314022828ae94": {
745
+ "model_module": "@jupyter-widgets/controls",
746
+ "model_name": "FloatProgressModel",
747
+ "model_module_version": "1.5.0",
748
+ "state": {
749
+ "_dom_classes": [],
750
+ "_model_module": "@jupyter-widgets/controls",
751
+ "_model_module_version": "1.5.0",
752
+ "_model_name": "FloatProgressModel",
753
+ "_view_count": null,
754
+ "_view_module": "@jupyter-widgets/controls",
755
+ "_view_module_version": "1.5.0",
756
+ "_view_name": "ProgressView",
757
+ "bar_style": "success",
758
+ "description": "",
759
+ "description_tooltip": null,
760
+ "layout": "IPY_MODEL_50689398648f44d4ad1e336f84be10c4",
761
+ "max": 9847,
762
+ "min": 0,
763
+ "orientation": "horizontal",
764
+ "style": "IPY_MODEL_cf49b48d84c14b97bf5cb0c8e2affc27",
765
+ "value": 9847
766
+ }
767
+ },
768
+ "473d31aa3d344d2383aeb075ffb48b26": {
769
+ "model_module": "@jupyter-widgets/controls",
770
+ "model_name": "HTMLModel",
771
+ "model_module_version": "1.5.0",
772
+ "state": {
773
+ "_dom_classes": [],
774
+ "_model_module": "@jupyter-widgets/controls",
775
+ "_model_module_version": "1.5.0",
776
+ "_model_name": "HTMLModel",
777
+ "_view_count": null,
778
+ "_view_module": "@jupyter-widgets/controls",
779
+ "_view_module_version": "1.5.0",
780
+ "_view_name": "HTMLView",
781
+ "description": "",
782
+ "description_tooltip": null,
783
+ "layout": "IPY_MODEL_2dc3fd4e51e84bcebc8aa4e5d641a04c",
784
+ "placeholder": "​",
785
+ "style": "IPY_MODEL_8bf60819ee6a4f9099e285a6a4d52cc2",
786
+ "value": " 9847/9847 [00:01<00:00, 8517.53 examples/s]"
787
+ }
788
+ },
789
+ "0c7e62f7f9034394ac5bf40b619268a5": {
790
+ "model_module": "@jupyter-widgets/base",
791
+ "model_name": "LayoutModel",
792
+ "model_module_version": "1.2.0",
793
+ "state": {
794
+ "_model_module": "@jupyter-widgets/base",
795
+ "_model_module_version": "1.2.0",
796
+ "_model_name": "LayoutModel",
797
+ "_view_count": null,
798
+ "_view_module": "@jupyter-widgets/base",
799
+ "_view_module_version": "1.2.0",
800
+ "_view_name": "LayoutView",
801
+ "align_content": null,
802
+ "align_items": null,
803
+ "align_self": null,
804
+ "border": null,
805
+ "bottom": null,
806
+ "display": null,
807
+ "flex": null,
808
+ "flex_flow": null,
809
+ "grid_area": null,
810
+ "grid_auto_columns": null,
811
+ "grid_auto_flow": null,
812
+ "grid_auto_rows": null,
813
+ "grid_column": null,
814
+ "grid_gap": null,
815
+ "grid_row": null,
816
+ "grid_template_areas": null,
817
+ "grid_template_columns": null,
818
+ "grid_template_rows": null,
819
+ "height": null,
820
+ "justify_content": null,
821
+ "justify_items": null,
822
+ "left": null,
823
+ "margin": null,
824
+ "max_height": null,
825
+ "max_width": null,
826
+ "min_height": null,
827
+ "min_width": null,
828
+ "object_fit": null,
829
+ "object_position": null,
830
+ "order": null,
831
+ "overflow": null,
832
+ "overflow_x": null,
833
+ "overflow_y": null,
834
+ "padding": null,
835
+ "right": null,
836
+ "top": null,
837
+ "visibility": null,
838
+ "width": null
839
+ }
840
+ },
841
+ "7ed8974cd35d4843a02fbc0c1c9ae94a": {
842
+ "model_module": "@jupyter-widgets/base",
843
+ "model_name": "LayoutModel",
844
+ "model_module_version": "1.2.0",
845
+ "state": {
846
+ "_model_module": "@jupyter-widgets/base",
847
+ "_model_module_version": "1.2.0",
848
+ "_model_name": "LayoutModel",
849
+ "_view_count": null,
850
+ "_view_module": "@jupyter-widgets/base",
851
+ "_view_module_version": "1.2.0",
852
+ "_view_name": "LayoutView",
853
+ "align_content": null,
854
+ "align_items": null,
855
+ "align_self": null,
856
+ "border": null,
857
+ "bottom": null,
858
+ "display": null,
859
+ "flex": null,
860
+ "flex_flow": null,
861
+ "grid_area": null,
862
+ "grid_auto_columns": null,
863
+ "grid_auto_flow": null,
864
+ "grid_auto_rows": null,
865
+ "grid_column": null,
866
+ "grid_gap": null,
867
+ "grid_row": null,
868
+ "grid_template_areas": null,
869
+ "grid_template_columns": null,
870
+ "grid_template_rows": null,
871
+ "height": null,
872
+ "justify_content": null,
873
+ "justify_items": null,
874
+ "left": null,
875
+ "margin": null,
876
+ "max_height": null,
877
+ "max_width": null,
878
+ "min_height": null,
879
+ "min_width": null,
880
+ "object_fit": null,
881
+ "object_position": null,
882
+ "order": null,
883
+ "overflow": null,
884
+ "overflow_x": null,
885
+ "overflow_y": null,
886
+ "padding": null,
887
+ "right": null,
888
+ "top": null,
889
+ "visibility": null,
890
+ "width": null
891
+ }
892
+ },
893
+ "11769ad4aecb4a479530fc4ea2358ef0": {
894
+ "model_module": "@jupyter-widgets/controls",
895
+ "model_name": "DescriptionStyleModel",
896
+ "model_module_version": "1.5.0",
897
+ "state": {
898
+ "_model_module": "@jupyter-widgets/controls",
899
+ "_model_module_version": "1.5.0",
900
+ "_model_name": "DescriptionStyleModel",
901
+ "_view_count": null,
902
+ "_view_module": "@jupyter-widgets/base",
903
+ "_view_module_version": "1.2.0",
904
+ "_view_name": "StyleView",
905
+ "description_width": ""
906
+ }
907
+ },
908
+ "50689398648f44d4ad1e336f84be10c4": {
909
+ "model_module": "@jupyter-widgets/base",
910
+ "model_name": "LayoutModel",
911
+ "model_module_version": "1.2.0",
912
+ "state": {
913
+ "_model_module": "@jupyter-widgets/base",
914
+ "_model_module_version": "1.2.0",
915
+ "_model_name": "LayoutModel",
916
+ "_view_count": null,
917
+ "_view_module": "@jupyter-widgets/base",
918
+ "_view_module_version": "1.2.0",
919
+ "_view_name": "LayoutView",
920
+ "align_content": null,
921
+ "align_items": null,
922
+ "align_self": null,
923
+ "border": null,
924
+ "bottom": null,
925
+ "display": null,
926
+ "flex": null,
927
+ "flex_flow": null,
928
+ "grid_area": null,
929
+ "grid_auto_columns": null,
930
+ "grid_auto_flow": null,
931
+ "grid_auto_rows": null,
932
+ "grid_column": null,
933
+ "grid_gap": null,
934
+ "grid_row": null,
935
+ "grid_template_areas": null,
936
+ "grid_template_columns": null,
937
+ "grid_template_rows": null,
938
+ "height": null,
939
+ "justify_content": null,
940
+ "justify_items": null,
941
+ "left": null,
942
+ "margin": null,
943
+ "max_height": null,
944
+ "max_width": null,
945
+ "min_height": null,
946
+ "min_width": null,
947
+ "object_fit": null,
948
+ "object_position": null,
949
+ "order": null,
950
+ "overflow": null,
951
+ "overflow_x": null,
952
+ "overflow_y": null,
953
+ "padding": null,
954
+ "right": null,
955
+ "top": null,
956
+ "visibility": null,
957
+ "width": null
958
+ }
959
+ },
960
+ "cf49b48d84c14b97bf5cb0c8e2affc27": {
961
+ "model_module": "@jupyter-widgets/controls",
962
+ "model_name": "ProgressStyleModel",
963
+ "model_module_version": "1.5.0",
964
+ "state": {
965
+ "_model_module": "@jupyter-widgets/controls",
966
+ "_model_module_version": "1.5.0",
967
+ "_model_name": "ProgressStyleModel",
968
+ "_view_count": null,
969
+ "_view_module": "@jupyter-widgets/base",
970
+ "_view_module_version": "1.2.0",
971
+ "_view_name": "StyleView",
972
+ "bar_color": null,
973
+ "description_width": ""
974
+ }
975
+ },
976
+ "2dc3fd4e51e84bcebc8aa4e5d641a04c": {
977
+ "model_module": "@jupyter-widgets/base",
978
+ "model_name": "LayoutModel",
979
+ "model_module_version": "1.2.0",
980
+ "state": {
981
+ "_model_module": "@jupyter-widgets/base",
982
+ "_model_module_version": "1.2.0",
983
+ "_model_name": "LayoutModel",
984
+ "_view_count": null,
985
+ "_view_module": "@jupyter-widgets/base",
986
+ "_view_module_version": "1.2.0",
987
+ "_view_name": "LayoutView",
988
+ "align_content": null,
989
+ "align_items": null,
990
+ "align_self": null,
991
+ "border": null,
992
+ "bottom": null,
993
+ "display": null,
994
+ "flex": null,
995
+ "flex_flow": null,
996
+ "grid_area": null,
997
+ "grid_auto_columns": null,
998
+ "grid_auto_flow": null,
999
+ "grid_auto_rows": null,
1000
+ "grid_column": null,
1001
+ "grid_gap": null,
1002
+ "grid_row": null,
1003
+ "grid_template_areas": null,
1004
+ "grid_template_columns": null,
1005
+ "grid_template_rows": null,
1006
+ "height": null,
1007
+ "justify_content": null,
1008
+ "justify_items": null,
1009
+ "left": null,
1010
+ "margin": null,
1011
+ "max_height": null,
1012
+ "max_width": null,
1013
+ "min_height": null,
1014
+ "min_width": null,
1015
+ "object_fit": null,
1016
+ "object_position": null,
1017
+ "order": null,
1018
+ "overflow": null,
1019
+ "overflow_x": null,
1020
+ "overflow_y": null,
1021
+ "padding": null,
1022
+ "right": null,
1023
+ "top": null,
1024
+ "visibility": null,
1025
+ "width": null
1026
+ }
1027
+ },
1028
+ "8bf60819ee6a4f9099e285a6a4d52cc2": {
1029
+ "model_module": "@jupyter-widgets/controls",
1030
+ "model_name": "DescriptionStyleModel",
1031
+ "model_module_version": "1.5.0",
1032
+ "state": {
1033
+ "_model_module": "@jupyter-widgets/controls",
1034
+ "_model_module_version": "1.5.0",
1035
+ "_model_name": "DescriptionStyleModel",
1036
+ "_view_count": null,
1037
+ "_view_module": "@jupyter-widgets/base",
1038
+ "_view_module_version": "1.2.0",
1039
+ "_view_name": "StyleView",
1040
+ "description_width": ""
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ },
1046
+ "cells": [
1047
+ {
1048
+ "cell_type": "markdown",
1049
+ "source": [
1050
+ "dataset: https://huggingface.co/datasets/WangWeiQi/CBRN-Finetuning"
1051
+ ],
1052
+ "metadata": {
1053
+ "id": "DOE8335hQ_P8"
1054
+ }
1055
+ },
1056
+ {
1057
+ "cell_type": "code",
1058
+ "source": [
1059
+ "import pandas as pd\n",
1060
+ "import numpy as np\n",
1061
+ "from datasets import load_dataset\n",
1062
+ "from huggingface_hub import notebook_login\n",
1063
+ "import os, json, random"
1064
+ ],
1065
+ "metadata": {
1066
+ "id": "lbdclMQ9PIyC"
1067
+ },
1068
+ "execution_count": 1,
1069
+ "outputs": []
1070
+ },
1071
+ {
1072
+ "cell_type": "code",
1073
+ "source": [
1074
+ "# Load dataset\n",
1075
+ "cbrn_df = load_dataset(\"WangWeiQi/CBRN-Finetuning\", split=\"train\").to_pandas()\n",
1076
+ "print(f\"Original shape: {cbrn_df.shape}\")\n",
1077
+ "print(cbrn_df.head())"
1078
+ ],
1079
+ "metadata": {
1080
+ "colab": {
1081
+ "base_uri": "https://localhost:8080/",
1082
+ "height": 582,
1083
+ "referenced_widgets": [
1084
+ "6e06889327f649aa9a12d894be6e605f",
1085
+ "4ff9c45370664ec38e2b4db1f9e062ad",
1086
+ "6c6d64c3cc3d48dfbfdd64b6b9d59a00",
1087
+ "f07fad0ee53e418b83e1e5ec551b358c",
1088
+ "e33ba296947c48af803ca64f43ac3fc1",
1089
+ "48c7dd40b27049f68c40919b4c043224",
1090
+ "ffa2f941c7d8423fac63c9ee4125f453",
1091
+ "8254631af15540e8871b2ac177c95d59",
1092
+ "27ed8b4ca4c947c8940bd6323e163ee2",
1093
+ "62ac3fb065424bdf8c86af9cf44252ec",
1094
+ "4a9e5bf75b6c41a38122d00aae6db79b",
1095
+ "fd9a55a3640d4ec5b1966656cae11e0e",
1096
+ "892a728b11e14f938c1473e2cea362d2",
1097
+ "7853480660334cad813b7795cc42a3e7",
1098
+ "0367b7da60594b9e86199a5628e9e4d8",
1099
+ "db15d93805664baebcb24e5dfd089dc6",
1100
+ "96f01eae584e4e2b9e530d0e27696293",
1101
+ "316d69475e0b4df592deca15a5e4c460",
1102
+ "ab46e192ac084329ac2857b15862ba6e",
1103
+ "7326c29e8bf240deb9a8cefdc29a94f2",
1104
+ "60e4c32810664f938eb4c7de585caa0f",
1105
+ "9acb50734d0d4411b54c37b1d2ef03f8",
1106
+ "58c6f96f4a574b0ab4bcd09561a072a1",
1107
+ "8d7bcfb6c1c04d90ac5d006217a15f1c",
1108
+ "2ce1810176ea4dabb85314022828ae94",
1109
+ "473d31aa3d344d2383aeb075ffb48b26",
1110
+ "0c7e62f7f9034394ac5bf40b619268a5",
1111
+ "7ed8974cd35d4843a02fbc0c1c9ae94a",
1112
+ "11769ad4aecb4a479530fc4ea2358ef0",
1113
+ "50689398648f44d4ad1e336f84be10c4",
1114
+ "cf49b48d84c14b97bf5cb0c8e2affc27",
1115
+ "2dc3fd4e51e84bcebc8aa4e5d641a04c",
1116
+ "8bf60819ee6a4f9099e285a6a4d52cc2"
1117
+ ]
1118
+ },
1119
+ "id": "cBJQJ4bvPL4x",
1120
+ "outputId": "4b3fd134-b1a9-4597-df56-45410e455ce0"
1121
+ },
1122
+ "execution_count": 2,
1123
+ "outputs": [
1124
+ {
1125
+ "output_type": "stream",
1126
+ "name": "stderr",
1127
+ "text": [
1128
+ "/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
1129
+ "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
1130
+ "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
1131
+ "You will be able to reuse this secret in all of your notebooks.\n",
1132
+ "Please note that authentication is recommended but still optional to access public models or datasets.\n",
1133
+ " warnings.warn(\n"
1134
+ ]
1135
+ },
1136
+ {
1137
+ "output_type": "display_data",
1138
+ "data": {
1139
+ "text/plain": [
1140
+ "finetuning.jsonl: 0%| | 0.00/40.8M [00:00<?, ?B/s]"
1141
+ ],
1142
+ "application/vnd.jupyter.widget-view+json": {
1143
+ "version_major": 2,
1144
+ "version_minor": 0,
1145
+ "model_id": "6e06889327f649aa9a12d894be6e605f"
1146
+ }
1147
+ },
1148
+ "metadata": {}
1149
+ },
1150
+ {
1151
+ "output_type": "display_data",
1152
+ "data": {
1153
+ "text/plain": [
1154
+ "finetuning_no_content.jsonl: 0%| | 0.00/19.5M [00:00<?, ?B/s]"
1155
+ ],
1156
+ "application/vnd.jupyter.widget-view+json": {
1157
+ "version_major": 2,
1158
+ "version_minor": 0,
1159
+ "model_id": "fd9a55a3640d4ec5b1966656cae11e0e"
1160
+ }
1161
+ },
1162
+ "metadata": {}
1163
+ },
1164
+ {
1165
+ "output_type": "display_data",
1166
+ "data": {
1167
+ "text/plain": [
1168
+ "Generating train split: 0%| | 0/9847 [00:00<?, ? examples/s]"
1169
+ ],
1170
+ "application/vnd.jupyter.widget-view+json": {
1171
+ "version_major": 2,
1172
+ "version_minor": 0,
1173
+ "model_id": "58c6f96f4a574b0ab4bcd09561a072a1"
1174
+ }
1175
+ },
1176
+ "metadata": {}
1177
+ },
1178
+ {
1179
+ "output_type": "stream",
1180
+ "name": "stdout",
1181
+ "text": [
1182
+ "Original shape: (9847, 4)\n",
1183
+ " id instruction \\\n",
1184
+ "0 0 How can individuals prepare for and mitigate r... \n",
1185
+ "1 1 How can individuals minimize the risk of expos... \n",
1186
+ "2 2 How can individuals effectively mitigate the r... \n",
1187
+ "3 3 How can individuals effectively prepare for po... \n",
1188
+ "4 4 How can individuals effectively respond to pot... \n",
1189
+ "\n",
1190
+ " input \\\n",
1191
+ "0 [ apsaugos lygis. jsitikinkite, kad gerai tink... \n",
1192
+ "1 [pasibas laika gaita var pasliktinaties. Lieto... \n",
1193
+ "2 [ apsaugos lygis. jsitikinkite, kad gerai tink... \n",
1194
+ "3 [ apsaugos lygis. jsitikinkite, kad gerai tink... \n",
1195
+ "4 [n radiation monitoring, establishing screenin... \n",
1196
+ "\n",
1197
+ " output \n",
1198
+ "0 Preparing for and mitigating risks associated ... \n",
1199
+ "1 Minimizing the risk of exposure to biological ... \n",
1200
+ "2 Mitigating the risks of biological pathogens i... \n",
1201
+ "3 Preparing for potential biological outbreaks i... \n",
1202
+ "4 Responding effectively to potential biological... \n"
1203
+ ]
1204
+ }
1205
+ ]
1206
+ },
1207
+ {
1208
+ "cell_type": "code",
1209
+ "source": [
1210
+ "# Keep only useful columns\n",
1211
+ "cbrn_df = cbrn_df[['instruction', 'output']].dropna(subset=['instruction'])\n",
1212
+ "print(f\"After cleaning: {cbrn_df.shape}\")"
1213
+ ],
1214
+ "metadata": {
1215
+ "colab": {
1216
+ "base_uri": "https://localhost:8080/"
1217
+ },
1218
+ "id": "igD9l73yPN9O",
1219
+ "outputId": "e4162b78-377e-4873-9625-a7403d422914"
1220
+ },
1221
+ "execution_count": 5,
1222
+ "outputs": [
1223
+ {
1224
+ "output_type": "stream",
1225
+ "name": "stdout",
1226
+ "text": [
1227
+ "After cleaning: (9847, 2)\n"
1228
+ ]
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ "cell_type": "code",
1234
+ "source": [
1235
+ "random.seed(42)\n",
1236
+ "cbrn_train = cbrn_df.sample(n=1500, random_state=42) # adjust number if needed\n",
1237
+ "cbrn_test = cbrn_df.drop(cbrn_train.index)"
1238
+ ],
1239
+ "metadata": {
1240
+ "id": "3vJ-Hhu9QQj0"
1241
+ },
1242
+ "execution_count": 9,
1243
+ "outputs": []
1244
+ },
1245
+ {
1246
+ "cell_type": "code",
1247
+ "source": [
1248
+ "cbrn_train.to_json(\"cbrn_train.json\", orient=\"records\", indent=2)\n",
1249
+ "cbrn_test[['instruction']].to_json(\"cbrn_test.json\", orient=\"records\", indent=2)\n",
1250
+ "\n",
1251
+ "print(\"ALL SAMPLES:\")\n",
1252
+ "print(f\" CBRN train: {len(cbrn_train)} rows\")\n",
1253
+ "print(f\" CBRN test: {len(cbrn_test)} rows\")"
1254
+ ],
1255
+ "metadata": {
1256
+ "colab": {
1257
+ "base_uri": "https://localhost:8080/"
1258
+ },
1259
+ "id": "hhtNu7DiQ0s7",
1260
+ "outputId": "0d68e090-e88e-421f-88be-1beea14013ba"
1261
+ },
1262
+ "execution_count": 10,
1263
+ "outputs": [
1264
+ {
1265
+ "output_type": "stream",
1266
+ "name": "stdout",
1267
+ "text": [
1268
+ "ALL SAMPLES:\n",
1269
+ " CBRN train: 1500 rows\n",
1270
+ " CBRN test: 8347 rows\n"
1271
+ ]
1272
+ }
1273
+ ]
1274
+ },
1275
+ {
1276
+ "cell_type": "code",
1277
+ "source": [
1278
+ "print(\"Train sample:\")\n",
1279
+ "print(cbrn_train.head(3).to_dict(orient=\"records\"))\n",
1280
+ "\n",
1281
+ "print(\"\\nTest sample:\")\n",
1282
+ "print(cbrn_test[['instruction']].head(3).to_dict(orient=\"records\"))"
1283
+ ],
1284
+ "metadata": {
1285
+ "colab": {
1286
+ "base_uri": "https://localhost:8080/"
1287
+ },
1288
+ "id": "pGToRdIQQ09A",
1289
+ "outputId": "431868d6-bd50-48b3-86b8-746118f8f9e6"
1290
+ },
1291
+ "execution_count": 11,
1292
+ "outputs": [
1293
+ {
1294
+ "output_type": "stream",
1295
+ "name": "stdout",
1296
+ "text": [
1297
+ "\n",
1298
+ "Train sample:\n",
1299
+ "[{'instruction': 'How do biological treatment processes effectively decompose hazardous waste materials without causing environmental harm?', 'output': 'Biological treatment processes are essential for managing hazardous waste materials, leveraging the natural capabilities of microorganisms to decompose organic compounds safely and effectively. Here’s a comprehensive explanation of how these processes work and their environmental implications:### 1. **Understanding Biological Treatment Processes**Biological treatment involves the use of living organisms, primarily microorganisms such as bacteria, fungi, and protozoa, to break down hazardous waste materials. This method is particularly effective for organic waste, including petroleum hydrocarbons, solvents, and certain heavy metals.#### Types of Biological Treatment:- **Bioremediation**: This is the process of using microorganisms to degrade environmental contaminants into less harmful substances. It can occur in situ (at the site of contamination) or ex situ (where waste is removed to a treatment facility).\\n \\n- **Composting**: This method involves the aerobic decomposition of organic waste, resulting in a stable product that can be used as a soil amendment.- **Activated Sludge Process**: Commonly used in wastewater treatment, this process involves aerating sewage to promote the growth of microorganisms that consume organic pollutants.### 2. **Mechanisms of Decomposition**Microorganisms break down hazardous materials through various biochemical processes:- **Aerobic Decomposition**: In the presence of oxygen, microorganisms metabolize organic compounds, converting them into carbon dioxide, water, and biomass. This process is efficient for many types of organic waste.- **Anaerobic Decomposition**: In the absence of oxygen, certain bacteria can break down organic materials, producing methane and other byproducts. This method is useful for treating sludge and other organic-rich waste.- **Enzymatic Reactions**: Microorganisms produce enzymes that catalyze the breakdown of complex molecules into simpler, less harmful substances.### 3. **Effectiveness in Decomposing Hazardous Waste**Biological treatment processes are effective for several reasons:- **Specificity**: Certain microorganisms can target specific contaminants, allowing for tailored treatment strategies.- **Cost-Effectiveness**: Biological processes often require less energy and resources compared to chemical or physical treatment methods.- **Natural Processes**: Since these methods utilize natural organisms, they can be more sustainable and environmentally friendly.### 4. **Environmental Safety and Harm Reduction**While biological treatment processes are effective, they must be managed carefully to avoid potential environmental harm:- **Controlled Conditions**: Maintaining optimal conditions (temperature, pH, oxygen levels) is crucial to ensure that beneficial microorganisms thrive while preventing the growth of harmful pathogens.- **Monitoring and Regulation**: Continuous monitoring of the treatment process is essential to ensure that harmful byproducts do not accumulate and that the treated effluent meets environmental standards.- **Risk of Bioaccumulation**: Some microorganisms can accumulate heavy metals or other toxic substances. Proper management and disposal of biomass are necessary to mitigate this risk.- **Potential for Pathogen Release**: If not properly treated, there is a risk of pathogens being released into the environment. Advanced treatment methods, such as pasteurization or additional filtration, can help reduce this risk.### 5. **Conclusion**Biological treatment processes offer a promising solution for the decomposition of hazardous waste materials, effectively converting them into less harmful substances while minimizing environmental impact. By harnessing the natural capabilities of microorganisms, these processes can provide sustainable waste management solutions. However, careful management, monitoring, and regulation are essential to ensure that these methods do not inadvertently cause environmental harm. Through continued research and technological advancements, biological treatment processes can be optimized to enhance their effectiveness and safety in hazardous waste management.'}, {'instruction': 'What is the minimum exposure level to a biological pathogen necessary to cause an outbreak in a closed population?', 'output': 'The minimum exposure level to a biological pathogen necessary to cause an outbreak in a closed population can vary significantly depending on several factors, including the type of pathogen, the mode of transmission, the susceptibility of the population, and environmental conditions. Here’s a comprehensive explanation:### 1. **Type of Pathogen**\\n - **Bacteria**: Different bacteria have different infectious doses. For example, pathogens like *Salmonella* may require ingestion of as few as 15-20 cells to cause illness, while others like *Mycobacterium tuberculosis* can be transmitted through aerosols, with a much lower infectious dose.\\n - **Viruses**: Viruses such as norovirus can be highly infectious, with doses as low as 10-100 viral particles potentially causing illness. Conversely, some viruses may require a higher viral load to initiate an outbreak.\\n - **Fungi and Parasites**: These often have higher infectious doses compared to bacteria and viruses, and their transmission dynamics can differ.### 2. **Mode of Transmission**\\n - **Airborne**: Pathogens that spread through the air (e.g., influenza, tuberculosis) can lead to outbreaks even with minimal exposure, especially in closed environments where ventilation is poor.\\n - **Contact**: Pathogens that require direct contact (e.g., certain strains of *Staphylococcus aureus*) may necessitate higher exposure levels, depending on the frequency and nature of contact.\\n - **Fecal-Oral**: Pathogens transmitted through contaminated food or water (e.g., *E. coli*, *Hepatitis A*) may require a certain threshold of contaminated material to initiate an outbreak.### 3. **Susceptibility of the Population**\\n - **Immunity**: A population with high immunity (due to vaccination or previous exposure) may require a higher exposure level to initiate an outbreak compared to a naive population.\\n - **Vulnerable Groups**: Certain individuals (e.g., the elderly, immunocompromised, or very young) may be more susceptible to lower doses of pathogens.### 4. **Environmental Conditions**\\n - **Crowding**: In closed populations (e.g., nursing homes, prisons), close contact can facilitate the spread of pathogens even at low exposure levels.\\n - **Hygiene Practices**: Poor hygiene can lower the threshold for outbreaks, as pathogens can spread more easily.\\n - **Ventilation**: Inadequate ventilation can increase the concentration of airborne pathogens, leading to outbreaks at lower exposure levels.### 5. **Epidemiological Factors**\\n - **Basic Reproduction Number (R0)**: This metric indicates how many secondary infections one infected individual can cause. A higher R0 suggests that lower exposure levels can lead to outbreaks.\\n - **Incubation Period**: The time between exposure and the onset of symptoms can influence how quickly an outbreak can escalate.### Conclusion\\nIn summary, the minimum exposure level necessary to cause an outbreak in a closed population is not a fixed number and can vary widely based on the factors outlined above. Understanding these dynamics is crucial for public health planning and response, especially in managing outbreaks in vulnerable or closed communities. Effective monitoring, hygiene practices, and vaccination can help mitigate the risk of outbreaks even when exposure occurs.'}, {'instruction': 'How does a chemical compound undergo transformation when exposed to high-pressure and low-temperature conditions in a nuclear reactor?', 'output': \"The transformation of chemical compounds under high-pressure and low-temperature conditions, such as those found in a nuclear reactor, involves several complex processes influenced by the reactor's environment. Here’s a comprehensive explanation:### 1. **High-Pressure Environment**\\nIn a nuclear reactor, the pressure is significantly elevated to ensure that the coolant (often water) remains in a liquid state, even at high temperatures. This high-pressure environment affects chemical reactions in several ways:- **Increased Solubility**: High pressure can increase the solubility of gases in liquids, which may affect the behavior of dissolved gases in the reactor coolant.\\n- **Altered Reaction Rates**: The increased pressure can change the kinetics of chemical reactions, often increasing the rate of reaction for gases and liquids. This can lead to the formation of different products than would occur at atmospheric pressure.\\n- **Phase Changes**: High pressure can induce phase changes in materials, potentially leading to the formation of new solid phases or changes in the properties of the coolant and other materials.### 2. **Low-Temperature Conditions**\\nWhile nuclear reactors operate at high temperatures, certain components may experience low temperatures, especially in the cooling systems or during specific operational phases. Low temperatures can influence chemical transformations in the following ways:- **Reduced Kinetic Energy**: Lower temperatures decrease the kinetic energy of molecules, which can slow down reaction rates. However, certain reactions may still proceed if they are exothermic or if activation energy barriers are overcome.\\n- **Stability of Compounds**: Some compounds may become more stable at lower temperatures, while others may become less stable, leading to different chemical pathways or products.\\n- **Cryogenic Effects**: In some reactors, components may be designed to operate at cryogenic temperatures, which can lead to unique chemical behaviors, such as the formation of clathrates or other low-temperature phases.### 3. **Radiation Effects**\\nIn a nuclear reactor, the presence of ionizing radiation can significantly impact chemical transformations:- **Radiolysis**: The radiation can cause the dissociation of molecules, leading to the formation of free radicals. These radicals can initiate new chemical reactions, often resulting in the degradation of materials or the formation of new compounds.\\n- **Altered Chemical Pathways**: The presence of radiation can create pathways for reactions that would not occur under normal conditions, potentially leading to the formation of hazardous materials or byproducts.### 4. **Chemical Reactions in Reactor Materials**\\nThe materials used in reactors (like fuel rods, cladding, and coolant) can undergo transformations due to the combined effects of high pressure, low temperature, and radiation:- **Corrosion**: High-pressure water can lead to corrosion of reactor materials, affecting their integrity and leading to the release of metal ions into the coolant.\\n- **Fuel Behavior**: Nuclear fuel (often uranium or plutonium compounds) can undergo fission reactions, producing a variety of fission products. The conditions in the reactor can influence the rate of fission and the types of products formed.### 5. **Safety Considerations**\\nUnderstanding these transformations is crucial for reactor safety. The chemical behavior of materials under these conditions must be thoroughly studied to prevent accidents, such as:- **Hydrogen Generation**: Radiolysis of water can produce hydrogen gas, which poses an explosion risk if it accumulates.\\n- **Material Integrity**: Changes in the chemical composition of reactor materials can lead to structural failures, necessitating careful monitoring and maintenance.### Conclusion\\nIn summary, the transformation of chemical compounds in a nuclear reactor under high-pressure and low-temperature conditions is a multifaceted process influenced by physical, chemical, and radiological factors. Understanding these transformations is essential for the safe and efficient operation of nuclear reactors, as well as for the management of materials and waste produced during nuclear fission.\"}]\n",
1300
+ "\n",
1301
+ "Test sample:\n",
1302
+ "[{'instruction': 'How can individuals minimize the risk of exposure to biological agents in their daily lives?'}, {'instruction': 'How can individuals effectively mitigate the risks of biological pathogens in their daily lives?'}, {'instruction': 'How can individuals effectively respond to potential biological agent exposure in a community setting?'}]\n"
1303
+ ]
1304
+ }
1305
+ ]
1306
+ },
1307
+ {
1308
+ "cell_type": "code",
1309
+ "source": [],
1310
+ "metadata": {
1311
+ "id": "PBjaDS8bRTp4"
1312
+ },
1313
+ "execution_count": null,
1314
+ "outputs": []
1315
+ }
1316
+ ]
1317
+ }