Przetwarzanie_tekstu/projekt/FLAN_T5_sms_spam.ipynb

7156 lines
364 KiB
Plaintext
Raw Normal View History

2023-02-10 12:42:56 +01:00
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"gpuClass": "standard",
"accelerator": "GPU",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"e4bb6f2f32de48d4b1f6d7ecf97ce376": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_3305b30f1bfa48e9b0c1ba3add06094e",
"IPY_MODEL_a343619acbb745baa6aa561271ec8815",
"IPY_MODEL_c493fc54d9eb421f96d6e8519c8a1b0e"
],
"layout": "IPY_MODEL_12fd6daa8e604ecd9ad731b6296815da"
}
},
"3305b30f1bfa48e9b0c1ba3add06094e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_805f497aa3304353a1be8b4cc87bfb54",
"placeholder": "",
"style": "IPY_MODEL_594a6d13f81f479eb00fa45fd4094146",
"value": "Downloading builder script: 100%"
}
},
"a343619acbb745baa6aa561271ec8815": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_236979048eb8461f9b7d8c4103905eed",
"max": 3208,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_4620faf461ca449a88de45e86467e265",
"value": 3208
}
},
"c493fc54d9eb421f96d6e8519c8a1b0e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8dc2f0f2e66741edbccab7abaaf634ce",
"placeholder": "",
"style": "IPY_MODEL_0d49bfb55dfd4090ba57c544eaa97902",
"value": " 3.21k/3.21k [00:00<00:00, 139kB/s]"
}
},
"12fd6daa8e604ecd9ad731b6296815da": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"805f497aa3304353a1be8b4cc87bfb54": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"594a6d13f81f479eb00fa45fd4094146": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"236979048eb8461f9b7d8c4103905eed": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4620faf461ca449a88de45e86467e265": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"8dc2f0f2e66741edbccab7abaaf634ce": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0d49bfb55dfd4090ba57c544eaa97902": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"4084f218fca64fc9b765e04d0cc073ac": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_fec67d95a5904ac199f6648a34ef1ff9",
"IPY_MODEL_a734d44f6baf4a5f8dfda576c09fffca",
"IPY_MODEL_3fc2d009da594365854aa11be804b388"
],
"layout": "IPY_MODEL_45c7d35932ec44bcb2ccdc73f0ae6b46"
}
},
"fec67d95a5904ac199f6648a34ef1ff9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_0c1c3db046f24599b27daa44217f48d2",
"placeholder": "",
"style": "IPY_MODEL_c3f9ed611a154e22b875d0696ef6022d",
"value": "Downloading metadata: 100%"
}
},
"a734d44f6baf4a5f8dfda576c09fffca": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7fd51c34909b41a8884fa358cccdbf48",
"max": 1687,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_9d9edc5471de40c2b7c2b9156637997d",
"value": 1687
}
},
"3fc2d009da594365854aa11be804b388": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_02c64bf3ff95438cb43c7dc52034cc43",
"placeholder": "",
"style": "IPY_MODEL_f0b71ecb6b1c4d1190ca899af7d3e82c",
"value": " 1.69k/1.69k [00:00<00:00, 37.7kB/s]"
}
},
"45c7d35932ec44bcb2ccdc73f0ae6b46": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0c1c3db046f24599b27daa44217f48d2": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c3f9ed611a154e22b875d0696ef6022d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"7fd51c34909b41a8884fa358cccdbf48": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9d9edc5471de40c2b7c2b9156637997d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"02c64bf3ff95438cb43c7dc52034cc43": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f0b71ecb6b1c4d1190ca899af7d3e82c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"8cae9c49e18f43248072b5e059429f6d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_88c8adca128b44c1bbbec437630c2074",
"IPY_MODEL_0f73f5e2c8af41eaae5f1c27f212da8b",
"IPY_MODEL_255b4480e11f4b3e892a5d2dc6abfd4b"
],
"layout": "IPY_MODEL_a96eab6312f6447b9eff3f914c5a6827"
}
},
"88c8adca128b44c1bbbec437630c2074": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_063059d53dc942d1aee9e3fe2f27687d",
"placeholder": "",
"style": "IPY_MODEL_ca50704df2cc430fae6b5902c5399414",
"value": "Downloading readme: 100%"
}
},
"0f73f5e2c8af41eaae5f1c27f212da8b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_64f5cdd8d1c14be79278ee4de89993d1",
"max": 4872,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_f065dcd7d1d34cb6806f2eb28bb3cd6f",
"value": 4872
}
},
"255b4480e11f4b3e892a5d2dc6abfd4b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_67663505c87640b58e04d3ce028537ea",
"placeholder": "",
"style": "IPY_MODEL_f5a17bc6f9f94b2ca119528b0ca2d456",
"value": " 4.87k/4.87k [00:00<00:00, 116kB/s]"
}
},
"a96eab6312f6447b9eff3f914c5a6827": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"063059d53dc942d1aee9e3fe2f27687d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ca50704df2cc430fae6b5902c5399414": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"64f5cdd8d1c14be79278ee4de89993d1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f065dcd7d1d34cb6806f2eb28bb3cd6f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"67663505c87640b58e04d3ce028537ea": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f5a17bc6f9f94b2ca119528b0ca2d456": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ec0f16c3cbb14d9287e148887127219b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_ba832204e1d4413f8b8a15e10bac7d95",
"IPY_MODEL_8179dbec98b7466ea2195affb0568498",
"IPY_MODEL_7e9abda7b55c459b8a9888edaf1cc116"
],
"layout": "IPY_MODEL_64c8860ae16848af9b04bb41955a8446"
}
},
"ba832204e1d4413f8b8a15e10bac7d95": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_64fe250082bf4d4fb126a319920d2f0a",
"placeholder": "",
"style": "IPY_MODEL_0b278b6f5da94921afbacb873c15d9c9",
"value": "Downloading data: 100%"
}
},
"8179dbec98b7466ea2195affb0568498": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b688bc7f34e941488831da5d4aed9396",
"max": 203415,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_44cec66cbaeb49abb26dbfc5420ceacb",
"value": 203415
}
},
"7e9abda7b55c459b8a9888edaf1cc116": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_67a750dcfa8b44499956572fda3dbacf",
"placeholder": "",
"style": "IPY_MODEL_edad6f2eb6704468bd06006c50697f86",
"value": " 203k/203k [00:00<00:00, 171kB/s]"
}
},
"64c8860ae16848af9b04bb41955a8446": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"64fe250082bf4d4fb126a319920d2f0a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0b278b6f5da94921afbacb873c15d9c9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b688bc7f34e941488831da5d4aed9396": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"44cec66cbaeb49abb26dbfc5420ceacb": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"67a750dcfa8b44499956572fda3dbacf": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"edad6f2eb6704468bd06006c50697f86": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"699a1bdf38ca48e2affc3c6bd771852f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_4e5a92d4acdc43d487290ffd8a842ea5",
"IPY_MODEL_8bc8c44b6324478a8209094f9b7e9ccd",
"IPY_MODEL_e95f31e693674a0aae8de0e167a49daf"
],
"layout": "IPY_MODEL_069a68aed2bb4d37a00c9c0feedd3e17"
}
},
"4e5a92d4acdc43d487290ffd8a842ea5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9930f171a6db47939e996016cb49fe20",
"placeholder": "",
"style": "IPY_MODEL_ddd0c0abba074aa7a33b5c825ccf8760",
"value": "Generating train split: 100%"
}
},
"8bc8c44b6324478a8209094f9b7e9ccd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8bbb7307312648b0afb901f701a4e466",
"max": 5574,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_4a2eb48d3583446598fdd1b7175c96fd",
"value": 5574
}
},
"e95f31e693674a0aae8de0e167a49daf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b3eae90c5aea409ab1a2c541948658f8",
"placeholder": "",
"style": "IPY_MODEL_41b5186c2e194402a1e18f1c1a9f18a4",
"value": " 5574/5574 [00:12<00:00, 7617.98 examples/s]"
}
},
"069a68aed2bb4d37a00c9c0feedd3e17": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": "hidden",
"width": null
}
},
"9930f171a6db47939e996016cb49fe20": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ddd0c0abba074aa7a33b5c825ccf8760": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"8bbb7307312648b0afb901f701a4e466": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4a2eb48d3583446598fdd1b7175c96fd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"b3eae90c5aea409ab1a2c541948658f8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"41b5186c2e194402a1e18f1c1a9f18a4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"3c84850ebe3e45d297d3bfa8a12f1b86": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_8a5f71a073ca4b0cb929ba3cf31fd296",
"IPY_MODEL_b5be73849b61415fb9187d011261be1e",
"IPY_MODEL_46a51fbd984344b1958889c608ea04ed"
],
"layout": "IPY_MODEL_0d25092adebd4f94b1799df263ccaf55"
}
},
"8a5f71a073ca4b0cb929ba3cf31fd296": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_e4814d2ee2df4f6a9f411b134ebca546",
"placeholder": "",
"style": "IPY_MODEL_09669f6ac72b45689e082b4fb489a23f",
"value": "100%"
}
},
"b5be73849b61415fb9187d011261be1e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7afda94f85794acf882856b760a3eb63",
"max": 1,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_a70df5e47adb4a4d8b80a543dedfd708",
"value": 1
}
},
"46a51fbd984344b1958889c608ea04ed": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_140058b69379422797bdc22374192bd6",
"placeholder": "",
"style": "IPY_MODEL_8aabd23e2fa242e4b8cf4ef43fbebe2e",
"value": " 1/1 [00:00<00:00, 13.35it/s]"
}
},
"0d25092adebd4f94b1799df263ccaf55": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e4814d2ee2df4f6a9f411b134ebca546": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"09669f6ac72b45689e082b4fb489a23f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"7afda94f85794acf882856b760a3eb63": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a70df5e47adb4a4d8b80a543dedfd708": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"140058b69379422797bdc22374192bd6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"8aabd23e2fa242e4b8cf4ef43fbebe2e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"040698c1b4be4adebfe751751a64c11d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_11b4ddede4494fe093329c50097b7df5",
"IPY_MODEL_7986c625c9c34d039fad240333d0da08",
"IPY_MODEL_b35a6f8e81184f81990a0111cc5c6ca8"
],
"layout": "IPY_MODEL_2968992398a94adeb626eec2f45a8699"
}
},
"11b4ddede4494fe093329c50097b7df5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_c9f8f67483fb45c8a6b59fceae40fe42",
"placeholder": "",
"style": "IPY_MODEL_c5a862e7d71c430c865fa87dc21b1f6d",
"value": "Downloading (…)okenizer_config.json: 100%"
}
},
"7986c625c9c34d039fad240333d0da08": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d69171bdd6544c8ab9e96f3f3dfe7f92",
"max": 2537,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_9cca59c67c5f452eb1d9e8dd22296968",
"value": 2537
}
},
"b35a6f8e81184f81990a0111cc5c6ca8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_0f18ab0690ce4bc3b9b7c2f4d10c2049",
"placeholder": "",
"style": "IPY_MODEL_af26b98c1e3440daa11e104ed1c8b7e4",
"value": " 2.54k/2.54k [00:00<00:00, 97.2kB/s]"
}
},
"2968992398a94adeb626eec2f45a8699": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c9f8f67483fb45c8a6b59fceae40fe42": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c5a862e7d71c430c865fa87dc21b1f6d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"d69171bdd6544c8ab9e96f3f3dfe7f92": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9cca59c67c5f452eb1d9e8dd22296968": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"0f18ab0690ce4bc3b9b7c2f4d10c2049": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"af26b98c1e3440daa11e104ed1c8b7e4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"be9060616d68475ea2e4674f7e460566": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_264afd978de54dbeaa1b711e4c0b1c07",
"IPY_MODEL_bbcefda6eea74b8ea8313e4f7167df65",
"IPY_MODEL_68d85f6957ea4807a1fe7c82c9a7bc06"
],
"layout": "IPY_MODEL_cdfaf060f34a4d23afe97243d5f4c709"
}
},
"264afd978de54dbeaa1b711e4c0b1c07": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9411023294ab44b284894aebf3f8f589",
"placeholder": "",
"style": "IPY_MODEL_d8bf78a3d7ea47a9824d6e01e70b0237",
"value": "Downloading (…)"spiece.model";: 100%"
}
},
"bbcefda6eea74b8ea8313e4f7167df65": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b95ece9507db467fad710338bdf29177",
"max": 791656,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_34a31746a99c4916b1402a2829e71a98",
"value": 791656
}
},
"68d85f6957ea4807a1fe7c82c9a7bc06": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_29b2a7a233a9484c92056034cc70b8ca",
"placeholder": "",
"style": "IPY_MODEL_c9a72e2599e94e9e9bc2b4912d25877b",
"value": " 792k/792k [00:00<00:00, 19.7MB/s]"
}
},
"cdfaf060f34a4d23afe97243d5f4c709": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9411023294ab44b284894aebf3f8f589": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"d8bf78a3d7ea47a9824d6e01e70b0237": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b95ece9507db467fad710338bdf29177": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"34a31746a99c4916b1402a2829e71a98": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"29b2a7a233a9484c92056034cc70b8ca": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c9a72e2599e94e9e9bc2b4912d25877b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"2c24af439f3e45db8a0e004686e912ed": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_dcb13b35232145fd85be1b6e4442cc5a",
"IPY_MODEL_58037f9984bb414a9c6e56337d86215c",
"IPY_MODEL_6e9379baaf2049658790e176ca279531"
],
"layout": "IPY_MODEL_772e39d516cf43fdbb1b3db001d53d77"
}
},
"dcb13b35232145fd85be1b6e4442cc5a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_c08c1e0783324c53b7fc02912fa14af9",
"placeholder": "",
"style": "IPY_MODEL_9bcdda510c0147178f651b66450b48ac",
"value": "Downloading (…)/main/tokenizer.json: 100%"
}
},
"58037f9984bb414a9c6e56337d86215c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_18ab5e8088e04cdca93df7519156a59f",
"max": 2424064,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_f502a26154d840b89b5c61a2aae4f827",
"value": 2424064
}
},
"6e9379baaf2049658790e176ca279531": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7beb993a979443dcb93d26ec6e6718c3",
"placeholder": "",
"style": "IPY_MODEL_62e60fc862054e4d8d0d18cb1957cf6d",
"value": " 2.42M/2.42M [00:01<00:00, 1.56MB/s]"
}
},
"772e39d516cf43fdbb1b3db001d53d77": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c08c1e0783324c53b7fc02912fa14af9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9bcdda510c0147178f651b66450b48ac": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"18ab5e8088e04cdca93df7519156a59f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f502a26154d840b89b5c61a2aae4f827": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"7beb993a979443dcb93d26ec6e6718c3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"62e60fc862054e4d8d0d18cb1957cf6d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"bd697213d4fa4c1d9119657c537e78fe": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_67f9f97815354675bf3bd435f2ed0436",
"IPY_MODEL_27bd6c78e7f74ff385509e9856c2b8d0",
"IPY_MODEL_34f670acaa3542eebc8c19018e900ce3"
],
"layout": "IPY_MODEL_ec2d082874844b6daf8542824bfde1a0"
}
},
"67f9f97815354675bf3bd435f2ed0436": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b9df5fc8959447449d873bd17e6696f7",
"placeholder": "",
"style": "IPY_MODEL_f8489ecaa1a844369bcb427c5f4c95e6",
"value": "Downloading (…)cial_tokens_map.json: 100%"
}
},
"27bd6c78e7f74ff385509e9856c2b8d0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b21e65a9dff040f4a045580d9989ac20",
"max": 2201,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_0efa19170c9e4de891e328365543c916",
"value": 2201
}
},
"34f670acaa3542eebc8c19018e900ce3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8c6fa802ddd5491581c092e5422bfeab",
"placeholder": "",
"style": "IPY_MODEL_42cfc2ada7ac408fab39251add66f6ef",
"value": " 2.20k/2.20k [00:00<00:00, 67.2kB/s]"
}
},
"ec2d082874844b6daf8542824bfde1a0": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b9df5fc8959447449d873bd17e6696f7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f8489ecaa1a844369bcb427c5f4c95e6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b21e65a9dff040f4a045580d9989ac20": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0efa19170c9e4de891e328365543c916": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"8c6fa802ddd5491581c092e5422bfeab": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"42cfc2ada7ac408fab39251add66f6ef": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"3747d0aa68d642449ff32b7efd47d497": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_2a84ccf3660a4e24b37bfc1d952f06d9",
"IPY_MODEL_43b98452768846eb9b773839a4681cc6",
"IPY_MODEL_2dfbcef644a84b558ce99b2ddaf091b6"
],
"layout": "IPY_MODEL_9dd02373a1994433a49e0015b76dd858"
}
},
"2a84ccf3660a4e24b37bfc1d952f06d9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_42a620dfccb4416c95fbd7a76637dc73",
"placeholder": "",
"style": "IPY_MODEL_9d953b41e24c4263b18e1ff2174eb797",
"value": "Downloading (…)lve/main/config.json: 100%"
}
},
"43b98452768846eb9b773839a4681cc6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_cb409960af114fa690bac72c1d51d2ab",
"max": 1404,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_995a94c35b4c441b86598d1976281711",
"value": 1404
}
},
"2dfbcef644a84b558ce99b2ddaf091b6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_4ea2ccb5fa264dd5a042f570c22db7de",
"placeholder": "",
"style": "IPY_MODEL_4d5668e5b66d4993b935b077a1dc281c",
"value": " 1.40k/1.40k [00:00<00:00, 54.0kB/s]"
}
},
"9dd02373a1994433a49e0015b76dd858": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"42a620dfccb4416c95fbd7a76637dc73": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9d953b41e24c4263b18e1ff2174eb797": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"cb409960af114fa690bac72c1d51d2ab": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"995a94c35b4c441b86598d1976281711": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"4ea2ccb5fa264dd5a042f570c22db7de": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4d5668e5b66d4993b935b077a1dc281c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"cf36c750119449e8a16aa97a9b66a124": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_0de691bf20804830ba5e6710c205c9ac",
"IPY_MODEL_7ee532c002784554b12fede964c6c05a",
"IPY_MODEL_25e5c76c84a8414495b61663250825aa"
],
"layout": "IPY_MODEL_12bd0cd379754967bfd5481d5836b7a4"
}
},
"0de691bf20804830ba5e6710c205c9ac": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d55d326ffbdc420da0a399c141f7fb56",
"placeholder": "",
"style": "IPY_MODEL_092323b59b734eada8d88197d9f0eb72",
"value": "Downloading (…)"pytorch_model.bin";: 100%"
}
},
"7ee532c002784554b12fede964c6c05a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_622df288b2ae4f62b776cb101de18b9f",
"max": 990402637,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_c72abd216b9444ef9bdb0f8a0a6771b0",
"value": 990402637
}
},
"25e5c76c84a8414495b61663250825aa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_03d5f2402e464b7cb5244db0f824df1d",
"placeholder": "",
"style": "IPY_MODEL_4a6e196f590d4b329e0edefc910d4730",
"value": " 990M/990M [00:09<00:00, 135MB/s]"
}
},
"12bd0cd379754967bfd5481d5836b7a4": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"d55d326ffbdc420da0a399c141f7fb56": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"092323b59b734eada8d88197d9f0eb72": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"622df288b2ae4f62b776cb101de18b9f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c72abd216b9444ef9bdb0f8a0a6771b0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"03d5f2402e464b7cb5244db0f824df1d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4a6e196f590d4b329e0edefc910d4730": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"9a04f6723e2a40288eb42eea0134dfaf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_4065d0eed87e4d268de8f4536287e225",
"IPY_MODEL_bebca147a83446abaf19c3e3db11744e",
"IPY_MODEL_cf525a599ca245b19204bfff3fa1bd11"
],
"layout": "IPY_MODEL_b60759f0730343849ef3e51d2c8be38c"
}
},
"4065d0eed87e4d268de8f4536287e225": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_dcc795e3fac0401b9a4d2aac3bd6e8cc",
"placeholder": "",
"style": "IPY_MODEL_ed7ca6da408842b38a466097ec9d4616",
"value": "Downloading (…)neration_config.json: 100%"
}
},
"bebca147a83446abaf19c3e3db11744e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_0335f29f40564adf9b577707dfb40aa9",
"max": 147,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_a200da1478fa46a19695a5b2f2c77fd1",
"value": 147
}
},
"cf525a599ca245b19204bfff3fa1bd11": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_e21e75bbbc4149b4ac85fece44aee355",
"placeholder": "",
"style": "IPY_MODEL_c014c271cd374f62a0d113efca14001a",
"value": " 147/147 [00:00<00:00, 6.16kB/s]"
}
},
"b60759f0730343849ef3e51d2c8be38c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"dcc795e3fac0401b9a4d2aac3bd6e8cc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ed7ca6da408842b38a466097ec9d4616": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"0335f29f40564adf9b577707dfb40aa9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a200da1478fa46a19695a5b2f2c77fd1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"e21e75bbbc4149b4ac85fece44aee355": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c014c271cd374f62a0d113efca14001a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"source": [
"# Instalacja pakietów"
],
"metadata": {
"id": "ZXsOR6oJOJbd"
}
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "8l0hzptKNiZS",
"outputId": "6ebbbe8e-00ec-4108-d209-e7dd267f6d1e"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting transformers\n",
" Downloading transformers-4.26.1-py3-none-any.whl (6.3 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.3/6.3 MB\u001b[0m \u001b[31m47.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting datasets\n",
" Downloading datasets-2.9.0-py3-none-any.whl (462 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m462.8/462.8 KB\u001b[0m \u001b[31m22.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: torch in /usr/local/lib/python3.8/dist-packages (1.13.1+cu116)\n",
"Collecting sentencepiece\n",
" Downloading sentencepiece-0.1.97-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m15.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.8/dist-packages (from transformers) (6.0)\n",
"Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (2022.6.2)\n",
"Collecting huggingface-hub<1.0,>=0.11.0\n",
" Downloading huggingface_hub-0.12.0-py3-none-any.whl (190 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m190.3/190.3 KB\u001b[0m \u001b[31m13.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
" Downloading tokenizers-0.13.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m56.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from transformers) (3.9.0)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (from transformers) (2.25.1)\n",
"Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.8/dist-packages (from transformers) (4.64.1)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from transformers) (23.0)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (1.21.6)\n",
"Collecting multiprocess\n",
" Downloading multiprocess-0.70.14-py38-none-any.whl (132 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m132.0/132.0 KB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: dill<0.3.7 in /usr/local/lib/python3.8/dist-packages (from datasets) (0.3.6)\n",
"Collecting xxhash\n",
" Downloading xxhash-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m213.0/213.0 KB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.8/dist-packages (from datasets) (9.0.0)\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from datasets) (1.3.5)\n",
"Collecting responses<0.19\n",
" Downloading responses-0.18.0-py3-none-any.whl (38 kB)\n",
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.8/dist-packages (from datasets) (3.8.3)\n",
"Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.8/dist-packages (from datasets) (2023.1.0)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from torch) (4.4.0)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (22.2.0)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (4.0.2)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.8.2)\n",
"Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (2.1.1)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (6.0.4)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.3.1)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.3.3)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (1.24.3)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (2022.12.7)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (4.0.0)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (2.10)\n",
"Collecting urllib3<1.27,>=1.21.1\n",
" Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m140.6/140.6 KB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas->datasets) (2.8.2)\n",
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->datasets) (2022.7.1)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.7.3->pandas->datasets) (1.15.0)\n",
"Installing collected packages: tokenizers, sentencepiece, xxhash, urllib3, multiprocess, responses, huggingface-hub, transformers, datasets\n",
" Attempting uninstall: urllib3\n",
" Found existing installation: urllib3 1.24.3\n",
" Uninstalling urllib3-1.24.3:\n",
" Successfully uninstalled urllib3-1.24.3\n",
"Successfully installed datasets-2.9.0 huggingface-hub-0.12.0 multiprocess-0.70.14 responses-0.18.0 sentencepiece-0.1.97 tokenizers-0.13.2 transformers-4.26.1 urllib3-1.26.14 xxhash-3.2.0\n"
]
}
],
"source": [
"!pip install transformers datasets torch sentencepiece"
]
},
{
"cell_type": "markdown",
"source": [
"# Załadowanie datasetu"
],
"metadata": {
"id": "dhN0rmb5Oi3d"
}
},
{
"cell_type": "code",
"source": [
"from datasets import load_dataset"
],
"metadata": {
"id": "tnaDkwZ2Pbnn"
},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"source": [
"dataset = load_dataset(\"sms_spam\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 244,
"referenced_widgets": [
"e4bb6f2f32de48d4b1f6d7ecf97ce376",
"3305b30f1bfa48e9b0c1ba3add06094e",
"a343619acbb745baa6aa561271ec8815",
"c493fc54d9eb421f96d6e8519c8a1b0e",
"12fd6daa8e604ecd9ad731b6296815da",
"805f497aa3304353a1be8b4cc87bfb54",
"594a6d13f81f479eb00fa45fd4094146",
"236979048eb8461f9b7d8c4103905eed",
"4620faf461ca449a88de45e86467e265",
"8dc2f0f2e66741edbccab7abaaf634ce",
"0d49bfb55dfd4090ba57c544eaa97902",
"4084f218fca64fc9b765e04d0cc073ac",
"fec67d95a5904ac199f6648a34ef1ff9",
"a734d44f6baf4a5f8dfda576c09fffca",
"3fc2d009da594365854aa11be804b388",
"45c7d35932ec44bcb2ccdc73f0ae6b46",
"0c1c3db046f24599b27daa44217f48d2",
"c3f9ed611a154e22b875d0696ef6022d",
"7fd51c34909b41a8884fa358cccdbf48",
"9d9edc5471de40c2b7c2b9156637997d",
"02c64bf3ff95438cb43c7dc52034cc43",
"f0b71ecb6b1c4d1190ca899af7d3e82c",
"8cae9c49e18f43248072b5e059429f6d",
"88c8adca128b44c1bbbec437630c2074",
"0f73f5e2c8af41eaae5f1c27f212da8b",
"255b4480e11f4b3e892a5d2dc6abfd4b",
"a96eab6312f6447b9eff3f914c5a6827",
"063059d53dc942d1aee9e3fe2f27687d",
"ca50704df2cc430fae6b5902c5399414",
"64f5cdd8d1c14be79278ee4de89993d1",
"f065dcd7d1d34cb6806f2eb28bb3cd6f",
"67663505c87640b58e04d3ce028537ea",
"f5a17bc6f9f94b2ca119528b0ca2d456",
"ec0f16c3cbb14d9287e148887127219b",
"ba832204e1d4413f8b8a15e10bac7d95",
"8179dbec98b7466ea2195affb0568498",
"7e9abda7b55c459b8a9888edaf1cc116",
"64c8860ae16848af9b04bb41955a8446",
"64fe250082bf4d4fb126a319920d2f0a",
"0b278b6f5da94921afbacb873c15d9c9",
"b688bc7f34e941488831da5d4aed9396",
"44cec66cbaeb49abb26dbfc5420ceacb",
"67a750dcfa8b44499956572fda3dbacf",
"edad6f2eb6704468bd06006c50697f86",
"699a1bdf38ca48e2affc3c6bd771852f",
"4e5a92d4acdc43d487290ffd8a842ea5",
"8bc8c44b6324478a8209094f9b7e9ccd",
"e95f31e693674a0aae8de0e167a49daf",
"069a68aed2bb4d37a00c9c0feedd3e17",
"9930f171a6db47939e996016cb49fe20",
"ddd0c0abba074aa7a33b5c825ccf8760",
"8bbb7307312648b0afb901f701a4e466",
"4a2eb48d3583446598fdd1b7175c96fd",
"b3eae90c5aea409ab1a2c541948658f8",
"41b5186c2e194402a1e18f1c1a9f18a4",
"3c84850ebe3e45d297d3bfa8a12f1b86",
"8a5f71a073ca4b0cb929ba3cf31fd296",
"b5be73849b61415fb9187d011261be1e",
"46a51fbd984344b1958889c608ea04ed",
"0d25092adebd4f94b1799df263ccaf55",
"e4814d2ee2df4f6a9f411b134ebca546",
"09669f6ac72b45689e082b4fb489a23f",
"7afda94f85794acf882856b760a3eb63",
"a70df5e47adb4a4d8b80a543dedfd708",
"140058b69379422797bdc22374192bd6",
"8aabd23e2fa242e4b8cf4ef43fbebe2e"
]
},
"id": "cCiAuRqrOkvV",
"outputId": "394df630-e545-4005-b3a4-82b0341b210b"
},
"execution_count": 3,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading builder script: 0%| | 0.00/3.21k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "e4bb6f2f32de48d4b1f6d7ecf97ce376"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading metadata: 0%| | 0.00/1.69k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "4084f218fca64fc9b765e04d0cc073ac"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading readme: 0%| | 0.00/4.87k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "8cae9c49e18f43248072b5e059429f6d"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading and preparing dataset sms_spam/plain_text to /root/.cache/huggingface/datasets/sms_spam/plain_text/1.0.0/53f051d3b5f62d99d61792c91acefe4f1577ad3e4c216fb0ad39e30b9f20019c...\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading data: 0%| | 0.00/203k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "ec0f16c3cbb14d9287e148887127219b"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Generating train split: 0%| | 0/5574 [00:00<?, ? examples/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "699a1bdf38ca48e2affc3c6bd771852f"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Dataset sms_spam downloaded and prepared to /root/.cache/huggingface/datasets/sms_spam/plain_text/1.0.0/53f051d3b5f62d99d61792c91acefe4f1577ad3e4c216fb0ad39e30b9f20019c. Subsequent calls will reuse this data.\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/1 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "3c84850ebe3e45d297d3bfa8a12f1b86"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"dataset['train'][123]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JKFHPko3OnAV",
"outputId": "423375ec-0be7-431b-8a65-f531df1d94d8"
},
"execution_count": 4,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'sms': 'Todays Voda numbers ending 7548 are selected to receive a $350 award. If you have a match please call 08712300220 quoting claim code 4041 standard rates app\\n',\n",
" 'label': 1}"
]
},
"metadata": {},
"execution_count": 4
}
]
},
{
"cell_type": "markdown",
"source": [
"# Modyfikacja datasetu - klasyfikacja zero-shot"
],
"metadata": {
"id": "l140vJrgYxPr"
}
},
{
"cell_type": "code",
"source": [
"parsed_dataset = []\n",
"\n",
"for row in dataset['train']:\n",
" text = \"Answer the question in one word - true if provided text is spam or false, if provided text is not spam.\\n Q: Is this text spam? \\nText: \" + row['sms'] + \"A: \"\n",
" new_row = {}\n",
" new_row['sms'] = text\n",
" if row['label'] == 0:\n",
" new_row['label'] = \"true\"\n",
" else:\n",
" new_row['label'] = \"false\"\n",
" parsed_dataset.append(new_row)\n",
"\n",
"parsed_dataset[0]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "1boUF-YiY3_y",
"outputId": "a7ecfad8-7c97-4de2-8852-80b28ea7c965"
},
"execution_count": 5,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'sms': 'Answer the question in one word - true if provided text is spam or false, if provided text is not spam.\\n Q: Is this text spam? \\nText: Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\\nA: ',\n",
" 'label': 'true'}"
]
},
"metadata": {},
"execution_count": 5
}
]
},
{
"cell_type": "markdown",
"source": [
"# Tokenizer FLAN-T5"
],
"metadata": {
"id": "O-J-jBDxPJcn"
}
},
{
"cell_type": "code",
"source": [
"from transformers import AutoTokenizer"
],
"metadata": {
"id": "P23AYPX1PZ6g"
},
"execution_count": 6,
"outputs": []
},
{
"cell_type": "code",
"source": [
"tokenizer = AutoTokenizer.from_pretrained('google/flan-t5-base')"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 145,
"referenced_widgets": [
"040698c1b4be4adebfe751751a64c11d",
"11b4ddede4494fe093329c50097b7df5",
"7986c625c9c34d039fad240333d0da08",
"b35a6f8e81184f81990a0111cc5c6ca8",
"2968992398a94adeb626eec2f45a8699",
"c9f8f67483fb45c8a6b59fceae40fe42",
"c5a862e7d71c430c865fa87dc21b1f6d",
"d69171bdd6544c8ab9e96f3f3dfe7f92",
"9cca59c67c5f452eb1d9e8dd22296968",
"0f18ab0690ce4bc3b9b7c2f4d10c2049",
"af26b98c1e3440daa11e104ed1c8b7e4",
"be9060616d68475ea2e4674f7e460566",
"264afd978de54dbeaa1b711e4c0b1c07",
"bbcefda6eea74b8ea8313e4f7167df65",
"68d85f6957ea4807a1fe7c82c9a7bc06",
"cdfaf060f34a4d23afe97243d5f4c709",
"9411023294ab44b284894aebf3f8f589",
"d8bf78a3d7ea47a9824d6e01e70b0237",
"b95ece9507db467fad710338bdf29177",
"34a31746a99c4916b1402a2829e71a98",
"29b2a7a233a9484c92056034cc70b8ca",
"c9a72e2599e94e9e9bc2b4912d25877b",
"2c24af439f3e45db8a0e004686e912ed",
"dcb13b35232145fd85be1b6e4442cc5a",
"58037f9984bb414a9c6e56337d86215c",
"6e9379baaf2049658790e176ca279531",
"772e39d516cf43fdbb1b3db001d53d77",
"c08c1e0783324c53b7fc02912fa14af9",
"9bcdda510c0147178f651b66450b48ac",
"18ab5e8088e04cdca93df7519156a59f",
"f502a26154d840b89b5c61a2aae4f827",
"7beb993a979443dcb93d26ec6e6718c3",
"62e60fc862054e4d8d0d18cb1957cf6d",
"bd697213d4fa4c1d9119657c537e78fe",
"67f9f97815354675bf3bd435f2ed0436",
"27bd6c78e7f74ff385509e9856c2b8d0",
"34f670acaa3542eebc8c19018e900ce3",
"ec2d082874844b6daf8542824bfde1a0",
"b9df5fc8959447449d873bd17e6696f7",
"f8489ecaa1a844369bcb427c5f4c95e6",
"b21e65a9dff040f4a045580d9989ac20",
"0efa19170c9e4de891e328365543c916",
"8c6fa802ddd5491581c092e5422bfeab",
"42cfc2ada7ac408fab39251add66f6ef"
]
},
"id": "q5Jz0E_oPMBr",
"outputId": "c71131a5-4737-4354-e58f-17aa88116348"
},
"execution_count": 7,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)okenizer_config.json: 0%| | 0.00/2.54k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "040698c1b4be4adebfe751751a64c11d"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)\"spiece.model\";: 0%| | 0.00/792k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "be9060616d68475ea2e4674f7e460566"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)/main/tokenizer.json: 0%| | 0.00/2.42M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "2c24af439f3e45db8a0e004686e912ed"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)cial_tokens_map.json: 0%| | 0.00/2.20k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "bd697213d4fa4c1d9119657c537e78fe"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"sms = parsed_dataset[0]['sms']\n",
"print('Original: \\n', sms)\n",
"print('Tokenized: ', tokenizer.tokenize(sms))\n",
"print('Token IDs: ', tokenizer.convert_tokens_to_ids(tokenizer.tokenize(sms)))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "dfxJQpoePsvI",
"outputId": "2ce963db-ed94-467a-e859-fd0515849ee2"
},
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Original: \n",
" Answer the question in one word - true if provided text is spam or false, if provided text is not spam.\n",
" Q: Is this text spam? \n",
"Text: Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\n",
"A: \n",
"Tokenized: ['▁Answer', '▁the', '▁question', '▁in', '▁one', '▁word', '▁', '-', '▁true', '▁', 'if', '▁provided', '▁text', '▁is', '▁spam', '▁or', '▁false', ',', '▁', 'if', '▁provided', '▁text', '▁is', '▁not', '▁spam', '.', '▁Q', ':', '▁I', 's', '▁this', '▁text', '▁spam', '?', '▁Text', ':', '▁Go', '▁until', '▁jur', 'ong', '▁point', ',', '▁crazy', '.', '.', '▁Available', '▁only', '▁in', '▁bug', 'is', '▁', 'n', '▁great', '▁world', '▁la', '▁', 'e', '▁buffet', '...', '▁Cine', '▁there', '▁got', '▁', 'a', 'more', '▁wa', 't', '...', '▁A', ':', '▁']\n",
"Token IDs: [11801, 8, 822, 16, 80, 1448, 3, 18, 1176, 3, 99, 937, 1499, 19, 13655, 42, 6136, 6, 3, 99, 937, 1499, 19, 59, 13655, 5, 1593, 10, 27, 7, 48, 1499, 13655, 58, 5027, 10, 1263, 552, 10081, 2444, 500, 6, 6139, 5, 5, 8144, 163, 16, 8143, 159, 3, 29, 248, 296, 50, 3, 15, 15385, 233, 17270, 132, 530, 3, 9, 3706, 8036, 17, 233, 71, 10, 3]\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Check maximum lenght of a sentence"
],
"metadata": {
"id": "UpluhM8cU5Ir"
}
},
{
"cell_type": "code",
"source": [
"max_len = 0\n",
"\n",
"for sentence in parsed_dataset:\n",
" input_ids = tokenizer.encode(sentence['sms'], add_special_tokens=True)\n",
" max_len = max(max_len, len(input_ids))\n",
"\n",
"print('Max sentence length: ', max_len)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "7uNUkixPU85O",
"outputId": "352b31bb-164e-42a8-a8b0-6be9d3eca0c4"
},
"execution_count": 12,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Max sentence length: 377\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"max_label_len = 0\n",
"\n",
"for sentence in parsed_dataset:\n",
" input_ids = tokenizer.encode(sentence['label'], add_special_tokens=True)\n",
" max_label_len = max(max_label_len, len(input_ids))\n",
"\n",
"print('Max sentence length: ', max_label_len)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "lj0issBznZfK",
"outputId": "53defde8-ed8d-4927-add4-5d7d63f737df"
},
"execution_count": 13,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Max sentence length: 2\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Pre train tokenization"
],
"metadata": {
"id": "nfw62HdgSERb"
}
},
{
"cell_type": "code",
"source": [
"import torch"
],
"metadata": {
"id": "KTXYalS1VLqH"
},
"execution_count": 11,
"outputs": []
},
{
"cell_type": "code",
"source": [
"input_ids = []\n",
"target_ids = []\n",
"attention_masks = []\n",
"\n",
"for sentence in parsed_dataset:\n",
" encoded_dict = tokenizer.encode_plus(\n",
" sentence['sms'],\n",
" add_special_tokens = True,\n",
" max_length = 380,\n",
" padding = 'max_length',\n",
" truncation=True,\n",
" return_attention_mask = True,\n",
" return_tensors = 'pt',\n",
" )\n",
" \n",
" encoded_target_dict = tokenizer.encode_plus(\n",
" sentence['label'],\n",
" add_special_tokens = True,\n",
" max_length = 2,\n",
" padding = 'max_length',\n",
" truncation=True,\n",
" return_attention_mask = True,\n",
" return_tensors = 'pt',\n",
" )\n",
" \n",
" input_ids.append(encoded_dict['input_ids'])\n",
" target_ids.append(encoded_target_dict['input_ids'])\n",
" attention_masks.append(encoded_dict['attention_mask'])\n",
"\n",
"input_ids = torch.cat(input_ids, dim=0)\n",
"target_ids = torch.cat(target_ids, dim=0)\n",
"attention_masks = torch.cat(attention_masks, dim=0)\n",
"\n",
"print('Original: ', parsed_dataset[0])\n",
"print('Token IDs:', input_ids[0])\n",
"print('Label token IDs:', target_ids[0])"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Z28QYfLnSGxR",
"outputId": "eb9d48d0-cb2d-4596-c752-14b18f6e3590"
},
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Original: {'sms': 'Answer the question in one word - true if provided text is spam or false, if provided text is not spam.\\n Q: Is this text spam? \\nText: Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\\nA: ', 'label': 'true'}\n",
"Token IDs: tensor([11801, 8, 822, 16, 80, 1448, 3, 18, 1176, 3,\n",
" 99, 937, 1499, 19, 13655, 42, 6136, 6, 3, 99,\n",
" 937, 1499, 19, 59, 13655, 5, 1593, 10, 27, 7,\n",
" 48, 1499, 13655, 58, 5027, 10, 1263, 552, 10081, 2444,\n",
" 500, 6, 6139, 5, 5, 8144, 163, 16, 8143, 159,\n",
" 3, 29, 248, 296, 50, 3, 15, 15385, 233, 17270,\n",
" 132, 530, 3, 9, 3706, 8036, 17, 233, 71, 10,\n",
" 3, 1, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n",
"Label token IDs: tensor([1176, 1])\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Split dataset"
],
"metadata": {
"id": "qD_t0y0KVVSy"
}
},
{
"cell_type": "code",
"source": [
"from torch.utils.data import TensorDataset, random_split"
],
"metadata": {
"id": "vN_SatRIVa4c"
},
"execution_count": 15,
"outputs": []
},
{
"cell_type": "code",
"source": [
"dataset = TensorDataset(input_ids, attention_masks, target_ids)\n",
"\n",
"test_size = 1000\n",
"dataset_len = len(dataset)\n",
"train_size = int(0.9 * (dataset_len-test_size))\n",
"val_size = (dataset_len-test_size) - train_size\n",
"\n",
"test_dataset, train_dataset, val_dataset = random_split(dataset, [test_size, train_size, val_size])\n",
"\n",
"print('{:>5,} test samples'.format(test_size))\n",
"print('{:>5,} training samples'.format(train_size))\n",
"print('{:>5,} validation samples'.format(val_size))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Mm6vc6lLVW3l",
"outputId": "023efb5b-eab3-4675-9900-3918aedae90f"
},
"execution_count": 16,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"1,000 test samples\n",
"4,116 training samples\n",
" 458 validation samples\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Create train and validation loaders"
],
"metadata": {
"id": "bmgQOP4EVfA1"
}
},
{
"cell_type": "code",
"source": [
"from torch.utils.data import DataLoader, RandomSampler, SequentialSampler"
],
"metadata": {
"id": "CxnQ3cmIVlNh"
},
"execution_count": 17,
"outputs": []
},
{
"cell_type": "code",
"source": [
"batch_size = 8\n",
"\n",
"train_dataloader = DataLoader(\n",
" train_dataset,\n",
" sampler = RandomSampler(train_dataset),\n",
" batch_size = batch_size\n",
" )\n",
"\n",
"validation_dataloader = DataLoader(\n",
" val_dataset,\n",
" sampler = SequentialSampler(val_dataset),\n",
" batch_size = batch_size\n",
" )"
],
"metadata": {
"id": "0hcpO_onVjEC"
},
"execution_count": 18,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Device check"
],
"metadata": {
"id": "efwhqLyyVu9z"
}
},
{
"cell_type": "code",
"source": [
"if torch.cuda.is_available(): \n",
" device = torch.device(\"cuda\")\n",
"\n",
" print('There are %d GPU(s) available.' % torch.cuda.device_count())\n",
" print('We will use the GPU:', torch.cuda.get_device_name(0))\n",
"\n",
"else:\n",
" print('No GPU available, using the CPU instead.')\n",
" device = torch.device(\"cpu\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ANBCfNGnVwVk",
"outputId": "6192e88f-5e61-4de6-b476-de9a6e3a59a6"
},
"execution_count": 19,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"There are 1 GPU(s) available.\n",
"We will use the GPU: Tesla T4\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Load FLAN-T5 model"
],
"metadata": {
"id": "okTx_ynMV0rH"
}
},
{
"cell_type": "code",
"source": [
"from transformers import AutoModelForSeq2SeqLM"
],
"metadata": {
"id": "Eu-7Eed8WgN0"
},
"execution_count": 20,
"outputs": []
},
{
"cell_type": "code",
"source": [
"model = AutoModelForSeq2SeqLM.from_pretrained('google/flan-t5-base')\n",
"\n",
"model.cuda()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"3747d0aa68d642449ff32b7efd47d497",
"2a84ccf3660a4e24b37bfc1d952f06d9",
"43b98452768846eb9b773839a4681cc6",
"2dfbcef644a84b558ce99b2ddaf091b6",
"9dd02373a1994433a49e0015b76dd858",
"42a620dfccb4416c95fbd7a76637dc73",
"9d953b41e24c4263b18e1ff2174eb797",
"cb409960af114fa690bac72c1d51d2ab",
"995a94c35b4c441b86598d1976281711",
"4ea2ccb5fa264dd5a042f570c22db7de",
"4d5668e5b66d4993b935b077a1dc281c",
"cf36c750119449e8a16aa97a9b66a124",
"0de691bf20804830ba5e6710c205c9ac",
"7ee532c002784554b12fede964c6c05a",
"25e5c76c84a8414495b61663250825aa",
"12bd0cd379754967bfd5481d5836b7a4",
"d55d326ffbdc420da0a399c141f7fb56",
"092323b59b734eada8d88197d9f0eb72",
"622df288b2ae4f62b776cb101de18b9f",
"c72abd216b9444ef9bdb0f8a0a6771b0",
"03d5f2402e464b7cb5244db0f824df1d",
"4a6e196f590d4b329e0edefc910d4730",
"9a04f6723e2a40288eb42eea0134dfaf",
"4065d0eed87e4d268de8f4536287e225",
"bebca147a83446abaf19c3e3db11744e",
"cf525a599ca245b19204bfff3fa1bd11",
"b60759f0730343849ef3e51d2c8be38c",
"dcc795e3fac0401b9a4d2aac3bd6e8cc",
"ed7ca6da408842b38a466097ec9d4616",
"0335f29f40564adf9b577707dfb40aa9",
"a200da1478fa46a19695a5b2f2c77fd1",
"e21e75bbbc4149b4ac85fece44aee355",
"c014c271cd374f62a0d113efca14001a"
]
},
"id": "JKv9O8kfV2zZ",
"outputId": "6893e79a-48f7-4713-c4a4-a9558acbcf7c"
},
"execution_count": 21,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)lve/main/config.json: 0%| | 0.00/1.40k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "3747d0aa68d642449ff32b7efd47d497"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)\"pytorch_model.bin\";: 0%| | 0.00/990M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "cf36c750119449e8a16aa97a9b66a124"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)neration_config.json: 0%| | 0.00/147 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "9a04f6723e2a40288eb42eea0134dfaf"
}
},
"metadata": {}
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"T5ForConditionalGeneration(\n",
" (shared): Embedding(32128, 768)\n",
" (encoder): T5Stack(\n",
" (embed_tokens): Embedding(32128, 768)\n",
" (block): ModuleList(\n",
" (0): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" (relative_attention_bias): Embedding(32, 12)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (1): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (2): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (3): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (4): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (5): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (6): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (7): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (8): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (9): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (10): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (11): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (final_layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (decoder): T5Stack(\n",
" (embed_tokens): Embedding(32128, 768)\n",
" (block): ModuleList(\n",
" (0): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" (relative_attention_bias): Embedding(32, 12)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (1): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (2): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (3): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (4): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (5): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (6): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (7): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (8): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (9): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (10): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (11): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseGatedActDense(\n",
" (wi_0): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wi_1): Linear(in_features=768, out_features=2048, bias=False)\n",
" (wo): Linear(in_features=2048, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): NewGELUActivation()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (final_layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (lm_head): Linear(in_features=768, out_features=32128, bias=False)\n",
")"
]
},
"metadata": {},
"execution_count": 21
}
]
},
{
"cell_type": "markdown",
"source": [
"# Helper functions"
],
"metadata": {
"id": "F_SDAwxoawDy"
}
},
{
"cell_type": "code",
"source": [
"import datetime\n",
"import numpy as np"
],
"metadata": {
"id": "s-q6_F38bLVA"
},
"execution_count": 22,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def calculate_accuracy(preds, target):\n",
" results_ok = 0.0\n",
" results_false = 0.0\n",
"\n",
" for idx, pred in enumerate(preds):\n",
" if pred == target[idx]:\n",
" results_ok += 1.0\n",
" else:\n",
" results_false += 1.0\n",
"\n",
" return results_ok / (results_ok + results_false)\n",
"\n",
"def format_time(elapsed):\n",
" '''\n",
" Takes a time in seconds and returns a string hh:mm:ss\n",
" '''\n",
" elapsed_rounded = int(round((elapsed)))\n",
" return str(datetime.timedelta(seconds=elapsed_rounded))"
],
"metadata": {
"id": "FzUi8908ax61"
},
"execution_count": 23,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Init training"
],
"metadata": {
"id": "ucChBa-9bXJy"
}
},
{
"cell_type": "code",
"source": [
"from transformers import get_linear_schedule_with_warmup"
],
"metadata": {
"id": "c9e7rbGwbdEp"
},
"execution_count": 24,
"outputs": []
},
{
"cell_type": "code",
"source": [
"optimizer = torch.optim.AdamW(model.parameters(),\n",
" lr = 3e-4,\n",
" eps = 1e-8\n",
" )\n",
"\n",
"epochs = 4\n",
"\n",
"total_steps = len(train_dataloader) * epochs\n",
"\n",
"scheduler = get_linear_schedule_with_warmup(optimizer, \n",
" num_warmup_steps = 0,\n",
" num_training_steps = total_steps)"
],
"metadata": {
"id": "A7XUF4PNbYy8"
},
"execution_count": 25,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Training"
],
"metadata": {
"id": "DAzQWODja0A3"
}
},
{
"cell_type": "code",
"source": [
"import random\n",
"import time"
],
"metadata": {
"id": "Hoa7NlU0bI7G"
},
"execution_count": 26,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# This training code is based on the `run_glue.py` script here:\n",
"# https://github.com/huggingface/transformers/blob/5bfcd0485ece086ebcbed2d008813037968a9e58/examples/run_glue.py#L128\n",
"\n",
"seed_val = 42\n",
"\n",
"random.seed(seed_val)\n",
"np.random.seed(seed_val)\n",
"torch.manual_seed(seed_val)\n",
"torch.cuda.manual_seed_all(seed_val)\n",
"\n",
"training_stats = []\n",
"total_t0 = time.time()\n",
"\n",
"for epoch_i in range(0, epochs):\n",
" \n",
" # ========================================\n",
" # Training\n",
" # ========================================\n",
"\n",
" print(\"\")\n",
" print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs))\n",
" print('Training...')\n",
"\n",
" t0 = time.time()\n",
"\n",
" total_train_loss = 0\n",
" total_train_acc = 0\n",
"\n",
" model.train()\n",
"\n",
" for step, batch in enumerate(train_dataloader):\n",
" if step % 40 == 0 and not step == 0:\n",
" elapsed = format_time(time.time() - t0)\n",
" print(' Batch {:>5,} of {:>5,}. Elapsed: {:}.'.format(step, len(train_dataloader), elapsed))\n",
"\n",
"\n",
" b_input_ids = batch[0].to(device)\n",
" b_input_mask = batch[1].to(device)\n",
"\n",
" y = batch[2].to(device)\n",
" y_ids = y[:, :-1].contiguous()\n",
" lm_labels = y[:, 1:].clone().detach()\n",
" lm_labels[y[:, 1:] == tokenizer.pad_token_id] = -100\n",
"\n",
" model.zero_grad() \n",
"\n",
" outputs = model(\n",
" input_ids=b_input_ids,\n",
" attention_mask=b_input_mask,\n",
" decoder_input_ids=y_ids,\n",
" labels=lm_labels\n",
" )\n",
"\n",
" generated_ids = model.generate(\n",
" input_ids = b_input_ids,\n",
" attention_mask = b_input_mask, \n",
" max_length=2, \n",
" num_beams=2,\n",
" repetition_penalty=2.5, \n",
" length_penalty=1.0, \n",
" early_stopping=True\n",
" )\n",
"\n",
" preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]\n",
" target = [tokenizer.decode(t, skip_special_tokens=True, clean_up_tokenization_spaces=True) for t in y]\n",
" total_train_acc += calculate_accuracy(preds, target) \n",
"\n",
" loss = outputs['loss']\n",
" total_train_loss += loss.item()\n",
"\n",
" loss.backward()\n",
" torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)\n",
"\n",
" optimizer.step()\n",
" scheduler.step()\n",
"\n",
" avg_train_loss = total_train_loss / len(train_dataloader) \n",
" avg_train_acc = total_train_acc / len(train_dataloader) \n",
" \n",
" training_time = format_time(time.time() - t0)\n",
"\n",
" print(\"\")\n",
" print(\" Average training loss: {0:.2f}\".format(avg_train_loss))\n",
" print(\" Average training acc: {0:.2f}\".format(avg_train_acc))\n",
" print(\" Training epcoh took: {:}\".format(training_time))\n",
" \n",
" # ========================================\n",
" # Validation\n",
" # ========================================\n",
"\n",
" print(\"\")\n",
" print(\"Running Validation...\")\n",
"\n",
" t0 = time.time()\n",
" model.eval()\n",
"\n",
" total_eval_loss = 0\n",
" total_eval_accuracy = 0\n",
"\n",
" for batch in validation_dataloader:\n",
"\n",
" b_input_ids = batch[0].to(device)\n",
" b_input_mask = batch[1].to(device)\n",
"\n",
" y = batch[2].to(device)\n",
" y_ids = y[:, :-1].contiguous()\n",
" lm_labels = y[:, 1:].clone().detach()\n",
" lm_labels[y[:, 1:] == tokenizer.pad_token_id] = -100\n",
" \n",
" with torch.no_grad(): \n",
"\n",
" outputs = model(\n",
" input_ids=b_input_ids,\n",
" attention_mask=b_input_mask,\n",
" decoder_input_ids=y_ids,\n",
" labels=lm_labels\n",
" )\n",
"\n",
" loss = outputs['loss']\n",
" total_eval_loss += loss.item()\n",
"\n",
" generated_ids = model.generate(\n",
" input_ids = b_input_ids,\n",
" attention_mask = b_input_mask, \n",
" max_length=2, \n",
" num_beams=2,\n",
" repetition_penalty=2.5, \n",
" length_penalty=1.0, \n",
" early_stopping=True\n",
" )\n",
"\n",
" preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]\n",
" target = [tokenizer.decode(t, skip_special_tokens=True, clean_up_tokenization_spaces=True) for t in y]\n",
" total_eval_accuracy += calculate_accuracy(preds, target) \n",
"\n",
" avg_val_loss = total_eval_loss / len(validation_dataloader)\n",
"\n",
" avg_val_accuracy = total_eval_accuracy / len(validation_dataloader)\n",
" print(\" Accuracy: {0:.2f}\".format(avg_val_accuracy))\n",
" \n",
" validation_time = format_time(time.time() - t0)\n",
" print(\" Validation took: {:}\".format(validation_time))\n",
" print(\" Validation Loss: {0:.2f}\".format(avg_val_loss))\n",
"\n",
" training_stats.append(\n",
" {\n",
" 'epoch': epoch_i + 1,\n",
" 'Training Loss': avg_train_loss,\n",
" 'Training Accur.': avg_train_acc,\n",
" 'Valid. Loss': avg_val_loss,\n",
" 'Valid. Accur.': avg_val_accuracy,\n",
" 'Training Time': training_time,\n",
" 'Validation Time': validation_time\n",
" }\n",
" )\n",
"\n",
"print(\"\")\n",
"print(\"Training complete!\")\n",
"\n",
"print(\"Total training took {:} (h:mm:ss)\".format(format_time(time.time()-total_t0)))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "xsHxfslka1u5",
"outputId": "28c30ee0-6f41-4ede-eb3a-eebd4269c332"
},
"execution_count": 27,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\n",
"======== Epoch 1 / 4 ========\n",
"Training...\n",
" Batch 40 of 515. Elapsed: 0:00:46.\n",
" Batch 80 of 515. Elapsed: 0:01:30.\n",
" Batch 120 of 515. Elapsed: 0:02:14.\n",
" Batch 160 of 515. Elapsed: 0:02:59.\n",
" Batch 200 of 515. Elapsed: 0:03:44.\n",
" Batch 240 of 515. Elapsed: 0:04:28.\n",
" Batch 280 of 515. Elapsed: 0:05:13.\n",
" Batch 320 of 515. Elapsed: 0:05:57.\n",
" Batch 360 of 515. Elapsed: 0:06:42.\n",
" Batch 400 of 515. Elapsed: 0:07:26.\n",
" Batch 440 of 515. Elapsed: 0:08:11.\n",
" Batch 480 of 515. Elapsed: 0:08:55.\n",
"\n",
" Average training loss: 0.01\n",
" Average training acc: 0.59\n",
" Training epcoh took: 0:09:34\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.47\n",
" Validation took: 0:00:31\n",
" Validation Loss: 0.00\n",
"\n",
"======== Epoch 2 / 4 ========\n",
"Training...\n",
" Batch 40 of 515. Elapsed: 0:00:44.\n",
" Batch 80 of 515. Elapsed: 0:01:29.\n",
" Batch 120 of 515. Elapsed: 0:02:13.\n",
" Batch 160 of 515. Elapsed: 0:02:58.\n",
" Batch 200 of 515. Elapsed: 0:03:42.\n",
" Batch 240 of 515. Elapsed: 0:04:27.\n",
" Batch 280 of 515. Elapsed: 0:05:11.\n",
" Batch 320 of 515. Elapsed: 0:05:56.\n",
" Batch 360 of 515. Elapsed: 0:06:40.\n",
" Batch 400 of 515. Elapsed: 0:07:25.\n",
" Batch 440 of 515. Elapsed: 0:08:09.\n",
" Batch 480 of 515. Elapsed: 0:08:54.\n",
"\n",
" Average training loss: 0.00\n",
" Average training acc: 0.59\n",
" Training epcoh took: 0:09:32\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.46\n",
" Validation took: 0:00:31\n",
" Validation Loss: 0.00\n",
"\n",
"======== Epoch 3 / 4 ========\n",
"Training...\n",
" Batch 40 of 515. Elapsed: 0:00:44.\n",
" Batch 80 of 515. Elapsed: 0:01:34.\n",
" Batch 120 of 515. Elapsed: 0:02:20.\n",
" Batch 160 of 515. Elapsed: 0:03:05.\n",
" Batch 200 of 515. Elapsed: 0:03:49.\n",
" Batch 240 of 515. Elapsed: 0:04:34.\n",
" Batch 280 of 515. Elapsed: 0:05:18.\n",
" Batch 320 of 515. Elapsed: 0:06:03.\n",
" Batch 360 of 515. Elapsed: 0:06:47.\n",
" Batch 400 of 515. Elapsed: 0:07:32.\n",
" Batch 440 of 515. Elapsed: 0:08:16.\n",
" Batch 480 of 515. Elapsed: 0:09:00.\n",
"\n",
" Average training loss: 0.00\n",
" Average training acc: 0.59\n",
" Training epcoh took: 0:09:39\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.46\n",
" Validation took: 0:00:31\n",
" Validation Loss: 0.00\n",
"\n",
"======== Epoch 4 / 4 ========\n",
"Training...\n",
" Batch 40 of 515. Elapsed: 0:00:45.\n",
" Batch 80 of 515. Elapsed: 0:01:29.\n",
" Batch 120 of 515. Elapsed: 0:02:14.\n",
" Batch 160 of 515. Elapsed: 0:02:58.\n",
" Batch 200 of 515. Elapsed: 0:03:42.\n",
" Batch 240 of 515. Elapsed: 0:04:27.\n",
" Batch 280 of 515. Elapsed: 0:05:11.\n",
" Batch 320 of 515. Elapsed: 0:05:56.\n",
" Batch 360 of 515. Elapsed: 0:06:40.\n",
" Batch 400 of 515. Elapsed: 0:07:24.\n",
" Batch 440 of 515. Elapsed: 0:08:09.\n",
" Batch 480 of 515. Elapsed: 0:08:53.\n",
"\n",
" Average training loss: 0.00\n",
" Average training acc: 0.58\n",
" Training epcoh took: 0:09:32\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.46\n",
" Validation took: 0:00:31\n",
" Validation Loss: 0.00\n",
"\n",
"Training complete!\n",
"Total training took 0:40:22 (h:mm:ss)\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Train summary"
],
"metadata": {
"id": "xIpFPoRb91Or"
}
},
{
"cell_type": "code",
"source": [
"import pandas as pd\n",
"\n",
"pd.set_option('precision', 2)\n",
"df_stats = pd.DataFrame(data=training_stats)\n",
"\n",
"df_stats = df_stats.set_index('epoch')\n",
"df_stats"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
},
"id": "GjYqBrrO93Oh",
"outputId": "0087ee68-c017-41fd-db84-ca6e0d25fb12"
},
"execution_count": 28,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Training Loss Training Accur. Valid. Loss Valid. Accur. \\\n",
"epoch \n",
"1 5.27e-03 0.59 0.0 0.47 \n",
"2 2.74e-08 0.59 0.0 0.46 \n",
"3 1.58e-08 0.59 0.0 0.46 \n",
"4 1.55e-08 0.58 0.0 0.46 \n",
"\n",
" Training Time Validation Time \n",
"epoch \n",
"1 0:09:34 0:00:31 \n",
"2 0:09:32 0:00:31 \n",
"3 0:09:39 0:00:31 \n",
"4 0:09:32 0:00:31 "
],
"text/html": [
"\n",
" <div id=\"df-ca1b78cf-f532-4d4d-b437-30d6fbef7e05\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Training Loss</th>\n",
" <th>Training Accur.</th>\n",
" <th>Valid. Loss</th>\n",
" <th>Valid. Accur.</th>\n",
" <th>Training Time</th>\n",
" <th>Validation Time</th>\n",
" </tr>\n",
" <tr>\n",
" <th>epoch</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>5.27e-03</td>\n",
" <td>0.59</td>\n",
" <td>0.0</td>\n",
" <td>0.47</td>\n",
" <td>0:09:34</td>\n",
" <td>0:00:31</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2.74e-08</td>\n",
" <td>0.59</td>\n",
" <td>0.0</td>\n",
" <td>0.46</td>\n",
" <td>0:09:32</td>\n",
" <td>0:00:31</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1.58e-08</td>\n",
" <td>0.59</td>\n",
" <td>0.0</td>\n",
" <td>0.46</td>\n",
" <td>0:09:39</td>\n",
" <td>0:00:31</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1.55e-08</td>\n",
" <td>0.58</td>\n",
" <td>0.0</td>\n",
" <td>0.46</td>\n",
" <td>0:09:32</td>\n",
" <td>0:00:31</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-ca1b78cf-f532-4d4d-b437-30d6fbef7e05')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-ca1b78cf-f532-4d4d-b437-30d6fbef7e05 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-ca1b78cf-f532-4d4d-b437-30d6fbef7e05');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 28
}
]
},
{
"cell_type": "code",
"source": [
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"import seaborn as sns\n",
"\n",
"sns.set(style='darkgrid')\n",
"\n",
"sns.set(font_scale=1.5)\n",
"plt.rcParams[\"figure.figsize\"] = (12,6)\n",
"\n",
"plt.plot(df_stats['Training Loss'], 'b-o', label=\"Training\")\n",
"plt.plot(df_stats['Valid. Loss'], 'g-o', label=\"Validation\")\n",
"\n",
"plt.title(\"Training & Validation Loss\")\n",
"plt.xlabel(\"Epoch\")\n",
"plt.ylabel(\"Loss\")\n",
"plt.legend()\n",
"plt.xticks([1, 2, 3, 4])\n",
"\n",
"plt.show()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 427
},
"id": "Xk3gzkeU96v3",
"outputId": "aa447af5-09f3-4bc2-e234-8a74bba87c05"
},
"execution_count": 29,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
],
"image/png": "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
},
"metadata": {}
}
]
},
{
"cell_type": "markdown",
"source": [
"# Create test loader"
],
"metadata": {
"id": "UJlKxl0r-W-m"
}
},
{
"cell_type": "code",
"source": [
"prediction_dataloader = DataLoader(\n",
" test_dataset,\n",
" sampler = SequentialSampler(test_dataset),\n",
" batch_size = batch_size\n",
" )"
],
"metadata": {
"id": "eQGsEEDh-YxG"
},
"execution_count": 30,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Evaluate on test dataset"
],
"metadata": {
"id": "gHSDNWvA-aq9"
}
},
{
"cell_type": "code",
"source": [
"print('Predicting labels for {:,} test sentences...'.format(len(test_dataset)))\n",
"\n",
"model.eval()\n",
"predictions , true_labels = [], []\n",
"\n",
"for batch in prediction_dataloader:\n",
"\n",
" b_input_ids = batch[0].to(device)\n",
" b_input_mask = batch[1].to(device)\n",
" y = batch[2].to(device)\n",
" \n",
" with torch.no_grad(): \n",
"\n",
" generated_ids = model.generate(\n",
" input_ids = b_input_ids,\n",
" attention_mask = b_input_mask, \n",
" max_length=2, \n",
" num_beams=2,\n",
" repetition_penalty=2.5, \n",
" length_penalty=1.0, \n",
" early_stopping=True\n",
" )\n",
" \n",
" preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]\n",
" target = [tokenizer.decode(t, skip_special_tokens=True, clean_up_tokenization_spaces=True) for t in y]\n",
"\n",
" predictions.append(preds)\n",
" true_labels.append(target)\n",
"\n",
"print(' DONE.')"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "OPcQkHnJ-c9A",
"outputId": "768230ca-117a-423c-9e5d-058a63fa8838"
},
"execution_count": 31,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Predicting labels for 1,000 test sentences...\n",
" DONE.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"results_ok = 0\n",
"results_false = 0\n",
"for idx, true_labels_batch in enumerate(true_labels):\n",
" for bidx, true_label in enumerate(true_labels_batch):\n",
" if true_label == predictions[idx][bidx]:\n",
" results_ok += 1\n",
" else:\n",
" results_false += 1\n",
"\n",
"print(\"Correct predictions: {}, incorrect results: {}, accuracy: {}\".format(results_ok, results_false, float(results_ok) / (results_ok + results_false)))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ifz56jYW-zBN",
"outputId": "0d8585e1-c0d7-4cca-a0d9-2f1c0f3dd1a9"
},
"execution_count": 32,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Correct predictions: 431, incorrect results: 569, accuracy: 0.431\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"print(\"Sample prediction: {}, expected: {}\".format(predictions[2][0], true_labels[2][0]))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "1LqVo4wW-2g-",
"outputId": "f777b5ba-8c10-466b-c9be-d61382478d77"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Sample prediction: I, expected: true\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# MCC Score"
],
"metadata": {
"id": "dLYc9WXz_B1o"
}
},
{
"cell_type": "code",
"source": [
"from sklearn.metrics import matthews_corrcoef\n",
"\n",
"matthews_set = []\n",
"print('Calculating Matthews Corr. Coef. for each batch...')\n",
"\n",
"for i in range(len(true_labels)):\n",
" matthews = matthews_corrcoef(true_labels[i], predictions[i]) \n",
" matthews_set.append(matthews)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "hPEPpXXX_DXR",
"outputId": "215f4970-5e0d-4477-cf5b-95ec1b27317f"
},
"execution_count": 33,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Calculating Matthews Corr. Coef. for each batch...\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"ax = sns.barplot(x=list(range(len(matthews_set))), y=matthews_set, ci=None)\n",
"\n",
"plt.title('MCC Score per Batch')\n",
"plt.ylabel('MCC Score (-1 to +1)')\n",
"plt.xlabel('Batch #')\n",
"\n",
"plt.show()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 427
},
"id": "qjtAYcme_EyM",
"outputId": "00d36441-d6fb-4398-dad1-dfed14b8c7e6"
},
"execution_count": 34,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
],
"image/png": "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
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"flat_predictions = np.concatenate(predictions, axis=0)\n",
"flat_true_labels = np.concatenate(true_labels, axis=0)\n",
"\n",
"mcc = matthews_corrcoef(flat_true_labels, flat_predictions)\n",
"print('Total MCC: %.3f' % mcc)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "rkonN244_HPz",
"outputId": "cbf3d43c-f453-4146-ee38-58e45475aeb2"
},
"execution_count": 35,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Total MCC: -0.033\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Save model"
],
"metadata": {
"id": "GPhCp068_Iwq"
}
},
{
"cell_type": "code",
"source": [
"from google.colab import drive\n",
"\n",
"drive.mount('/content/gdrive/', force_remount=True)\n",
"\n",
"output_dir = '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model'\n",
"print(\"Saving model to %s\" % output_dir)\n",
"\n",
"model_to_save = model.module if hasattr(model, 'module') else model\n",
"model_to_save.save_pretrained(output_dir)\n",
"tokenizer.save_pretrained(output_dir)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "avafCMoS_KDF",
"outputId": "c1148369-1c8e-4448-de94-af6ea058c171"
},
"execution_count": 36,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/gdrive/\n",
"Saving model to /content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"('/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model/tokenizer_config.json',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model/special_tokens_map.json',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model/spiece.model',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model/added_tokens.json',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/FLAN-T5_Model/tokenizer.json')"
]
},
"metadata": {},
"execution_count": 36
}
]
},
{
"cell_type": "markdown",
"source": [
"# Bibliografia\n",
"- https://huggingface.co/docs/transformers/main/en/model_doc/flan-t5\n",
"- https://mccormickml.com/2019/07/22/BERT-fine-tuning/#a1-saving--loading-fine-tuned-model\n",
"- https://huggingface.co/docs/transformers/model_doc/t5#training"
],
"metadata": {
"id": "wHzm2_nDA6i-"
}
}
]
}