{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [], "toc_visible": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" }, "accelerator": "GPU", "gpuClass": "standard", "widgets": { "application/vnd.jupyter.widget-state+json": { "9570c3dea757457a94bfd2d9875d8d04": { "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_4a4a34cb45d1464686fda8212e1767ce", "IPY_MODEL_574de132db6a4aad9a14592d72216bd6", "IPY_MODEL_9c3a0c6b08d242608492abfabbf0888e" ], "layout": "IPY_MODEL_1aca1130e6774ebc9f5990d40014cd3c" } }, "4a4a34cb45d1464686fda8212e1767ce": { "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_a23c64e3dc984530b0a0bc5a9b62076d", "placeholder": "​", "style": "IPY_MODEL_e8c48b4c2e2f44939fb9b29822a640ca", "value": "100%" } }, "574de132db6a4aad9a14592d72216bd6": { "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_1c656bc2f8d04653bf0dd128e030040b", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_d248e7799cce4e4891c84d3179937057", "value": 1 } }, "9c3a0c6b08d242608492abfabbf0888e": { "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_a02f0a246c224065b90daf6316620c0c", "placeholder": "​", "style": "IPY_MODEL_4e192190a34d43c98813285f09b06d22", "value": " 1/1 [00:00<00:00, 26.35it/s]" } }, "1aca1130e6774ebc9f5990d40014cd3c": { "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 } }, "a23c64e3dc984530b0a0bc5a9b62076d": { "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 } }, "e8c48b4c2e2f44939fb9b29822a640ca": { "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": "" } }, "1c656bc2f8d04653bf0dd128e030040b": { "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 } }, "d248e7799cce4e4891c84d3179937057": { "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": "" } }, "a02f0a246c224065b90daf6316620c0c": { "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 } }, "4e192190a34d43c98813285f09b06d22": { "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": "" } }, "9790774db5a14adfa2317cdc86d89550": { "model_module": "@jupyter-widgets/controls", "model_name": "VBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "VBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "VBoxView", "box_style": "", "children": [ "IPY_MODEL_e0beac7ce8ba4533ba1b68f4cbf19c87", "IPY_MODEL_4eb8e01a06164be38f26abe32bee38ae", "IPY_MODEL_81273f4eacb14b6eab57615ca12f0335", "IPY_MODEL_82bd823207764b23a74699e33409267c", "IPY_MODEL_030e7704a107460a80e6297fc89d9095" ], "layout": "IPY_MODEL_b231f4cd606343e8bf21faaee6d6ef00" } }, "e0beac7ce8ba4533ba1b68f4cbf19c87": { "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_3e3c69ad66ed4162b7ae3e9eae66ff61", "placeholder": "​", "style": "IPY_MODEL_79f3cdbb195344db941af4ca9752f800", "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" } }, "4eb8e01a06164be38f26abe32bee38ae": { "model_module": "@jupyter-widgets/controls", "model_name": "PasswordModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "PasswordModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "PasswordView", "continuous_update": true, "description": "Token:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_3ca95791ca9148a3ba7651be2261dd0c", "placeholder": "​", "style": "IPY_MODEL_36c4c87a01d9412a920c644bde98a3ca", "value": "" } }, "81273f4eacb14b6eab57615ca12f0335": { "model_module": "@jupyter-widgets/controls", "model_name": "CheckboxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "CheckboxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "CheckboxView", "description": "Add token as git credential?", "description_tooltip": null, "disabled": false, "indent": true, "layout": "IPY_MODEL_182629fdf88d472985adc14951c5350b", "style": "IPY_MODEL_378926c667e1484d976e8bec577a178a", "value": true } }, "82bd823207764b23a74699e33409267c": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Login", "disabled": false, "icon": "", "layout": "IPY_MODEL_6baae6f5acc64ed59c5ef4f6cd732857", "style": "IPY_MODEL_23f512514ceb4e15bbfb882596775cc5", "tooltip": "" } }, "030e7704a107460a80e6297fc89d9095": { "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_fe3c67bb451047b6ba082464f4989cb4", "placeholder": "​", "style": "IPY_MODEL_dd2c77d146bb4bef8e9168a577beab64", "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " } }, "b231f4cd606343e8bf21faaee6d6ef00": { "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": "center", "align_self": null, "border": null, "bottom": null, "display": "flex", "flex": null, "flex_flow": "column", "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": "50%" } }, "3e3c69ad66ed4162b7ae3e9eae66ff61": { "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 } }, "79f3cdbb195344db941af4ca9752f800": { "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": "" } }, "3ca95791ca9148a3ba7651be2261dd0c": { "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 } }, "36c4c87a01d9412a920c644bde98a3ca": { "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": "" } }, "182629fdf88d472985adc14951c5350b": { "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 } }, "378926c667e1484d976e8bec577a178a": { "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": "" } }, "6baae6f5acc64ed59c5ef4f6cd732857": { "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 } }, "23f512514ceb4e15bbfb882596775cc5": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "fe3c67bb451047b6ba082464f4989cb4": { "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 } }, "dd2c77d146bb4bef8e9168a577beab64": { "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": "" } }, "6750ae8ba9c04927bb582c61152aa7cf": { "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_5c03ea44ef984f3fb3faa34168b17cf0", "IPY_MODEL_2ddb54d1e9c847cf902714560d813813", "IPY_MODEL_773793b250ca400d82dc7fc9a411dabc" ], "layout": "IPY_MODEL_61060479693544968928e60a7bfa0ab4" } }, "5c03ea44ef984f3fb3faa34168b17cf0": { "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_d083ac19d0174255874e668dd784bff7", "placeholder": "​", "style": "IPY_MODEL_c0f2ef3f2d034af3a068055588facb2a", "value": "100%" } }, "2ddb54d1e9c847cf902714560d813813": { "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_75188aab5b534c3381f5909a1d59d571", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_d61ce8ed5b7843268d4f069ee8a4e031", "value": 1 } }, "773793b250ca400d82dc7fc9a411dabc": { "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_f3a1c33528e846a5bd9f729ba99a4b8e", "placeholder": "​", "style": "IPY_MODEL_034a0e7da5b04b0ea35ad12708d418c5", "value": " 1/1 [00:00<00:00, 7.17it/s]" } }, "61060479693544968928e60a7bfa0ab4": { "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 } }, "d083ac19d0174255874e668dd784bff7": { "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 } }, "c0f2ef3f2d034af3a068055588facb2a": { "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": "" } }, "75188aab5b534c3381f5909a1d59d571": { "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 } }, "d61ce8ed5b7843268d4f069ee8a4e031": { "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": "" } }, "f3a1c33528e846a5bd9f729ba99a4b8e": { "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 } }, "034a0e7da5b04b0ea35ad12708d418c5": { "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": "" } }, "eb44dc6924764c64a0069bb671be5d37": { "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_ce55de87df3440868f64fb3f1fbd0477", "IPY_MODEL_42cdb0eb66d740beb6f7a722cd03d178", "IPY_MODEL_3a724042026641f2a70c9e4c89dcf46f" ], "layout": "IPY_MODEL_9d05dd285eff44188c22e7255ff07597" } }, "ce55de87df3440868f64fb3f1fbd0477": { "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_44174db7d3ff43f6b9f86ee7d45be747", "placeholder": "​", "style": "IPY_MODEL_63eb2d3606a34ff9b3bd6ecf00af29e0", "value": "Loading checkpoint shards: 100%" } }, "42cdb0eb66d740beb6f7a722cd03d178": { "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_94461329fb9c4d0cac78a2048209116a", "max": 33, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_69e1db285e3b4b01834486c94866dc9b", "value": 33 } }, "3a724042026641f2a70c9e4c89dcf46f": { "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_52c3a666fdd9458b8c4fac05063dc226", "placeholder": "​", "style": "IPY_MODEL_c2f218f10f4d4ba88a95dc7b9f836c6d", "value": " 33/33 [00:59<00:00, 1.93s/it]" } }, "9d05dd285eff44188c22e7255ff07597": { "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 } }, "44174db7d3ff43f6b9f86ee7d45be747": { "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 } }, "63eb2d3606a34ff9b3bd6ecf00af29e0": { "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": "" } }, "94461329fb9c4d0cac78a2048209116a": { "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 } }, "69e1db285e3b4b01834486c94866dc9b": { "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": "" } }, "52c3a666fdd9458b8c4fac05063dc226": { "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 } }, "c2f218f10f4d4ba88a95dc7b9f836c6d": { "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": "" } }, "6b0d5f34f06142e38097ff23a9bbf7c5": { "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_8b9e32d8a4824cbea8793149d19c75bc", "IPY_MODEL_e0840eb98ed3401d8be87e9bb6ba1966", "IPY_MODEL_7d5d3340fd224d1bb0b5a25f156a3bff" ], "layout": "IPY_MODEL_176cc62f43774007b2dce873be628915" } }, "8b9e32d8a4824cbea8793149d19c75bc": { "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_072a489e7af145d5927ab5becd0bdfc0", "placeholder": "​", "style": "IPY_MODEL_ddb6d7a3328b4884ae6b688b23f58acd", "value": "Map: 100%" } }, "e0840eb98ed3401d8be87e9bb6ba1966": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_09c14023b1474e2fbd8636718b71b0f4", "max": 52002, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_68b95f4eb32942809309b312926707cf", "value": 52002 } }, "7d5d3340fd224d1bb0b5a25f156a3bff": { "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_ded666847dc748ed930bbb0b938b1eb6", "placeholder": "​", "style": "IPY_MODEL_496e34386d2b4c7880aa2c98790813d4", "value": " 51945/52002 [01:19<00:00, 819.91 examples/s]" } }, "176cc62f43774007b2dce873be628915": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": "hidden", "width": null } }, "072a489e7af145d5927ab5becd0bdfc0": { "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 } }, "ddb6d7a3328b4884ae6b688b23f58acd": { "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": "" } }, "09c14023b1474e2fbd8636718b71b0f4": { "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 } }, "68b95f4eb32942809309b312926707cf": { "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": "" } }, "ded666847dc748ed930bbb0b938b1eb6": { "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 } }, "496e34386d2b4c7880aa2c98790813d4": { "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": "" } }, "d558193dc34240a0a0028c879f9d3a91": { "model_module": "@jupyter-widgets/controls", "model_name": "VBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "VBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "VBoxView", "box_style": "", "children": [ "IPY_MODEL_56e90084a870402ea765c75e59785c33", "IPY_MODEL_196842b67f6b4451b33916ad1a3f4d54", "IPY_MODEL_cd6752ed8360412485f27ff74c7dc86c", "IPY_MODEL_7f6031d9d88f47f0a35093e806c1f51d", "IPY_MODEL_ce6986c036e84106940c6de7104da2d6" ], "layout": "IPY_MODEL_b905d63ad7854f5bb5f5027fc73b0a3e" } }, "56e90084a870402ea765c75e59785c33": { "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_4d62895b900846aba9b687a24999bb05", "placeholder": "​", "style": "IPY_MODEL_b2910f3dbda449d99db9c46331cfb955", "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" } }, "196842b67f6b4451b33916ad1a3f4d54": { "model_module": "@jupyter-widgets/controls", "model_name": "PasswordModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "PasswordModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "PasswordView", "continuous_update": true, "description": "Token:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_961ae75617764743a12cb03965bc3e6a", "placeholder": "​", "style": "IPY_MODEL_0e72536f08d14c80a80fdd685d2be848", "value": "" } }, "cd6752ed8360412485f27ff74c7dc86c": { "model_module": "@jupyter-widgets/controls", "model_name": "CheckboxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "CheckboxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "CheckboxView", "description": "Add token as git credential?", "description_tooltip": null, "disabled": false, "indent": true, "layout": "IPY_MODEL_9379a6e8d7694b988e8b514639c21498", "style": "IPY_MODEL_43510cb3cdb84281ab5f80214b09fadf", "value": true } }, "7f6031d9d88f47f0a35093e806c1f51d": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Login", "disabled": false, "icon": "", "layout": "IPY_MODEL_9d89147fe1004a369a588f28341c761b", "style": "IPY_MODEL_d5d6fbcc101e402e9b7882f43beadb87", "tooltip": "" } }, "ce6986c036e84106940c6de7104da2d6": { "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_4981580665644cd39a92c99ef460e676", "placeholder": "​", "style": "IPY_MODEL_edd70dce7d3944d1812057c3650d2c5a", "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " } }, "b905d63ad7854f5bb5f5027fc73b0a3e": { "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": "center", "align_self": null, "border": null, "bottom": null, "display": "flex", "flex": null, "flex_flow": "column", "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": "50%" } }, "4d62895b900846aba9b687a24999bb05": { "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 } }, "b2910f3dbda449d99db9c46331cfb955": { "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": "" } }, "961ae75617764743a12cb03965bc3e6a": { "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 } }, "0e72536f08d14c80a80fdd685d2be848": { "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": "" } }, "9379a6e8d7694b988e8b514639c21498": { "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 } }, "43510cb3cdb84281ab5f80214b09fadf": { "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": "" } }, "9d89147fe1004a369a588f28341c761b": { "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 } }, "d5d6fbcc101e402e9b7882f43beadb87": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "4981580665644cd39a92c99ef460e676": { "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 } }, "edd70dce7d3944d1812057c3650d2c5a": { "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": "" } }, "8b7ad87c92604c2fbbe084a9bcb798cf": { "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_c8a6a08fb64c40e384a29ef2b8b572d4", "IPY_MODEL_544fe145cd9f4d16b9e765d4c9fae159", "IPY_MODEL_85721f7b94a74ddd89d4b76f614f011b" ], "layout": "IPY_MODEL_85164250cb064eeb800e910d108bff89" } }, "c8a6a08fb64c40e384a29ef2b8b572d4": { "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_acb3eaef4ac34e86a994799c106b4321", "placeholder": "​", "style": "IPY_MODEL_bc9ee26d49ea4b76991a8318dadcb4f9", "value": "adapter_model.bin: 100%" } }, "544fe145cd9f4d16b9e765d4c9fae159": { "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_8cc6bca9441a46489edae8f059da4838", "max": 16822989, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_70ac6f5efd32410caa0a84e57701f15e", "value": 16822989 } }, "85721f7b94a74ddd89d4b76f614f011b": { "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_fdf719ae121c48dcade058669ae65286", "placeholder": "​", "style": "IPY_MODEL_5a42640e9c23406db8d732677eeeafde", "value": " 16.8M/16.8M [00:02<00:00, 19.3MB/s]" } }, "85164250cb064eeb800e910d108bff89": { "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 } }, "acb3eaef4ac34e86a994799c106b4321": { "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 } }, "bc9ee26d49ea4b76991a8318dadcb4f9": { "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": "" } }, "8cc6bca9441a46489edae8f059da4838": { "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 } }, "70ac6f5efd32410caa0a84e57701f15e": { "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": "" } }, "fdf719ae121c48dcade058669ae65286": { "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 } }, "5a42640e9c23406db8d732677eeeafde": { "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": "" } }, "3179ba4cdf624e5282d131fbe88e8763": { "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_24ef46fccd6744958b56fa290d733815", "IPY_MODEL_6db176d8394942e788f5c58544a91c61", "IPY_MODEL_34be4197ebff417681e41d4a98418582" ], "layout": "IPY_MODEL_d732a799f8dd438c946b2385ff431049" } }, "24ef46fccd6744958b56fa290d733815": { "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_66622d01018f4c80bd9a910853687136", "placeholder": "​", "style": "IPY_MODEL_5189de40e84c4e029362c5033aec01bd", "value": "Upload 1 LFS files: 100%" } }, "6db176d8394942e788f5c58544a91c61": { "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_b563b008da534df5b5604927ae3ac434", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_6b0e98decd6a4875b4bca6fed36aa5ba", "value": 1 } }, "34be4197ebff417681e41d4a98418582": { "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_6e65437ddb264b7999d661b093a7ec9e", "placeholder": "​", "style": "IPY_MODEL_e6b59602e3834b419a0bcef8cc39a8d9", "value": " 1/1 [00:02<00:00, 2.35s/it]" } }, "d732a799f8dd438c946b2385ff431049": { "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 } }, "66622d01018f4c80bd9a910853687136": { "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 } }, "5189de40e84c4e029362c5033aec01bd": { "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": "" } }, "b563b008da534df5b5604927ae3ac434": { "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 } }, "6b0e98decd6a4875b4bca6fed36aa5ba": { "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": "" } }, "6e65437ddb264b7999d661b093a7ec9e": { "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 } }, "e6b59602e3834b419a0bcef8cc39a8d9": { "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": "" } }, "d3bd784fdd634acaa3c10c0d0edf63b7": { "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_b8f32ea8169943c1a725c9e9a5aac65a", "IPY_MODEL_c233e719c7a04c15b1776f768fabebd3", "IPY_MODEL_28c237d79cbb4eb08882a6f99a5c4ec0" ], "layout": "IPY_MODEL_7b3fdcd220b74459b44428c9d384c4c8" } }, "b8f32ea8169943c1a725c9e9a5aac65a": { "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_1b281bea604e4e1e989c2a53a04dd442", "placeholder": "​", "style": "IPY_MODEL_4b85a0ea70c14b9c87301eb335066759", "value": "Loading checkpoint shards: 100%" } }, "c233e719c7a04c15b1776f768fabebd3": { "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_b0267b1334134d6c82eed48ecd1ce784", "max": 33, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_1e89d6537f614a1b975a4ad5df1751a5", "value": 33 } }, "28c237d79cbb4eb08882a6f99a5c4ec0": { "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_d1523fe13d5f4daaaebc8811a1623c2e", "placeholder": "​", "style": "IPY_MODEL_f705370f708d48b8b27f4b1f50e60cf6", "value": " 33/33 [00:59<00:00, 1.92s/it]" } }, "7b3fdcd220b74459b44428c9d384c4c8": { "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 } }, "1b281bea604e4e1e989c2a53a04dd442": { "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 } }, "4b85a0ea70c14b9c87301eb335066759": { "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": "" } }, "b0267b1334134d6c82eed48ecd1ce784": { "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 } }, "1e89d6537f614a1b975a4ad5df1751a5": { "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": "" } }, "d1523fe13d5f4daaaebc8811a1623c2e": { "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 } }, "f705370f708d48b8b27f4b1f50e60cf6": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } } } } }, "cells": [ { "cell_type": "markdown", "source": [ "# **Instruction Fine-tuning** of Alpaca 🦙 on Arabic\n", "link to **Alpaca Native** Repository -> https://github.com/tatsu-lab/stanford_alpaca" ], "metadata": { "id": "PWbH02FBHO7N" } }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "JMR47nI6qRSb" }, "outputs": [], "source": [ "#Preparing the environement\n", "!pip install -q datasets\n", "!pip install -q loralib\n", "!pip install -q sentencepiece\n", "!pip install -q git+https://github.com/huggingface/transformers.git\n", "# transformers from source\n", "!pip install git+https://github.com/huggingface/transformers -q\n", "!pip install -q accelerate\n", "!pip install -q bitsandbytes\n", "!pip install -q git+https://github.com/huggingface/peft.git" ] }, { "cell_type": "markdown", "source": [ "## Importing and Pre-processing the Dataset from 🦙's github repo\n", "> https://github.com/tatsu-lab/stanford_alpaca/blob/main/alpaca_data.json" ], "metadata": { "id": "JITGbfVR9wv3" } }, { "cell_type": "code", "source": [ "!wget https://raw.githubusercontent.com/tatsu-lab/stanford_alpaca/main/alpaca_data.json" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "wESPzTExLKnW", "outputId": "2431a043-0db7-4c2b-cfb1-40d1483ba75c" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "--2023-03-18 20:10:45-- https://raw.githubusercontent.com/tatsu-lab/stanford_alpaca/main/alpaca_data.json\n", "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n", "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n", "HTTP request sent, awaiting response... 200 OK\n", "Length: 22773992 (22M) [text/plain]\n", "Saving to: ‘alpaca_data.json’\n", "\n", "alpaca_data.json 100%[===================>] 21.72M --.-KB/s in 0.1s \n", "\n", "2023-03-18 20:10:47 (192 MB/s) - ‘alpaca_data.json’ saved [22773992/22773992]\n", "\n" ] } ] }, { "cell_type": "markdown", "source": [ "> Translation task on the dataset using **GoogleTrans** package" ], "metadata": { "id": "qpSGejtMoPZc" } }, { "cell_type": "code", "source": [ "from datasets import load_dataset\n", "import pandas as pd\n", "import numpy as np" ], "metadata": { "id": "g-LRgwOEWwYy" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "data = load_dataset(\"json\", data_files=\"/content/alpaca_data.json\")" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 86, "referenced_widgets": [ "9570c3dea757457a94bfd2d9875d8d04", "4a4a34cb45d1464686fda8212e1767ce", "574de132db6a4aad9a14592d72216bd6", "9c3a0c6b08d242608492abfabbf0888e", "1aca1130e6774ebc9f5990d40014cd3c", "a23c64e3dc984530b0a0bc5a9b62076d", "e8c48b4c2e2f44939fb9b29822a640ca", "1c656bc2f8d04653bf0dd128e030040b", "d248e7799cce4e4891c84d3179937057", "a02f0a246c224065b90daf6316620c0c", "4e192190a34d43c98813285f09b06d22" ] }, "id": "6pEmNVyGWJHN", "outputId": "bdde2c01-81f6-4383-f12c-751dea557228" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "WARNING:datasets.builder:Found cached dataset json (/root/.cache/huggingface/datasets/json/default-36797aee22f11a11/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51)\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ " 0%| | 0/1 [00:00=1.3 in /usr/local/lib/python3.9/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (1.5.0)\n", "Requirement already satisfied: httpcore==0.9.* in /usr/local/lib/python3.9/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (0.9.1)\n", "Requirement already satisfied: certifi in /usr/local/lib/python3.9/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (2022.12.7)\n", "Requirement already satisfied: chardet==3.* in /usr/lib/python3/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (3.0.4)\n", "Requirement already satisfied: sniffio in /usr/local/lib/python3.9/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (1.3.0)\n", "Requirement already satisfied: hstspreload in /usr/local/lib/python3.9/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (2023.1.1)\n", "Requirement already satisfied: idna==2.* in /usr/local/lib/python3.9/dist-packages (from httpx==0.13.3->googletrans==3.1.0a0) (2.10)\n", "Requirement already satisfied: h11<0.10,>=0.8 in /usr/local/lib/python3.9/dist-packages (from httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) (0.9.0)\n", "Requirement already satisfied: h2==3.* in /usr/local/lib/python3.9/dist-packages (from httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) (3.2.0)\n", "Requirement already satisfied: hpack<4,>=3.0 in /usr/local/lib/python3.9/dist-packages (from h2==3.*->httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) (3.0.0)\n", "Requirement already satisfied: hyperframe<6,>=5.2.0 in /usr/local/lib/python3.9/dist-packages (from h2==3.*->httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) (5.2.0)\n", "Building wheels for collected packages: googletrans\n", " Building wheel for googletrans (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for googletrans: filename=googletrans-3.1.0a0-py3-none-any.whl size=16368 sha256=f0ad04a622f36020a3dd8bc89f67bad753c5a77249776687ad2442605107dcf4\n", " Stored in directory: /root/.cache/pip/wheels/ae/e1/6c/5137bc3f35aa130deea71575e165cc4f4f0680a88f3d90a636\n", "Successfully built googletrans\n", "Installing collected packages: googletrans\n", " Attempting uninstall: googletrans\n", " Found existing installation: googletrans 3.0.0\n", " Uninstalling googletrans-3.0.0:\n", " Successfully uninstalled googletrans-3.0.0\n", "Successfully installed googletrans-3.1.0a0\n" ] }, { "output_type": "display_data", "data": { "application/vnd.colab-display-data+json": { "pip_warning": { "packages": [ "googletrans" ] } } }, "metadata": {} } ] }, { "cell_type": "code", "source": [ "from googletrans import Translator" ], "metadata": { "id": "jEiivaAwYcqW" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "> Little sample output" ], "metadata": { "id": "LL6yRVyf_-u5" } }, { "cell_type": "code", "source": [ "translator = Translator()\n", "translations = translator.translate(['the lazy dog'],dest='ko')\n", "for translation in translations:\n", " print(translation.origin, ' -> ', translation.text)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "he3BH-acYogg", "outputId": "fdc6aa6c-01d5-4d72-fe4f-dd23225fd5f3" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "the lazy dog -> 게으른 개\n" ] } ] }, { "cell_type": "code", "source": [ "def translate_doc(example):\n", " texts = example['input'] + example['instruction'] + example['output']\n", " print(texts)\n", " return {\"input\":[e.text for e in translator.translate(example['input'], dest='ar',)],\n", " \"instruction\":[e.text for e in translator.translate(example['instruction'], dest='ar',)],\n", " \"output\":[e.text for e in translator.translate(example['output'], dest='ar',)]}" ], "metadata": { "id": "L9VTFCbrW8gy" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "# pandas load 3 xlsx files\n", "df1 = pd.read_excel(\"alpaca_data1.xlsx\")\n", "df2 = pd.read_excel(\"alpaca_data2.xlsx\")\n", "df3 = pd.read_excel(\"alpaca_data3.xlsx\")\n", "\n", "# concat 3 xlsx files\n", "df = pd.concat([df1, df2, df3])" ], "metadata": { "id": "Mvgu6jKUcOyi" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "df" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 423 }, "id": "VcitmyKwkfA_", "outputId": "a40b2ae5-51b5-452f-b30f-77bd1d26748b" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Unnamed: 0 تعليمات \\\n", "0 0 أعط ثلاث نصائح للبقاء بصحة جيدة. \n", "1 1 ما هي الألوان الثلاثة الأساسية؟ \n", "2 2 صف بنية الذرة. \n", "3 3 كيف يمكننا تقليل تلوث الهواء؟ \n", "4 4 صف وقتًا كان عليك فيه اتخاذ قرار صعب. \n", "... ... ... \n", "17329 51997 قم بإنشاء مثال لما يجب أن ترغب فيه السيرة الذ... \n", "17330 51998 رتب العناصر الواردة أدناه بالترتيب لإكمال الجم... \n", "17331 51999 اكتب فقرة تمهيدية عن شخص مشهور. \n", "17332 52000 قم بإنشاء قائمة من خمسة أشياء يجب على المرء أ... \n", "17333 52001 قم بتحليل الوثيقة القانونية المقدمة واشرح الن... \n", "\n", " مدخل \\\n", "0 NaN \n", "1 NaN \n", "2 NaN \n", "3 NaN \n", "4 NaN \n", "... ... \n", "17329 NaN \n", "17330 كعكة لي الأكل \n", "17331 ميشيل أوباما \n", "17332 NaN \n", "17333 ما يلي مقتطف من عقد بين طرفين ، بعنوان \"الشرك... \n", "\n", " انتاج \n", "0 1- تناول نظامًا غذائيًا متوازنًا وتأكد من تنا... \n", "1 الألوان الثلاثة الأساسية هي الأحمر والأزرق وا... \n", "2 تتكون الذرة من نواة تحتوي على البروتونات والن... \n", "3 هناك عدد من الطرق للحد من تلوث الهواء ، مثل ال... \n", "4 كان علي أن أتخذ قرارًا صعبًا عندما كنت أعمل كم... \n", "... ... \n", "17329 جين تريمين \\ n1234 Main Street، Anytown، CA 98... \n", "17330 أنا آكل الكعكة. \n", "17331 ميشيل أوباما امرأة ملهمة ارتقت إلى مستوى التح... \n", "17332 1. ابحث عن الفرص المحتملة وفكر مليًا في الخيار... \n", "17333 تنص هذه الوثيقة القانونية على أن الشركة \"أ\" وا... \n", "\n", "[52002 rows x 4 columns]" ], "text/html": [ "\n", "
\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Unnamed: 0تعليماتمدخلانتاج
00أعط ثلاث نصائح للبقاء بصحة جيدة.NaN1- تناول نظامًا غذائيًا متوازنًا وتأكد من تنا...
11ما هي الألوان الثلاثة الأساسية؟NaNالألوان الثلاثة الأساسية هي الأحمر والأزرق وا...
22صف بنية الذرة.NaNتتكون الذرة من نواة تحتوي على البروتونات والن...
33كيف يمكننا تقليل تلوث الهواء؟NaNهناك عدد من الطرق للحد من تلوث الهواء ، مثل ال...
44صف وقتًا كان عليك فيه اتخاذ قرار صعب.NaNكان علي أن أتخذ قرارًا صعبًا عندما كنت أعمل كم...
...............
1732951997قم بإنشاء مثال لما يجب أن ترغب فيه السيرة الذ...NaNجين تريمين \\ n1234 Main Street، Anytown، CA 98...
1733051998رتب العناصر الواردة أدناه بالترتيب لإكمال الجم...كعكة لي الأكلأنا آكل الكعكة.
1733151999اكتب فقرة تمهيدية عن شخص مشهور.ميشيل أوباماميشيل أوباما امرأة ملهمة ارتقت إلى مستوى التح...
1733252000قم بإنشاء قائمة من خمسة أشياء يجب على المرء أ...NaN1. ابحث عن الفرص المحتملة وفكر مليًا في الخيار...
1733352001قم بتحليل الوثيقة القانونية المقدمة واشرح الن...ما يلي مقتطف من عقد بين طرفين ، بعنوان \"الشرك...تنص هذه الوثيقة القانونية على أن الشركة \"أ\" وا...
\n", "

52002 rows × 4 columns

\n", "
\n", " \n", " \n", " \n", "\n", " \n", "
\n", "
\n", " " ] }, "metadata": {}, "execution_count": 44 } ] }, { "cell_type": "code", "source": [ "import numpy as np" ], "metadata": { "id": "lptbaKYukwyD" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "df.drop([\"Unnamed: 0\"],axis =1,inplace=True)\n", "df = df.replace(np.nan,'')" ], "metadata": { "id": "sIZ_YEeqlLo2" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "df" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 423 }, "id": "6P1h2JzXlA1K", "outputId": "b4d412f2-ffa3-40b3-d8f2-e13159039802" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " تعليمات \\\n", "0 أعط ثلاث نصائح للبقاء بصحة جيدة. \n", "1 ما هي الألوان الثلاثة الأساسية؟ \n", "2 صف بنية الذرة. \n", "3 كيف يمكننا تقليل تلوث الهواء؟ \n", "4 صف وقتًا كان عليك فيه اتخاذ قرار صعب. \n", "... ... \n", "17329 قم بإنشاء مثال لما يجب أن ترغب فيه السيرة الذ... \n", "17330 رتب العناصر الواردة أدناه بالترتيب لإكمال الجم... \n", "17331 اكتب فقرة تمهيدية عن شخص مشهور. \n", "17332 قم بإنشاء قائمة من خمسة أشياء يجب على المرء أ... \n", "17333 قم بتحليل الوثيقة القانونية المقدمة واشرح الن... \n", "\n", " مدخل \\\n", "0 \n", "1 \n", "2 \n", "3 \n", "4 \n", "... ... \n", "17329 \n", "17330 كعكة لي الأكل \n", "17331 ميشيل أوباما \n", "17332 \n", "17333 ما يلي مقتطف من عقد بين طرفين ، بعنوان \"الشرك... \n", "\n", " انتاج \n", "0 1- تناول نظامًا غذائيًا متوازنًا وتأكد من تنا... \n", "1 الألوان الثلاثة الأساسية هي الأحمر والأزرق وا... \n", "2 تتكون الذرة من نواة تحتوي على البروتونات والن... \n", "3 هناك عدد من الطرق للحد من تلوث الهواء ، مثل ال... \n", "4 كان علي أن أتخذ قرارًا صعبًا عندما كنت أعمل كم... \n", "... ... \n", "17329 جين تريمين \\ n1234 Main Street، Anytown، CA 98... \n", "17330 أنا آكل الكعكة. \n", "17331 ميشيل أوباما امرأة ملهمة ارتقت إلى مستوى التح... \n", "17332 1. ابحث عن الفرص المحتملة وفكر مليًا في الخيار... \n", "17333 تنص هذه الوثيقة القانونية على أن الشركة \"أ\" وا... \n", "\n", "[52002 rows x 3 columns]" ], "text/html": [ "\n", "
\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
تعليماتمدخلانتاج
0أعط ثلاث نصائح للبقاء بصحة جيدة.1- تناول نظامًا غذائيًا متوازنًا وتأكد من تنا...
1ما هي الألوان الثلاثة الأساسية؟الألوان الثلاثة الأساسية هي الأحمر والأزرق وا...
2صف بنية الذرة.تتكون الذرة من نواة تحتوي على البروتونات والن...
3كيف يمكننا تقليل تلوث الهواء؟هناك عدد من الطرق للحد من تلوث الهواء ، مثل ال...
4صف وقتًا كان عليك فيه اتخاذ قرار صعب.كان علي أن أتخذ قرارًا صعبًا عندما كنت أعمل كم...
............
17329قم بإنشاء مثال لما يجب أن ترغب فيه السيرة الذ...جين تريمين \\ n1234 Main Street، Anytown، CA 98...
17330رتب العناصر الواردة أدناه بالترتيب لإكمال الجم...كعكة لي الأكلأنا آكل الكعكة.
17331اكتب فقرة تمهيدية عن شخص مشهور.ميشيل أوباماميشيل أوباما امرأة ملهمة ارتقت إلى مستوى التح...
17332قم بإنشاء قائمة من خمسة أشياء يجب على المرء أ...1. ابحث عن الفرص المحتملة وفكر مليًا في الخيار...
17333قم بتحليل الوثيقة القانونية المقدمة واشرح الن...ما يلي مقتطف من عقد بين طرفين ، بعنوان \"الشرك...تنص هذه الوثيقة القانونية على أن الشركة \"أ\" وا...
\n", "

52002 rows × 3 columns

\n", "
\n", " \n", " \n", " \n", "\n", " \n", "
\n", "
\n", " " ] }, "metadata": {}, "execution_count": 50 } ] }, { "cell_type": "code", "source": [ "from datasets import Dataset, load_dataset\n", "# dataset = Dataset.from_pandas(df)" ], "metadata": { "id": "5DgROl4Zlg_z" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "dataset = dataset.rename_column(\" انتاج\",'output')\n", "dataset = dataset.rename_column(\" مدخل\",'input')\n", "dataset = dataset.rename_column(\"تعليمات\",'instruction') " ], "metadata": { "id": "3op3pLehluuy" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "dataset = dataset.remove_columns('__index_level_0__')" ], "metadata": { "id": "QL-7L6Z_lxqN" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "dataset[0]" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "RRgH6i6RnIt0", "outputId": "1e3e2ee7-70f5-4453-be6f-18be2a6e4ada" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'instruction': ' أعط ثلاث نصائح للبقاء بصحة جيدة.',\n", " 'input': '',\n", " 'output': ' 1- تناول نظامًا غذائيًا متوازنًا وتأكد من تناول الكثير من الفواكه والخضروات. \\\\ n2. تمرن بانتظام لتحافظ على جسمك نشيطًا وقويًا. \\\\ n3. احصل على قسط كافٍ من النوم وحافظ على جدول نوم ثابت.'}" ] }, "metadata": {}, "execution_count": 64 } ] }, { "cell_type": "code", "source": [ "from huggingface_hub import notebook_login\n", "\n", "notebook_login()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 331, "referenced_widgets": [ "9790774db5a14adfa2317cdc86d89550", "e0beac7ce8ba4533ba1b68f4cbf19c87", "4eb8e01a06164be38f26abe32bee38ae", "81273f4eacb14b6eab57615ca12f0335", "82bd823207764b23a74699e33409267c", "030e7704a107460a80e6297fc89d9095", "b231f4cd606343e8bf21faaee6d6ef00", "3e3c69ad66ed4162b7ae3e9eae66ff61", "79f3cdbb195344db941af4ca9752f800", "3ca95791ca9148a3ba7651be2261dd0c", "36c4c87a01d9412a920c644bde98a3ca", "182629fdf88d472985adc14951c5350b", "378926c667e1484d976e8bec577a178a", "6baae6f5acc64ed59c5ef4f6cd732857", "23f512514ceb4e15bbfb882596775cc5", "fe3c67bb451047b6ba082464f4989cb4", "dd2c77d146bb4bef8e9168a577beab64" ] }, "id": "dK1funUWn2hV", "outputId": "5fca39ee-369e-4576-b39e-1f36f5e2b5cd" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Token is valid.\n", "Your token has been saved in your configured git credential helpers (store).\n", "Your token has been saved to /root/.cache/huggingface/token\n", "Login successful\n" ] } ] }, { "cell_type": "markdown", "source": [ "> Saving a checkpoint to upload the dataset from 🤗" ], "metadata": { "id": "xVGiMJMF2frH" } }, { "cell_type": "code", "source": [ "# dataset.push_to_hub(\"Yasbok/Alpaca_arabic_instruct\")" ], "metadata": { "id": "BntxSFbcnLnc" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "## Fine-tune 🦙 Model using PEFT on instruction fine tuning" ], "metadata": { "id": "Fpsh94pvDBwA" } }, { "cell_type": "markdown", "source": [ "> Download the instruction dataset from 🤗 Datasets" ], "metadata": { "id": "yUFu_laKClCL" } }, { "cell_type": "code", "source": [ "from datasets import Dataset, load_dataset\n", "# dataset = Dataset.from_pandas(df)" ], "metadata": { "id": "vlPmu7ZsgvzN" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "dataset = load_dataset(\"Yasbok/Alpaca_arabic_instruct\")" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 86, "referenced_widgets": [ "6750ae8ba9c04927bb582c61152aa7cf", "5c03ea44ef984f3fb3faa34168b17cf0", "2ddb54d1e9c847cf902714560d813813", "773793b250ca400d82dc7fc9a411dabc", "61060479693544968928e60a7bfa0ab4", "d083ac19d0174255874e668dd784bff7", "c0f2ef3f2d034af3a068055588facb2a", "75188aab5b534c3381f5909a1d59d571", "d61ce8ed5b7843268d4f069ee8a4e031", "f3a1c33528e846a5bd9f729ba99a4b8e", "034a0e7da5b04b0ea35ad12708d418c5" ] }, "id": "cKYtcNWuwbnB", "outputId": "7a5cd276-9182-4e31-a411-6e8951b439e5" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "WARNING:datasets.builder:Found cached dataset parquet (/root/.cache/huggingface/datasets/Yasbok___parquet/Yasbok--Alpaca_arabic_instruct-6d9c6a84c184d924/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec)\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ " 0%| | 0/1 [00:00 Setup 🦙 Pre-trained Model and tokenizer" ], "metadata": { "id": "4V-l24RMD1fS" } }, { "cell_type": "code", "source": [ "MICRO_BATCH_SIZE = 2 # this could actually be 5 but i like powers of 2\n", "BATCH_SIZE = 128\n", "GRADIENT_ACCUMULATION_STEPS = BATCH_SIZE // MICRO_BATCH_SIZE\n", "EPOCHS = 1 # we don't need 3 tbh\n", "LEARNING_RATE = 3e-4 # the Karpathy constant\n", "CUTOFF_LEN = 256 # 256 accounts for about 96% of the data\n", "LORA_R = 8\n", "LORA_ALPHA = 16\n", "LORA_DROPOUT = 0.05" ], "metadata": { "id": "ou5puhh3qvf0" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "model = LlamaForCausalLM.from_pretrained(\n", " \"decapoda-research/llama-7b-hf\",\n", " load_in_8bit=True,\n", " device_map=\"auto\",\n", ")\n", "tokenizer = LlamaTokenizer.from_pretrained(\n", " \"decapoda-research/llama-7b-hf\", add_eos_token=True\n", ")\n", "\n", "model = prepare_model_for_int8_training(model)\n", "\n", "config = LoraConfig(\n", " r=LORA_R,\n", " lora_alpha=LORA_ALPHA,\n", " target_modules=[\"q_proj\", \"v_proj\"],\n", " lora_dropout=LORA_DROPOUT,\n", " bias=\"none\",\n", " task_type=\"CAUSAL_LM\",\n", ") \n", "tokenizer.pad_token_id = 0\n", "model = get_peft_model(model, config)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 138, "referenced_widgets": [ "eb44dc6924764c64a0069bb671be5d37", "ce55de87df3440868f64fb3f1fbd0477", "42cdb0eb66d740beb6f7a722cd03d178", "3a724042026641f2a70c9e4c89dcf46f", "9d05dd285eff44188c22e7255ff07597", "44174db7d3ff43f6b9f86ee7d45be747", "63eb2d3606a34ff9b3bd6ecf00af29e0", "94461329fb9c4d0cac78a2048209116a", "69e1db285e3b4b01834486c94866dc9b", "52c3a666fdd9458b8c4fac05063dc226", "c2f218f10f4d4ba88a95dc7b9f836c6d" ] }, "id": "7ViZlJ2Wquqr", "outputId": "6dd49920-235a-4808-e732-df25a48d2d11" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "Overriding torch_dtype=None with `torch_dtype=torch.float16` due to requirements of `bitsandbytes` to enable model loading in mixed int8. Either pass torch_dtype=torch.float16 or don't pass this argument at all to remove this warning.\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "Loading checkpoint shards: 0%| | 0/33 [00:00 Template to be used for the instruction fine tuning 🦙 model" ], "metadata": { "id": "mLqiJDLUEcE_" } }, { "cell_type": "code", "source": [ "def generate_prompt(data_point):\n", " # desculpe o desastre de formatação, preciso ser rápido\n", " if data_point[\"input\"]:\n", " return f\"\"\"يوجد أدناه تعليمات تصف مهمة ، إلى جانب إدخال يوفر المزيد من السياق. اكتب ردًا يكمل الطلب بشكل مناسب.\n", "### تعليمات:\n", "{data_point[\"instruction\"]}\n", "### مدخل:\n", "{data_point[\"input\"]}\n", "### انتاج:\n", "{data_point[\"output\"]}\"\"\"\n", " else:\n", " return f\"\"\"يوجد أدناه تعليمات تصف مهمة. اكتب ردًا يكمل الطلب بشكل مناسب.\n", "### تعليمات:\n", "{data_point[\"instruction\"]}\n", "### انتاج:\n", "{data_point[\"output\"]}\"\"\"\n", "\n", "\n", "\n", "def tokenize(prompt):\n", " # there's probably a way to do this with the tokenizer settings\n", " # but again, gotta move fast\n", " result = tokenizer(\n", " prompt,\n", " truncation=True,\n", " max_length=CUTOFF_LEN + 1,\n", " padding=\"max_length\",\n", " )\n", " return {\n", " \"input_ids\": result[\"input_ids\"][:-1],\n", " \"attention_mask\": result[\"attention_mask\"][:-1],\n", " }" ], "metadata": { "id": "l38rIp_5py0l" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "dataset = dataset.shuffle().map(lambda x: tokenize(generate_prompt(x)))" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 17, "referenced_widgets": [ "6b0d5f34f06142e38097ff23a9bbf7c5", "8b9e32d8a4824cbea8793149d19c75bc", "e0840eb98ed3401d8be87e9bb6ba1966", "7d5d3340fd224d1bb0b5a25f156a3bff", "176cc62f43774007b2dce873be628915", "072a489e7af145d5927ab5becd0bdfc0", "ddb6d7a3328b4884ae6b688b23f58acd", "09c14023b1474e2fbd8636718b71b0f4", "68b95f4eb32942809309b312926707cf", "ded666847dc748ed930bbb0b938b1eb6", "496e34386d2b4c7880aa2c98790813d4" ] }, "id": "DyBU47TlsOGm", "outputId": "d21a8b97-776c-4866-9fa2-2168f04c046c" }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "Map: 0%| | 0/52002 [00:00 Training the 🦙 model using instruct fine-tuning" ], "metadata": { "id": "qWS4N4cvDqCW" } }, { "cell_type": "code", "source": [ "trainer = transformers.Trainer(\n", " model=model,\n", " train_dataset=dataset['train'],\n", " args=transformers.TrainingArguments(\n", " per_device_train_batch_size=MICRO_BATCH_SIZE,\n", " gradient_accumulation_steps=GRADIENT_ACCUMULATION_STEPS,\n", " warmup_steps=100,\n", " num_train_epochs=EPOCHS,\n", " learning_rate=LEARNING_RATE,\n", " fp16=True,\n", " logging_steps=20,\n", " output_dir=\"lora-alpaca\",\n", " save_total_limit=3,\n", " ),\n", " data_collator=transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),\n", ")\n", "model.config.use_cache = False\n", "trainer.train(resume_from_checkpoint=False)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 615 }, "id": "qcypUaCCuWxd", "outputId": "8e24ec8b-8642-428d-ab8b-dc3b72cf0710" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "/usr/local/lib/python3.9/dist-packages/transformers/optimization.py:391: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n", " warnings.warn(\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "\n", "
\n", " \n", " \n", " [102/406 2:51:51 < 8:42:26, 0.01 it/s, Epoch 0.25/1]\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
StepTraining Loss
201.656200
401.290300
600.859200
800.753000
1000.713000

" ] }, "metadata": {} }, { "output_type": "error", "ename": "KeyboardInterrupt", "evalue": "ignored", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 16\u001b[0m )\n\u001b[1;32m 17\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muse_cache\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 18\u001b[0;31m \u001b[0mtrainer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtrain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresume_from_checkpoint\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;32m/usr/local/lib/python3.9/dist-packages/transformers/trainer.py\u001b[0m in \u001b[0;36mtrain\u001b[0;34m(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)\u001b[0m\n\u001b[1;32m 1632\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_inner_training_loop\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_train_batch_size\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauto_find_batch_size\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1633\u001b[0m )\n\u001b[0;32m-> 1634\u001b[0;31m return inner_training_loop(\n\u001b[0m\u001b[1;32m 1635\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1636\u001b[0m \u001b[0mresume_from_checkpoint\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mresume_from_checkpoint\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/usr/local/lib/python3.9/dist-packages/transformers/trainer.py\u001b[0m in \u001b[0;36m_inner_training_loop\u001b[0;34m(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)\u001b[0m\n\u001b[1;32m 1899\u001b[0m \u001b[0mtr_loss_step\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtraining_step\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1900\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1901\u001b[0;31m \u001b[0mtr_loss_step\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtraining_step\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1902\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1903\u001b[0m if (\n", "\u001b[0;32m/usr/local/lib/python3.9/dist-packages/transformers/trainer.py\u001b[0m in \u001b[0;36mtraining_step\u001b[0;34m(self, model, inputs)\u001b[0m\n\u001b[1;32m 2651\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2652\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdo_grad_scaling\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2653\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscaler\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscale\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mloss\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2654\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muse_apex\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2655\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mamp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscale_loss\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mloss\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moptimizer\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mscaled_loss\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/usr/local/lib/python3.9/dist-packages/torch/_tensor.py\u001b[0m in \u001b[0;36mbackward\u001b[0;34m(self, gradient, retain_graph, create_graph, inputs)\u001b[0m\n\u001b[1;32m 486\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 487\u001b[0m )\n\u001b[0;32m--> 488\u001b[0;31m torch.autograd.backward(\n\u001b[0m\u001b[1;32m 489\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgradient\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mretain_graph\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcreate_graph\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 490\u001b[0m )\n", "\u001b[0;32m/usr/local/lib/python3.9/dist-packages/torch/autograd/__init__.py\u001b[0m in \u001b[0;36mbackward\u001b[0;34m(tensors, grad_tensors, retain_graph, create_graph, grad_variables, inputs)\u001b[0m\n\u001b[1;32m 195\u001b[0m \u001b[0;31m# some Python versions print out the first line of a multi-line function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 196\u001b[0m \u001b[0;31m# calls in the traceback and some print out the last line\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 197\u001b[0;31m Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass\n\u001b[0m\u001b[1;32m 198\u001b[0m \u001b[0mtensors\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgrad_tensors_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mretain_graph\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcreate_graph\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 199\u001b[0m allow_unreachable=True, accumulate_grad=True) # Calls into the C++ engine to run the backward pass\n", "\u001b[0;31mKeyboardInterrupt\u001b[0m: " ] } ] }, { "cell_type": "markdown", "source": [ "> Let's have an insight of our fine tuned Alpaca using Peft" ], "metadata": { "id": "NXRgwTDven3t" } }, { "cell_type": "code", "source": [ "model" ], "metadata": { "id": "PH10skP5elzb" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "model.save_pretrained(\"lora-alpaca_ar\")" ], "metadata": { "id": "_9g0HzA5vsla" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "> Push the adapter to🤗" ], "metadata": { "id": "5LN4eg8F2ROK" } }, { "cell_type": "code", "source": [ "from huggingface_hub import notebook_login\n", "\n", "notebook_login()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 331, "referenced_widgets": [ "d558193dc34240a0a0028c879f9d3a91", "56e90084a870402ea765c75e59785c33", "196842b67f6b4451b33916ad1a3f4d54", "cd6752ed8360412485f27ff74c7dc86c", "7f6031d9d88f47f0a35093e806c1f51d", "ce6986c036e84106940c6de7104da2d6", "b905d63ad7854f5bb5f5027fc73b0a3e", "4d62895b900846aba9b687a24999bb05", "b2910f3dbda449d99db9c46331cfb955", "961ae75617764743a12cb03965bc3e6a", "0e72536f08d14c80a80fdd685d2be848", "9379a6e8d7694b988e8b514639c21498", "43510cb3cdb84281ab5f80214b09fadf", "9d89147fe1004a369a588f28341c761b", "d5d6fbcc101e402e9b7882f43beadb87", "4981580665644cd39a92c99ef460e676", "edd70dce7d3944d1812057c3650d2c5a" ] }, "id": "K66O_4Jj2dSG", "outputId": "48a84d7c-e391-43aa-f6ef-a0f4af02d7bb" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Token is valid.\n", "Your token has been saved in your configured git credential helpers (store).\n", "Your token has been saved to /root/.cache/huggingface/token\n", "Login successful\n" ] } ] }, { "cell_type": "code", "source": [ "model.push_to_hub(\"Yasbok/Alpaca_instruction_fine_tune_Arabic\", use_auth_token=True)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 116, "referenced_widgets": [ "8b7ad87c92604c2fbbe084a9bcb798cf", "c8a6a08fb64c40e384a29ef2b8b572d4", "544fe145cd9f4d16b9e765d4c9fae159", "85721f7b94a74ddd89d4b76f614f011b", "85164250cb064eeb800e910d108bff89", "acb3eaef4ac34e86a994799c106b4321", "bc9ee26d49ea4b76991a8318dadcb4f9", "8cc6bca9441a46489edae8f059da4838", "70ac6f5efd32410caa0a84e57701f15e", "fdf719ae121c48dcade058669ae65286", "5a42640e9c23406db8d732677eeeafde", "3179ba4cdf624e5282d131fbe88e8763", "24ef46fccd6744958b56fa290d733815", "6db176d8394942e788f5c58544a91c61", "34be4197ebff417681e41d4a98418582", "d732a799f8dd438c946b2385ff431049", "66622d01018f4c80bd9a910853687136", "5189de40e84c4e029362c5033aec01bd", "b563b008da534df5b5604927ae3ac434", "6b0e98decd6a4875b4bca6fed36aa5ba", "6e65437ddb264b7999d661b093a7ec9e", "e6b59602e3834b419a0bcef8cc39a8d9" ] }, "id": "rrH4zgEDWYgs", "outputId": "f899bf6f-2f3b-4250-b4ec-ddea8c34f734" }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "adapter_model.bin: 0%| | 0.00/16.8M [00:00