diff --git a/In_context_learning_Flan_T5.ipynb b/In_context_learning_Flan_T5.ipynb
new file mode 100644
index 0000000000..c0edf776ca
--- /dev/null
+++ b/In_context_learning_Flan_T5.ipynb
@@ -0,0 +1,4231 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyP4DY8IDISdvOlIhHc6et8O",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "44029e30ccbf43e18ddd086be85e2526": {
+ "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_23a6a2f391864e5fbee91eb1c5e43ec5",
+ "IPY_MODEL_78433004c9d6428fa78186dd61aa04a5",
+ "IPY_MODEL_2af77a7d1bd3482dbad3a735d6830837"
+ ],
+ "layout": "IPY_MODEL_0150777f386f46ac847aba4f7e66190f"
+ }
+ },
+ "23a6a2f391864e5fbee91eb1c5e43ec5": {
+ "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_b2069f7fa49d4e92aa9338f70355961d",
+ "placeholder": "",
+ "style": "IPY_MODEL_af7855cbf0a04e97b7b18ab093a1fdc0",
+ "value": "100%"
+ }
+ },
+ "78433004c9d6428fa78186dd61aa04a5": {
+ "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_90f586d4d27b4916ad120ac2724f19ba",
+ "max": 3,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_72d9e1aab07a4a5c9f4605461f0be602",
+ "value": 3
+ }
+ },
+ "2af77a7d1bd3482dbad3a735d6830837": {
+ "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_543a9dabe2af4e0cbe527209e7fa7ad4",
+ "placeholder": "",
+ "style": "IPY_MODEL_ff0381e7d36e41d38f59d35b5c37c2cd",
+ "value": " 3/3 [00:00<00:00, 103.01it/s]"
+ }
+ },
+ "0150777f386f46ac847aba4f7e66190f": {
+ "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
+ }
+ },
+ "b2069f7fa49d4e92aa9338f70355961d": {
+ "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
+ }
+ },
+ "af7855cbf0a04e97b7b18ab093a1fdc0": {
+ "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": ""
+ }
+ },
+ "90f586d4d27b4916ad120ac2724f19ba": {
+ "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
+ }
+ },
+ "72d9e1aab07a4a5c9f4605461f0be602": {
+ "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": ""
+ }
+ },
+ "543a9dabe2af4e0cbe527209e7fa7ad4": {
+ "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
+ }
+ },
+ "ff0381e7d36e41d38f59d35b5c37c2cd": {
+ "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": ""
+ }
+ },
+ "10d0c7c7f9ae482188c86a7cb902915c": {
+ "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_d0494a8371ae4eabb1f5a8c254f959b2",
+ "IPY_MODEL_74fe41b20dee404a9d872130baa14c70",
+ "IPY_MODEL_95265438d93b4325b43a80a148a1535a"
+ ],
+ "layout": "IPY_MODEL_1a4305867cea4c2eab700beea96d1f6f"
+ }
+ },
+ "d0494a8371ae4eabb1f5a8c254f959b2": {
+ "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_5d4682c248994c8cbc05c580f79d43a9",
+ "placeholder": "",
+ "style": "IPY_MODEL_6f55d1e5cc4d4ccb8e5ed5bf8769d5e5",
+ "value": "config.json: 100%"
+ }
+ },
+ "74fe41b20dee404a9d872130baa14c70": {
+ "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_d7533ed11e724bd78005a3ec18a188ff",
+ "max": 1404,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_4d540fa5c179406eab756b6d284a24d9",
+ "value": 1404
+ }
+ },
+ "95265438d93b4325b43a80a148a1535a": {
+ "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_e7a8e4625ffd488cbbcd48fd20bc7336",
+ "placeholder": "",
+ "style": "IPY_MODEL_725210892c41455f9f64b18fc954ccfa",
+ "value": " 1.40k/1.40k [00:00<00:00, 59.2kB/s]"
+ }
+ },
+ "1a4305867cea4c2eab700beea96d1f6f": {
+ "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
+ }
+ },
+ "5d4682c248994c8cbc05c580f79d43a9": {
+ "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
+ }
+ },
+ "6f55d1e5cc4d4ccb8e5ed5bf8769d5e5": {
+ "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": ""
+ }
+ },
+ "d7533ed11e724bd78005a3ec18a188ff": {
+ "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
+ }
+ },
+ "4d540fa5c179406eab756b6d284a24d9": {
+ "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": ""
+ }
+ },
+ "e7a8e4625ffd488cbbcd48fd20bc7336": {
+ "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
+ }
+ },
+ "725210892c41455f9f64b18fc954ccfa": {
+ "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": ""
+ }
+ },
+ "4bc21d19df4147e7a5792080b5e6e99c": {
+ "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_60a52ff990f54140b7d3f895773d75ef",
+ "IPY_MODEL_6a85958749344719bd478219e4852b12",
+ "IPY_MODEL_e942cbe6acad4be183b40789e6eca23f"
+ ],
+ "layout": "IPY_MODEL_fa3eabe60a6b42b98600fffde4abd158"
+ }
+ },
+ "60a52ff990f54140b7d3f895773d75ef": {
+ "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_69b084bccc294b58bdeaf7475c5259c6",
+ "placeholder": "",
+ "style": "IPY_MODEL_b7df6c569ec246229ceb2e8ebdd53abc",
+ "value": "model.safetensors: 100%"
+ }
+ },
+ "6a85958749344719bd478219e4852b12": {
+ "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_11fc67d7b0bc4c45aafff8054d507331",
+ "max": 990345061,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_6838c26d493241a0aafed02b8f1d1269",
+ "value": 990345061
+ }
+ },
+ "e942cbe6acad4be183b40789e6eca23f": {
+ "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_37dbff5e221f4d8d850edb31377c13e0",
+ "placeholder": "",
+ "style": "IPY_MODEL_9c1935de456a49f0b765340db75d3541",
+ "value": " 990M/990M [00:10<00:00, 97.1MB/s]"
+ }
+ },
+ "fa3eabe60a6b42b98600fffde4abd158": {
+ "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
+ }
+ },
+ "69b084bccc294b58bdeaf7475c5259c6": {
+ "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
+ }
+ },
+ "b7df6c569ec246229ceb2e8ebdd53abc": {
+ "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": ""
+ }
+ },
+ "11fc67d7b0bc4c45aafff8054d507331": {
+ "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
+ }
+ },
+ "6838c26d493241a0aafed02b8f1d1269": {
+ "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": ""
+ }
+ },
+ "37dbff5e221f4d8d850edb31377c13e0": {
+ "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
+ }
+ },
+ "9c1935de456a49f0b765340db75d3541": {
+ "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": ""
+ }
+ },
+ "a0307e4f15d649e89e6fbb1a1f55d15b": {
+ "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_2553d152205c43d9b7d0edc47cf3c5e8",
+ "IPY_MODEL_f3725546da824451a0461351dbb8f6ad",
+ "IPY_MODEL_c26aefed289f443fbc89e3c9cfc92bd5"
+ ],
+ "layout": "IPY_MODEL_0b79b30470154e02941b4cf447937e66"
+ }
+ },
+ "2553d152205c43d9b7d0edc47cf3c5e8": {
+ "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_c9834b5fcaec4c34a1f3f160d9602bef",
+ "placeholder": "",
+ "style": "IPY_MODEL_5275a4181ae84906860eddbbee6b5e9a",
+ "value": "generation_config.json: 100%"
+ }
+ },
+ "f3725546da824451a0461351dbb8f6ad": {
+ "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_b9f48de07c7e4ab4a9d9cb2133564289",
+ "max": 147,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d94b98175be5457b89852aa44d1227ad",
+ "value": 147
+ }
+ },
+ "c26aefed289f443fbc89e3c9cfc92bd5": {
+ "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_6cf4521dc7434d4d91f801dd6877905b",
+ "placeholder": "",
+ "style": "IPY_MODEL_73870d94dda94048a295eb1952018481",
+ "value": " 147/147 [00:00<00:00, 7.25kB/s]"
+ }
+ },
+ "0b79b30470154e02941b4cf447937e66": {
+ "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
+ }
+ },
+ "c9834b5fcaec4c34a1f3f160d9602bef": {
+ "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
+ }
+ },
+ "5275a4181ae84906860eddbbee6b5e9a": {
+ "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": ""
+ }
+ },
+ "b9f48de07c7e4ab4a9d9cb2133564289": {
+ "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
+ }
+ },
+ "d94b98175be5457b89852aa44d1227ad": {
+ "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": ""
+ }
+ },
+ "6cf4521dc7434d4d91f801dd6877905b": {
+ "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
+ }
+ },
+ "73870d94dda94048a295eb1952018481": {
+ "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": ""
+ }
+ },
+ "63724b101a924111b36e293385bd0efa": {
+ "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_33e574b50f7a44c4a6f19ec18bfc8906",
+ "IPY_MODEL_9725ed50d1934c988d1366b62cb28a0b",
+ "IPY_MODEL_3af3c307a01e4fd88dedef915acd4d96"
+ ],
+ "layout": "IPY_MODEL_8ede8c5cf48f4547a00a9be6947ca382"
+ }
+ },
+ "33e574b50f7a44c4a6f19ec18bfc8906": {
+ "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_0cb9efb607ee4e1e8e231790d6a0c263",
+ "placeholder": "",
+ "style": "IPY_MODEL_b52a516cd55044e38c2dbd3c2a6cf159",
+ "value": "tokenizer_config.json: 100%"
+ }
+ },
+ "9725ed50d1934c988d1366b62cb28a0b": {
+ "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_6a656d41681844dda6facdda2c97a7d8",
+ "max": 2537,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_73a9bd984f1a43f7bb35b43c42ddcf7e",
+ "value": 2537
+ }
+ },
+ "3af3c307a01e4fd88dedef915acd4d96": {
+ "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_8bdf37cf98af4391acbcbb7b54f74e4a",
+ "placeholder": "",
+ "style": "IPY_MODEL_07390990b7f346d885b2362724c19aa0",
+ "value": " 2.54k/2.54k [00:00<00:00, 91.0kB/s]"
+ }
+ },
+ "8ede8c5cf48f4547a00a9be6947ca382": {
+ "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
+ }
+ },
+ "0cb9efb607ee4e1e8e231790d6a0c263": {
+ "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
+ }
+ },
+ "b52a516cd55044e38c2dbd3c2a6cf159": {
+ "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": ""
+ }
+ },
+ "6a656d41681844dda6facdda2c97a7d8": {
+ "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
+ }
+ },
+ "73a9bd984f1a43f7bb35b43c42ddcf7e": {
+ "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": ""
+ }
+ },
+ "8bdf37cf98af4391acbcbb7b54f74e4a": {
+ "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
+ }
+ },
+ "07390990b7f346d885b2362724c19aa0": {
+ "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": ""
+ }
+ },
+ "d1b8916a7b884b6b894cf926e63df9db": {
+ "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_fcf0cb3f22a5409a83ce97ee45e2e0a1",
+ "IPY_MODEL_1c3fa0e375564ac0a408e4ca0d5ef3b2",
+ "IPY_MODEL_e27e6d65800945788c19a3fbdca6dd02"
+ ],
+ "layout": "IPY_MODEL_050cb9be495b40cc886a9013d8443962"
+ }
+ },
+ "fcf0cb3f22a5409a83ce97ee45e2e0a1": {
+ "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_b92442f8ce2a4038a79661cb598d8128",
+ "placeholder": "",
+ "style": "IPY_MODEL_ccf5242fce0e4aacb93a449205acc2b1",
+ "value": "spiece.model: 100%"
+ }
+ },
+ "1c3fa0e375564ac0a408e4ca0d5ef3b2": {
+ "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_c9ad898e3a2844dcb14b6d12d111af34",
+ "max": 791656,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_9cb6b1685e0945c687760276d6c81720",
+ "value": 791656
+ }
+ },
+ "e27e6d65800945788c19a3fbdca6dd02": {
+ "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_eb8109a9a1de49f49a69427fff3950ab",
+ "placeholder": "",
+ "style": "IPY_MODEL_5cf98a29202b431fac1e1a6f8fe2662e",
+ "value": " 792k/792k [00:00<00:00, 28.5MB/s]"
+ }
+ },
+ "050cb9be495b40cc886a9013d8443962": {
+ "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
+ }
+ },
+ "b92442f8ce2a4038a79661cb598d8128": {
+ "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
+ }
+ },
+ "ccf5242fce0e4aacb93a449205acc2b1": {
+ "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": ""
+ }
+ },
+ "c9ad898e3a2844dcb14b6d12d111af34": {
+ "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
+ }
+ },
+ "9cb6b1685e0945c687760276d6c81720": {
+ "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": ""
+ }
+ },
+ "eb8109a9a1de49f49a69427fff3950ab": {
+ "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
+ }
+ },
+ "5cf98a29202b431fac1e1a6f8fe2662e": {
+ "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": ""
+ }
+ },
+ "1c2d912e988c4681ba05c035dc7d8db3": {
+ "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_b5a46c91b6774679877770f2dab7c931",
+ "IPY_MODEL_4868f4f7f9f449a6813ae7dd208c5946",
+ "IPY_MODEL_e2f020a2a047488a997622bde2c5d866"
+ ],
+ "layout": "IPY_MODEL_f5be3c1bb1ed44a997117b780f6c7eb5"
+ }
+ },
+ "b5a46c91b6774679877770f2dab7c931": {
+ "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_45472ebe06b149dc8ae9c4448644d67f",
+ "placeholder": "",
+ "style": "IPY_MODEL_29a9bab815b1463cbda5fcc0c474a486",
+ "value": "tokenizer.json: 100%"
+ }
+ },
+ "4868f4f7f9f449a6813ae7dd208c5946": {
+ "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_a48e65e2507945e99be633d0e9614c35",
+ "max": 2424064,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_454bfcbcf8284ff9adbd1c2975b7dcde",
+ "value": 2424064
+ }
+ },
+ "e2f020a2a047488a997622bde2c5d866": {
+ "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_ec7f04a49cb84cdb929e2c380077c642",
+ "placeholder": "",
+ "style": "IPY_MODEL_d6fb7f51f6364e9e88014afcf7182ed5",
+ "value": " 2.42M/2.42M [00:00<00:00, 15.9MB/s]"
+ }
+ },
+ "f5be3c1bb1ed44a997117b780f6c7eb5": {
+ "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
+ }
+ },
+ "45472ebe06b149dc8ae9c4448644d67f": {
+ "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
+ }
+ },
+ "29a9bab815b1463cbda5fcc0c474a486": {
+ "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": ""
+ }
+ },
+ "a48e65e2507945e99be633d0e9614c35": {
+ "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
+ }
+ },
+ "454bfcbcf8284ff9adbd1c2975b7dcde": {
+ "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": ""
+ }
+ },
+ "ec7f04a49cb84cdb929e2c380077c642": {
+ "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
+ }
+ },
+ "d6fb7f51f6364e9e88014afcf7182ed5": {
+ "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": ""
+ }
+ },
+ "59eb8d3bb1204ea298a092cf41adb33e": {
+ "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_4b2872ccaf7d4acfbf1ab0ba50e54d13",
+ "IPY_MODEL_8f239572931c4f7498a6e809fba2266e",
+ "IPY_MODEL_d6c5c38ab6f841629c7e8b7811649b70"
+ ],
+ "layout": "IPY_MODEL_26bd543a463945688b2eac26c4bc4702"
+ }
+ },
+ "4b2872ccaf7d4acfbf1ab0ba50e54d13": {
+ "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_da03ba86a8194353a12ab1cc04a7f008",
+ "placeholder": "",
+ "style": "IPY_MODEL_14438647a8e648179c94d35f09fe61f4",
+ "value": "special_tokens_map.json: 100%"
+ }
+ },
+ "8f239572931c4f7498a6e809fba2266e": {
+ "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_511287443e8a45b38106f779a5873f0d",
+ "max": 2201,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_6f049ace8418405b94275c1607817298",
+ "value": 2201
+ }
+ },
+ "d6c5c38ab6f841629c7e8b7811649b70": {
+ "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_f5ee9a03603b43d5b3dd141622f5603e",
+ "placeholder": "",
+ "style": "IPY_MODEL_d2a6435769b942f58ae30d7adaf7fca2",
+ "value": " 2.20k/2.20k [00:00<00:00, 66.1kB/s]"
+ }
+ },
+ "26bd543a463945688b2eac26c4bc4702": {
+ "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
+ }
+ },
+ "da03ba86a8194353a12ab1cc04a7f008": {
+ "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
+ }
+ },
+ "14438647a8e648179c94d35f09fe61f4": {
+ "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": ""
+ }
+ },
+ "511287443e8a45b38106f779a5873f0d": {
+ "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
+ }
+ },
+ "6f049ace8418405b94275c1607817298": {
+ "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": ""
+ }
+ },
+ "f5ee9a03603b43d5b3dd141622f5603e": {
+ "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
+ }
+ },
+ "d2a6435769b942f58ae30d7adaf7fca2": {
+ "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",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [],
+ "metadata": {
+ "id": "e56VU6HIq3Ka"
+ },
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Install PIP"
+ ],
+ "metadata": {
+ "id": "M-wjsxptocRS"
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "63b2504a-5514-4062-ee02-abbcee95415f",
+ "id": "hdmhZJ9Mq3lg"
+ },
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Requirement already satisfied: pip in /usr/local/lib/python3.10/dist-packages (23.1.2)\n",
+ "Collecting pip\n",
+ " Downloading pip-24.0-py3-none-any.whl (2.1 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hInstalling collected packages: pip\n",
+ " Attempting uninstall: pip\n",
+ " Found existing installation: pip 23.1.2\n",
+ " Uninstalling pip-23.1.2:\n",
+ " Successfully uninstalled pip-23.1.2\n",
+ "Successfully installed pip-24.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "pip install --upgrade pip"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "pip install --disable-pip-version-check torch==1.13.1 torchdata==0.5.1 --quiet\n"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "71cbf183-37e9-4a5d-aa8d-81aca36549d8",
+ "id": "pKu2-Rvnq3lg"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m887.5/887.5 MB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.6/4.6 MB\u001b[0m \u001b[31m61.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m317.1/317.1 MB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.0/21.0 MB\u001b[0m \u001b[31m68.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m849.3/849.3 kB\u001b[0m \u001b[31m36.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m557.1/557.1 MB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
+ "torchaudio 2.1.0+cu121 requires torch==2.1.0, but you have torch 1.13.1 which is incompatible.\n",
+ "torchtext 0.16.0 requires torch==2.1.0, but you have torch 1.13.1 which is incompatible.\n",
+ "torchtext 0.16.0 requires torchdata==0.7.0, but you have torchdata 0.5.1 which is incompatible.\n",
+ "torchvision 0.16.0+cu121 requires torch==2.1.0, but you have torch 1.13.1 which is incompatible.\u001b[0m\u001b[31m\n",
+ "\u001b[0m\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
+ "\u001b[0m"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Install huggingface Transformer library"
+ ],
+ "metadata": {
+ "id": "1vgrN8OAni_R"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "pip install transformers==4.27.2 datasets==2.11.0 --quiet"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "32050499-5d73-4716-90f6-bf97865cbefb",
+ "id": "yybPZRypq3lh"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m106.7/106.7 kB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.8/6.8 MB\u001b[0m \u001b[31m12.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m468.7/468.7 kB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.5/110.5 kB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m11.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25h\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
+ "\u001b[0m"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Load the datasets, LLM, tokenizer, configurator"
+ ],
+ "metadata": {
+ "id": "i_6bD8-ini_R"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from datasets import load_dataset\n",
+ "from transformers import AutoModelForSeq2SeqLM\n",
+ "from transformers import AutoTokenizer\n",
+ "from transformers import GenerationConfig"
+ ],
+ "metadata": {
+ "id": "_5SkOIqDq3li"
+ },
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Loading DataSet\n",
+ "\n",
+ "Generating the summary of a dialogue with the pre-trained LLM Flan T5 from Huggingface. The list of available models in the HuggingFace *transformers* package can be found here:\n",
+ "\n",
+ "Upload simple dialogues from the Dialogsum huggingface dataset.\n",
+ "This contains 10000+dialogue and the corresponding manually labeled summaries and topics."
+ ],
+ "metadata": {
+ "id": "juuxoHVTq3li"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "huggingface_dataset_name = \"knkarthick/dialogsum\"\n",
+ "#public dataset from huggingface\n",
+ "dataset = load_dataset(huggingface_dataset_name)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 400,
+ "referenced_widgets": [
+ "68c28c1742f7450c9de3af45aced6677",
+ "5145046d92a745868aa9f4d3d6ef444c",
+ "450417826ff145af944ba5e0981dc186",
+ "eee74fdb99414c278bf64a35f89d79e4",
+ "5184f0953fec4b0eab916d0569071272",
+ "5809ba92c3854cf8a9307f6ca56c1130",
+ "bf2d6b6931104b2bba4f317a4a69c89f",
+ "bb0edb6277c14d1a99ef0c5e719a9884",
+ "1326ffc58fb549f28d46bd46e0915bad",
+ "0b51e1be4448432c957a1e9f468580e9",
+ "919513c69f1f4136a8fb8c79144cf6f1",
+ "1824e692beab4ab785b08273eddf656b",
+ "982e284d5a3a4264833619ff8da59561",
+ "f4e8af3ef869402f866c3d026e824070",
+ "a07211f1eef74714a65d8201e7dbad3d",
+ "e5e2bce7fe044dceb85b470dab48bbfd",
+ "2d6513c531b24065b4dc5c011933e2b6",
+ "ecac8966a4ff42428705437983365af5",
+ "63faf414efcd4ab7af57dee71285e95a",
+ "a50e2a590a9c4b4e822e77e7c14b9210",
+ "ea259b239daa4122bb0c948a7068637e",
+ "bea9df166b2242f982f0d7a2900ef0b8",
+ "10287267979944458b6a5d05a8cbc56d",
+ "05a45c533d5f49728cdfae3b66efd064",
+ "52ea511e35824a89be07c495b6e67ede",
+ "958b5a890cec4b5f83ac458ca334efe0",
+ "a059c3f0b68d40a69e6dbafd28b9e2e7",
+ "2cfe0fdad1c44246a9905efeab680f4d",
+ "fa94838c5260418789f66b5b76014bd4",
+ "11b09891164543f98b217b8b300a860e",
+ "1e00dec35eec4dbfa9049e35ff3457b2",
+ "13bacbd1766b496eb351b18c77c9768c",
+ "181372f8f02640be86d0e4e011789930",
+ "f3b7d5d348e045a9958555ca8a3b3517",
+ "f8d538b79406431aa5b09a2285315438",
+ "863f0ae59ca245a7a000ae597d83677e",
+ "d6439264aa524ee89ae6bf740a85c6cd",
+ "d1a0e7a9a8f64e0b9e15aa1102b2270f",
+ "a55f547153fe4a47bc816b91897aa50f",
+ "3ab2a38586b14de1b387c5fd48b0a576",
+ "5724bf07019047d8b2876bae5f71ca5f",
+ "9e2cbc580a8143cb98d93cc0a6744974",
+ "1700ee16339544c690cc23220b1ce6cd",
+ "f9fe4e6716f2471b8d988cb4f111fbaf",
+ "2a36ab75759142f69bef213d9bf3f19d",
+ "863562040174449d89de0e791511a191",
+ "0223629406ff455cbd2692340fa93fe1",
+ "0f473db6c85547c4bd11d12a01195b8e",
+ "34b93626700a4598a4d889cb6bec4da6",
+ "9ecbc216a7104ce7b78b9e043d59fc37",
+ "2b14a5810f7c441c9c6555c968b3a1bc",
+ "d1dd3da1af5e4b5ebf04b287816ab226",
+ "67256737db3b43a2bffd109c9d1ab55c",
+ "60403012a26b4964b7b70aa4a81cc732",
+ "5ef82221377f43208e4da4daf7b9f512",
+ "89bd1fb5ba6e400e9eca23d00bcd16fe",
+ "1dab76850a6e43a5bb87ef2604f60729",
+ "1fd3e6708e1c4f96ba32dd09b28a459f",
+ "222e2af11ba747c29baea612cd64ac6d",
+ "78286c0bce1d4a2fa626fca3f0035aa5",
+ "ea20aa830872477e92a10d8857cb1943",
+ "bc4b0b5e25d841aba43150e6cce46c4d",
+ "753990cbc9dc4e0db89837b08132e7d6",
+ "c359711f9d1f4d8dbe754ce1f27ed0dc",
+ "2cfddcb6ab504b688050bac65653f147",
+ "e87bd9798bd94a63b3189b6ff37afc17",
+ "f3c4bf14d7af4528a7c064948d6c25e0",
+ "b1fcd81a13cc4cc5acee947a4adf67b2",
+ "68d36b08170b42609a68865fb508c89b",
+ "12515eba763545a9a12f126c4002b156",
+ "6945a5317da74077a4602b6acb7430b1",
+ "dcf5c2916a784cb89961e7494d09726f",
+ "e441bf7ceb3e46cba4b1af5f53a3137a",
+ "302d6af3cd9c4693a46f2e4ab511b806",
+ "7aea9e9e898a450b8fef897577781326",
+ "387fc0ef4770440183ccaff7cf1b6908",
+ "4f65857c19ae425085622e8c80a89abe",
+ "be57056a32d142729d86a7e52962bb8b",
+ "bcfb640dd8784eb6a3a0466c59a1682e",
+ "128a52f50f624339851d592eb7a18b22",
+ "88f19faf63d54af28fa347514f328c46",
+ "7e1a87639ebd4ea6a3c21b5b4f957319",
+ "f3daf593ad004d428171c1c5a135bd27",
+ "e6e39ef65b2a4f1e8f9f6c8c2845b077",
+ "ba4c4a1ebcba46c1aff10020f7c6bb0d",
+ "84c4c905a7014f64aaf2453c830926f7",
+ "bb9fe0dd07ec4f61b5cd752a99bed3c3",
+ "b9da553854024b3e86eb9e085df409d6",
+ "cb5bfee27d8441fa90c45ce13150cd54",
+ "3441232503d04e2b835a55e3a6d461fb",
+ "3c5a2d82f5a14576956c5332ded3391d",
+ "7ba31624fdf548478e5f18dd907487a2",
+ "6ebd98d3baea49789a3a358f24dd3ec0",
+ "4234762181a94e12ace8966312ea282c",
+ "692e20840be74f6ea13429272f0547d2",
+ "ddde04c309454de5835d4b2a7e491266",
+ "da8ebe4c3894484abe7e7e34084a0f54",
+ "498fa591948348139014a2cc174df38d",
+ "2d540c262a2847248cb47c8ecde25c93",
+ "c5bda7b732af409ca1a77b674bca054f",
+ "922dcfe8f60242498c2448e2943c118f",
+ "0464f4ab18564cf4bf2c183742d39534",
+ "2445f6b711214404b4080aeced3de619",
+ "f801d7eb54224882a7c2407868bf1070",
+ "439bc2ae30274df99e4e96bd5eb33e51",
+ "d41fcf3295ce406794c502b8801953fb",
+ "6ec1414bcfc5484c83b2976753e90c12",
+ "5a862907ce7a4dd59288ab1ecde2e1df",
+ "200d37f07b3845bcb9cbc1f9ed213045",
+ "52d10c63fcde45b9881e4170ee98c293"
+ ]
+ },
+ "outputId": "6903e3cb-f054-4426-d0ab-defa16dde8c7",
+ "id": "tEPKQ_xmq3lj"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stderr",
+ "text": [
+ "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:88: UserWarning: \n",
+ "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
+ "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
+ "You will be able to reuse this secret in all of your notebooks.\n",
+ "Please note that authentication is recommended but still optional to access public models or datasets.\n",
+ " warnings.warn(\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Downloading readme: 0%| | 0.00/4.65k [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "68c28c1742f7450c9de3af45aced6677"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Downloading and preparing dataset csv/knkarthick--dialogsum to /root/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1...\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Downloading data files: 0%| | 0/3 [00:00, ?it/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "1824e692beab4ab785b08273eddf656b"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Downloading data: 0%| | 0.00/11.3M [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "10287267979944458b6a5d05a8cbc56d"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Downloading data: 0%| | 0.00/1.35M [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "f3b7d5d348e045a9958555ca8a3b3517"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Downloading data: 0%| | 0.00/442k [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "2a36ab75759142f69bef213d9bf3f19d"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Extracting data files: 0%| | 0/3 [00:00, ?it/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "89bd1fb5ba6e400e9eca23d00bcd16fe"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Generating train split: 0 examples [00:00, ? examples/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "f3c4bf14d7af4528a7c064948d6c25e0"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Generating test split: 0 examples [00:00, ? examples/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "be57056a32d142729d86a7e52962bb8b"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "Generating validation split: 0 examples [00:00, ? examples/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "cb5bfee27d8441fa90c45ce13150cd54"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1. Subsequent calls will reuse this data.\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ " 0%| | 0/3 [00:00, ?it/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "c5bda7b732af409ca1a77b674bca054f"
+ }
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Summarize Dialogue without prompt engineering\n",
+ "\n",
+ "Generating the summary of a dialogue with the pre-trained LLM Flan T5 from Huggingface. The list of available models in the HuggingFace *transformers* package can be found here:\n",
+ "\n",
+ "Upload simple dialogues from the Dialogsum huggingface dataset.\n",
+ "This contains 10000+dialogue and the corresponding manually labeled summaries and topics."
+ ],
+ "metadata": {
+ "id": "7tb6SBmWlLNn"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "huggingface_dataset_name = \"knkarthick/dialogsum\"\n",
+ "#public dataset from huggingface\n",
+ "dataset = load_dataset(huggingface_dataset_name)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 86,
+ "referenced_widgets": [
+ "44029e30ccbf43e18ddd086be85e2526",
+ "23a6a2f391864e5fbee91eb1c5e43ec5",
+ "78433004c9d6428fa78186dd61aa04a5",
+ "2af77a7d1bd3482dbad3a735d6830837",
+ "0150777f386f46ac847aba4f7e66190f",
+ "b2069f7fa49d4e92aa9338f70355961d",
+ "af7855cbf0a04e97b7b18ab093a1fdc0",
+ "90f586d4d27b4916ad120ac2724f19ba",
+ "72d9e1aab07a4a5c9f4605461f0be602",
+ "543a9dabe2af4e0cbe527209e7fa7ad4",
+ "ff0381e7d36e41d38f59d35b5c37c2cd"
+ ]
+ },
+ "id": "6tKoJh1oeLpk",
+ "outputId": "6bb6bf16-91e9-4d7b-f4f4-420406cd5fe9"
+ },
+ "execution_count": 24,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stderr",
+ "text": [
+ "WARNING:datasets.builder:Found cached dataset csv (/root/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1)\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ " 0%| | 0/3 [00:00, ?it/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "44029e30ccbf43e18ddd086be85e2526"
+ }
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "example_indices = [100,150]\n",
+ "#dash_line = '-'.join('' for x in range(100))\n",
+ "dash_line = '-'*100\n",
+ "for i, index in enumerate(example_indices):\n",
+ " print(dash_line)\n",
+ " print('Example ',i+1)\n",
+ " print(dash_line)\n",
+ " print('Input Dialogue:')\n",
+ " print(dataset['test'][index]['dialogue'])\n",
+ " print(dash_line)\n",
+ " print('Baseline human summary:')\n",
+ " print(dataset['test'][index]['summary'])\n",
+ " print(dash_line)\n",
+ " print()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "qNT_TZM6e0nA",
+ "outputId": "3de54549-2d7f-4281-e2d7-5400c84a1389"
+ },
+ "execution_count": 26,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 1\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: OK, that's a cut! Let's start from the beginning, everyone.\n",
+ "#Person2#: What was the problem that time?\n",
+ "#Person1#: The feeling was all wrong, Mike. She is telling you that she doesn't want to see you any more, but I want to get more anger from you. You're acting hurt and sad, but that's not how your character would act in this situation.\n",
+ "#Person2#: But Jason and Laura have been together for three years. Don't you think his reaction would be one of both anger and sadness?\n",
+ "#Person1#: At this point, no. I think he would react the way most guys would, and then later on, we would see his real feelings.\n",
+ "#Person2#: I'm not so sure about that.\n",
+ "#Person1#: Let's try it my way, and you can see how you feel when you're saying your lines. After that, if it still doesn't feel right, we can try something else.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# and Mike have a disagreement on how to act out a scene. #Person1# proposes that Mike can try to act in #Person1#'s way.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 2\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# takes a taxi to the Friendship Hotel for something important.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Load the FLAN T5 model"
+ ],
+ "metadata": {
+ "id": "VcDV2orcpukl"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "#load the Flan t5 model creating an instance of the AutoModelForSeq2SeqLM class with the from_pretrained method\n",
+ "model_name = 'google/flan-t5-base'\n",
+ "model = AutoModelForSeq2SeqLM.from_pretrained(model_name)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 113,
+ "referenced_widgets": [
+ "10d0c7c7f9ae482188c86a7cb902915c",
+ "d0494a8371ae4eabb1f5a8c254f959b2",
+ "74fe41b20dee404a9d872130baa14c70",
+ "95265438d93b4325b43a80a148a1535a",
+ "1a4305867cea4c2eab700beea96d1f6f",
+ "5d4682c248994c8cbc05c580f79d43a9",
+ "6f55d1e5cc4d4ccb8e5ed5bf8769d5e5",
+ "d7533ed11e724bd78005a3ec18a188ff",
+ "4d540fa5c179406eab756b6d284a24d9",
+ "e7a8e4625ffd488cbbcd48fd20bc7336",
+ "725210892c41455f9f64b18fc954ccfa",
+ "4bc21d19df4147e7a5792080b5e6e99c",
+ "60a52ff990f54140b7d3f895773d75ef",
+ "6a85958749344719bd478219e4852b12",
+ "e942cbe6acad4be183b40789e6eca23f",
+ "fa3eabe60a6b42b98600fffde4abd158",
+ "69b084bccc294b58bdeaf7475c5259c6",
+ "b7df6c569ec246229ceb2e8ebdd53abc",
+ "11fc67d7b0bc4c45aafff8054d507331",
+ "6838c26d493241a0aafed02b8f1d1269",
+ "37dbff5e221f4d8d850edb31377c13e0",
+ "9c1935de456a49f0b765340db75d3541",
+ "a0307e4f15d649e89e6fbb1a1f55d15b",
+ "2553d152205c43d9b7d0edc47cf3c5e8",
+ "f3725546da824451a0461351dbb8f6ad",
+ "c26aefed289f443fbc89e3c9cfc92bd5",
+ "0b79b30470154e02941b4cf447937e66",
+ "c9834b5fcaec4c34a1f3f160d9602bef",
+ "5275a4181ae84906860eddbbee6b5e9a",
+ "b9f48de07c7e4ab4a9d9cb2133564289",
+ "d94b98175be5457b89852aa44d1227ad",
+ "6cf4521dc7434d4d91f801dd6877905b",
+ "73870d94dda94048a295eb1952018481"
+ ]
+ },
+ "id": "MnwGm741f_LM",
+ "outputId": "99202033-20fb-48fd-d36f-8c2127e01070"
+ },
+ "execution_count": 10,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "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": "10d0c7c7f9ae482188c86a7cb902915c"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "model.safetensors: 0%| | 0.00/990M [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "4bc21d19df4147e7a5792080b5e6e99c"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "generation_config.json: 0%| | 0.00/147 [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "a0307e4f15d649e89e6fbb1a1f55d15b"
+ }
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Instantiate the Tokenizer for encode and decode"
+ ],
+ "metadata": {
+ "id": "LxLgE3Xnp1fl"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "#To perform encoding and decoding, we need to work with text in a tokenized form.\n",
+ "#Tokenization is the process of splitting texts into smaller units that can be\n",
+ "#processed by the LLM models\n",
+ "\n",
+ "#Download the tokenizer for the Flan-t5 model using transformer package AutoTokenizer.from_pretrained() method,\n",
+ "#Parameter use_fast switches on fast Tokenizer\n",
+ "tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 145,
+ "referenced_widgets": [
+ "63724b101a924111b36e293385bd0efa",
+ "33e574b50f7a44c4a6f19ec18bfc8906",
+ "9725ed50d1934c988d1366b62cb28a0b",
+ "3af3c307a01e4fd88dedef915acd4d96",
+ "8ede8c5cf48f4547a00a9be6947ca382",
+ "0cb9efb607ee4e1e8e231790d6a0c263",
+ "b52a516cd55044e38c2dbd3c2a6cf159",
+ "6a656d41681844dda6facdda2c97a7d8",
+ "73a9bd984f1a43f7bb35b43c42ddcf7e",
+ "8bdf37cf98af4391acbcbb7b54f74e4a",
+ "07390990b7f346d885b2362724c19aa0",
+ "d1b8916a7b884b6b894cf926e63df9db",
+ "fcf0cb3f22a5409a83ce97ee45e2e0a1",
+ "1c3fa0e375564ac0a408e4ca0d5ef3b2",
+ "e27e6d65800945788c19a3fbdca6dd02",
+ "050cb9be495b40cc886a9013d8443962",
+ "b92442f8ce2a4038a79661cb598d8128",
+ "ccf5242fce0e4aacb93a449205acc2b1",
+ "c9ad898e3a2844dcb14b6d12d111af34",
+ "9cb6b1685e0945c687760276d6c81720",
+ "eb8109a9a1de49f49a69427fff3950ab",
+ "5cf98a29202b431fac1e1a6f8fe2662e",
+ "1c2d912e988c4681ba05c035dc7d8db3",
+ "b5a46c91b6774679877770f2dab7c931",
+ "4868f4f7f9f449a6813ae7dd208c5946",
+ "e2f020a2a047488a997622bde2c5d866",
+ "f5be3c1bb1ed44a997117b780f6c7eb5",
+ "45472ebe06b149dc8ae9c4448644d67f",
+ "29a9bab815b1463cbda5fcc0c474a486",
+ "a48e65e2507945e99be633d0e9614c35",
+ "454bfcbcf8284ff9adbd1c2975b7dcde",
+ "ec7f04a49cb84cdb929e2c380077c642",
+ "d6fb7f51f6364e9e88014afcf7182ed5",
+ "59eb8d3bb1204ea298a092cf41adb33e",
+ "4b2872ccaf7d4acfbf1ab0ba50e54d13",
+ "8f239572931c4f7498a6e809fba2266e",
+ "d6c5c38ab6f841629c7e8b7811649b70",
+ "26bd543a463945688b2eac26c4bc4702",
+ "da03ba86a8194353a12ab1cc04a7f008",
+ "14438647a8e648179c94d35f09fe61f4",
+ "511287443e8a45b38106f779a5873f0d",
+ "6f049ace8418405b94275c1607817298",
+ "f5ee9a03603b43d5b3dd141622f5603e",
+ "d2a6435769b942f58ae30d7adaf7fca2"
+ ]
+ },
+ "id": "lF_ZSKcBjF5d",
+ "outputId": "4baa0645-03a9-4aa9-d91c-c773e2b11cf9"
+ },
+ "execution_count": 12,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "tokenizer_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": "63724b101a924111b36e293385bd0efa"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "spiece.model: 0%| | 0.00/792k [00:00, ?B/s]"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "d1b8916a7b884b6b894cf926e63df9db"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "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": "1c2d912e988c4681ba05c035dc7d8db3"
+ }
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "special_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": "59eb8d3bb1204ea298a092cf41adb33e"
+ }
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "#Test the AutoTokenizer instance for its encoding and decoding with a simple sentence\n",
+ "\n",
+ "dialogue = \"Hello Padma Thanumoorthy, How are you doing?\"\n",
+ "dialogue_encoded = tokenizer(dialogue, return_tensors='pt')\n",
+ "print('Encoded Dialogue: ')\n",
+ "print(dialogue_encoded)\n",
+ "dialogue_decoded = tokenizer.decode(dialogue_encoded['input_ids'][0],\n",
+ " skip_special_tokens=True)\n",
+ "\n",
+ "print(dash_line)\n",
+ "print('Encoded Dialogue Tensor: Weighted numbers of vector embeddings')\n",
+ "print(dialogue_encoded['input_ids'][0])\n",
+ "print(dash_line)\n",
+ "print('Decoded Dialogue: ')\n",
+ "print(dialogue_decoded)\n",
+ "print(dash_line)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "C8ecfjZGkgMx",
+ "outputId": "9dff611a-5c1f-49ab-f887-9590da57fee2"
+ },
+ "execution_count": 13,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Encoded Dialogue: \n",
+ "{'input_ids': tensor([[ 8774, 10683, 51, 9, 19224, 76, 21477, 189, 63, 6,\n",
+ " 571, 33, 25, 692, 58, 1]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])}\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Encoded Dialogue Tensor: Weighted numbers of vector embeddings\n",
+ "tensor([ 8774, 10683, 51, 9, 19224, 76, 21477, 189, 63, 6,\n",
+ " 571, 33, 25, 692, 58, 1])\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Decoded Dialogue: \n",
+ "Hello Padma Thanumoorthy, How are you doing?\n",
+ "----------------------------------------------------------------------------------------------------\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "Now its time to explore how well the base FM LLM summarizes a dialogue withiut any prompt enigneering.\n",
+ "\n",
+ "Prompt Engineering is an act of a human changing the prommpt (input) to improve the response for a given task"
+ ],
+ "metadata": {
+ "id": "5xHg1yKIZluL"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "for i, index in enumerate(example_indices):\n",
+ " dialogue = dataset['test'][index]['dialogue']\n",
+ " summary = dataset['test'][index]['summary']\n",
+ "\n",
+ " inputs = tokenizer(dialogue, return_tensors='pt')\n",
+ " output = tokenizer.decode(\n",
+ " model.generate(inputs['input_ids'], max_new_tokens=50)[0],\n",
+ " skip_special_tokens=True)\n",
+ "\n",
+ " print(dash_line)\n",
+ " print('Example ',i+1)\n",
+ " print(dash_line)\n",
+ " print('Input Dialogue:')\n",
+ " print(dialogue)\n",
+ " print(dash_line)\n",
+ " print('Baseline human summary:')\n",
+ " print(summary)\n",
+ " print(dash_line)\n",
+ " print('Model generation without prompt engineering:')\n",
+ " print(output)\n",
+ " print()\n"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Z70np0euuuKW",
+ "outputId": "798f0db9-c60a-47b8-9941-4c698277c351"
+ },
+ "execution_count": 27,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 1\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: OK, that's a cut! Let's start from the beginning, everyone.\n",
+ "#Person2#: What was the problem that time?\n",
+ "#Person1#: The feeling was all wrong, Mike. She is telling you that she doesn't want to see you any more, but I want to get more anger from you. You're acting hurt and sad, but that's not how your character would act in this situation.\n",
+ "#Person2#: But Jason and Laura have been together for three years. Don't you think his reaction would be one of both anger and sadness?\n",
+ "#Person1#: At this point, no. I think he would react the way most guys would, and then later on, we would see his real feelings.\n",
+ "#Person2#: I'm not so sure about that.\n",
+ "#Person1#: Let's try it my way, and you can see how you feel when you're saying your lines. After that, if it still doesn't feel right, we can try something else.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# and Mike have a disagreement on how to act out a scene. #Person1# proposes that Mike can try to act in #Person1#'s way.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Model generation without prompt engineering:\n",
+ "#Person1#: I'm sorry, but I'm not sure what Jason and Laura are doing.\n",
+ "\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 2\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# takes a taxi to the Friendship Hotel for something important.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Model generation without prompt engineering:\n",
+ "The taxi driver will pick you up at the Friendship Hotel at 20 yuan.\n",
+ "\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Summarize Dialogue with an Instruction Prompt\n",
+ "\n",
+ "Prompt Engineering is an important concept in using Foundation Models for text generation.\n",
+ "\n",
+ "1. Zero Shot inference with an instruction prompt\n",
+ "\n",
+ "in order to instruct the model to perform a task - summarize a dialogue - take the dialogue and convert that into an instruction prompt. This is called Zero Shot Inference.\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "metadata": {
+ "id": "LyQoL1nl3WX4"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Zero Shot Inference"
+ ],
+ "metadata": {
+ "id": "C2jiLjFZbtOB"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "for i, index in enumerate(example_indices):\n",
+ " dialogue = dataset['test'][index]['dialogue']\n",
+ " summary = dataset['test'][index]['summary']\n",
+ "\n",
+ " prompt = f\"\"\"\n",
+ " Summarize the following conversation.\n",
+ " {dialogue}\n",
+ "\n",
+ " Summary:\n",
+ " \"\"\"\n",
+ "\n",
+ " inputs = tokenizer(prompt, return_tensors='pt')\n",
+ " output = tokenizer.decode(\n",
+ " model.generate(inputs['input_ids'], max_new_tokens=50)[0],\n",
+ " skip_special_tokens=True)\n",
+ "\n",
+ " print(dash_line)\n",
+ " print('Example ',i+1)\n",
+ " print(dash_line)\n",
+ " print('Input Dialogue:')\n",
+ " print(dialogue)\n",
+ " print(dash_line)\n",
+ " print('Baseline human summary:')\n",
+ " print(summary)\n",
+ " print(dash_line)\n",
+ " print('Model generation with Zero Shot inference prompt engineering:')\n",
+ " print(output)\n",
+ " print()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "XGJEvbS52Bsh",
+ "outputId": "53ccad66-c1d7-4f12-8472-10d936c7339e"
+ },
+ "execution_count": 28,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 1\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: OK, that's a cut! Let's start from the beginning, everyone.\n",
+ "#Person2#: What was the problem that time?\n",
+ "#Person1#: The feeling was all wrong, Mike. She is telling you that she doesn't want to see you any more, but I want to get more anger from you. You're acting hurt and sad, but that's not how your character would act in this situation.\n",
+ "#Person2#: But Jason and Laura have been together for three years. Don't you think his reaction would be one of both anger and sadness?\n",
+ "#Person1#: At this point, no. I think he would react the way most guys would, and then later on, we would see his real feelings.\n",
+ "#Person2#: I'm not so sure about that.\n",
+ "#Person1#: Let's try it my way, and you can see how you feel when you're saying your lines. After that, if it still doesn't feel right, we can try something else.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# and Mike have a disagreement on how to act out a scene. #Person1# proposes that Mike can try to act in #Person1#'s way.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Model generation with Zero Shot inference prompt engineering:\n",
+ "The cut is over.\n",
+ "\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 2\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# takes a taxi to the Friendship Hotel for something important.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Model generation with Zero Shot inference prompt engineering:\n",
+ "The taxi will pick up Person1 at Friendship Hotel.\n",
+ "\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# One Shot Inference."
+ ],
+ "metadata": {
+ "id": "3CPLxUe0bxQc"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "def make_prompt(example_indices_full, example_index_to_summarize):\n",
+ " prompt = ''\n",
+ " for index in example_indices_full:\n",
+ " dialogue = dataset['test'][index]['dialogue']\n",
+ " summary = dataset['test'][index]['summary']\n",
+ "\n",
+ " prompt += f\"\"\"\n",
+ " Dialogue:\n",
+ " {dialogue}\n",
+ "\n",
+ " What was going on?\n",
+ " {summary}\n",
+ " \"\"\"\n",
+ " dialogue = dataset['test'][example_index_to_summarize]['dialogue']\n",
+ "\n",
+ " prompt += f\"\"\"\n",
+ " Dialogue:\n",
+ " {dialogue}\n",
+ "\n",
+ " What was going on?\n",
+ " \"\"\"\n",
+ " return prompt"
+ ],
+ "metadata": {
+ "id": "-XK6VgWV6tdx"
+ },
+ "execution_count": 31,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "example_indices_full = [100]\n",
+ "\n",
+ "example_index_to_summarize = 150\n",
+ "\n",
+ "one_shot_prompt = make_prompt(example_indices_full, example_index_to_summarize)\n",
+ "\n",
+ "print(one_shot_prompt)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "TeZ5-TbN9Aff",
+ "outputId": "5e22783b-cf37-4fcc-d185-d4ac65829dc5"
+ },
+ "execution_count": 33,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\n",
+ " Dialogue:\n",
+ " #Person1#: OK, that's a cut! Let's start from the beginning, everyone.\n",
+ "#Person2#: What was the problem that time?\n",
+ "#Person1#: The feeling was all wrong, Mike. She is telling you that she doesn't want to see you any more, but I want to get more anger from you. You're acting hurt and sad, but that's not how your character would act in this situation.\n",
+ "#Person2#: But Jason and Laura have been together for three years. Don't you think his reaction would be one of both anger and sadness?\n",
+ "#Person1#: At this point, no. I think he would react the way most guys would, and then later on, we would see his real feelings.\n",
+ "#Person2#: I'm not so sure about that.\n",
+ "#Person1#: Let's try it my way, and you can see how you feel when you're saying your lines. After that, if it still doesn't feel right, we can try something else.\n",
+ "\n",
+ " What was going on?\n",
+ " #Person1# and Mike have a disagreement on how to act out a scene. #Person1# proposes that Mike can try to act in #Person1#'s way.\n",
+ " \n",
+ " Dialogue:\n",
+ " #Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "\n",
+ " What was going on?\n",
+ " \n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "dialogue = dataset['test'][example_index_to_summarize]['dialogue']\n",
+ "summary = dataset['test'][example_index_to_summarize]['summary']\n",
+ "\n",
+ "inputs = tokenizer(one_shot_prompt, return_tensors='pt')\n",
+ "output = tokenizer.decode(\n",
+ " model.generate(inputs['input_ids'], max_new_tokens=50)[0],\n",
+ " skip_special_tokens=True)\n",
+ "\n",
+ "print(dash_line)\n",
+ "print('Example ',i+1)\n",
+ "print(dash_line)\n",
+ "print('Input Dialogue:')\n",
+ "print(dialogue)\n",
+ "print(dash_line)\n",
+ "print(\"Baseline human summary:\")\n",
+ "print(summary)\n",
+ "print(dash_line)\n",
+ "print('Model generation with a One Shot inference prompt engineering:')\n",
+ "print(output)\n",
+ "print(dash_line)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Nr2-p_e__krG",
+ "outputId": "c7c50064-2c01-4768-edea-9f41cde5e5e5"
+ },
+ "execution_count": 34,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 2\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# takes a taxi to the Friendship Hotel for something important.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Model generation with a One Shot inference prompt engineering:\n",
+ "The taxi driver will pick up Person1 at Friendship Hotel at 20 yuan.\n",
+ "----------------------------------------------------------------------------------------------------\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Few Shot Inference"
+ ],
+ "metadata": {
+ "id": "LIFUlbmnbk1S"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "example_indices_full = [100,200]\n",
+ "\n",
+ "example_index_to_summarize = 150\n",
+ "\n",
+ "one_shot_prompt = make_prompt(example_indices_full, example_index_to_summarize)\n",
+ "\n",
+ "print(one_shot_prompt)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "-1_EEEGkRbia",
+ "outputId": "f1d72854-a874-408d-d278-7a6677ccc631"
+ },
+ "execution_count": 35,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\n",
+ " Dialogue:\n",
+ " #Person1#: OK, that's a cut! Let's start from the beginning, everyone.\n",
+ "#Person2#: What was the problem that time?\n",
+ "#Person1#: The feeling was all wrong, Mike. She is telling you that she doesn't want to see you any more, but I want to get more anger from you. You're acting hurt and sad, but that's not how your character would act in this situation.\n",
+ "#Person2#: But Jason and Laura have been together for three years. Don't you think his reaction would be one of both anger and sadness?\n",
+ "#Person1#: At this point, no. I think he would react the way most guys would, and then later on, we would see his real feelings.\n",
+ "#Person2#: I'm not so sure about that.\n",
+ "#Person1#: Let's try it my way, and you can see how you feel when you're saying your lines. After that, if it still doesn't feel right, we can try something else.\n",
+ "\n",
+ " What was going on?\n",
+ " #Person1# and Mike have a disagreement on how to act out a scene. #Person1# proposes that Mike can try to act in #Person1#'s way.\n",
+ " \n",
+ " Dialogue:\n",
+ " #Person1#: Have you considered upgrading your system?\n",
+ "#Person2#: Yes, but I'm not sure what exactly I would need.\n",
+ "#Person1#: You could consider adding a painting program to your software. It would allow you to make up your own flyers and banners for advertising.\n",
+ "#Person2#: That would be a definite bonus.\n",
+ "#Person1#: You might also want to upgrade your hardware because it is pretty outdated now.\n",
+ "#Person2#: How can we do that?\n",
+ "#Person1#: You'd probably need a faster processor, to begin with. And you also need a more powerful hard disc, more memory and a faster modem. Do you have a CD-ROM drive?\n",
+ "#Person2#: No.\n",
+ "#Person1#: Then you might want to add a CD-ROM drive too, because most new software programs are coming out on Cds.\n",
+ "#Person2#: That sounds great. Thanks.\n",
+ "\n",
+ " What was going on?\n",
+ " #Person1# teaches #Person2# how to upgrade software and hardware in #Person2#'s system.\n",
+ " \n",
+ " Dialogue:\n",
+ " #Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "\n",
+ " What was going on?\n",
+ " \n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "dialogue = dataset['test'][example_index_to_summarize]['dialogue']\n",
+ "summary = dataset['test'][example_index_to_summarize]['summary']\n",
+ "\n",
+ "inputs = tokenizer(one_shot_prompt, return_tensors='pt')\n",
+ "output = tokenizer.decode(\n",
+ " model.generate(inputs['input_ids'], max_new_tokens=50)[0],\n",
+ " skip_special_tokens=True)\n",
+ "\n",
+ "print(dash_line)\n",
+ "print('Example ',i+1)\n",
+ "print(dash_line)\n",
+ "print('Input Dialogue:')\n",
+ "print(dialogue)\n",
+ "print(dash_line)\n",
+ "print(\"Baseline human summary:\")\n",
+ "print(summary)\n",
+ "print(dash_line)\n",
+ "print('Model generation with a One Shot inference prompt engineering:')\n",
+ "print(output)\n",
+ "print(dash_line)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "XPdyhMdpb8JE",
+ "outputId": "813220f2-2852-4f05-cd9d-26e66bcf2ef7"
+ },
+ "execution_count": 37,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example 2\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "#Person1#: Taxi!\n",
+ "#Person2#: Where will you go, sir?\n",
+ "#Person1#: Friendship Hotel.\n",
+ "#Person2#: OK, it's not far from here.\n",
+ "#Person1#: I have something important to do, can you fast the speed?\n",
+ "#Person2#: Sure, I'll try my best. Here we are.\n",
+ "#Person1#: It's fast! How much should I pay you?\n",
+ "#Person2#: The reading on the meter is 15 yuan.\n",
+ "#Person1#: Here's 20 yuan, keep the change.\n",
+ "#Person2#: Thank you very much.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Baseline human summary:\n",
+ "#Person1# takes a taxi to the Friendship Hotel for something important.\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Model generation with a One Shot inference prompt engineering:\n",
+ "The taxi driver will take Person1 to Friendship Hotel at a speed of 15 yuan.\n",
+ "----------------------------------------------------------------------------------------------------\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "----------------------------------------------------------------------------------------------------\n",
+ "Example\n",
+ "----------------------------------------------------------------------------------------------------\n",
+ "Input Dialogue:\n",
+ "\n",
+ "Person1#: Taxi!\n",
+ "\n",
+ "Person2#: Where will you go, sir?\n",
+ "\n",
+ "Person1#: Friendship Hotel.\n",
+ "\n",
+ "Person2#: OK, it's not far from here.\n",
+ "\n",
+ "Person1#: I have something important to do, can you fast the speed?\n",
+ "\n",
+ "Person2#: Sure, I'll try my best. Here we are.\n",
+ "\n",
+ "Person1#: It's fast! How much should I pay you?\n",
+ "\n",
+ "Person2#: The reading on the meter is 15 yuan.\n",
+ "\n",
+ "Person1#: Here's 20 yuan, keep the change.\n",
+ "\n",
+ "Person2#: Thank you very much.\n",
+ "\n",
+ "--------------------------------------\n",
+ "\n",
+ "Baseline human summary:\n",
+ "\n",
+ "Person1 takes a taxi to the Friendship Hotel for something important.\n",
+ "\n",
+ "---------------------------------------\n",
+ "\n",
+ "Model generation without prompt engineering:\n",
+ "\n",
+ "The taxi driver will pick you up at the Friendship Hotel at 20 yuan.\n",
+ "\n",
+ "---------------------------------------\n",
+ "\n",
+ "Model generation with a Zero Shot inference prompt engineering:\n",
+ "\n",
+ "The taxi will pick up Person1 at Friendship Hotel.\n",
+ "\n",
+ "---------------------------------------\n",
+ "\n",
+ "Model generation with a One Shot inference prompt engineering:\n",
+ "\n",
+ "The taxi driver will pick up Person1 at Friendship Hotel at 20 yuan.\n",
+ "\n",
+ "---------------------------------------\n",
+ "\n",
+ "Model generation with a Two Shot inference prompt engineering:\n",
+ "\n",
+ "The taxi driver will take Person1 to Friendship Hotel at a speed of 15 yuan.\n",
+ "\n",
+ "---------------------------------------"
+ ],
+ "metadata": {
+ "id": "bFwZUUHicX-N"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [],
+ "metadata": {
+ "id": "X-hJM9FicFja"
+ },
+ "execution_count": null,
+ "outputs": []
+ }
+ ]
+}
\ No newline at end of file
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: