Skip to content

Instantly share code, notes, and snippets.

@motemen
Created November 25, 2022 14:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motemen/fb8682fcbaca3ea65d73ed8ed885be9d to your computer and use it in GitHub Desktop.
Save motemen/fb8682fcbaca3ea65d73ed8ed885be9d to your computer and use it in GitHub Desktop.
experiment-gpt2-togetter-title-quotes (public)
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyNhgs/qp0xgqjqyOaFxBmsP",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU",
"gpuClass": "standard",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"ad6de574c5234516aa04111a49fbc7c4": {
"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_57c9fa18607b4e29899db2ec9a04aea9",
"IPY_MODEL_6b187fb7e7f149d09a2b447ef8623307",
"IPY_MODEL_3991f58388fc44bcbac5f3413c9c2daf"
],
"layout": "IPY_MODEL_8826b067998e4a689bfcab74005232d1"
}
},
"57c9fa18607b4e29899db2ec9a04aea9": {
"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_9de276258abd4e1f9f47aecdb7aa8ef1",
"placeholder": "​",
"style": "IPY_MODEL_fd70e85ba2f346398c0d20b67b58ae0a",
"value": "Downloading: 100%"
}
},
"6b187fb7e7f149d09a2b447ef8623307": {
"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_d07675a8ed1c4e108c2bedf3662a49f4",
"max": 805634,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_a04f1d80a14040dc857f75af11c97494",
"value": 805634
}
},
"3991f58388fc44bcbac5f3413c9c2daf": {
"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_19a66c932074482093a8281ac1d28a94",
"placeholder": "​",
"style": "IPY_MODEL_4796a0a773db4eedbd220470ff241570",
"value": " 806k/806k [00:00<00:00, 9.32MB/s]"
}
},
"8826b067998e4a689bfcab74005232d1": {
"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
}
},
"9de276258abd4e1f9f47aecdb7aa8ef1": {
"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
}
},
"fd70e85ba2f346398c0d20b67b58ae0a": {
"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": ""
}
},
"d07675a8ed1c4e108c2bedf3662a49f4": {
"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
}
},
"a04f1d80a14040dc857f75af11c97494": {
"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": ""
}
},
"19a66c932074482093a8281ac1d28a94": {
"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
}
},
"4796a0a773db4eedbd220470ff241570": {
"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": ""
}
},
"2ae3d294215e45759fc577b0118c3902": {
"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_ae7c9fbc552b4b388173fac70f30ebc3",
"IPY_MODEL_8292b1c567f3436c88a622b022b15100",
"IPY_MODEL_0528570989dd4260b3d84d0d28c2a1a0"
],
"layout": "IPY_MODEL_31cae4788a994fea82abb178a62346e9"
}
},
"ae7c9fbc552b4b388173fac70f30ebc3": {
"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_1e00c37fa6ea44e5921c92bc573910b0",
"placeholder": "​",
"style": "IPY_MODEL_87a6311e637a4487971b8bcbd9a6c259",
"value": "Downloading: 100%"
}
},
"8292b1c567f3436c88a622b022b15100": {
"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_d18954ee0c6a4523ad15d790df3ba570",
"max": 153,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_24bfc8e7208a462ba0a1b9977b2a885f",
"value": 153
}
},
"0528570989dd4260b3d84d0d28c2a1a0": {
"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_08d0830bb0664f3a94385ccfeef8b4fe",
"placeholder": "​",
"style": "IPY_MODEL_27c79ee796c046a1b5df512b8b5f4756",
"value": " 153/153 [00:00<00:00, 5.23kB/s]"
}
},
"31cae4788a994fea82abb178a62346e9": {
"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
}
},
"1e00c37fa6ea44e5921c92bc573910b0": {
"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
}
},
"87a6311e637a4487971b8bcbd9a6c259": {
"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": ""
}
},
"d18954ee0c6a4523ad15d790df3ba570": {
"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
}
},
"24bfc8e7208a462ba0a1b9977b2a885f": {
"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": ""
}
},
"08d0830bb0664f3a94385ccfeef8b4fe": {
"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
}
},
"27c79ee796c046a1b5df512b8b5f4756": {
"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": ""
}
},
"c7a28ad80c4940ecb94f8b967796efb6": {
"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_f47fb906ad2542d28a161eefbe25036a",
"IPY_MODEL_a082c25761f84a7987b4990c21897beb",
"IPY_MODEL_89bdb22f4799400e935a59308151cb81"
],
"layout": "IPY_MODEL_709cdbbe310243f5a57dcc3c24f9e392"
}
},
"f47fb906ad2542d28a161eefbe25036a": {
"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_7bcf2fa9e9af4bbab43cbf280da5625d",
"placeholder": "​",
"style": "IPY_MODEL_96ac5d46c7d2426cac25cda672936d4b",
"value": "Downloading: 100%"
}
},
"a082c25761f84a7987b4990c21897beb": {
"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_0129c8c2eea84d73a0446e86a01dfc3b",
"max": 282,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_d42acd479b294a9b950cb3d3557510bc",
"value": 282
}
},
"89bdb22f4799400e935a59308151cb81": {
"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_b9c68d9b46de487d97c5d97771f7a256",
"placeholder": "​",
"style": "IPY_MODEL_4b4c6cf4d41a44f4864b80274d914af4",
"value": " 282/282 [00:00<00:00, 9.66kB/s]"
}
},
"709cdbbe310243f5a57dcc3c24f9e392": {
"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
}
},
"7bcf2fa9e9af4bbab43cbf280da5625d": {
"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
}
},
"96ac5d46c7d2426cac25cda672936d4b": {
"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": ""
}
},
"0129c8c2eea84d73a0446e86a01dfc3b": {
"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
}
},
"d42acd479b294a9b950cb3d3557510bc": {
"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": ""
}
},
"b9c68d9b46de487d97c5d97771f7a256": {
"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
}
},
"4b4c6cf4d41a44f4864b80274d914af4": {
"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": ""
}
},
"58e9003d61774dce97d745529f532bf2": {
"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_a3051d733c604445aa3b3bed9ac9bd86",
"IPY_MODEL_bbedf1b5c40a449fa06230e6a3521d0b",
"IPY_MODEL_f0987a38b7be42889ce10c6094ca2a7c"
],
"layout": "IPY_MODEL_a46b5516997d442995aace784e2fcdef"
}
},
"a3051d733c604445aa3b3bed9ac9bd86": {
"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_bca290a269444a1ea9b9321fe9d9fe41",
"placeholder": "​",
"style": "IPY_MODEL_d7b8230164754985ab4222ebc30c78f3",
"value": "Downloading: 100%"
}
},
"bbedf1b5c40a449fa06230e6a3521d0b": {
"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_9981eaa09c63416e97a60a0d45a9b2c9",
"max": 799,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_10b1e64454ab4c42bef472b6ad51732a",
"value": 799
}
},
"f0987a38b7be42889ce10c6094ca2a7c": {
"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_e8db58c8457c4e828ed71fda3bf832d0",
"placeholder": "​",
"style": "IPY_MODEL_894724e9dfa741e58a72a6258b8ffac2",
"value": " 799/799 [00:00<00:00, 25.9kB/s]"
}
},
"a46b5516997d442995aace784e2fcdef": {
"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
}
},
"bca290a269444a1ea9b9321fe9d9fe41": {
"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
}
},
"d7b8230164754985ab4222ebc30c78f3": {
"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": ""
}
},
"9981eaa09c63416e97a60a0d45a9b2c9": {
"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
}
},
"10b1e64454ab4c42bef472b6ad51732a": {
"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": ""
}
},
"e8db58c8457c4e828ed71fda3bf832d0": {
"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
}
},
"894724e9dfa741e58a72a6258b8ffac2": {
"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": ""
}
},
"ba9da801ae7a4960ac3ebf522d3dd9bd": {
"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_6621c6a68c1c4ef19c3bb6aaa0aa9d35",
"IPY_MODEL_0ee8e96c572c4e259b3d28374e118d7b",
"IPY_MODEL_def6a0171dfa4e1b8dafef5b95d907c8"
],
"layout": "IPY_MODEL_ccd1940040b94fb3b7f24e776f9b5707"
}
},
"6621c6a68c1c4ef19c3bb6aaa0aa9d35": {
"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_bc839f15b05f4438b424b20d52d04075",
"placeholder": "​",
"style": "IPY_MODEL_2b13aeac2cf44dac95307b2bff1fc63d",
"value": "Downloading: 100%"
}
},
"0ee8e96c572c4e259b3d28374e118d7b": {
"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_b755be1d278945f78db4ce9b6b55865c",
"max": 1369804067,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_5644a8305c03465890c69147d6bbede8",
"value": 1369804067
}
},
"def6a0171dfa4e1b8dafef5b95d907c8": {
"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_77e63fca567645d9a97e3873529e233d",
"placeholder": "​",
"style": "IPY_MODEL_a1c16d86a9b5472d84c94838b24fab31",
"value": " 1.37G/1.37G [00:27<00:00, 58.2MB/s]"
}
},
"ccd1940040b94fb3b7f24e776f9b5707": {
"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
}
},
"bc839f15b05f4438b424b20d52d04075": {
"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
}
},
"2b13aeac2cf44dac95307b2bff1fc63d": {
"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": ""
}
},
"b755be1d278945f78db4ce9b6b55865c": {
"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
}
},
"5644a8305c03465890c69147d6bbede8": {
"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": ""
}
},
"77e63fca567645d9a97e3873529e233d": {
"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
}
},
"a1c16d86a9b5472d84c94838b24fab31": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/motemen/fb8682fcbaca3ea65d73ed8ed885be9d/experiment-gpt2-togetter-title-quotes-public.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"# 準備\n",
"\n",
"* `togetter-titles-filtered-all.txt` を置く"
],
"metadata": {
"id": "b3jbG2DvGxTh"
}
},
{
"cell_type": "code",
"source": [
"!git clone --depth=1 https://github.com/huggingface/transformers"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "e1G7FJZuSBP5",
"outputId": "a71453fd-fc08-4b9b-9c7c-fda5d3b831c7"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Cloning into 'transformers'...\n",
"remote: Enumerating objects: 3068, done.\u001b[K\n",
"remote: Counting objects: 100% (3068/3068), done.\u001b[K\n",
"remote: Compressing objects: 100% (2590/2590), done.\u001b[K\n",
"remote: Total 3068 (delta 916), reused 1044 (delta 429), pack-reused 0\u001b[K\n",
"Receiving objects: 100% (3068/3068), 10.75 MiB | 10.61 MiB/s, done.\n",
"Resolving deltas: 100% (916/916), done.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!pip install ./transformers"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "mj4bWePbaV1B",
"outputId": "068f0d1e-9f9a-4107-a6a4-3b260f0f4a49"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Processing ./transformers\n",
"\u001b[33m DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.\n",
" pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.\u001b[0m\n",
" Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Preparing wheel metadata ... \u001b[?25l\u001b[?25hdone\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (3.8.0)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (21.3)\n",
"Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (2022.6.2)\n",
"Collecting huggingface-hub<1.0,>=0.10.0\n",
" Downloading huggingface_hub-0.11.0-py3-none-any.whl (182 kB)\n",
"\u001b[K |████████████████████████████████| 182 kB 5.2 MB/s \n",
"\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (1.21.6)\n",
"Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (4.13.0)\n",
"Collecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
" Downloading tokenizers-0.13.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
"\u001b[K |████████████████████████████████| 7.6 MB 60.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (2.23.0)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (6.0)\n",
"Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers==4.25.0.dev0) (4.64.1)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0,>=0.10.0->transformers==4.25.0.dev0) (4.1.1)\n",
"Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers==4.25.0.dev0) (3.0.9)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers==4.25.0.dev0) (3.10.0)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.25.0.dev0) (2.10)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.25.0.dev0) (2022.9.24)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.25.0.dev0) (1.24.3)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.25.0.dev0) (3.0.4)\n",
"Building wheels for collected packages: transformers\n",
" Building wheel for transformers (PEP 517) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for transformers: filename=transformers-4.25.0.dev0-py3-none-any.whl size=5778385 sha256=f65d3f27a55718f882e9807911fd6c9f8c104ea77063945ce957e9daf72e7122\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-7v_ll7cz/wheels/49/62/f4/6730819eed4e6468662b1519bf3bf46419b2335990c77f8767\n",
"Successfully built transformers\n",
"Installing collected packages: tokenizers, huggingface-hub, transformers\n",
"Successfully installed huggingface-hub-0.11.0 tokenizers-0.13.2 transformers-4.25.0.dev0\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"%cd transformers"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "q_Bw8hxHSPSE",
"outputId": "565c4505-e513-42b3-8057-f72b95e9236a"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"/content/transformers\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!git rev-parse HEAD"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Vgh6_WPQSUtM",
"outputId": "0333ec0b-7531-4728-b637-4db53d83c272"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"a1d4563f7a2d78a5b29e4da46c76c90c4afe5331\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!pip install -r examples/pytorch/language-modeling/requirements.txt"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "2ipYMn2KSWFV",
"outputId": "af0194da-302d-4e9e-b103-5356748a29d0"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting accelerate>=0.12.0\n",
" Downloading accelerate-0.14.0-py3-none-any.whl (175 kB)\n",
"\u001b[K |████████████████████████████████| 175 kB 4.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: torch>=1.3 in /usr/local/lib/python3.7/dist-packages (from -r examples/pytorch/language-modeling/requirements.txt (line 2)) (1.12.1+cu113)\n",
"Collecting datasets>=1.8.0\n",
" Downloading datasets-2.7.1-py3-none-any.whl (451 kB)\n",
"\u001b[K |████████████████████████████████| 451 kB 48.9 MB/s \n",
"\u001b[?25hCollecting sentencepiece!=0.1.92\n",
" Downloading sentencepiece-0.1.97-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
"\u001b[K |████████████████████████████████| 1.3 MB 46.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: protobuf in /usr/local/lib/python3.7/dist-packages (from -r examples/pytorch/language-modeling/requirements.txt (line 5)) (3.19.6)\n",
"Collecting evaluate\n",
" Downloading evaluate-0.3.0-py3-none-any.whl (72 kB)\n",
"\u001b[K |████████████████████████████████| 72 kB 1.7 MB/s \n",
"\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from accelerate>=0.12.0->-r examples/pytorch/language-modeling/requirements.txt (line 1)) (1.21.6)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from accelerate>=0.12.0->-r examples/pytorch/language-modeling/requirements.txt (line 1)) (21.3)\n",
"Requirement already satisfied: psutil in /usr/local/lib/python3.7/dist-packages (from accelerate>=0.12.0->-r examples/pytorch/language-modeling/requirements.txt (line 1)) (5.4.8)\n",
"Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from accelerate>=0.12.0->-r examples/pytorch/language-modeling/requirements.txt (line 1)) (6.0)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch>=1.3->-r examples/pytorch/language-modeling/requirements.txt (line 2)) (4.1.1)\n",
"Collecting multiprocess\n",
" Downloading multiprocess-0.70.14-py37-none-any.whl (115 kB)\n",
"\u001b[K |████████████████████████████████| 115 kB 62.4 MB/s \n",
"\u001b[?25hRequirement already satisfied: dill<0.3.7 in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (0.3.6)\n",
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (4.64.1)\n",
"Requirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (9.0.0)\n",
"Collecting xxhash\n",
" Downloading xxhash-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)\n",
"\u001b[K |████████████████████████████████| 212 kB 65.6 MB/s \n",
"\u001b[?25hRequirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (3.8.3)\n",
"Collecting responses<0.19\n",
" Downloading responses-0.18.0-py3-none-any.whl (38 kB)\n",
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2.23.0)\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (1.3.5)\n",
"Requirement already satisfied: huggingface-hub<1.0.0,>=0.2.0 in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (0.11.0)\n",
"Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2022.11.0)\n",
"Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (4.13.0)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (6.0.2)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (4.0.2)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (22.1.0)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (1.3.1)\n",
"Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (0.13.0)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (1.8.1)\n",
"Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2.1.1)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (1.3.3)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0.0,>=0.2.0->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (3.8.0)\n",
"Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->accelerate>=0.12.0->-r examples/pytorch/language-modeling/requirements.txt (line 1)) (3.0.9)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (1.24.3)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2022.9.24)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (3.0.4)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2.10)\n",
"Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1\n",
" Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)\n",
"\u001b[K |████████████████████████████████| 127 kB 66.8 MB/s \n",
"\u001b[?25hRequirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (3.10.0)\n",
"Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2.8.2)\n",
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (2022.6)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas->datasets>=1.8.0->-r examples/pytorch/language-modeling/requirements.txt (line 3)) (1.15.0)\n",
"Installing collected packages: urllib3, xxhash, responses, multiprocess, datasets, sentencepiece, evaluate, accelerate\n",
" Attempting uninstall: urllib3\n",
" Found existing installation: urllib3 1.24.3\n",
" Uninstalling urllib3-1.24.3:\n",
" Successfully uninstalled urllib3-1.24.3\n",
"Successfully installed accelerate-0.14.0 datasets-2.7.1 evaluate-0.3.0 multiprocess-0.70.14 responses-0.18.0 sentencepiece-0.1.97 urllib3-1.25.11 xxhash-3.1.0\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"https://huggingface.co/rinna/japanese-gpt2-medium にある通りにモデルを作成"
],
"metadata": {
"id": "vpobMZklUd0s"
}
},
{
"cell_type": "code",
"source": [
"from transformers import T5Tokenizer, AutoModelForCausalLM\n",
"\n",
"tokenizer = T5Tokenizer.from_pretrained(\"rinna/japanese-gpt2-medium\")\n",
"tokenizer.do_lower_case = True # due to some bug of tokenizer config loading\n",
"\n",
"model = AutoModelForCausalLM.from_pretrained(\"rinna/japanese-gpt2-medium\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 177,
"referenced_widgets": [
"ad6de574c5234516aa04111a49fbc7c4",
"57c9fa18607b4e29899db2ec9a04aea9",
"6b187fb7e7f149d09a2b447ef8623307",
"3991f58388fc44bcbac5f3413c9c2daf",
"8826b067998e4a689bfcab74005232d1",
"9de276258abd4e1f9f47aecdb7aa8ef1",
"fd70e85ba2f346398c0d20b67b58ae0a",
"d07675a8ed1c4e108c2bedf3662a49f4",
"a04f1d80a14040dc857f75af11c97494",
"19a66c932074482093a8281ac1d28a94",
"4796a0a773db4eedbd220470ff241570",
"2ae3d294215e45759fc577b0118c3902",
"ae7c9fbc552b4b388173fac70f30ebc3",
"8292b1c567f3436c88a622b022b15100",
"0528570989dd4260b3d84d0d28c2a1a0",
"31cae4788a994fea82abb178a62346e9",
"1e00c37fa6ea44e5921c92bc573910b0",
"87a6311e637a4487971b8bcbd9a6c259",
"d18954ee0c6a4523ad15d790df3ba570",
"24bfc8e7208a462ba0a1b9977b2a885f",
"08d0830bb0664f3a94385ccfeef8b4fe",
"27c79ee796c046a1b5df512b8b5f4756",
"c7a28ad80c4940ecb94f8b967796efb6",
"f47fb906ad2542d28a161eefbe25036a",
"a082c25761f84a7987b4990c21897beb",
"89bdb22f4799400e935a59308151cb81",
"709cdbbe310243f5a57dcc3c24f9e392",
"7bcf2fa9e9af4bbab43cbf280da5625d",
"96ac5d46c7d2426cac25cda672936d4b",
"0129c8c2eea84d73a0446e86a01dfc3b",
"d42acd479b294a9b950cb3d3557510bc",
"b9c68d9b46de487d97c5d97771f7a256",
"4b4c6cf4d41a44f4864b80274d914af4",
"58e9003d61774dce97d745529f532bf2",
"a3051d733c604445aa3b3bed9ac9bd86",
"bbedf1b5c40a449fa06230e6a3521d0b",
"f0987a38b7be42889ce10c6094ca2a7c",
"a46b5516997d442995aace784e2fcdef",
"bca290a269444a1ea9b9321fe9d9fe41",
"d7b8230164754985ab4222ebc30c78f3",
"9981eaa09c63416e97a60a0d45a9b2c9",
"10b1e64454ab4c42bef472b6ad51732a",
"e8db58c8457c4e828ed71fda3bf832d0",
"894724e9dfa741e58a72a6258b8ffac2",
"ba9da801ae7a4960ac3ebf522d3dd9bd",
"6621c6a68c1c4ef19c3bb6aaa0aa9d35",
"0ee8e96c572c4e259b3d28374e118d7b",
"def6a0171dfa4e1b8dafef5b95d907c8",
"ccd1940040b94fb3b7f24e776f9b5707",
"bc839f15b05f4438b424b20d52d04075",
"2b13aeac2cf44dac95307b2bff1fc63d",
"b755be1d278945f78db4ce9b6b55865c",
"5644a8305c03465890c69147d6bbede8",
"77e63fca567645d9a97e3873529e233d",
"a1c16d86a9b5472d84c94838b24fab31"
]
},
"id": "R8FP6SHmUbW5",
"outputId": "320c2aee-1e15-4950-8cfe-1c574d3a2148"
},
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/806k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "ad6de574c5234516aa04111a49fbc7c4"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/153 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "2ae3d294215e45759fc577b0118c3902"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/282 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c7a28ad80c4940ecb94f8b967796efb6"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/799 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "58e9003d61774dce97d745529f532bf2"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/1.37G [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "ba9da801ae7a4960ac3ebf522d3dd9bd"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"import re\n",
"\n",
"with open(\"../train.txt\", \"w\") as out:\n",
" with open(\"togetter-titles-filtered-all.txt\", \"r\") as f:\n",
" for line in f:\n",
" if re.search(r\"(「[^」]+」)+$\", line):\n",
" out.write(re.sub(\n",
" r\"^(.+?)(「[^」]+」)+$\",\n",
" f\"{tokenizer.special_tokens_map['bos_token']}\\\\1{tokenizer.special_tokens_map['eos_token']}{tokenizer.special_tokens_map['sep_token']}{tokenizer.special_tokens_map['bos_token']}\\\\2{tokenizer.special_tokens_map['eos_token']}\",\n",
" line))"
],
"metadata": {
"id": "FUAmxK-1U7Yj"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!head ../train.txt"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ORUfOgtsCumI",
"outputId": "10533ac5-83f7-4dfb-845e-02d6a7d841e9"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<s>「Excelいらん」と思った学生へ、将来ほぼ役に立つ神スキルだから勉強しとけ</s>[SEP]<s>「合計を手入力する大人にならないでほしい」</s>\n",
"<s>店長の「見やすいものをパパっと作って」という要求を完全に満たしたセブンイレブンに貼ってあった求人ポスターが天才の所業だった</s>[SEP]<s>「完璧な仕事だ」</s>\n",
"<s>海外でどうしてもお風呂に入りたい方が入手したアイテムに海外在住勢から歓喜の声</s>[SEP]<s>「海外バスタブ難民の救世主だ!」</s>\n",
"<s>日本のカレーライスに衝撃を受けたアメリカ人記者の書いた記事がすごくいいからみんな読んでほしい</s>[SEP]<s>「コカインが入っているのか?」</s>\n",
"<s>カルビーのポテチに星形にくり抜いたレアものが?「こんなことあるんだ」→カルビーさんからの回答あり</s>[SEP]<s>「だからレアなんだなぁ」</s>\n",
"<s>東大前駅の明治R1の受験生に向けた広告が見る角度によって行きと帰りで見るメッセージがガラッと変わっている</s>[SEP]<s>「このアイデア思いついた人すげえな」</s>\n",
"<s>マツケンサンバ(まったくサンバ要素がない)をブラジル人の友達に聴かせてみたらカッコいい返答があった</s>[SEP]<s>「考えるな!感じろ!」</s>\n",
"<s>食事に対する価値観が合わない人と旅行すると最悪旅先でケンカになるという話</s>[SEP]<s>「擦り合わせは大事」</s>\n",
"<s>亀梨和也さんのラジオ、ファンとの電話コーナーで修羅場発生「今何してたの?」『ライブレポ見てました』</s>[SEP]<s>「俺今ライブやってないんだけど!!」</s>\n",
"<s>いいかい学生さん、我孫子駅の唐揚げそばをな、食べれるうちに食べておきなよ</s>[SEP]<s>「1個乗せただけで自分の老いを突きつけられるの辛い」</s>\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!wc -l ../train.txt"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "5PpyBZVKbi_2",
"outputId": "72e8641c-b2ae-4c7d-c0f8-175bdd692b82"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"1827 ../train.txt\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!python ./examples/pytorch/language-modeling/run_clm.py \\\n",
" --model_name_or_path=rinna/japanese-gpt2-medium \\\n",
" --train_file=../train.txt \\\n",
" --do_train \\\n",
" --num_train_epochs=5 \\\n",
" --save_steps=1000 \\\n",
" --save_total_limit=3 \\\n",
" --per_device_train_batch_size=1 \\\n",
" --per_device_eval_batch_size=1 \\\n",
" --output_dir=output \\\n",
" --overwrite_output_dir \\\n",
" --use_fast_tokenizer=False \\\n",
" --block_size=256\n"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "VB5-cwIOXjbx",
"outputId": "570ff8b0-7f5d-4f10-b0a2-623430a5691a"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:__main__:Process rank: -1, device: cuda:0, n_gpu: 1distributed training: False, 16-bits training: False\n",
"INFO:__main__:Training/evaluation parameters TrainingArguments(\n",
"_n_gpu=1,\n",
"adafactor=False,\n",
"adam_beta1=0.9,\n",
"adam_beta2=0.999,\n",
"adam_epsilon=1e-08,\n",
"auto_find_batch_size=False,\n",
"bf16=False,\n",
"bf16_full_eval=False,\n",
"data_seed=None,\n",
"dataloader_drop_last=False,\n",
"dataloader_num_workers=0,\n",
"dataloader_pin_memory=True,\n",
"ddp_bucket_cap_mb=None,\n",
"ddp_find_unused_parameters=None,\n",
"ddp_timeout=1800,\n",
"debug=[],\n",
"deepspeed=None,\n",
"disable_tqdm=False,\n",
"do_eval=False,\n",
"do_predict=False,\n",
"do_train=True,\n",
"eval_accumulation_steps=None,\n",
"eval_delay=0,\n",
"eval_steps=None,\n",
"evaluation_strategy=no,\n",
"fp16=False,\n",
"fp16_backend=auto,\n",
"fp16_full_eval=False,\n",
"fp16_opt_level=O1,\n",
"fsdp=[],\n",
"fsdp_min_num_params=0,\n",
"fsdp_transformer_layer_cls_to_wrap=None,\n",
"full_determinism=False,\n",
"gradient_accumulation_steps=1,\n",
"gradient_checkpointing=False,\n",
"greater_is_better=None,\n",
"group_by_length=False,\n",
"half_precision_backend=auto,\n",
"hub_model_id=None,\n",
"hub_private_repo=False,\n",
"hub_strategy=every_save,\n",
"hub_token=<HUB_TOKEN>,\n",
"ignore_data_skip=False,\n",
"include_inputs_for_metrics=False,\n",
"jit_mode_eval=False,\n",
"label_names=None,\n",
"label_smoothing_factor=0.0,\n",
"learning_rate=5e-05,\n",
"length_column_name=length,\n",
"load_best_model_at_end=False,\n",
"local_rank=-1,\n",
"log_level=passive,\n",
"log_level_replica=passive,\n",
"log_on_each_node=True,\n",
"logging_dir=output/runs/Nov25_13-49-33_4f866dfde8c1,\n",
"logging_first_step=False,\n",
"logging_nan_inf_filter=True,\n",
"logging_steps=500,\n",
"logging_strategy=steps,\n",
"lr_scheduler_type=linear,\n",
"max_grad_norm=1.0,\n",
"max_steps=-1,\n",
"metric_for_best_model=None,\n",
"mp_parameters=,\n",
"no_cuda=False,\n",
"num_train_epochs=5.0,\n",
"optim=adamw_hf,\n",
"optim_args=None,\n",
"output_dir=output,\n",
"overwrite_output_dir=True,\n",
"past_index=-1,\n",
"per_device_eval_batch_size=1,\n",
"per_device_train_batch_size=1,\n",
"prediction_loss_only=False,\n",
"push_to_hub=False,\n",
"push_to_hub_model_id=None,\n",
"push_to_hub_organization=None,\n",
"push_to_hub_token=<PUSH_TO_HUB_TOKEN>,\n",
"ray_scope=last,\n",
"remove_unused_columns=True,\n",
"report_to=['tensorboard'],\n",
"resume_from_checkpoint=None,\n",
"run_name=output,\n",
"save_on_each_node=False,\n",
"save_steps=1000,\n",
"save_strategy=steps,\n",
"save_total_limit=3,\n",
"seed=42,\n",
"sharded_ddp=[],\n",
"skip_memory_metrics=True,\n",
"tf32=None,\n",
"torchdynamo=None,\n",
"tpu_metrics_debug=False,\n",
"tpu_num_cores=None,\n",
"use_ipex=False,\n",
"use_legacy_prediction_loop=False,\n",
"use_mps_device=False,\n",
"warmup_ratio=0.0,\n",
"warmup_steps=0,\n",
"weight_decay=0.0,\n",
"xpu_backend=None,\n",
")\n",
"WARNING:datasets.builder:Using custom data configuration default-62d8859826e1c335\n",
"INFO:datasets.info:Loading Dataset Infos from /usr/local/lib/python3.7/dist-packages/datasets/packaged_modules/text\n",
"INFO:datasets.builder:Generating dataset text (/root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c)\n",
"Downloading and preparing dataset text/default to /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c...\n",
"\rDownloading data files: 0% 0/1 [00:00<?, ?it/s]\rDownloading data files: 100% 1/1 [00:00<00:00, 5974.79it/s]\n",
"INFO:datasets.download.download_manager:Downloading took 0.0 min\n",
"INFO:datasets.download.download_manager:Checksum Computation took 0.0 min\n",
"\rExtracting data files: 0% 0/1 [00:00<?, ?it/s]\rExtracting data files: 100% 1/1 [00:00<00:00, 818.72it/s]\n",
"INFO:datasets.utils.info_utils:Unable to verify checksums.\n",
"INFO:datasets.builder:Generating train split\n",
"INFO:datasets.utils.info_utils:Unable to verify splits sizes.\n",
"Dataset text downloaded and prepared to /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c. Subsequent calls will reuse this data.\n",
"100% 1/1 [00:00<00:00, 584.57it/s]\n",
"WARNING:datasets.builder:Using custom data configuration default-62d8859826e1c335\n",
"INFO:datasets.info:Loading Dataset Infos from /usr/local/lib/python3.7/dist-packages/datasets/packaged_modules/text\n",
"INFO:datasets.builder:Overwrite dataset info from restored data version.\n",
"INFO:datasets.info:Loading Dataset info from /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c\n",
"WARNING:datasets.builder:Found cached dataset text (/root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c)\n",
"INFO:datasets.info:Loading Dataset info from /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c\n",
"WARNING:datasets.builder:Using custom data configuration default-62d8859826e1c335\n",
"INFO:datasets.info:Loading Dataset Infos from /usr/local/lib/python3.7/dist-packages/datasets/packaged_modules/text\n",
"INFO:datasets.builder:Overwrite dataset info from restored data version.\n",
"INFO:datasets.info:Loading Dataset info from /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c\n",
"WARNING:datasets.builder:Found cached dataset text (/root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c)\n",
"INFO:datasets.info:Loading Dataset info from /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c\n",
"[INFO|configuration_utils.py:654] 2022-11-25 13:49:34,761 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--rinna--japanese-gpt2-medium/snapshots/f464b76739c884d8b0479a0a7705b7fa71c3fd5a/config.json\n",
"[INFO|configuration_utils.py:706] 2022-11-25 13:49:34,762 >> Model config GPT2Config {\n",
" \"_name_or_path\": \"rinna/japanese-gpt2-medium\",\n",
" \"activation_function\": \"gelu_new\",\n",
" \"architectures\": [\n",
" \"GPT2LMHeadModel\"\n",
" ],\n",
" \"attn_pdrop\": 0.1,\n",
" \"bos_token_id\": 1,\n",
" \"embd_pdrop\": 0.1,\n",
" \"eos_token_id\": 2,\n",
" \"gradient_checkpointing\": false,\n",
" \"initializer_range\": 0.02,\n",
" \"layer_norm_epsilon\": 1e-05,\n",
" \"model_type\": \"gpt2\",\n",
" \"n_ctx\": 1024,\n",
" \"n_embd\": 1024,\n",
" \"n_head\": 16,\n",
" \"n_inner\": 4096,\n",
" \"n_layer\": 24,\n",
" \"n_positions\": 1024,\n",
" \"reorder_and_upcast_attn\": false,\n",
" \"resid_pdrop\": 0.1,\n",
" \"scale_attn_by_inverse_layer_idx\": false,\n",
" \"scale_attn_weights\": true,\n",
" \"summary_activation\": null,\n",
" \"summary_first_dropout\": 0.1,\n",
" \"summary_proj_to_labels\": true,\n",
" \"summary_type\": \"cls_index\",\n",
" \"summary_use_proj\": true,\n",
" \"task_specific_params\": {\n",
" \"text-generation\": {\n",
" \"do_sample\": true,\n",
" \"max_length\": 50\n",
" }\n",
" },\n",
" \"transformers_version\": \"4.25.0.dev0\",\n",
" \"use_cache\": true,\n",
" \"vocab_size\": 32000\n",
"}\n",
"\n",
"[INFO|tokenization_utils_base.py:1775] 2022-11-25 13:49:34,909 >> loading file spiece.model from cache at /root/.cache/huggingface/hub/models--rinna--japanese-gpt2-medium/snapshots/f464b76739c884d8b0479a0a7705b7fa71c3fd5a/spiece.model\n",
"[INFO|tokenization_utils_base.py:1775] 2022-11-25 13:49:34,910 >> loading file added_tokens.json from cache at None\n",
"[INFO|tokenization_utils_base.py:1775] 2022-11-25 13:49:34,910 >> loading file special_tokens_map.json from cache at /root/.cache/huggingface/hub/models--rinna--japanese-gpt2-medium/snapshots/f464b76739c884d8b0479a0a7705b7fa71c3fd5a/special_tokens_map.json\n",
"[INFO|tokenization_utils_base.py:1775] 2022-11-25 13:49:34,910 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--rinna--japanese-gpt2-medium/snapshots/f464b76739c884d8b0479a0a7705b7fa71c3fd5a/tokenizer_config.json\n",
"[INFO|modeling_utils.py:2199] 2022-11-25 13:49:35,080 >> loading weights file pytorch_model.bin from cache at /root/.cache/huggingface/hub/models--rinna--japanese-gpt2-medium/snapshots/f464b76739c884d8b0479a0a7705b7fa71c3fd5a/pytorch_model.bin\n",
"[INFO|modeling_utils.py:2653] 2022-11-25 13:49:42,043 >> All model checkpoint weights were used when initializing GPT2LMHeadModel.\n",
"\n",
"[INFO|modeling_utils.py:2662] 2022-11-25 13:49:42,044 >> All the weights of GPT2LMHeadModel were initialized from the model checkpoint at rinna/japanese-gpt2-medium.\n",
"If your task is similar to the task the model of the checkpoint was trained on, you can already use GPT2LMHeadModel for predictions without further training.\n",
"Running tokenizer on dataset: 0% 0/2 [00:00<?, ?ba/s]/usr/local/lib/python3.7/dist-packages/transformers/models/t5/tokenization_t5.py:227: UserWarning: This sequence already has </s>. In future versions this behavior may lead to duplicated eos tokens being added.\n",
" f\"This sequence already has {self.eos_token}. In future versions this behavior may lead to duplicated\"\n",
"INFO:datasets.arrow_dataset:Caching processed dataset at /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c/cache-27cd49722520c305.arrow\n",
"Running tokenizer on dataset: 100% 2/2 [00:00<00:00, 2.43ba/s]\n",
"Running tokenizer on dataset: 0% 0/1 [00:00<?, ?ba/s]INFO:datasets.arrow_dataset:Caching processed dataset at /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c/cache-3ef00e59055dba12.arrow\n",
"Running tokenizer on dataset: 100% 1/1 [00:00<00:00, 34.41ba/s]\n",
"Grouping texts in chunks of 256: 0% 0/2 [00:00<?, ?ba/s]INFO:datasets.arrow_dataset:Caching processed dataset at /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c/cache-aa3683bdee6ff88b.arrow\n",
"Grouping texts in chunks of 256: 100% 2/2 [00:00<00:00, 22.42ba/s]\n",
"Grouping texts in chunks of 256: 0% 0/1 [00:00<?, ?ba/s]INFO:datasets.arrow_dataset:Caching processed dataset at /root/.cache/huggingface/datasets/text/default-62d8859826e1c335/0.0.0/99cc88223027054f94ce0c7fd69d10eb172910fa0615671283a3c8e5e7af2f9c/cache-07aee4e6d02cfe4d.arrow\n",
"Grouping texts in chunks of 256: 100% 1/1 [00:00<00:00, 180.06ba/s]\n",
"/usr/local/lib/python3.7/dist-packages/transformers/optimization.py:310: 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",
" FutureWarning,\n",
"[INFO|trainer.py:1654] 2022-11-25 13:49:47,465 >> ***** Running training *****\n",
"[INFO|trainer.py:1655] 2022-11-25 13:49:47,465 >> Num examples = 249\n",
"[INFO|trainer.py:1656] 2022-11-25 13:49:47,465 >> Num Epochs = 5\n",
"[INFO|trainer.py:1657] 2022-11-25 13:49:47,465 >> Instantaneous batch size per device = 1\n",
"[INFO|trainer.py:1658] 2022-11-25 13:49:47,465 >> Total train batch size (w. parallel, distributed & accumulation) = 1\n",
"[INFO|trainer.py:1659] 2022-11-25 13:49:47,465 >> Gradient Accumulation steps = 1\n",
"[INFO|trainer.py:1660] 2022-11-25 13:49:47,465 >> Total optimization steps = 1245\n",
"[INFO|trainer.py:1662] 2022-11-25 13:49:47,466 >> Number of trainable parameters = 336128000\n",
"{'loss': 3.2516, 'learning_rate': 2.991967871485944e-05, 'epoch': 2.01}\n",
"{'loss': 2.1409, 'learning_rate': 9.839357429718876e-06, 'epoch': 4.02}\n",
" 80% 1000/1245 [05:30<01:20, 3.04it/s][INFO|trainer.py:2724] 2022-11-25 13:55:18,030 >> Saving model checkpoint to output/checkpoint-1000\n",
"[INFO|configuration_utils.py:447] 2022-11-25 13:55:18,031 >> Configuration saved in output/checkpoint-1000/config.json\n",
"[INFO|modeling_utils.py:1632] 2022-11-25 13:55:23,517 >> Model weights saved in output/checkpoint-1000/pytorch_model.bin\n",
"[INFO|tokenization_utils_base.py:2133] 2022-11-25 13:55:23,518 >> tokenizer config file saved in output/checkpoint-1000/tokenizer_config.json\n",
"[INFO|tokenization_utils_base.py:2140] 2022-11-25 13:55:23,518 >> Special tokens file saved in output/checkpoint-1000/special_tokens_map.json\n",
"100% 1245/1245 [07:07<00:00, 3.06it/s][INFO|trainer.py:1905] 2022-11-25 13:56:55,348 >> \n",
"\n",
"Training completed. Do not forget to share your model on huggingface.co/models =)\n",
"\n",
"\n",
"{'train_runtime': 427.8839, 'train_samples_per_second': 2.91, 'train_steps_per_second': 2.91, 'train_loss': 2.50661751007938, 'epoch': 5.0}\n",
"100% 1245/1245 [07:07<00:00, 2.91it/s]\n",
"[INFO|trainer.py:2724] 2022-11-25 13:56:55,353 >> Saving model checkpoint to output\n",
"[INFO|configuration_utils.py:447] 2022-11-25 13:56:55,354 >> Configuration saved in output/config.json\n",
"[INFO|modeling_utils.py:1632] 2022-11-25 13:57:00,504 >> Model weights saved in output/pytorch_model.bin\n",
"[INFO|tokenization_utils_base.py:2133] 2022-11-25 13:57:00,505 >> tokenizer config file saved in output/tokenizer_config.json\n",
"[INFO|tokenization_utils_base.py:2140] 2022-11-25 13:57:00,506 >> Special tokens file saved in output/special_tokens_map.json\n",
"***** train metrics *****\n",
" epoch = 5.0\n",
" train_loss = 2.5066\n",
" train_runtime = 0:07:07.88\n",
" train_samples = 249\n",
" train_samples_per_second = 2.91\n",
" train_steps_per_second = 2.91\n",
"[INFO|modelcard.py:449] 2022-11-25 13:57:01,121 >> Dropping the following result as it does not have all the necessary fields:\n",
"{'task': {'name': 'Causal Language Modeling', 'type': 'text-generation'}}\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## 使ってみる"
],
"metadata": {
"id": "QS7JpIwRZ4P4"
}
},
{
"cell_type": "code",
"source": [
"import torch\n",
"from transformers import AutoModelForCausalLM, T5Tokenizer\n",
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
"\n",
"tokenizer = T5Tokenizer.from_pretrained(\"rinna/japanese-gpt2-medium\")\n",
"tokenizer.do_lower_case = True\n",
"model = AutoModelForCausalLM.from_pretrained('./output')\n",
"model.to(device)\n",
"model.eval()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "OTewnG-MZ6Cv",
"outputId": "7bb9e0a2-2f65-4574-84fa-f8f3b487c332"
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"GPT2LMHeadModel(\n",
" (transformer): GPT2Model(\n",
" (wte): Embedding(32000, 1024)\n",
" (wpe): Embedding(1024, 1024)\n",
" (drop): Dropout(p=0.1, inplace=False)\n",
" (h): ModuleList(\n",
" (0): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (1): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (2): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (3): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (4): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (5): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (6): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (7): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (8): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (9): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (10): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (11): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (12): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (13): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (14): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (15): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (16): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (17): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (18): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (19): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (20): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (21): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (22): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" (23): GPT2Block(\n",
" (ln_1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (attn): GPT2Attention(\n",
" (c_attn): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (attn_dropout): Dropout(p=0.1, inplace=False)\n",
" (resid_dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (ln_2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" (mlp): GPT2MLP(\n",
" (c_fc): Conv1D()\n",
" (c_proj): Conv1D()\n",
" (act): NewGELUActivation()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (ln_f): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
" )\n",
" (lm_head): Linear(in_features=1024, out_features=32000, bias=False)\n",
")"
]
},
"metadata": {},
"execution_count": 18
}
]
},
{
"cell_type": "code",
"source": [
"input_text = '<s>進化中のニャオハに屈伸煽りすると立つ</s>[SEP]';\n",
"input_ids = tokenizer.encode(input_text, return_tensors='pt').to(device)\n",
"out = model.generate(input_ids, do_sample=True, top_p=0.95, top_k=100, \n",
" num_return_sequences=10, max_length=64)\n",
"\n",
"for sent in tokenizer.batch_decode(out, skip_special_tokens=True):\n",
" print(sent)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "84465790-43e7-438f-f4ea-3d6f7a99d7fe",
"id": "dE7ZBcDoute9"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n",
"Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.\n",
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n"
]
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"進化中のニャオハに屈伸煽りすると立つ 「気を付けないと・・・」\n",
"進化中のニャオハに屈伸煽りすると立つ 「猫が立ってた」\n",
"進化中のニャオハに屈伸煽りすると立つ 「そんな事気にする事ない」\n",
"進化中のニャオハに屈伸煽りすると立つ 「可愛すぎる......」\n",
"進化中のニャオハに屈伸煽りすると立つ 「の技見たいに決まってんだろ!見てみろよ!」\n",
"進化中のニャオハに屈伸煽りすると立つ 「ニャオハには負けるな、私にも...」\n",
"進化中のニャオハに屈伸煽りすると立つ 「この技を使っても倒せない」\n",
"進化中のニャオハに屈伸煽りすると立つ 「ああ...」\n",
"進化中のニャオハに屈伸煽りすると立つ 「ネコ科になるとこのポーズになる」\n",
"進化中のニャオハに屈伸煽りすると立つ 「お前ら全員ヤバい奴だって分かってるんだから」\n"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment