Skip to content

Instantly share code, notes, and snippets.

@avidale
Last active March 27, 2024 18:35
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save avidale/7bc6350f26196918bf339c01261f5c60 to your computer and use it in GitHub Desktop.
Save avidale/7bc6350f26196918bf339c01261f5c60 to your computer and use it in GitHub Desktop.
rubert-tiny
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"accelerator": "GPU",
"colab": {
"name": "rubert-tiny",
"provenance": [],
"collapsed_sections": [],
"toc_visible": true,
"include_colab_link": true
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"0a52fe88c96b4cd6ad3419b76500a7f5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_7efe537454eb4797b8b78b5446d1aeeb",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_b25796d6816a419493e51707fa382837",
"IPY_MODEL_1cc992a5ad7d49408faa54108df0fb7c"
]
}
},
"7efe537454eb4797b8b78b5446d1aeeb": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"b25796d6816a419493e51707fa382837": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_800be8a4516c41f9a2221222d0f175fa",
"_dom_classes": [],
"description": "Downloading: ",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1896,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1896,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_9053db753786459cbce371472b1b5647"
}
},
"1cc992a5ad7d49408faa54108df0fb7c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_c422afc902854ae5a1a62e7d86bc5ba8",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 4.29k/? [00:02<00:00, 1.94kB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_a5c64dc937184d36af38b5112b2bce82"
}
},
"800be8a4516c41f9a2221222d0f175fa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"9053db753786459cbce371472b1b5647": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"c422afc902854ae5a1a62e7d86bc5ba8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"a5c64dc937184d36af38b5112b2bce82": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"4439025ae3aa449e98a6b93aca49d6cd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_015645e2bc434295a6fd8752ca985bea",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_43f0dd9742ab4962bd67d776a3fbfb4b",
"IPY_MODEL_df9ebae2913948479b8e34c9238c47a8"
]
}
},
"015645e2bc434295a6fd8752ca985bea": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"43f0dd9742ab4962bd67d776a3fbfb4b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_a5cc62ccf350423fab12ab98f222d70e",
"_dom_classes": [],
"description": "Downloading: ",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1438,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1438,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_abd6844fc9b64f569ee1d9fe3759feae"
}
},
"df9ebae2913948479b8e34c9238c47a8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_ce70ee84d0954e1e861d0072d8b2815d",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 8.58k/? [00:00<00:00, 128kB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_9433190ace91411e9e15e0c2ee43084d"
}
},
"a5cc62ccf350423fab12ab98f222d70e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"abd6844fc9b64f569ee1d9fe3759feae": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"ce70ee84d0954e1e861d0072d8b2815d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"9433190ace91411e9e15e0c2ee43084d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"31352c7a09c6416581d37d0ca9249cc7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_c7c64bb990f2462792ef9e3fe5444d27",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_463248de93c641ff836da752e2e96f36",
"IPY_MODEL_7672f5a6ddac4154b9ee9dc107bda350"
]
}
},
"c7c64bb990f2462792ef9e3fe5444d27": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"463248de93c641ff836da752e2e96f36": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_418ad1bf1e2b4c6dba5b52748accf3d5",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 14047102,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 14047102,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_c6ccbcc2bd18435fa0677d9b0ac4218f"
}
},
"7672f5a6ddac4154b9ee9dc107bda350": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_c59b80c09ab345ebb28e4a75fcf2031c",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 14.0M/14.0M [00:01<00:00, 13.7MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6cc9689b0cb04ce9af56c9bdcd575292"
}
},
"418ad1bf1e2b4c6dba5b52748accf3d5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"c6ccbcc2bd18435fa0677d9b0ac4218f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"c59b80c09ab345ebb28e4a75fcf2031c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"6cc9689b0cb04ce9af56c9bdcd575292": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"dabf86c8ea8d422a8609ae2712e7bae3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_2fd17344fc2c4f86b14195521902519f",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_4f8858f4b10b469a8384b979b2ba72a2",
"IPY_MODEL_5fcd8ad7ddf647dba17c6078af40d915"
]
}
},
"2fd17344fc2c4f86b14195521902519f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"4f8858f4b10b469a8384b979b2ba72a2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_4d6c62fcd63648f681a7add2af68dac4",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_16b9ad470df9491ba89dbf7235a28b06"
}
},
"5fcd8ad7ddf647dba17c6078af40d915": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_a75a0c9bd112445a9298486196ea0274",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 514195/0 [00:12<00:00, 39130.89 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_28d68f14a6704f19ac164391e0454a4b"
}
},
"4d6c62fcd63648f681a7add2af68dac4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"16b9ad470df9491ba89dbf7235a28b06": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"a75a0c9bd112445a9298486196ea0274": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"28d68f14a6704f19ac164391e0454a4b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"69ccb24556874ea2a888474745f84264": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_5a4c7eb5bc0242cc897ff0205d049abe",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_3c87620a0b4b43d4a839c7cb57b0ed08",
"IPY_MODEL_6cd9c354332c48708d2bd972165df0be"
]
}
},
"5a4c7eb5bc0242cc897ff0205d049abe": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"3c87620a0b4b43d4a839c7cb57b0ed08": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_0307ce401df648eb8a53f9e28b53591d",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 514195,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 514195,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d44027a88ccb4bcb90ec41c4e0db0167"
}
},
"6cd9c354332c48708d2bd972165df0be": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_0a399b8c74a746578ea80efd1da5104d",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 514195/514195 [00:48<00:00, 10525.24it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_954094a06e274d758c3931a2743b43cc"
}
},
"0307ce401df648eb8a53f9e28b53591d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"d44027a88ccb4bcb90ec41c4e0db0167": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"0a399b8c74a746578ea80efd1da5104d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"954094a06e274d758c3931a2743b43cc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"15eb862a14ab4a8290659c5be4165512": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_48253d09475a48f286288d389b129a49",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_6fc002d18c8645e8a87a0d02df05820f",
"IPY_MODEL_8105accd26264b2ca4811696bab672c0"
]
}
},
"48253d09475a48f286288d389b129a49": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"6fc002d18c8645e8a87a0d02df05820f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_a5a2a96e74ba44ad926af4298cb493ea",
"_dom_classes": [],
"description": "Downloading: ",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2216,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2216,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f4f688aa239341a6a53a9c53e8801910"
}
},
"8105accd26264b2ca4811696bab672c0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_0926dce034e64aebb525043f8d805eb4",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 6.94k/? [00:00<00:00, 24.8kB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_99c87db5323246d9b3a3e3f31401d686"
}
},
"a5a2a96e74ba44ad926af4298cb493ea": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"f4f688aa239341a6a53a9c53e8801910": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"0926dce034e64aebb525043f8d805eb4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"99c87db5323246d9b3a3e3f31401d686": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"e9a9e0950ddf48df980a7d64cdf0d113": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_35fc1bf189e841d49f45dee21432a6fd",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_b3baf8cc045e4d72bd9360df4766273f",
"IPY_MODEL_eb53eb69ea3d43e195444ba540d84fd7"
]
}
},
"35fc1bf189e841d49f45dee21432a6fd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"b3baf8cc045e4d72bd9360df4766273f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_b42f89384ce145b4abfd926a2bf5b76f",
"_dom_classes": [],
"description": "Downloading: ",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 13292,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 13292,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d686a207b3dc4ad79b026bd7f75a840b"
}
},
"eb53eb69ea3d43e195444ba540d84fd7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_aab7cd25a05843ed92ad8669e7d4c598",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 192k/? [00:03<00:00, 49.0kB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_133cd5e05c794709a4c83d244cd14474"
}
},
"b42f89384ce145b4abfd926a2bf5b76f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"d686a207b3dc4ad79b026bd7f75a840b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"aab7cd25a05843ed92ad8669e7d4c598": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"133cd5e05c794709a4c83d244cd14474": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"560831b29a0d4de29fe785cc4ece0610": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_07a0a865c2ab417d9a29ec7a671c4151",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_e30e1ba86c5e418cb22c06c6a6059341",
"IPY_MODEL_4eb26191b7a744598581356ec150127f"
]
}
},
"07a0a865c2ab417d9a29ec7a671c4151": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"e30e1ba86c5e418cb22c06c6a6059341": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_98b2e77e61de45c681f7e608ac7e4109",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 68501634,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 68501634,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_61865f221cfe404b9b39a69090644507"
}
},
"4eb26191b7a744598581356ec150127f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_153bbb6533184782a4a03507d70b81e6",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 68.5M/68.5M [00:03<00:00, 21.6MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_2a388c75761c48ddb43c3a30cbc6e6ad"
}
},
"98b2e77e61de45c681f7e608ac7e4109": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"61865f221cfe404b9b39a69090644507": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"153bbb6533184782a4a03507d70b81e6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"2a388c75761c48ddb43c3a30cbc6e6ad": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"a9fff4a599da446a9b4b52e8c696b81e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_7209b0d38d8341d681a96eb542aebb8f",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_81f9204291df4e49b80fd21d4e057c70",
"IPY_MODEL_c909d711a42943a8a2152fc09f25be98"
]
}
},
"7209b0d38d8341d681a96eb542aebb8f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"81f9204291df4e49b80fd21d4e057c70": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_d0a1fb9dbb6c4ef7944db9b82ede6e5d",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_7625b1d1090641b0842d0553cb0e7e66"
}
},
"c909d711a42943a8a2152fc09f25be98": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_10129c224cef4f82b893453b0e5578dd",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2000/0 [00:00<00:00, 17089.00 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_cb74b9c81d0746fd8a44973d5d2544f7"
}
},
"d0a1fb9dbb6c4ef7944db9b82ede6e5d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"7625b1d1090641b0842d0553cb0e7e66": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"10129c224cef4f82b893453b0e5578dd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"cb74b9c81d0746fd8a44973d5d2544f7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"20eb0b7ab6584d84a7f7ab7477040e3d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_9785e07c64ca4068ad99a65da326b1aa",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_588ff0d4b83f439cb8787314267ad6ea",
"IPY_MODEL_b6c532398f4045d184600d1bf7849b54"
]
}
},
"9785e07c64ca4068ad99a65da326b1aa": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"588ff0d4b83f439cb8787314267ad6ea": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_f7258ebdafef444281c048fbece5adab",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_50448247069f4330b2d4114abd2523fc"
}
},
"b6c532398f4045d184600d1bf7849b54": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_2651f7dced1d4d7b9c396afb8b7dd7be",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 1000000/0 [00:22<00:00, 55424.94 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f5e05f9dbb3b4fe0b4ecd0041fab282f"
}
},
"f7258ebdafef444281c048fbece5adab": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"50448247069f4330b2d4114abd2523fc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"2651f7dced1d4d7b9c396afb8b7dd7be": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"f5e05f9dbb3b4fe0b4ecd0041fab282f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"234662f3a8d248d19cc52da034a842f0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_cc136fac62654de3a029d25cb7644ad4",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_cf1a6777af99454dbf08cf86ab342132",
"IPY_MODEL_54a7d7995a1d4073998d7f43f4ea877c"
]
}
},
"cc136fac62654de3a029d25cb7644ad4": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"cf1a6777af99454dbf08cf86ab342132": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_c11ff305c42d42d781ea618658f622db",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d14040f5a53c4410a58d2a871612248a"
}
},
"54a7d7995a1d4073998d7f43f4ea877c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_026efcab8c1b48739e1b521a5df70316",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2000/0 [00:00<00:00, 28797.64 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_373a2e36f38c4244aa80bc90405bbec0"
}
},
"c11ff305c42d42d781ea618658f622db": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"d14040f5a53c4410a58d2a871612248a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"026efcab8c1b48739e1b521a5df70316": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"373a2e36f38c4244aa80bc90405bbec0": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"79268e2e1c46422e889831b91236bc88": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_f0fea403e7054f2594643f4f2e1f32df",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_54108263ed2241809b0669a3c786d4bb",
"IPY_MODEL_ddbb28e74716429fb30f9134744770db"
]
}
},
"f0fea403e7054f2594643f4f2e1f32df": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"54108263ed2241809b0669a3c786d4bb": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_78e8b052d7024a73afa04cb0dc4b67e2",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1000000,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1000000,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_9de36f7dd9d442e197cc12be859b7772"
}
},
"ddbb28e74716429fb30f9134744770db": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_028906a5a0b648a9a99a698e14c740e1",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 1000000/1000000 [01:13<00:00, 13515.53it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6275954e5e824a5db4868b24e7876096"
}
},
"78e8b052d7024a73afa04cb0dc4b67e2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"9de36f7dd9d442e197cc12be859b7772": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"028906a5a0b648a9a99a698e14c740e1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"6275954e5e824a5db4868b24e7876096": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"1e81ca98918b442e889e196645e1ca47": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_378bd07de8ea49da995a9eeef4adb132",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_b9097818a3e84b3fb224bdb5162be393",
"IPY_MODEL_b88ee8c94000445db99d299aecca40ca"
]
}
},
"378bd07de8ea49da995a9eeef4adb132": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"b9097818a3e84b3fb224bdb5162be393": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_6e7166d1f6f34c81a44595750f3022ca",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 100,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 100,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_eb9c7b60c0f1484b80a020efec9e31b3"
}
},
"b88ee8c94000445db99d299aecca40ca": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_ef1ce741d6b44be6b21113f3d8d21629",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 100/100 [00:00<00:00, 302.52it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_8596aad5509247a2971fd22acaae7b3f"
}
},
"6e7166d1f6f34c81a44595750f3022ca": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"eb9c7b60c0f1484b80a020efec9e31b3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"ef1ce741d6b44be6b21113f3d8d21629": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"8596aad5509247a2971fd22acaae7b3f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"5a299c646f73422b94f086ed3fc40d07": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_a90da2d4f68749eba5441d4fc305fa36",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_cdcabf402d6d4f08ac3d65257a435734",
"IPY_MODEL_5ad80080b71441d9bfe16c41a838750a"
]
}
},
"a90da2d4f68749eba5441d4fc305fa36": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"cdcabf402d6d4f08ac3d65257a435734": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_59f5cfc0e8934ca29705583f702f6aa6",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 625,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 625,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6fa9ce85f1484bf6a49f4a019700d617"
}
},
"5ad80080b71441d9bfe16c41a838750a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_54582b5aafd649bbb6c30d9a2635a132",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 625/625 [00:20<00:00, 31.2B/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_a261543b77454ee4ba4ea2b36b543332"
}
},
"59f5cfc0e8934ca29705583f702f6aa6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"6fa9ce85f1484bf6a49f4a019700d617": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"54582b5aafd649bbb6c30d9a2635a132": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"a261543b77454ee4ba4ea2b36b543332": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"8b4ff98bc1e54aaf8125bdb3d8714927": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_f5d89146e7fa48529b9be8f00eeee9b9",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_46eca66cf3544a0490ac156cb213c353",
"IPY_MODEL_8dea7e2e0e1c490ba8c5c98eaa804001"
]
}
},
"f5d89146e7fa48529b9be8f00eeee9b9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"46eca66cf3544a0490ac156cb213c353": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_eeaba765569f4484a9e3b98d9142360a",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 714314041,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 714314041,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_9d4314d4febf4bb08d3438e6d69418be"
}
},
"8dea7e2e0e1c490ba8c5c98eaa804001": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_00c53b121ffc4c2bb4b7086bda5c303d",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 714M/714M [00:14<00:00, 47.7MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_66f0822b93554f16b30050ced4f7d85c"
}
},
"eeaba765569f4484a9e3b98d9142360a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"9d4314d4febf4bb08d3438e6d69418be": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"00c53b121ffc4c2bb4b7086bda5c303d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"66f0822b93554f16b30050ced4f7d85c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"d867eb2270344ab08b4b7bed3a515a98": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_c6d5340668a940b98ebab206cec8bfe5",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_a4df8e2c70eb4ff1a8172b7b74e7590e",
"IPY_MODEL_b29ef88147be4684ae7cd9c728d2bb11"
]
}
},
"c6d5340668a940b98ebab206cec8bfe5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"a4df8e2c70eb4ff1a8172b7b74e7590e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_008f4b212204435abc4cb6ac835526cd",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 995526,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 995526,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_2d7286b1ffa545dbb70734d04b50bf49"
}
},
"b29ef88147be4684ae7cd9c728d2bb11": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_44f57c89d335475396501f0178a6dc9b",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 996k/996k [00:00<00:00, 3.61MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_4d3f057bc56b481c9583f77241a2c3e6"
}
},
"008f4b212204435abc4cb6ac835526cd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"2d7286b1ffa545dbb70734d04b50bf49": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"44f57c89d335475396501f0178a6dc9b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"4d3f057bc56b481c9583f77241a2c3e6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"b12451cce3dc43b29589659227545677": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_392da82bed954990a4710398dfcf43ee",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_17a8beb0ecb5436288065f07dfc43347",
"IPY_MODEL_7203f603977d4f63a1b5e04678529bf9"
]
}
},
"392da82bed954990a4710398dfcf43ee": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"17a8beb0ecb5436288065f07dfc43347": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_35f7f7c515cd438d86709439f8f6cbea",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1961828,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1961828,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f6b9b945f72941389668855243292334"
}
},
"7203f603977d4f63a1b5e04678529bf9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_ab28c4129ec54b33a598b906f9a7476c",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 1.96M/1.96M [00:01<00:00, 1.64MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_c80fa2fd45ce4f9c8bd18cc37125ae57"
}
},
"35f7f7c515cd438d86709439f8f6cbea": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"f6b9b945f72941389668855243292334": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"ab28c4129ec54b33a598b906f9a7476c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"c80fa2fd45ce4f9c8bd18cc37125ae57": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"3eb695ed9df542a780c78898061f1b72": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_1758e6f7d50d41c3b7e7ccc81d415a15",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_13bdeb14a3c640039aab5195476c3a38",
"IPY_MODEL_3ae0ae9c625b41649b9c03af595dc067"
]
}
},
"1758e6f7d50d41c3b7e7ccc81d415a15": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"13bdeb14a3c640039aab5195476c3a38": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_c7938c61126d4dbcba28ef9e5c201628",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 29,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 29,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_58f64df9ec274bb1bab78464f1fce3d1"
}
},
"3ae0ae9c625b41649b9c03af595dc067": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_e1a52c00073f4114b9b3ae3c2938c9f0",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 29.0/29.0 [00:00<00:00, 54.6B/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_1394f29831cc461db28b37e1b9fbceb1"
}
},
"c7938c61126d4dbcba28ef9e5c201628": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"58f64df9ec274bb1bab78464f1fce3d1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"e1a52c00073f4114b9b3ae3c2938c9f0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"1394f29831cc461db28b37e1b9fbceb1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"65697756d861478a9ac41147461c622f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_4fbe8e37a43c4fc893065a3b1a24b315",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_de3300a639aa47289ccb1ccb7c198c7a",
"IPY_MODEL_a649e03475124e6f915d9c651bb3647b"
]
}
},
"4fbe8e37a43c4fc893065a3b1a24b315": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"de3300a639aa47289ccb1ccb7c198c7a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_45d69a6909a2478da5d9076c1de19d02",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 642,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 642,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_9e87935db6bb4edbb62563193965e94b"
}
},
"a649e03475124e6f915d9c651bb3647b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_5359a33301ec4314852bc2dc4169f766",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 642/642 [00:19<00:00, 32.6B/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_ccb8239430404ce39ef61fc80afc91b3"
}
},
"45d69a6909a2478da5d9076c1de19d02": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"9e87935db6bb4edbb62563193965e94b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"5359a33301ec4314852bc2dc4169f766": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"ccb8239430404ce39ef61fc80afc91b3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"67a62027a8c1455d82757d280188ac28": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_fa60da066e654a2b952b4785057ab1e3",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_0eec813da49b4ac1a8f68f4818a4abec",
"IPY_MODEL_e1d88b5cf5d14d3e99397407a1dbb156"
]
}
},
"fa60da066e654a2b952b4785057ab1e3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"0eec813da49b4ac1a8f68f4818a4abec": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_31d54d98b9e247feb05dbb78789fd730",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 711456784,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 711456784,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_c17b555b227b46c7bea80223108c6e4d"
}
},
"e1d88b5cf5d14d3e99397407a1dbb156": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_417544674efa4d00bcf189beb1e5d708",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 711M/711M [00:14<00:00, 48.5MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_1fa20222ee214f1e838d8eaf9cd4ea5b"
}
},
"31d54d98b9e247feb05dbb78789fd730": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"c17b555b227b46c7bea80223108c6e4d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"417544674efa4d00bcf189beb1e5d708": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"1fa20222ee214f1e838d8eaf9cd4ea5b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"727455cc6bac4c7aab2408c07f1c7de3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_3a4eaf740a2f414bac7de1060c9a026a",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_abaf48cb84a249ea9b42fbf9286ba339",
"IPY_MODEL_cf2ab42ab61646f9beac706ce621d467"
]
}
},
"3a4eaf740a2f414bac7de1060c9a026a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"abaf48cb84a249ea9b42fbf9286ba339": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_b5bf6b0bfcf441ae985409521c439132",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1649718,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1649718,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_bcfb9a7902ac4afa8545fa075c31d922"
}
},
"cf2ab42ab61646f9beac706ce621d467": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_0ee39dc997934de4af52ac495d6ccbf6",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 1.65M/1.65M [00:02<00:00, 642kB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_fe1827a4bd5b4bb8a7b2a8ef35c3d10e"
}
},
"b5bf6b0bfcf441ae985409521c439132": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"bcfb9a7902ac4afa8545fa075c31d922": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"0ee39dc997934de4af52ac495d6ccbf6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"fe1827a4bd5b4bb8a7b2a8ef35c3d10e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"339c4748dc4b4d8baf2f485693c96b43": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_cb26698e3ba14bf5ba4fc54bae050273",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_76e89e90dc4347d3bdf8a5b0e64dbb64",
"IPY_MODEL_0905e57693424f419d4ef5316d592e8d"
]
}
},
"cb26698e3ba14bf5ba4fc54bae050273": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"76e89e90dc4347d3bdf8a5b0e64dbb64": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_9b18103bbe324872af4d64766c3e0a83",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 112,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 112,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_e99f65dd574949959b70fba7a8f6ef15"
}
},
"0905e57693424f419d4ef5316d592e8d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_26b49c9f8d1f43baac0df9cfafb43436",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 112/112 [00:00<00:00, 129B/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_aa72c0902c3a43b0a88ac45c02cf2bc6"
}
},
"9b18103bbe324872af4d64766c3e0a83": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"e99f65dd574949959b70fba7a8f6ef15": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"26b49c9f8d1f43baac0df9cfafb43436": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"aa72c0902c3a43b0a88ac45c02cf2bc6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"77c749bd8cf64202b8316c005d142a81": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_a694ac748da84dcb91974c1a339c787b",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_77d0548dab7247d19db6c978cc8a5b1f",
"IPY_MODEL_4f6aabfc6ac44937a2630e0ad150d831"
]
}
},
"a694ac748da84dcb91974c1a339c787b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"77d0548dab7247d19db6c978cc8a5b1f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_253a69aaead84f8a92876ed531e9f045",
"_dom_classes": [],
"description": "Downloading: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 24,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 24,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f21714938a91437eb90a6f3f40bb9395"
}
},
"4f6aabfc6ac44937a2630e0ad150d831": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_7c4cb05f930f40fbb96f13552a5bc60c",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 24.0/24.0 [00:00<00:00, 177B/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_36b7c06256b94a9ab6679eb7fe3e6ff3"
}
},
"253a69aaead84f8a92876ed531e9f045": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"f21714938a91437eb90a6f3f40bb9395": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"7c4cb05f930f40fbb96f13552a5bc60c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"36b7c06256b94a9ab6679eb7fe3e6ff3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"e5c01ec834474e8aa33b26947804e512": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_2b62264fbffc4822864b3399614ec73e",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_3d86795f60d44a508aff4f81ff3fe3ce",
"IPY_MODEL_2309468a56b747bfbf1929d47c08731b"
]
}
},
"2b62264fbffc4822864b3399614ec73e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"3d86795f60d44a508aff4f81ff3fe3ce": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_dd843dae9dd74a2ba1ec1d171f4a5dfe",
"_dom_classes": [],
"description": "loss: 21.11 6.79 2.04 7.66 4.62|5.7e-06: 2%",
"_model_name": "FloatProgressModel",
"bar_style": "danger",
"max": 471411,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9883,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_cd06b4930112436980d8ad761384f2a6"
}
},
"2309468a56b747bfbf1929d47c08731b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_d4dc016b50404879a30c90770e9ef415",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9883/471411 [1:42:59<72:40:55, 1.76it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_2bf4ad78caba457baff8347da6058746"
}
},
"dd843dae9dd74a2ba1ec1d171f4a5dfe": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"cd06b4930112436980d8ad761384f2a6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"d4dc016b50404879a30c90770e9ef415": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"2bf4ad78caba457baff8347da6058746": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/avidale/7bc6350f26196918bf339c01261f5c60/rubert-tiny.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "kEMO_tYly1iA"
},
"source": [
"Задача - сделать свой маленький англо-русский BERT с информативными сжатыми представлениями предложений:\n",
"* Инициализируем с нуля маленький BERT (3 слоя, 45 мб весов, 12M параметров, из которых 9M - эмбеддинги) с англо-русским подмножеством словаря bert multilingual (30К токенов)\n",
"* Эмбеддинги частично инициализируем из bert multilingual тоже\n",
"* При обучении используем несколько лоссов:\n",
" * Дистиллируем распределение выходных токенов обычного мультиязычного берта\n",
" * Минимизируем whole-word MLM лосс\n",
" * Минимизируем translation ranking loss, как в LaBSE\n",
" * Минимизируем перплексию декодера T5, обусловленного на CLS токен и воспроизводящего текст. \n",
" * Дистиллируем CLS токены, приближая разные их проекции к эмбеддингам RuBERT, LaBSE и Laser. \n",
"* Обучается это всё на 2.5 млн параллельных англо-русских предложений собранных из разных корпусов. \n",
"\n",
"Вдохновлено:\n",
"* TinyBERT от Хуавея https://huggingface.co/huawei-noah/TinyBERT_General_4L_312D\n",
"* LaBSE от Google https://arxiv.org/pdf/2007.01852.pdf"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "rq-7vupMKXgV"
},
"source": [
"### Dependencies"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "8r4axg2vWEkN"
},
"source": [
"Гугл диск я подключаю, т.к. на нём находится часть обучающих данных, и туда же я регулярно сохраняю веса модели. "
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "eYZL1uWbzC6X",
"outputId": "74f403ee-916c-47e9-f5e5-8d7cb8186d96"
},
"source": [
"from google.colab import drive\n",
"drive.mount('/gd')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Mounted at /gd\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "9XQNVTpEy9ot"
},
"source": [
"!pip install transformers sentencepiece datasets natasha laserembeddings"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "tJTKjScSqjwd"
},
"source": [
"!pip install tensorflow_text>=2.0.0"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "BTISmp06aCoH",
"outputId": "5e7dd26a-853e-4c15-ee43-5df7065f9f03"
},
"source": [
"!python -m laserembeddings download-models"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Downloading models into /usr/local/lib/python3.7/dist-packages/laserembeddings/data\n",
"\n",
"✅ Downloaded https://dl.fbaipublicfiles.com/laser/models/93langs.fcodes \n",
"✅ Downloaded https://dl.fbaipublicfiles.com/laser/models/93langs.fvocab \n",
"✅ Downloaded https://dl.fbaipublicfiles.com/laser/models/bilstm.93langs.2018-12-26.pt \n",
"\n",
"✨ You're all set!\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "9svxvMTvy39u"
},
"source": [
"### Prepare"
]
},
{
"cell_type": "code",
"metadata": {
"id": "94VHk0fFy1iC"
},
"source": [
"from transformers import BertForPreTraining, BertTokenizerFast, BertConfig"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "V9bZGdbxy1iD"
},
"source": [
"base_model = 'bert-base-multilingual-cased'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "sxj7hWvry1iD"
},
"source": [
"tok = BertTokenizerFast.from_pretrained(base_model)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "BTRNh4UaV9QR"
},
"source": [
"Корпус взят из https://translate.yandex.ru/corpus"
]
},
{
"cell_type": "code",
"metadata": {
"id": "R-EIHyu8y1iE"
},
"source": [
"corpus_path = 'C:/Users/david/Google Диск/datasets/nlp/1mcorpus/'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "Jox8iDFxy1iE"
},
"source": [
"import pandas as pd\n",
"import csv\n",
"df_en = pd.read_csv(corpus_path + 'corpus.en_ru.1m.en', sep='\\t', header=None, quoting=csv.QUOTE_NONE)\n",
"df_ru = pd.read_csv(corpus_path + 'corpus.en_ru.1m.ru', sep='\\t', header=None, quoting=csv.QUOTE_NONE)\n",
"df_en.columns = ['text']\n",
"df_ru.columns = ['text']\n",
"\n",
"print(df_ru.shape)\n",
"print(df_en.shape)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "K9fvvAUiy1iF"
},
"source": [
"pd.Series(len(tt) for tt in tok(df_ru.sample(10000).text.tolist())['input_ids']).describe()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "udKF0-ogy1iG"
},
"source": [
"pd.Series(len(tt) for tt in tok(df_en.sample(10000).text.tolist())['input_ids']).describe()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "U9c3l_G9y1iG"
},
"source": [
"### The tokenizer: initialize"
]
},
{
"cell_type": "code",
"metadata": {
"id": "9j7tKn-Ly1iG"
},
"source": [
"from collections import Counter\n",
"from tqdm.auto import tqdm, trange\n",
"\n",
"cnt_ru = Counter()\n",
"for text in tqdm(df_ru.text):\n",
" cnt_ru.update(tok(text)['input_ids'])\n",
" \n",
"cnt_en = Counter()\n",
"for text in tqdm(df_en.text):\n",
" cnt_en.update(tok(text)['input_ids'])"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "sp2S_n4vy1iH"
},
"source": [
"print(len(cnt_ru), len(cnt_en))"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "-gp_v382y1iH"
},
"source": [
"print(len(sorted(k for k, v in cnt_ru.items() if v >= 5)))\n",
"print(len(sorted(k for k, v in cnt_en.items() if v >= 5)))"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "3hJoCpsiy1iH"
},
"source": [
"print(len(sorted(k for k, v in cnt_ru.items() if v >= 10)))\n",
"print(len(sorted(k for k, v in cnt_en.items() if v >= 10)))"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "39csPaYQy1iI"
},
"source": [
"print(len(sorted(k for k, v in cnt_ru.items() if v >= 100)))\n",
"print(len(sorted(k for k, v in cnt_en.items() if v >= 100)))"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "3ZHzcaCny1iI",
"outputId": "6d1e8a1a-2116-4bfb-da69-afdc871e936b"
},
"source": [
"resulting_vocab = {\n",
" tok.vocab[k] for k in tok.special_tokens_map.values()\n",
"}\n",
"for k, v in cnt_ru.items():\n",
" if v >= 5 or k <= 3_000:\n",
" resulting_vocab.add(k)\n",
"for k, v in cnt_en.items():\n",
" if v >= 100 or k <= 3_000:\n",
" resulting_vocab.add(k)\n",
"\n",
"resulting_vocab = sorted(resulting_vocab)\n",
"print(len(resulting_vocab))"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"29564\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "PtJMnr6Ry1iI"
},
"source": [
"NEW_MODEL_NAME = 'tinybert-ru'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "WnLTEkjsy1iJ",
"outputId": "eac88e1f-7183-4a48-e023-5144ad6deb59"
},
"source": [
"tok.save_pretrained(NEW_MODEL_NAME)"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"('tinybert-ru\\\\tokenizer_config.json',\n",
" 'tinybert-ru\\\\special_tokens_map.json',\n",
" 'tinybert-ru\\\\vocab.txt',\n",
" 'tinybert-ru\\\\added_tokens.json')"
]
},
"metadata": {
"tags": []
},
"execution_count": 33
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "V7oYbcSHy1iJ"
},
"source": [
"inv_voc = {idx: word for word, idx in tok.vocab.items()}"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "yVOjjZdty1iJ"
},
"source": [
"with open(NEW_MODEL_NAME + '/vocab.txt', 'w', encoding='utf-8') as f:\n",
" for idx in resulting_vocab:\n",
" f.write(inv_voc[idx] + '\\n')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "isSzziqJy1iJ"
},
"source": [
"### The model: initialize"
]
},
{
"cell_type": "code",
"metadata": {
"id": "aR6BUzn3y1iK"
},
"source": [
"new_tokenizer = BertTokenizerFast.from_pretrained(NEW_MODEL_NAME)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "Ql37rRQmy1iK"
},
"source": [
"small_config = BertConfig(\n",
" emb_size=312,\n",
" hidden_size=312,\n",
" intermediate_size=600,\n",
" max_position_embeddings=512,\n",
" num_attention_heads=12,\n",
" num_hidden_layers=3,\n",
" vocab_size=new_tokenizer.vocab_size,\n",
")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "kYudfvpfy1iK"
},
"source": [
"small_model = BertForPreTraining(small_config)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "8T1dsHTny1iK"
},
"source": [
"small_model.save_pretrained(NEW_MODEL_NAME)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "BU06VFHMy1iK"
},
"source": [
"Выкачиваем веса из большой модели для инициализации"
]
},
{
"cell_type": "code",
"metadata": {
"id": "eDfDgaTny1iL",
"outputId": "f5f9126d-b159-4653-c731-a79b0ef7fa03"
},
"source": [
"big_model = BertForPreTraining.from_pretrained(base_model)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Some weights of BertForPreTraining were not initialized from the model checkpoint at bert-base-multilingual-cased and are newly initialized: ['cls.predictions.decoder.bias']\n",
"You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "4fehLoEiy1iL"
},
"source": [
"# copy input embeddings\n",
"small_model.bert.embeddings.word_embeddings.weight.data = big_model.bert.embeddings.word_embeddings.weight.data[resulting_vocab, :312].clone()\n",
"small_model.bert.embeddings.position_embeddings.weight.data = big_model.bert.embeddings.position_embeddings.weight.data[:, :312].clone()\n",
"# copy output embeddings\n",
"small_model.cls.predictions.decoder.weight.data = big_model.cls.predictions.decoder.weight.data[resulting_vocab, :312].clone()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "097Jhjzry1iL"
},
"source": [
"small_model.save_pretrained(NEW_MODEL_NAME)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "QhhbVcCay1iL"
},
"source": [
"### Fine tune the model (multitask and distillation)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "GryEO7tjzXaA"
},
"source": [
"NEW_MODEL_NAME = 'tinybert-ru'\n",
"NEW_MODEL_NAME = '/gd/MyDrive/models/tinybert-ru'\n",
"base_model = 'bert-base-multilingual-cased'\n",
"#corpus_path = 'C:/Users/david/Google Диск/datasets/nlp/1mcorpus/'\n",
"corpus_path = '/gd/MyDrive/datasets/nlp/1mcorpus/'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "vxKUbgdIy1iL"
},
"source": [
"from transformers import BertForPreTraining, BertTokenizerFast, BertConfig"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "v20PtZrIy1iM"
},
"source": [
"import torch\n",
"import torch.nn as nn\n",
"import torch.nn.functional as F"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "NndT9QKdy1iM"
},
"source": [
"from tqdm.auto import tqdm, trange"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "nonXL8bFy1iM"
},
"source": [
"#### Prepare data"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "7W4TGrrDy1iM",
"outputId": "b8026624-1919-4492-c1f8-23981d8f8cfc"
},
"source": [
"import pandas as pd\n",
"import csv\n",
"df_en = pd.read_csv(corpus_path + 'corpus.en_ru.1m.en', sep='\\t', header=None, quoting=csv.QUOTE_NONE)\n",
"df_ru = pd.read_csv(corpus_path + 'corpus.en_ru.1m.ru', sep='\\t', header=None, quoting=csv.QUOTE_NONE)\n",
"df_en.columns = ['text']\n",
"df_ru.columns = ['text']\n",
"\n",
"print(df_ru.shape)\n",
"print(df_en.shape)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"(1000000, 1)\n",
"(1000000, 1)\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "0A3J_45PvlGZ"
},
"source": [
"Добавляем датасеты opus100 и tatoeba, чтобы разнообразить примеры\n",
"\n",
"https://huggingface.co/datasets/opus100\n",
"\n",
"https://huggingface.co/datasets/tatoeba"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 289,
"referenced_widgets": [
"0a52fe88c96b4cd6ad3419b76500a7f5",
"7efe537454eb4797b8b78b5446d1aeeb",
"b25796d6816a419493e51707fa382837",
"1cc992a5ad7d49408faa54108df0fb7c",
"800be8a4516c41f9a2221222d0f175fa",
"9053db753786459cbce371472b1b5647",
"c422afc902854ae5a1a62e7d86bc5ba8",
"a5c64dc937184d36af38b5112b2bce82",
"4439025ae3aa449e98a6b93aca49d6cd",
"015645e2bc434295a6fd8752ca985bea",
"43f0dd9742ab4962bd67d776a3fbfb4b",
"df9ebae2913948479b8e34c9238c47a8",
"a5cc62ccf350423fab12ab98f222d70e",
"abd6844fc9b64f569ee1d9fe3759feae",
"ce70ee84d0954e1e861d0072d8b2815d",
"9433190ace91411e9e15e0c2ee43084d",
"31352c7a09c6416581d37d0ca9249cc7",
"c7c64bb990f2462792ef9e3fe5444d27",
"463248de93c641ff836da752e2e96f36",
"7672f5a6ddac4154b9ee9dc107bda350",
"418ad1bf1e2b4c6dba5b52748accf3d5",
"c6ccbcc2bd18435fa0677d9b0ac4218f",
"c59b80c09ab345ebb28e4a75fcf2031c",
"6cc9689b0cb04ce9af56c9bdcd575292",
"dabf86c8ea8d422a8609ae2712e7bae3",
"2fd17344fc2c4f86b14195521902519f",
"4f8858f4b10b469a8384b979b2ba72a2",
"5fcd8ad7ddf647dba17c6078af40d915",
"4d6c62fcd63648f681a7add2af68dac4",
"16b9ad470df9491ba89dbf7235a28b06",
"a75a0c9bd112445a9298486196ea0274",
"28d68f14a6704f19ac164391e0454a4b",
"69ccb24556874ea2a888474745f84264",
"5a4c7eb5bc0242cc897ff0205d049abe",
"3c87620a0b4b43d4a839c7cb57b0ed08",
"6cd9c354332c48708d2bd972165df0be",
"0307ce401df648eb8a53f9e28b53591d",
"d44027a88ccb4bcb90ec41c4e0db0167",
"0a399b8c74a746578ea80efd1da5104d",
"954094a06e274d758c3931a2743b43cc"
]
},
"id": "ZgQHrZ2aqhU8",
"outputId": "16f2edfa-c4d3-4dab-99cc-240fa5e3e3aa"
},
"source": [
"from datasets import load_dataset\n",
"tatoeba = load_dataset(\"tatoeba\", lang1=\"en\", lang2=\"ru\")\n",
"\n",
"tat_ru = []\n",
"tat_en = []\n",
"for pair in tqdm(tatoeba['train']):\n",
" tat_ru.append(pair['translation']['ru'])\n",
" tat_en.append(pair['translation']['en'])\n",
"\n",
"df_en = pd.concat([df_en, pd.Series(tat_en, name='text').to_frame()])\n",
"df_ru = pd.concat([df_ru, pd.Series(tat_ru, name='text').to_frame()])"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0a52fe88c96b4cd6ad3419b76500a7f5",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=1896.0, style=ProgressStyle(description…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4439025ae3aa449e98a6b93aca49d6cd",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=1438.0, style=ProgressStyle(description…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Using custom data configuration en-ru-lang1=en,lang2=ru\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"\n",
"Downloading and preparing dataset tatoeba/en-ru (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/tatoeba/en-ru-lang1=en,lang2=ru/0.0.0/54423b66d13968ea583b6ac5828448a54b1a69944cabd3368ccd364fdb4f3216...\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "31352c7a09c6416581d37d0ca9249cc7",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=14047102.0, style=ProgressStyle(descrip…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dabf86c8ea8d422a8609ae2712e7bae3",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\rDataset tatoeba downloaded and prepared to /root/.cache/huggingface/datasets/tatoeba/en-ru-lang1=en,lang2=ru/0.0.0/54423b66d13968ea583b6ac5828448a54b1a69944cabd3368ccd364fdb4f3216. Subsequent calls will reuse this data.\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "69ccb24556874ea2a888474745f84264",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=514195.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 272,
"referenced_widgets": [
"15eb862a14ab4a8290659c5be4165512",
"48253d09475a48f286288d389b129a49",
"6fc002d18c8645e8a87a0d02df05820f",
"8105accd26264b2ca4811696bab672c0",
"a5a2a96e74ba44ad926af4298cb493ea",
"f4f688aa239341a6a53a9c53e8801910",
"0926dce034e64aebb525043f8d805eb4",
"99c87db5323246d9b3a3e3f31401d686",
"e9a9e0950ddf48df980a7d64cdf0d113",
"35fc1bf189e841d49f45dee21432a6fd",
"b3baf8cc045e4d72bd9360df4766273f",
"eb53eb69ea3d43e195444ba540d84fd7",
"b42f89384ce145b4abfd926a2bf5b76f",
"d686a207b3dc4ad79b026bd7f75a840b",
"aab7cd25a05843ed92ad8669e7d4c598",
"133cd5e05c794709a4c83d244cd14474",
"560831b29a0d4de29fe785cc4ece0610",
"07a0a865c2ab417d9a29ec7a671c4151",
"e30e1ba86c5e418cb22c06c6a6059341",
"4eb26191b7a744598581356ec150127f",
"98b2e77e61de45c681f7e608ac7e4109",
"61865f221cfe404b9b39a69090644507",
"153bbb6533184782a4a03507d70b81e6",
"2a388c75761c48ddb43c3a30cbc6e6ad",
"a9fff4a599da446a9b4b52e8c696b81e",
"7209b0d38d8341d681a96eb542aebb8f",
"81f9204291df4e49b80fd21d4e057c70",
"c909d711a42943a8a2152fc09f25be98",
"d0a1fb9dbb6c4ef7944db9b82ede6e5d",
"7625b1d1090641b0842d0553cb0e7e66",
"10129c224cef4f82b893453b0e5578dd",
"cb74b9c81d0746fd8a44973d5d2544f7",
"20eb0b7ab6584d84a7f7ab7477040e3d",
"9785e07c64ca4068ad99a65da326b1aa",
"588ff0d4b83f439cb8787314267ad6ea",
"b6c532398f4045d184600d1bf7849b54",
"f7258ebdafef444281c048fbece5adab",
"50448247069f4330b2d4114abd2523fc",
"2651f7dced1d4d7b9c396afb8b7dd7be",
"f5e05f9dbb3b4fe0b4ecd0041fab282f",
"234662f3a8d248d19cc52da034a842f0",
"cc136fac62654de3a029d25cb7644ad4",
"cf1a6777af99454dbf08cf86ab342132",
"54a7d7995a1d4073998d7f43f4ea877c",
"c11ff305c42d42d781ea618658f622db",
"d14040f5a53c4410a58d2a871612248a",
"026efcab8c1b48739e1b521a5df70316",
"373a2e36f38c4244aa80bc90405bbec0",
"79268e2e1c46422e889831b91236bc88",
"f0fea403e7054f2594643f4f2e1f32df",
"54108263ed2241809b0669a3c786d4bb",
"ddbb28e74716429fb30f9134744770db",
"78e8b052d7024a73afa04cb0dc4b67e2",
"9de36f7dd9d442e197cc12be859b7772",
"028906a5a0b648a9a99a698e14c740e1",
"6275954e5e824a5db4868b24e7876096"
]
},
"id": "j46XD99mrNaW",
"outputId": "1c49e11a-5210-47e9-aae5-ac834268560f"
},
"source": [
"from datasets import load_dataset\n",
"opus100 = load_dataset('opus100', 'en-ru')\n",
"\n",
"tat_ru = []\n",
"tat_en = []\n",
"for pair in tqdm(opus100['train']):\n",
" tat_ru.append(pair['translation']['ru'])\n",
" tat_en.append(pair['translation']['en'])\n",
"\n",
"df_en = pd.concat([df_en, pd.Series(tat_en, name='text').to_frame()])\n",
"df_ru = pd.concat([df_ru, pd.Series(tat_ru, name='text').to_frame()])"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "15eb862a14ab4a8290659c5be4165512",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=2216.0, style=ProgressStyle(description…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e9a9e0950ddf48df980a7d64cdf0d113",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=13292.0, style=ProgressStyle(descriptio…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Downloading and preparing dataset opus100/en-ru (download: 65.33 MiB, generated: 187.00 MiB, post-processed: Unknown size, total: 252.33 MiB) to /root/.cache/huggingface/datasets/opus100/en-ru/0.0.0/a87abd612d82947c7a2c3991f71095a98f55141af7ad37516dfb31bfa3511ddc...\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "560831b29a0d4de29fe785cc4ece0610",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=68501634.0, style=ProgressStyle(descrip…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a9fff4a599da446a9b4b52e8c696b81e",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\r"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "20eb0b7ab6584d84a7f7ab7477040e3d",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\r"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "234662f3a8d248d19cc52da034a842f0",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\rDataset opus100 downloaded and prepared to /root/.cache/huggingface/datasets/opus100/en-ru/0.0.0/a87abd612d82947c7a2c3991f71095a98f55141af7ad37516dfb31bfa3511ddc. Subsequent calls will reuse this data.\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "79268e2e1c46422e889831b91236bc88",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=1000000.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "vhqqxLEp7JZU"
},
"source": [
"df_ru.reset_index(drop=True, inplace=True);\n",
"df_en.reset_index(drop=True, inplace=True);"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "3n9BOCdnrO8i",
"outputId": "06169bc8-ba7b-4d49-f29e-0bc81ec558da"
},
"source": [
"df_en.shape, df_ru.shape"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"((2514195, 1), (2514195, 1))"
]
},
"metadata": {
"tags": []
},
"execution_count": 14
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "cN5zsEue6Ny7"
},
"source": [
"Сложные негативные примеры (в итоге забил на них)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "i_unmC9g6Bez"
},
"source": [
"import math\n",
"\n",
"from collections import Counter, defaultdict\n",
"from functools import lru_cache\n",
"from typing import List, Dict\n",
"from tqdm.auto import tqdm, trange\n",
"import re\n",
"\n",
"TOKEN = re.compile(r'([^\\W\\d]+|\\d+|[^\\w\\s])')\n",
"\n",
"\n",
"def re_tokenize(text):\n",
" chunks = TOKEN.findall(text)\n",
" return find_substrings(chunks, text)\n",
"\n",
"\n",
"def find_substrings(chunks, text):\n",
" offset = 0\n",
" for chunk in chunks:\n",
" start = text.find(chunk, offset)\n",
" stop = start + len(chunk)\n",
" yield chunk\n",
" offset = stop\n",
"\n",
"\n",
"class SimpleSearcher:\n",
" def __init__(self, k=1.5, b=0.75, max_freq=None, df=False):\n",
" self.k = k\n",
" self.b = b\n",
" self.max_freq = max_freq\n",
" self.df = df\n",
"\n",
" def tokenize(self, text, stem=None):\n",
" return list(re_tokenize(text.lower()))\n",
"\n",
" def setup(self, texts, owners):\n",
" \"\"\" texts: list of texts, owners: list of ids \"\"\"\n",
" self.texts = texts\n",
" self.owners = owners\n",
" paragraphs = {i: text for i, text in enumerate(texts)}\n",
" self.fit(paragraphs=paragraphs)\n",
" return self\n",
"\n",
" def fit(self, paragraphs):\n",
" \"\"\"\" paragraphs: dict with ids as keys and texts as values \"\"\"\n",
" inverse_index = defaultdict(set)\n",
" text_frequencies = Counter()\n",
" text_lengths = Counter()\n",
" wf = Counter()\n",
" for p_id, p in tqdm(paragraphs.items(), total=len(paragraphs)):\n",
" tokens = self.tokenize(p)\n",
" text_lengths[p_id] = len(tokens)\n",
" for w in tokens:\n",
" wf[w] += 1\n",
" if self.max_freq and wf[w] >= self.max_freq:\n",
" inverse_index[w] = set()\n",
" else:\n",
" inverse_index[w].add(p_id)\n",
" \n",
" self.inverse_index = inverse_index\n",
" self.wf = wf\n",
" self.text_lengths = text_lengths\n",
" self.avg_len = sum(text_lengths.values()) / len(text_lengths)\n",
" self.n_docs = len(paragraphs)\n",
" \n",
" def trim(self, n):\n",
" # remove \"stopwords\" - words with too many indices\n",
" stopwords = {k for k, v in self.inverse_index.items() if len(v) > n}\n",
" for k in stopwords:\n",
" self.inverse_index[k] = set()\n",
"\n",
" def get_okapi_idf(self, w):\n",
" n = self.wf[w]\n",
" return math.log(max(1, self.n_docs - n + 0.5) / (n + 0.5))\n",
"\n",
" def get_okapi_tf(self, w, p_id):\n",
" f = self.text_frequencies[(p_id, w)] if self.df else 1\n",
" return f * (self.k + 1) / (f + self.k * (1 - self.b + self.b * self.text_lengths[p_id] / self.avg_len))\n",
"\n",
" def get_tf_idfs(self, query):\n",
" words = self.tokenize(query)\n",
" matches = [(w, d) for w in words for d in self.inverse_index[w]]\n",
"\n",
" tfidfs = Counter()\n",
" for w, d in matches:\n",
" tfidfs[d] += self.text_frequencies[(d, w)] / len(self.inverse_index[w])\n",
"\n",
" return tfidfs\n",
"\n",
" def get_okapis(self, query, normalize=False):\n",
" words = self.tokenize(query)\n",
" matches = [(w, d) for w in words for d in self.inverse_index[w]]\n",
"\n",
" tfidfs = Counter()\n",
" for w, d in matches:\n",
" tfidfs[d] += self.get_okapi_idf(w) * self.get_okapi_tf(w, d)\n",
"\n",
" return tfidfs"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 67,
"referenced_widgets": [
"1e81ca98918b442e889e196645e1ca47",
"378bd07de8ea49da995a9eeef4adb132",
"b9097818a3e84b3fb224bdb5162be393",
"b88ee8c94000445db99d299aecca40ca",
"6e7166d1f6f34c81a44595750f3022ca",
"eb9c7b60c0f1484b80a020efec9e31b3",
"ef1ce741d6b44be6b21113f3d8d21629",
"8596aad5509247a2971fd22acaae7b3f"
]
},
"id": "4ScwUFPt6CcP",
"outputId": "0df3285e-b7a9-4d14-8fdd-d6f259fd5c33"
},
"source": [
"ss = SimpleSearcher(max_freq=10_000)\n",
"ss.fit(df_ru.text.sample(100).to_dict())\n",
"#ss.fit(df_ru.text.to_dict())"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1e81ca98918b442e889e196645e1ca47",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "-Ig_sTnr65lW"
},
"source": [
"def hard_batch(n=16):\n",
" text = df_ru.text.sample(1).iloc[0]\n",
" indices = [k for k, v in ss.get_okapis(text).most_common(n * 4)]\n",
" indices = df_ru.text[indices].drop_duplicates().index.tolist()[:n]\n",
" if len(indices) < n:\n",
" indices.extend(df_ru.text.sample(n - len(indices)).index)\n",
" return indices"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "gjhJwHFQDca_",
"outputId": "950f8c3c-c0b2-4059-82b1-685f92acb0bd"
},
"source": [
"%%time\n",
"for _ in df_ru.text[hard_batch(16)]:\n",
" print(_)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Том сел на камень.\n",
"Ответ на повторяющиеся мероприятия\n",
"– Написать письмо претендуете на должность;\n",
"Том в костюме.\n",
"Том был голый.\n",
"Том делает это гораздо лучше, чем я.\n",
"ссылаясь также на свою резолюцию 56/260 от 31 января 2002 года, в которой Ассамблея установила мандат Специального комитета по разработке конвенции против коррупции,\n",
"Кроме того, Комитет рекомендует государству-участнику в свете статьи 17 Конвенции принимать все необходимые меры законодательного и иного характера, включая, в частности, проведение просветительских кампаний, направленных на родителей, попечителей и учителей, а также налаживать сотрудничество с провайдерами услуг Интернета в целях защиты детей от пагубного воздействия передаваемой через средства массовой коммуникации и через Интернет информации, в том числе материалы, содержащие сцены насилия и порнографии.\n",
"Мы твердо уверены в том, что необходимо безотлагательно создать влиятельную группу видных деятелей, которая займется этим вопросом.\n",
"В связи с окончательной формой документа ряд членов Комиссии согласились со Специальным докладчиком в том, что решение по этому вопросу следует отложить, пока не будут согласованы вопросы существа.\n",
"В составе ракетного сегмента этого комплекса - РН \"Зенит-2S\", которая является модификацией \"Зенита\", имевшего единую модульную часть с боковыми блоками первой ступени РН \"Энергия\", и космический разгонный блок ДМ-SL как одна из 10 модификаций высоконадежного, эксплуатируемого в течение нескольких десятилетий по различным программам разгонного блока типа ДМ, работающего на компонентах топлива жидкий кислород и керосин.\n",
"4. вновь заявляет также, что в отношении областей, в которых консультанты часто нанимаются на срок, превышающий один год, Генеральному секретарю следует, когда это необходимо, представлять предложения о создании должностей и что ему следует представить Генеральной Ассамблее на ее шестьдесят первой сессии доклад по этому вопросу;\n",
"Сезонная продукция: Расчет спроса на будущий месяц, основанный на среднем уровне потребления, зафиксированного в шести месяцах, предшествующих тому же месяцу что и текущий в прошлом году, и на последующем применении тренда, отражающего изменение объема продаж.\n",
"В прессе звучали слова об ответственности Грызлова за проникновение отряда террористов в столицу, но никакой реакции на эти публикации не последовало - ГосДума отказалась создавать комиссию для расследования обстоятельств теракта и гибели людей.\n",
"Слова из Деяний 24:15 проливают еще больше света на это грандиозное событие: \"Будет воскресение и праведных, и неправедных\".\n",
"Эта учетная запись должна иметь учетные данные локального администратора для подключения к указанному компьютеру, на котором будут установлены роли систем сайта.\n",
"CPU times: user 89.8 ms, sys: 181 µs, total: 90 ms\n",
"Wall time: 91.5 ms\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "38_tq7ghKJdr",
"outputId": "9e2637a1-5413-4d7b-f1b6-ceebe81854f2"
},
"source": [
"import gc\n",
"gc.collect()"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"73"
]
},
"metadata": {
"tags": []
},
"execution_count": 19
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "JDGAMwEY59g8"
},
"source": [
"#### Setup the model"
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZqnNjd2CuJ3T"
},
"source": [
"model = BertForPreTraining.from_pretrained(NEW_MODEL_NAME)\n",
"tokenizer = BertTokenizerFast.from_pretrained(NEW_MODEL_NAME)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "_k-ynLBRuPZl"
},
"source": [
"import gc\n",
"\n",
"def cleanup():\n",
" gc.collect()\n",
" torch.cuda.empty_cache()\n",
" # tf.keras.backend.clear_session()\n",
"\n",
"cleanup()\n",
"\n",
"model.cuda();"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "pq3R5RM7y1iO"
},
"source": [
"from transformers import DataCollatorForWholeWordMask\n",
"\n",
"data_collator = DataCollatorForWholeWordMask(\n",
" tokenizer=tokenizer, mlm=True, mlm_probability=0.15\n",
")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "UINY4LZfy1iO"
},
"source": [
"from tqdm.auto import tqdm, trange"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "KW4D5rHaulPB"
},
"source": [
"def get_sentence_loss(out_ru, out_en, margin=0.3, mult=1.0):\n",
" \"\"\" Calculate translation ranking loss using CLS tokens \"\"\"\n",
" emb_ru = F.normalize(out_ru) #(out_ru.hidden_states[-1][:, 0])\n",
" emb_en = F.normalize(out_en) #(out_en.hidden_states[-1][:, 0])\n",
" batch_size = emb_ru.shape[0]\n",
" sims = torch.matmul(emb_ru, emb_en.T) - torch.eye(batch_size).cuda() * margin\n",
" loss_fn = torch.nn.CrossEntropyLoss()\n",
" loss = (\n",
" loss_fn(torch.log_softmax(sims, -1) * mult, torch.arange(batch_size).cuda())\n",
" + loss_fn(torch.log_softmax(sims.T, -1) * mult, torch.arange(batch_size).cuda())\n",
" )\n",
" return loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "ckum58IPrY_n"
},
"source": [
"```\n",
"# demontrate that the task is difficult\n",
"emb_ru = F.normalize(pool_ru)\n",
"emb_en = F.normalize(pool_en)\n",
"batch_size = emb_ru.shape[0]\n",
"sims = torch.matmul(emb_ru, emb_en.T) - torch.eye(batch_size).cuda() * margin \n",
"print(torch.softmax(sims, dim=1).diag().mean()) # about 0.09\n",
"\n",
"from matplotlib import pyplot as plt\n",
"plt.imshow(torch.softmax(sims, dim=1).detach().cpu().numpy())\n",
"\n",
"emb_ru, emb_en, sims = None, None, None\n",
"```"
]
},
{
"cell_type": "code",
"metadata": {
"id": "BUQvV3uDy1iP"
},
"source": [
"def get_mask_labels(input_ids):\n",
" mask_labels = []\n",
" for e in input_ids:\n",
" ref_tokens = []\n",
" for idx in e:\n",
" token = tokenizer._convert_id_to_token(idx)\n",
" ref_tokens.append(token)\n",
" mask_labels.append(data_collator._whole_word_mask(ref_tokens))\n",
" ml = torch.tensor(mask_labels)\n",
" inputs, labels = data_collator.mask_tokens(input_ids, ml)\n",
" return inputs, labels"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "AalTMbZqy1iP"
},
"source": [
"def preprocess_inputs(inputs):\n",
" inputs['input_ids'], inputs['labels'] = get_mask_labels(inputs['input_ids'])\n",
" return {k: v.to(model.device) for k, v in inputs.items()}"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "iAGk9slgy1iP"
},
"source": [
"def get_mlm_loss(inputs, outputs):\n",
" return nn.CrossEntropyLoss()(\n",
" outputs.prediction_logits.view(-1, model.config.vocab_size),\n",
" inputs['labels'].view(-1)\n",
" )"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "43AeFcYVBlQa"
},
"source": [
"def pool(model, outputs):\n",
" return model.bert.pooler(outputs.hidden_states[-1])"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "v0vqSGD8uYya"
},
"source": [
"#### MLM distillation loss"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"referenced_widgets": [
"5a299c646f73422b94f086ed3fc40d07",
"a90da2d4f68749eba5441d4fc305fa36",
"cdcabf402d6d4f08ac3d65257a435734",
"5ad80080b71441d9bfe16c41a838750a",
"59f5cfc0e8934ca29705583f702f6aa6",
"6fa9ce85f1484bf6a49f4a019700d617",
"54582b5aafd649bbb6c30d9a2635a132",
"a261543b77454ee4ba4ea2b36b543332",
"8b4ff98bc1e54aaf8125bdb3d8714927",
"f5d89146e7fa48529b9be8f00eeee9b9",
"46eca66cf3544a0490ac156cb213c353",
"8dea7e2e0e1c490ba8c5c98eaa804001",
"eeaba765569f4484a9e3b98d9142360a",
"9d4314d4febf4bb08d3438e6d69418be",
"00c53b121ffc4c2bb4b7086bda5c303d",
"66f0822b93554f16b30050ced4f7d85c",
"d867eb2270344ab08b4b7bed3a515a98",
"c6d5340668a940b98ebab206cec8bfe5",
"a4df8e2c70eb4ff1a8172b7b74e7590e",
"b29ef88147be4684ae7cd9c728d2bb11",
"008f4b212204435abc4cb6ac835526cd",
"2d7286b1ffa545dbb70734d04b50bf49",
"44f57c89d335475396501f0178a6dc9b",
"4d3f057bc56b481c9583f77241a2c3e6",
"b12451cce3dc43b29589659227545677",
"392da82bed954990a4710398dfcf43ee",
"17a8beb0ecb5436288065f07dfc43347",
"7203f603977d4f63a1b5e04678529bf9",
"35f7f7c515cd438d86709439f8f6cbea",
"f6b9b945f72941389668855243292334",
"ab28c4129ec54b33a598b906f9a7476c",
"c80fa2fd45ce4f9c8bd18cc37125ae57",
"3eb695ed9df542a780c78898061f1b72",
"1758e6f7d50d41c3b7e7ccc81d415a15",
"13bdeb14a3c640039aab5195476c3a38",
"3ae0ae9c625b41649b9c03af595dc067",
"c7938c61126d4dbcba28ef9e5c201628",
"58f64df9ec274bb1bab78464f1fce3d1",
"e1a52c00073f4114b9b3ae3c2938c9f0",
"1394f29831cc461db28b37e1b9fbceb1"
]
},
"id": "CDUIL42ludym",
"outputId": "ed425191-bd96-4cac-f8ca-4254e2759e06"
},
"source": [
"big_model = BertForPreTraining.from_pretrained(base_model)\n",
"big_tokenizer = BertTokenizerFast.from_pretrained(base_model)\n",
"\n",
"bv = big_tokenizer.vocab\n",
"vocab_mapping = sorted(bv[w] for w in tokenizer.vocab)\n",
"\n",
"big_model.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5a299c646f73422b94f086ed3fc40d07",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=625.0, style=ProgressStyle(description_…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8b4ff98bc1e54aaf8125bdb3d8714927",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=714314041.0, style=ProgressStyle(descri…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "stream",
"text": [
"Some weights of BertForPreTraining were not initialized from the model checkpoint at bert-base-multilingual-cased and are newly initialized: ['cls.predictions.decoder.bias']\n",
"You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
],
"name": "stderr"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d867eb2270344ab08b4b7bed3a515a98",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=995526.0, style=ProgressStyle(descripti…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b12451cce3dc43b29589659227545677",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=1961828.0, style=ProgressStyle(descript…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3eb695ed9df542a780c78898061f1b72",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=29.0, style=ProgressStyle(description_w…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "AUzvKrWKuiZS"
},
"source": [
"def distill(inputs, outputs, temperature=1.0):\n",
" new_inputs = torch.tensor(\n",
" [[vocab_mapping[i] for i in row] for row in inputs['input_ids']]\n",
" ).to(inputs['input_ids'].device)\n",
" with torch.no_grad():\n",
" big_out = big_model(\n",
" input_ids=new_inputs, \n",
" token_type_ids=inputs['token_type_ids'],\n",
" attention_mask=inputs['attention_mask']\n",
" )\n",
" # the whole batch, all tokens after the [cls], the whole dimension\n",
" kd_loss = torch.nn.KLDivLoss(reduction='batchmean')(\n",
" F.log_softmax(outputs.prediction_logits[:, 1:, :] / temperature, dim=1), \n",
" F.softmax(big_out.prediction_logits[:, 1:, vocab_mapping] / temperature, dim=1)\n",
" ) / outputs.prediction_logits.shape[-1]\n",
" return kd_loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "44WxqlsjOIgY"
},
"source": [
"#### Sentence distillation loss (LaBSE, RuBERT, Laser, USE)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "zrW-A4KsOdsD"
},
"source": [
"from transformers import AutoModel, AutoTokenizer"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "a7mljjW6GBzA"
},
"source": [
"# тут я пытался сделать адаптеры нелинейными, но забил\n",
"\n",
"class Adapter(nn.Module):\n",
" def __init__(self, n_in, n_out):\n",
" super().__init__()\n",
" self.proj0 = nn.Linear(n_in, n_in)\n",
" self.proj1 = nn.Linear(n_in, n_in)\n",
" self.proj2 = nn.Linear(n_in, n_in)\n",
" self.proj3 = nn.Linear(n_in, n_out)\n",
" self.nonlin = nn.CELU()\n",
" \n",
" def forward(self, x):\n",
" x = nn.functional.normalize(self.proj0(x))\n",
" x = x + self.nonlin(self.proj1(x))\n",
" x = x + self.nonlin(self.proj2(x))\n",
" x = nn.functional.normalize(self.proj3(x))\n",
" return x\n",
"\n",
"# undo\n",
"Adapter = torch.nn.Linear"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "26VzhwwyONR4",
"outputId": "33da1fcc-a1bb-4a3e-992f-5783dafdabba"
},
"source": [
"labse_name = '/gd/MyDrive/models/labse-ru'\n",
"labse = AutoModel.from_pretrained(labse_name)\n",
"labse_tokenizer = AutoTokenizer.from_pretrained(labse_name)\n",
"\n",
"labse.eval()\n",
"labse.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Some weights of the model checkpoint at /gd/MyDrive/models/labse-ru were not used when initializing BertModel: ['cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.predictions.decoder.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.bias', 'cls.seq_relationship.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.dense.bias']\n",
"- This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
"- This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "0t-Nl-toPGBD",
"outputId": "fa17704d-f489-402b-fec1-17f0194a929f"
},
"source": [
"import os\n",
"ladapter_path = '/gd/MyDrive/models/tinybert-ru-labse-adapter.pt'\n",
"if os.path.exists(ladapter_path):\n",
" labse_adapter = torch.load(ladapter_path)\n",
" print('loading')\n",
"else:\n",
" labse_adapter = Adapter(312, 768)\n",
" print('creating from scratch')\n",
"labse_adapter.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"loading\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZxcxjO1dOiCi"
},
"source": [
"def get_labse_loss(outputs_list, texts):\n",
" inp = {k: v.to(labse.device) for k, v in labse_tokenizer(texts, return_tensors='pt', padding=True, max_length=512, truncation=True).items()}\n",
" with torch.no_grad():\n",
" labse_out = labse(**inp)\n",
" emb = torch.nn.functional.normalize(labse_out.pooler_output)\n",
" lfun = torch.nn.MSELoss()\n",
" loss = sum([\n",
" lfun(torch.nn.functional.normalize(labse_adapter(out)), emb) \n",
" for out in outputs_list\n",
" ])\n",
" return loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "ASyRfW9cGB7a"
},
"source": [
"The clever plan is that we will pull our embeddings to LaBSE embeddings of the English sentences and to rubert embeddings of the Russian sentences at the same time. "
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 284,
"referenced_widgets": [
"65697756d861478a9ac41147461c622f",
"4fbe8e37a43c4fc893065a3b1a24b315",
"de3300a639aa47289ccb1ccb7c198c7a",
"a649e03475124e6f915d9c651bb3647b",
"45d69a6909a2478da5d9076c1de19d02",
"9e87935db6bb4edbb62563193965e94b",
"5359a33301ec4314852bc2dc4169f766",
"ccb8239430404ce39ef61fc80afc91b3",
"67a62027a8c1455d82757d280188ac28",
"fa60da066e654a2b952b4785057ab1e3",
"0eec813da49b4ac1a8f68f4818a4abec",
"e1d88b5cf5d14d3e99397407a1dbb156",
"31d54d98b9e247feb05dbb78789fd730",
"c17b555b227b46c7bea80223108c6e4d",
"417544674efa4d00bcf189beb1e5d708",
"1fa20222ee214f1e838d8eaf9cd4ea5b",
"727455cc6bac4c7aab2408c07f1c7de3",
"3a4eaf740a2f414bac7de1060c9a026a",
"abaf48cb84a249ea9b42fbf9286ba339",
"cf2ab42ab61646f9beac706ce621d467",
"b5bf6b0bfcf441ae985409521c439132",
"bcfb9a7902ac4afa8545fa075c31d922",
"0ee39dc997934de4af52ac495d6ccbf6",
"fe1827a4bd5b4bb8a7b2a8ef35c3d10e",
"339c4748dc4b4d8baf2f485693c96b43",
"cb26698e3ba14bf5ba4fc54bae050273",
"76e89e90dc4347d3bdf8a5b0e64dbb64",
"0905e57693424f419d4ef5316d592e8d",
"9b18103bbe324872af4d64766c3e0a83",
"e99f65dd574949959b70fba7a8f6ef15",
"26b49c9f8d1f43baac0df9cfafb43436",
"aa72c0902c3a43b0a88ac45c02cf2bc6",
"77c749bd8cf64202b8316c005d142a81",
"a694ac748da84dcb91974c1a339c787b",
"77d0548dab7247d19db6c978cc8a5b1f",
"4f6aabfc6ac44937a2630e0ad150d831",
"253a69aaead84f8a92876ed531e9f045",
"f21714938a91437eb90a6f3f40bb9395",
"7c4cb05f930f40fbb96f13552a5bc60c",
"36b7c06256b94a9ab6679eb7fe3e6ff3"
]
},
"id": "Fw728FA8C5Rp",
"outputId": "1d6e14ad-953a-47ef-af5b-2c1f18277e15"
},
"source": [
"rubert_name = 'DeepPavlov/rubert-base-cased-sentence'\n",
"rubert = AutoModel.from_pretrained(rubert_name)\n",
"rubert_tokenizer = AutoTokenizer.from_pretrained(rubert_name)\n",
"\n",
"rubert.eval()\n",
"rubert.cuda();\n",
"\n",
"\n",
"import os\n",
"dpadapter_path = '/gd/MyDrive/models/tinybert-ru-rubert-adapter.pt'\n",
"if os.path.exists(dpadapter_path):\n",
" dp_adapter = torch.load(dpadapter_path)\n",
" print('loading')\n",
"else:\n",
" dp_adapter = Adapter(312, 768)\n",
" print('creating from scratch')\n",
"dp_adapter.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "65697756d861478a9ac41147461c622f",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=642.0, style=ProgressStyle(description_…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "67a62027a8c1455d82757d280188ac28",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=711456784.0, style=ProgressStyle(descri…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "727455cc6bac4c7aab2408c07f1c7de3",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=1649718.0, style=ProgressStyle(descript…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "339c4748dc4b4d8baf2f485693c96b43",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=112.0, style=ProgressStyle(description_…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "77c749bd8cf64202b8316c005d142a81",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Downloading', max=24.0, style=ProgressStyle(description_w…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"loading\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "qZUYiy8tLDOe"
},
"source": [
"def get_rubert_loss(outputs_list, texts):\n",
" inp = {k: v.to(rubert.device) for k, v in rubert_tokenizer(texts, return_tensors='pt', padding=True, max_length=512, truncation=True).items()}\n",
" with torch.no_grad():\n",
" dp_out = rubert(**inp)\n",
" emb = torch.nn.functional.normalize(dp_out.last_hidden_state[:, 0, :]) # pooler_output is worse for rubert\n",
" lfun = torch.nn.MSELoss()\n",
" loss = sum([\n",
" lfun(torch.nn.functional.normalize(dp_adapter(out)), emb) \n",
" for out in outputs_list\n",
" ])\n",
" return loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "b91ihgpvZ61G"
},
"source": [
"from laserembeddings import Laser\n",
"laser = Laser()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "AxduEcunaaeC",
"outputId": "aaa05700-2385-4603-fa2d-645ac083927d"
},
"source": [
"import os\n",
"laser_adapter_path = '/gd/MyDrive/models/tinybert-ru-laser-adapter.pt'\n",
"if os.path.exists(laser_adapter_path):\n",
" laser_adapter = torch.load(laser_adapter_path)\n",
" print('loading')\n",
"else:\n",
" laser_adapter = Adapter(312, 1024)\n",
" print('creating from scratch')\n",
"laser_adapter.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"loading\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "a9pGwp_lakBo"
},
"source": [
"def get_laser_loss(outputs_list, texts, language='en'):\n",
" with torch.no_grad():\n",
" embeddings = laser.embed_sentences(texts, lang=language)\n",
" emb = torch.nn.functional.normalize(torch.tensor(embeddings).to(outputs_list[0].device))\n",
" lfun = torch.nn.MSELoss()\n",
" loss = sum([\n",
" lfun(torch.nn.functional.normalize(laser_adapter(out)), emb) \n",
" for out in outputs_list\n",
" ])\n",
" return loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "nMqR4wgJtYnD"
},
"source": [
"Use: see https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3\n",
"\n",
"У него сильно течёт память, поэтому, возможно, стоит отменить эту затею. Но я таки пытаюсь. "
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "CG2ng2D-qWoM",
"outputId": "4ca89aec-b848-445b-9ca4-f590aad19d68"
},
"source": [
"import tensorflow_hub\n",
"import tensorflow_text\n",
"import tensorflow as tf\n",
"\n",
"use = tensorflow_hub.load(\"https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"INFO:absl:Using /tmp/tfhub_modules to cache modules.\n",
"INFO:absl:Downloading TF-Hub Module 'https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3'.\n",
"INFO:absl:Downloaded https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3, Total size: 334.32MB\n",
"INFO:absl:Downloaded TF-Hub Module 'https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3'.\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NAPmv39KqyAa",
"outputId": "a85b727c-321b-40c6-9cbd-f9228a33c16b"
},
"source": [
"import os\n",
"use_adapter_path = '/gd/MyDrive/models/tinybert-ru-use-adapter.pt'\n",
"if os.path.exists(use_adapter_path):\n",
" use_adapter = torch.load(use_adapter_path)\n",
" print('loading')\n",
"else:\n",
" use_adapter = Adapter(312, 512)\n",
" print('creating from scratch')\n",
"use_adapter.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"loading\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "J9xPiyvArAX1"
},
"source": [
"def get_use_loss(outputs_list, texts):\n",
" emb = use(texts)\n",
" emb = torch.nn.functional.normalize(torch.tensor(emb.numpy()).to(outputs_list[0].device))\n",
" lfun = torch.nn.MSELoss()\n",
" loss = sum([\n",
" lfun(torch.nn.functional.normalize(use_adapter(out)), emb) \n",
" for out in outputs_list\n",
" ])\n",
" return loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "3edTW4WJ3YkD"
},
"source": [
"#### Reconstruction loss (T5)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "a6TRi3k43anU"
},
"source": [
"from transformers import T5ForConditionalGeneration, T5Tokenizer\n",
"\n",
"t5_name = 'cointegrated/rut5-small'\n",
"t5_name = '/gd/MyDrive/models/tinybert-ru-t5-decoder'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "XpUIi7EM9it6"
},
"source": [
"t5 = T5ForConditionalGeneration.from_pretrained(t5_name)\n",
"t5_tokenizer = T5Tokenizer.from_pretrained(t5_name)\n",
"\n",
"t5.train();\n",
"t5.cuda();"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "QdNGHAz5-DTy",
"outputId": "5b7ec7b7-3d21-4b69-93a2-ffa54e24701b"
},
"source": [
"import os\n",
"t5_adapter_path = '/gd/MyDrive/models/tinybert-ru-t5-adapter.pt'\n",
"t5_states = 10\n",
"if os.path.exists(t5_adapter_path):\n",
" t5_adapter = torch.load(t5_adapter_path)\n",
" print('loading')\n",
"else:\n",
" t5_adapter = Adapter(312, 512 * t5_states)\n",
" print('creating from scratch')\n",
"t5_adapter.cuda();"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"loading\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "GEBTbOIm3sBi"
},
"source": [
"def get_t5_loss(outputs, texts):\n",
" t5_repr = [t5_adapter(outputs).reshape([outputs.shape[0], t5_states, 512])]\n",
" targets = t5_tokenizer(texts, return_tensors='pt', padding=True, truncation=True, max_length=512)\n",
" out = t5(\n",
" encoder_outputs=t5_repr, \n",
" labels=targets['input_ids'].to(t5.device), \n",
" decoder_attention_mask=targets['attention_mask'].to(t5.device),\n",
" )\n",
" return out.loss"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "J04PZMnAG_Pl"
},
"source": [
"```\n",
"labse_adapter = Adapter(312, 768)\n",
"dp_adapter = Adapter(312, 768)\n",
"laser_adapter = Adapter(312, 1024)\n",
"t5_adapter = Adapter(312, 512 * t5_states)\n",
"\n",
"labse_adapter.cuda(), dp_adapter.cuda(), laser_adapter.cuda(), t5_adapter.cuda();\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "cJaAefByCUbT"
},
"source": [
"#### Training loop"
]
},
{
"cell_type": "code",
"metadata": {
"id": "1fNhssU2Zujy"
},
"source": [
"def cleanup():\n",
" gc.collect()\n",
" torch.cuda.empty_cache()\n",
" tf.keras.backend.clear_session()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "vVrAGHiNLQzh",
"outputId": "c9ce4826-9c1e-427a-a3d8-90765fb6c6a7"
},
"source": [
"from itertools import chain\n",
"optimizer = torch.optim.Adam(\n",
" params=[p for p in chain(\n",
" model.parameters(), \n",
" t5.decoder.parameters(), t5.lm_head.parameters(),\n",
" t5_adapter.parameters(),\n",
" labse_adapter.parameters(),\n",
" dp_adapter.parameters(),\n",
" laser_adapter.parameters(),\n",
" use_adapter.parameters(),\n",
" ) if p.requires_grad], \n",
" lr=1e-5 # larger learning rate is detrimental\n",
")\n",
"len(optimizer.param_groups)"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"1"
]
},
"metadata": {
"tags": []
},
"execution_count": 47
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "BBE1oqI_XDd9"
},
"source": [
"optimizer.param_groups[0]['lr'] = 1e-5"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "UZ5h6YaWWorm"
},
"source": [
"scheduler = torch.optim.lr_scheduler.CosineAnnealingWarmRestarts(optimizer=optimizer, T_0=1765)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "YkaATwqq9WZx"
},
"source": [
""
]
},
{
"cell_type": "code",
"metadata": {
"id": "1x94DPaIdBEC"
},
"source": [
"from tensorflow.errors import ResourceExhaustedError"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"e5c01ec834474e8aa33b26947804e512",
"2b62264fbffc4822864b3399614ec73e",
"3d86795f60d44a508aff4f81ff3fe3ce",
"2309468a56b747bfbf1929d47c08731b",
"dd843dae9dd74a2ba1ec1d171f4a5dfe",
"cd06b4930112436980d8ad761384f2a6",
"d4dc016b50404879a30c90770e9ef415",
"2bf4ad78caba457baff8347da6058746"
]
},
"id": "KD3Ob-bBy1iQ",
"outputId": "31663e41-9cc6-4a5e-c9af-0ade6e79b43c"
},
"source": [
"batch_size = 16 # the size of 4 seems to be the limit on my local device, while on colab 32 is OK\n",
"# with gpt on colab, 8 is maximum, or 16, with t5\n",
"# when we do not distill any other models, batch size of 64 seems to be just fine (and 3 epochs promise to pass in less than 24 hours!)\n",
"margin = 0.3\n",
"temp = 3.0\n",
"hard_freq = 0\n",
"accumulation_steps = 4 # эта штука реально помогает, когда обучение подзастряло. А ещё ускоряет!\n",
"\n",
"epochs = 3\n",
"save_steps = int(8192 / batch_size)\n",
"window = int(1024 / batch_size * 4)\n",
"print('window steps', window, 'save steps', save_steps)\n",
"ewms = [0] * 20\n",
"\n",
"tq = trange(int(df_ru.shape[0] * epochs / batch_size))\n",
"cleanup()\n",
"\n",
"model.train()\n",
"t5.train()\n",
"labse.train()\n",
"#big_model.train()\n",
"rubert.train()\n",
"\n",
"for i in tq:\n",
" if hard_freq and i % hard_freq == 0:\n",
" bb = df_ru.text.loc[hard_batch(batch_size)]\n",
" else:\n",
" bb = df_ru.text.sample(batch_size)\n",
" eb = df_en.iloc[bb.index].text\n",
"\n",
" try:\n",
" inputs_ru = preprocess_inputs(tokenizer(bb.tolist(), return_tensors='pt', padding=True, truncation=True))\n",
" inputs_en = preprocess_inputs(tokenizer(eb.tolist(), return_tensors='pt', padding=True, truncation=True))\n",
" outputs_ru = model(**inputs_ru, output_hidden_states=True)\n",
" outputs_en = model(**inputs_en, output_hidden_states=True)\n",
" pool_ru = pool(model, outputs_ru)\n",
" pool_en = pool(model, outputs_en)\n",
" \n",
" losses = [\n",
" sum([\n",
" get_labse_loss([pool_ru, pool_en], eb.tolist()) * 768, \n",
" get_rubert_loss([pool_ru, pool_en], bb.tolist()) * 768,\n",
" get_laser_loss([pool_ru, pool_en], eb.tolist()) * 1024,\n",
" get_use_loss([pool_ru, pool_en], eb.tolist()) * 512, \n",
" get_use_loss([pool_ru, pool_en], bb.tolist()) * 512,\n",
" ]),\n",
" (get_t5_loss(pool_ru, bb.tolist()) + get_t5_loss(pool_en, bb.tolist())) * 1,\n",
" #(distill(inputs_ru, outputs_ru, temperature=temp) + distill(inputs_en, outputs_en, temperature=temp)) * 25,\n",
" get_mlm_loss(inputs_ru, outputs_ru) + get_mlm_loss(inputs_en, outputs_en),\n",
" get_sentence_loss(pool_ru, pool_en, margin=margin),\n",
" ]\n",
" loss = sum(losses)\n",
" loss.backward()\n",
"\n",
" except (RuntimeError, ResourceExhaustedError) as e:\n",
" print('runtime error on batch', i, e)\n",
" inputs_ru, inputs_en = None, None\n",
" outputs_ru, outputs_en = None, None\n",
" pool_ru, pool_en = None, None\n",
" losses = None\n",
" loss = None\n",
" cleanup()\n",
" tf.keras.backend.clear_session()\n",
" continue\n",
"\n",
" w = 1 / min(i+1, window)\n",
" ewms = [ewm * (1-w) + loss.item() * w for ewm, loss in zip(ewms, [loss] + losses)]\n",
" desc = 'loss: ' + ' '.join(['{:2.2f}'.format(l) for l in ewms]) + '|{:2.1e}'.format(optimizer.param_groups[0]['lr'])\n",
" tq.set_description(desc)\n",
"\n",
" if i % accumulation_steps == 0:\n",
" optimizer.step()\n",
" scheduler.step()\n",
" \n",
" optimizer.zero_grad()\n",
" tf.keras.backend.clear_session()\n",
" cleanup()\n",
" \n",
" if i % window == 0 and i > 0:\n",
" print(desc)\n",
" # cleanup()\n",
"\n",
" if i % save_steps == 0 and i > 0:\n",
" model.save_pretrained(NEW_MODEL_NAME)\n",
" tokenizer.save_pretrained(NEW_MODEL_NAME)\n",
" t5_tokenizer.save_pretrained(t5_name)\n",
" t5.save_pretrained(t5_name)\n",
" torch.save(labse_adapter, ladapter_path)\n",
" torch.save(dp_adapter, dpadapter_path)\n",
" torch.save(t5_adapter, t5_adapter_path)\n",
" torch.save(laser_adapter, laser_adapter_path)\n",
" torch.save(use_adapter, use_adapter_path)\n",
" print('saving...', i, optimizer.param_groups[0]['lr'])"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"window steps 256 save steps 512\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e5c01ec834474e8aa33b26947804e512",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=471411.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"runtime error on batch 121 CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 15.90 GiB total capacity; 13.54 GiB already allocated; 31.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"loss: 21.22 6.77 2.09 7.74 4.62|9.8e-06\n",
"loss: 21.16 6.81 2.06 7.67 4.62|9.6e-06\n",
"saving... 512 9.572540863471041e-06\n",
"loss: 21.15 6.80 2.06 7.66 4.63|9.3e-06\n",
"loss: 21.15 6.79 2.06 7.67 4.62|9.0e-06\n",
"saving... 1024 8.997487975927483e-06\n",
"runtime error on batch 1108 CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 15.90 GiB total capacity; 13.45 GiB already allocated; 27.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"loss: 21.18 6.80 2.05 7.70 4.63|8.6e-06\n",
"runtime error on batch 1408 CUDA out of memory. Tried to allocate 406.00 MiB (GPU 0; 15.90 GiB total capacity; 12.87 GiB already allocated; 415.75 MiB free; 13.46 GiB reserved in total by PyTorch)\n",
"runtime error on batch 1428 CUDA out of memory. Tried to allocate 96.00 MiB (GPU 0; 15.90 GiB total capacity; 13.46 GiB already allocated; 115.75 MiB free; 13.76 GiB reserved in total by PyTorch)\n",
"runtime error on batch 1492 CUDA out of memory. Tried to allocate 62.00 MiB (GPU 0; 15.90 GiB total capacity; 13.66 GiB already allocated; 53.75 MiB free; 13.82 GiB reserved in total by PyTorch)\n",
"loss: 21.19 6.83 2.04 7.69 4.64|8.2e-06\n",
"saving... 1536 8.243008619517074e-06\n",
"runtime error on batch 1599 CUDA out of memory. Tried to allocate 32.00 MiB (GPU 0; 15.90 GiB total capacity; 13.63 GiB already allocated; 25.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"runtime error on batch 1765 CUDA out of memory. Tried to allocate 408.00 MiB (GPU 0; 15.90 GiB total capacity; 12.91 GiB already allocated; 413.75 MiB free; 13.46 GiB reserved in total by PyTorch)\n",
"loss: 21.17 6.82 2.05 7.67 4.63|7.8e-06\n",
"loss: 21.24 6.81 2.05 7.76 4.63|7.3e-06\n",
"saving... 2048 7.299638038632134e-06\n",
"runtime error on batch 2071 CUDA out of memory. Tried to allocate 392.00 MiB (GPU 0; 15.90 GiB total capacity; 13.36 GiB already allocated; 225.75 MiB free; 13.65 GiB reserved in total by PyTorch)\n",
"runtime error on batch 2248 CUDA out of memory. Tried to allocate 406.00 MiB (GPU 0; 15.90 GiB total capacity; 13.10 GiB already allocated; 315.75 MiB free; 13.56 GiB reserved in total by PyTorch)\n",
"loss: 21.16 6.82 2.05 7.67 4.62|6.8e-06\n",
"loss: 21.14 6.80 2.04 7.67 4.62|6.3e-06\n",
"saving... 2560 6.246035287102069e-06\n",
"runtime error on batch 2816 CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 15.90 GiB total capacity; 13.51 GiB already allocated; 21.75 MiB free; 13.85 GiB reserved in total by PyTorch)\n",
"runtime error on batch 2919 CUDA out of memory. Tried to allocate 630.00 MiB (GPU 0; 15.90 GiB total capacity; 12.94 GiB already allocated; 357.75 MiB free; 13.52 GiB reserved in total by PyTorch)\n",
"runtime error on batch 3030 CUDA out of memory. Tried to allocate 14.00 MiB (GPU 0; 15.90 GiB total capacity; 13.54 GiB already allocated; 27.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"loss: 21.24 6.80 2.05 7.76 4.62|5.1e-06\n",
"saving... 3072 5.12903126462487e-06\n",
"runtime error on batch 3136 CUDA out of memory. Tried to allocate 32.00 MiB (GPU 0; 15.90 GiB total capacity; 13.28 GiB already allocated; 31.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"runtime error on batch 3292 CUDA out of memory. Tried to allocate 556.00 MiB (GPU 0; 15.90 GiB total capacity; 12.37 GiB already allocated; 455.75 MiB free; 13.42 GiB reserved in total by PyTorch)\n",
"runtime error on batch 3302 2 root error(s) found.\n",
" (0) Resource exhausted: OOM when allocating tensor with shape[16,8,1018,1018] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc\n",
"\t [[{{node StatefulPartitionedCall/StatefulPartitionedCall/EncoderTransformer/Transformer/SparseTransformerEncode/Layer_0/SelfAttention/SparseMultiheadAttention/DotProductAttention/MatMul}}]]\n",
"Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.\n",
"\n",
"\t [[StatefulPartitionedCall/StatefulPartitionedCall/EncoderTransformer/Transformer/layer_prepostprocess/layer_norm/add_1/_128]]\n",
"Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.\n",
"\n",
" (1) Resource exhausted: OOM when allocating tensor with shape[16,8,1018,1018] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc\n",
"\t [[{{node StatefulPartitionedCall/StatefulPartitionedCall/EncoderTransformer/Transformer/SparseTransformerEncode/Layer_0/SelfAttention/SparseMultiheadAttention/DotProductAttention/MatMul}}]]\n",
"Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.\n",
"\n",
"0 successful operations.\n",
"0 derived errors ignored. [Op:__inference_restored_function_body_40710]\n",
"\n",
"Function call stack:\n",
"restored_function_body -> restored_function_body\n",
"\n",
"loss: 21.16 6.79 2.05 7.70 4.62|4.6e-06\n",
"loss: 21.14 6.78 2.03 7.71 4.62|4.0e-06\n",
"saving... 3584 4.014185256361644e-06\n",
"loss: 21.08 6.79 2.00 7.67 4.62|3.5e-06\n",
"runtime error on batch 4042 CUDA out of memory. Tried to allocate 96.00 MiB (GPU 0; 15.90 GiB total capacity; 13.74 GiB already allocated; 45.75 MiB free; 13.82 GiB reserved in total by PyTorch)\n",
"loss: 21.13 6.80 2.02 7.68 4.62|2.9e-06\n",
"saving... 4096 2.932496871248491e-06\n",
"loss: 21.04 6.78 2.00 7.63 4.62|2.4e-06\n",
"runtime error on batch 4482 CUDA out of memory. Tried to allocate 26.00 MiB (GPU 0; 15.90 GiB total capacity; 13.39 GiB already allocated; 33.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"loss: 21.12 6.77 2.05 7.67 4.62|2.0e-06\n",
"saving... 4608 1.9576640232531785e-06\n",
"runtime error on batch 4620 CUDA out of memory. Tried to allocate 80.00 MiB (GPU 0; 15.90 GiB total capacity; 13.56 GiB already allocated; 27.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"runtime error on batch 4727 CUDA out of memory. Tried to allocate 376.00 MiB (GPU 0; 15.90 GiB total capacity; 13.24 GiB already allocated; 313.75 MiB free; 13.56 GiB reserved in total by PyTorch)\n",
"runtime error on batch 4761 CUDA out of memory. Tried to allocate 410.00 MiB (GPU 0; 15.90 GiB total capacity; 13.10 GiB already allocated; 317.75 MiB free; 13.56 GiB reserved in total by PyTorch)\n",
"runtime error on batch 4767 CUDA out of memory. Tried to allocate 440.00 MiB (GPU 0; 15.90 GiB total capacity; 13.45 GiB already allocated; 139.75 MiB free; 13.73 GiB reserved in total by PyTorch)\n",
"loss: 21.11 6.79 2.05 7.64 4.62|1.5e-06\n",
"loss: 21.10 6.78 2.05 7.66 4.62|1.2e-06\n",
"saving... 5120 1.1457324715546463e-06\n",
"runtime error on batch 5237 CUDA out of memory. Tried to allocate 386.00 MiB (GPU 0; 15.90 GiB total capacity; 13.05 GiB already allocated; 289.75 MiB free; 13.59 GiB reserved in total by PyTorch)\n",
"loss: 21.17 6.81 2.07 7.67 4.62|8.1e-07\n",
"runtime error on batch 5503 CUDA out of memory. Tried to allocate 24.00 MiB (GPU 0; 15.90 GiB total capacity; 13.59 GiB already allocated; 25.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"loss: 21.23 6.84 2.07 7.68 4.63|5.3e-07\n",
"saving... 5632 5.259350417824765e-07\n",
"loss: 21.15 6.81 2.02 7.69 4.63|3.0e-07\n",
"runtime error on batch 6064 CUDA out of memory. Tried to allocate 444.00 MiB (GPU 0; 15.90 GiB total capacity; 13.11 GiB already allocated; 399.75 MiB free; 13.48 GiB reserved in total by PyTorch)\n",
"runtime error on batch 6102 CUDA out of memory. Tried to allocate 580.00 MiB (GPU 0; 15.90 GiB total capacity; 13.11 GiB already allocated; 457.75 MiB free; 13.42 GiB reserved in total by PyTorch)\n",
"loss: 21.21 6.81 2.03 7.73 4.63|1.4e-07\n",
"saving... 6144 1.3945190165475963e-07\n",
"runtime error on batch 6212 2 root error(s) found.\n",
" (0) Resource exhausted: OOM when allocating tensor with shape[16,8,1312,1312] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc\n",
"\t [[{{node StatefulPartitionedCall/StatefulPartitionedCall/EncoderTransformer/Transformer/SparseTransformerEncode/Layer_0/SelfAttention/SparseMultiheadAttention/DotProductAttention/MatMul}}]]\n",
"Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.\n",
"\n",
"\t [[StatefulPartitionedCall/StatefulPartitionedCall/EncoderTransformer/Transformer/layer_prepostprocess/layer_norm/add_1/_128]]\n",
"Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.\n",
"\n",
" (1) Resource exhausted: OOM when allocating tensor with shape[16,8,1312,1312] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc\n",
"\t [[{{node StatefulPartitionedCall/StatefulPartitionedCall/EncoderTransformer/Transformer/SparseTransformerEncode/Layer_0/SelfAttention/SparseMultiheadAttention/DotProductAttention/MatMul}}]]\n",
"Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.\n",
"\n",
"0 successful operations.\n",
"0 derived errors ignored. [Op:__inference_restored_function_body_40710]\n",
"\n",
"Function call stack:\n",
"restored_function_body -> restored_function_body\n",
"\n",
"runtime error on batch 6281 CUDA out of memory. Tried to allocate 598.00 MiB (GPU 0; 15.90 GiB total capacity; 13.23 GiB already allocated; 415.75 MiB free; 13.46 GiB reserved in total by PyTorch)\n",
"loss: 21.14 6.81 1.99 7.70 4.63|4.0e-08\n",
"runtime error on batch 6416 CUDA out of memory. Tried to allocate 12.00 MiB (GPU 0; 15.90 GiB total capacity; 13.43 GiB already allocated; 27.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"runtime error on batch 6583 CUDA out of memory. Tried to allocate 96.00 MiB (GPU 0; 15.90 GiB total capacity; 13.65 GiB already allocated; 37.75 MiB free; 13.83 GiB reserved in total by PyTorch)\n",
"loss: 21.13 6.80 2.02 7.69 4.62|5.1e-10\n",
"saving... 6656 3.880974563125195e-10\n",
"runtime error on batch 6665 CUDA out of memory. Tried to allocate 440.00 MiB (GPU 0; 15.90 GiB total capacity; 13.46 GiB already allocated; 87.75 MiB free; 13.78 GiB reserved in total by PyTorch)\n",
"runtime error on batch 6841 CUDA out of memory. Tried to allocate 48.00 MiB (GPU 0; 15.90 GiB total capacity; 13.45 GiB already allocated; 61.75 MiB free; 13.81 GiB reserved in total by PyTorch)\n",
"loss: 21.14 6.82 2.05 7.65 4.63|1.0e-05\n",
"runtime error on batch 6989 CUDA out of memory. Tried to allocate 388.00 MiB (GPU 0; 15.90 GiB total capacity; 13.52 GiB already allocated; 67.75 MiB free; 13.80 GiB reserved in total by PyTorch)\n",
"loss: 21.19 6.82 2.11 7.64 4.63|9.9e-06\n",
"saving... 7168 9.884484122057703e-06\n",
"runtime error on batch 7192 CUDA out of memory. Tried to allocate 12.00 MiB (GPU 0; 15.90 GiB total capacity; 13.64 GiB already allocated; 21.75 MiB free; 13.85 GiB reserved in total by PyTorch)\n",
"loss: 21.24 6.83 2.11 7.68 4.63|9.7e-06\n",
"loss: 21.19 6.82 2.10 7.65 4.63|9.5e-06\n",
"saving... 7680 9.520719083212402e-06\n",
"runtime error on batch 7914 CUDA out of memory. Tried to allocate 74.00 MiB (GPU 0; 15.90 GiB total capacity; 13.47 GiB already allocated; 57.75 MiB free; 13.81 GiB reserved in total by PyTorch)\n",
"loss: 21.08 6.77 2.02 7.66 4.63|9.3e-06\n",
"runtime error on batch 8134 CUDA out of memory. Tried to allocate 454.00 MiB (GPU 0; 15.90 GiB total capacity; 13.46 GiB already allocated; 97.75 MiB free; 13.77 GiB reserved in total by PyTorch)\n",
"loss: 21.16 6.80 2.06 7.67 4.63|8.9e-06\n",
"saving... 8192 8.921413801302305e-06\n",
"runtime error on batch 8237 CUDA out of memory. Tried to allocate 54.00 MiB (GPU 0; 15.90 GiB total capacity; 13.70 GiB already allocated; 31.75 MiB free; 13.84 GiB reserved in total by PyTorch)\n",
"runtime error on batch 8399 CUDA out of memory. Tried to allocate 442.00 MiB (GPU 0; 15.90 GiB total capacity; 13.26 GiB already allocated; 267.75 MiB free; 13.61 GiB reserved in total by PyTorch)\n",
"runtime error on batch 8429 CUDA out of memory. Tried to allocate 26.00 MiB (GPU 0; 15.90 GiB total capacity; 13.47 GiB already allocated; 39.75 MiB free; 13.83 GiB reserved in total by PyTorch)\n",
"loss: 21.09 6.78 2.05 7.64 4.62|8.5e-06\n",
"loss: 21.09 6.78 2.04 7.65 4.62|8.1e-06\n",
"saving... 8704 8.119436623919674e-06\n",
"runtime error on batch 8845 CUDA out of memory. Tried to allocate 574.00 MiB (GPU 0; 15.90 GiB total capacity; 12.96 GiB already allocated; 587.75 MiB free; 13.29 GiB reserved in total by PyTorch)\n",
"loss: 21.09 6.79 2.03 7.66 4.61|7.7e-06\n",
"loss: 21.12 6.79 2.03 7.68 4.62|7.2e-06\n",
"saving... 9216 7.156236437334013e-06\n",
"loss: 21.20 6.81 2.03 7.74 4.63|6.6e-06\n",
"loss: 21.17 6.81 2.07 7.67 4.63|6.1e-06\n",
"saving... 9728 6.081594676871018e-06\n"
],
"name": "stdout"
},
{
"output_type": "error",
"ename": "KeyboardInterrupt",
"evalue": "ignored",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-54-212e7cfcf72f>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 32\u001b[0;31m \u001b[0minputs_ru\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpreprocess_inputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtokenizer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtolist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_tensors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'pt'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpadding\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtruncation\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 33\u001b[0m \u001b[0minputs_en\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpreprocess_inputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtokenizer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0meb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtolist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_tensors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'pt'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpadding\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtruncation\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 34\u001b[0m \u001b[0moutputs_ru\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0minputs_ru\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutput_hidden_states\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m<ipython-input-26-4c51bd26b02f>\u001b[0m in \u001b[0;36mpreprocess_inputs\u001b[0;34m(inputs)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mpreprocess_inputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0minputs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'input_ids'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'labels'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_mask_labels\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'input_ids'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mv\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdevice\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32min\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m<ipython-input-25-586a2ede563c>\u001b[0m in \u001b[0;36mget_mask_labels\u001b[0;34m(input_ids)\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0me\u001b[0m \u001b[0;32min\u001b[0m \u001b[0minput_ids\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mref_tokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6\u001b[0m \u001b[0mtoken\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtokenizer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_convert_id_to_token\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mref_tokens\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtoken\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/torch/tensor.py\u001b[0m in \u001b[0;36m__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 589\u001b[0m \u001b[0;34m'iterations executed (and might lead to errors or silently give '\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 590\u001b[0m 'incorrect results).', category=RuntimeWarning)\n\u001b[0;32m--> 591\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0miter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munbind\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 592\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 593\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__hash__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "X25iO3ckbtAb"
},
"source": [
"Семантика предложений в текстах, которые восстановил T5, угадывается очень-очень приблизительно. \n",
"\n",
"Но угадывается именно семантика, что приятно. \n",
"\n",
"А вообще я, конечно, дурак. CLS-токены надо было сразу из LABSE дистиллировать. К чему я в итоге и пришёл, и представительная сила CLS заметно возросла (и даже спустя время стала выше, чем у усреднения эмбеддингов всех токенов). \n",
"\n",
"~~Долбаный T5 я отключу, он ничему так и не научился, а GPU выжирает сильно. Так я хоть батчи смогу побольше сделать. ~~ Включил назад, пусть будет. Поменял адаптер только. И да, с более толстым адаптером (и с боле простыми примерами из татоебы) декодер учится заметно лучше. Когда лосс T5 около 2.2-2.3, он уже неплохо декодирует некоторые предложения (короткие иногда даже полностью). \n",
"\n",
"Пробовал отключить \"учителей\" от обучения, но качество CLS токена практически моментально упало с 0.58 до 0.56 на детекции парафраз (а потом до 0.54), и я подумал, что нафиг такие эксперименты. \n",
"\n",
"А вот отключение bert-multilingual для дистилляции токенов сильно помогло - начал уменьшаться лосс как для CLS, так и для MLM. Видимо, плохой учитель в какой-то момент начинает вредить. "
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "4ria8f56NO-T",
"outputId": "34b87e8d-359a-4278-f33d-0c9598e594a5"
},
"source": [
"from transformers.modeling_outputs import BaseModelOutput\n",
"model.eval()\n",
"t5.eval()\n",
"\n",
"def decipher(text, **kwargs):\n",
" bert_in = {k: v.to(model.device) for k, v in tokenizer(text, return_tensors='pt').items()}\n",
" \n",
" with torch.no_grad():\n",
" bert_out = model(**bert_in, output_hidden_states=True)\n",
" pooled = pool(model, bert_out)\n",
" eo = BaseModelOutput(last_hidden_state=t5_adapter(pooled).reshape([pooled.shape[0], t5_states, 512]))\n",
"\n",
" out = t5.generate(encoder_outputs=eo, **kwargs)\n",
" return t5_tokenizer.decode(out[0])\n",
"\n",
"for text in df_en.text.sample(5):\n",
" print(text)\n",
" print(decipher(text, max_length=64, repetition_penalty=3.0, num_beams=3))\n",
" print()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"If you j...\n",
"<pad> Если ты...</s>\n",
"\n",
"My delegation encourages the CTC in its efforts to intensify its cooperation with international, regional and subregional organizations.\n",
"<pad> Япония приветствует усилия, направленные на содействие сотрудничеству между ЮНЕСКО и другими региональными организациями в области развития.</s>\n",
"\n",
"Don't look so dismal, Arthur.\n",
"<pad> Не смотри, не беспокойся.</s>\n",
"\n",
"And Utanka took them back.\n",
"<pad> И они пошли в Бостон.</s>\n",
"\n",
"I was in love with Tom once.\n",
"<pad> Я был влюблён в Тома.</s>\n",
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "kDFFPkAXWGma",
"outputId": "2dc6392f-5bc5-45cc-da2d-3dc4dbe0ff68"
},
"source": [
"for text in df_ru.text.sample(5):\n",
" print(text)\n",
" print(decipher(text, max_length=64, repetition_penalty=3.0, num_beams=3))\n",
" print()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Я знаком с теми женщинами.\n",
"<pad> Я знаком с ней с мужчинами.</s>\n",
"\n",
"Знаете, я никогда не участвовала в соревнованиях для инвалидов, я всегда выступала против здоровых спортсменов.\n",
"<pad> Я никогда не играл в спортивных клубах, но всегда я люблю участвовать в спорте.</s>\n",
"\n",
"3.4 Сервис обязуется использовать только те букмекерские конторы, в которых был размещен по его рекомендации игровой банк Подписчика.\n",
"<pad> 2. Для этого пользователь должен использовать в качестве приложения, который используется для использования на основе списка клиентов.</s>\n",
"\n",
"Для того чтобы понять, насколько оправданно введение моратория и на чьей стороне правда: то ли на стороне экологов, выступающих против отлова, то ли сотрудников дельфинариев, утверждающих, что запрет 2008 года никоим образом не способствует спасению популяций дельфинов, мы обратились за разъяснениями к преподавателю кафедры зоологии Таврического национального университета имени Вернадского Павлу Гольдину.\n",
"<pad> Поскольку мы не считаем, что этот вопрос по-прежнему приводит к убеждению в том, что отсутствие прав человека на протяжении последнего десятилетия до тех пор, пока нет необходимости сказать, что из-за того, чтобы выясни\n",
"\n",
"Я понял.\n",
"<pad> Я понял.</s>\n",
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "NEPxAvaRW7_g"
},
"source": [
"Ниже - история значений лоссов за ход обучения. "
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "GzX2BGlVwCCt"
},
"source": [
"```\n",
"loss: 21.03 6.78 2.02 7.62 4.62\n",
"loss: 21.11 6.81 2.03 7.64 4.63\n",
"loss: 21.13 6.86 2.03 7.61 4.63\n",
"loss: 21.15 6.88 2.03 7.62 4.62\n",
"loss: 21.17 6.87 2.02 7.65 4.63\n",
"loss: 21.25 6.89 2.01 7.71 4.63\n",
"loss: 21.28 6.92 2.08 7.67 4.62\n",
"loss: 21.30 6.93 2.08 7.66 4.63\n",
"loss: 21.33 6.93 2.10 7.67 4.63\n",
"loss: 21.36 6.99 2.05 7.69 4.64\n",
"loss: 21.38 7.00 2.10 7.65 4.62\n",
"loss: 21.44 7.04 2.12 7.65 4.64\n",
"loss: 21.52 7.10 2.06 7.71 4.64\n",
"# назад 16, ибо участились overflow\n",
"loss: 22.15 7.09 1.91 7.73 5.43\n",
"loss: 22.19 7.12 1.88 7.77 5.42\n",
"loss: 22.24 7.14 1.91 7.77 5.43\n",
"loss: 22.31 7.22 1.88 7.77 5.43\n",
"loss: 22.35 7.24 1.89 7.79 5.43\n",
"loss: 22.40 7.24 1.90 7.83 5.43\n",
"loss: 22.64 7.32 1.95 7.93 5.43\n",
"# сделал батч 24 вместо 16\n",
"loss: 21.81 7.25 2.09 7.83 4.64\n",
"# отключил в порядке эксперимента потокенную дистилляцию\n",
"loss: 28.31 7.32 2.10 6.44 7.80 4.65\n",
"loss: 28.37 7.33 2.07 6.47 7.85 4.65\n",
"loss: 28.48 7.37 2.15 6.53 7.78 4.64\n",
"loss: 28.53 7.40 2.12 6.51 7.85 4.64\n",
"loss: 28.53 7.45 2.11 6.51 7.81 4.65\n",
"loss: 28.57 7.52 2.11 6.51 7.79 4.65\n",
"loss: 28.63 7.56 2.14 6.50 7.79 4.64 # или ломается T5?\n",
"loss: 28.63 7.60 2.09 6.46 7.83 4.65\n",
"# Добавил USE-multilingual-large в учителя, вроде ничего не ломается\n",
"loss: 24.19 3.20 2.10 6.48 7.77 4.64\n",
"loss: 24.24 3.20 2.12 6.46 7.80 4.65\n",
"loss: 24.26 3.19 2.12 6.50 7.80 4.65\n",
"loss: 24.29 3.21 2.16 6.54 7.74 4.64\n",
"loss: 24.32 3.23 2.14 6.46 7.84 4.65\n",
"loss: 24.36 3.24 2.13 6.49 7.84 4.66\n",
"loss: 24.43 3.31 2.15 6.46 7.83 4.68\n",
"# включил truncation в учителях, и сразу обучение как-то бодрее пошло. \n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "ygHeduRu3C9B"
},
"source": [
"```\n",
"loss: 24.50 3.31 2.14 6.49 7.88 4.67\n",
"loss: 24.53 3.31 2.17 6.50 7.87 4.68\n",
"loss: 24.55 3.33 2.14 6.49 7.91 4.68\n",
"loss: 24.64 3.35 2.16 6.55 7.89 4.69\n",
"loss: 24.68 3.35 2.18 6.55 7.90 4.69\n",
"loss: 24.71 3.37 2.19 6.51 7.94 4.70\n",
"loss: 24.74 3.41 2.17 6.51 7.94 4.72\n",
"loss: 24.85 3.42 2.22 6.52 7.96 4.72\n",
"# Отключил \"сложные\" батчи, т.к. обучение стало довольно нестабильным, особенно по части T5, который, похоже, охуел от таких массовых градиентов. \n",
"loss: 24.83 3.46 2.36 6.41 7.68 4.92\n",
"loss: 24.86 3.48 2.38 6.35 7.71 4.94\n",
"loss: 24.91 3.50 2.37 6.38 7.76 4.91\n",
"loss: 25.07 3.56 2.39 6.37 7.81 4.95\n",
"loss: 25.12 3.55 2.38 6.39 7.83 4.97\n",
"loss: 25.17 3.61 2.43 6.42 7.75 4.97\n",
"loss: 25.30 3.63 2.47 6.37 7.87 4.97\n",
"# сделал каждый 4-й батч однородным (\"сложным\")\n",
"loss: 25.24 3.79 2.16 6.47 7.95 4.86\n",
"loss: 25.55 3.89 2.16 6.56 7.99 4.94\n",
"# поправил индексацию обучающих данных, и внезапно оказались, что всё обстоит лучше с англо-русскими лоссами!\n",
"loss: 26.82 3.70 2.27 7.26 8.03 5.56\n",
"loss: 26.88 3.72 2.25 7.22 8.10 5.58\n",
"loss: 26.91 3.71 2.23 7.23 8.15 5.58\n",
"loss: 26.96 3.73 2.26 7.30 8.11 5.56\n",
"loss: 27.01 3.73 2.27 7.30 8.13 5.57\n",
"loss: 27.05 3.73 2.27 7.32 8.14 5.58\n",
"loss: 27.19 3.80 2.35 7.31 8.14 5.58\n",
"loss: 27.27 3.81 2.38 7.34 8.17 5.57\n",
"loss: 27.38 3.82 2.39 7.37 8.21 5.58\n",
"loss: 27.43 3.84 2.44 7.37 8.21 5.58\n",
"loss: 27.46 3.84 2.43 7.37 8.23 5.59\n",
"loss: 27.71 3.95 2.55 7.39 8.20 5.61\n",
"loss: 27.75 3.95 2.55 7.40 8.22 5.62\n",
"loss: 27.83 4.01 2.51 7.38 8.25 5.67\n",
"loss: 27.99 4.05 2.53 7.42 8.29 5.69\n",
"loss: 28.24 4.26 2.55 7.39 8.24 5.80\n",
"loss: 28.81 4.72 2.58 7.45 8.29 5.77\n",
"loss: 30.14 6.33 2.55 7.45 8.21 5.60\n",
"# добавил в учителя ещё Laser, чтобы ещё лучше смысл предложения угадывался\n",
"loss: 26.67 2.89 2.54 7.41 8.24 5.58\n",
"loss: 26.93 2.92 2.77 7.39 8.26 5.59\n",
"loss: 27.22 2.92 2.97 7.43 8.29 5.62 # when t5 loss gets lower than 2.5, I'll be satisfied\n",
"loss: 27.83 2.93 3.47 7.54 8.27 5.61\n",
"loss: 28.32 2.99 3.98 7.38 8.37 5.60\n",
"# не понравилось, вернул T5 на место в новом формате\n",
"loss: 25.31 2.91 7.20 8.23 6.96\n",
"loss: 25.50 2.96 7.17 8.37 7.00\n",
"# отключаю T5 нафиг, увеличиваю батч до 32\n",
"loss: 48.62 2.95 24.28 7.46 8.32 5.59\n",
"loss: 49.55 3.01 25.13 7.52 8.32 5.57\n",
"# Удесятерил лосс от T5, ибо задолбало, что он совсем не учится\n",
"loss: 26.91 3.03 2.51 7.46 8.32 5.60\n",
"loss: 27.05 2.87 2.67 7.82 8.49 5.20\n",
"## добавил tatoeba и opus100 корпус к яндексовскому, чтоб не учиться по кругу на одном и том же\n",
"loss: 27.29 2.56 3.05 8.60 8.42 4.65\n",
"loss: 27.34 2.58 3.06 8.64 8.41 4.66\n",
"loss: 27.36 2.59 3.11 8.62 8.38 4.66\n",
"loss: 27.43 2.62 3.07 8.64 8.43 4.67\n",
"loss: 27.47 2.64 3.11 8.65 8.39 4.67\n",
"loss: 27.57 2.66 3.10 8.69 8.44 4.68\n",
"loss: 27.61 2.68 3.11 8.67 8.48 4.68\n",
"loss: 27.65 2.76 3.07 8.65 8.45 4.72\n",
"loss: 27.74 2.77 3.13 8.67 8.45 4.72\n",
"loss: 27.83 2.81 3.16 8.67 8.43 4.75\n",
"loss: 27.87 2.85 3.13 8.69 8.42 4.77\n",
"loss: 28.38 3.11 3.13 8.73 8.50 4.91\n",
"loss: 29.10 3.76 3.16 8.72 8.45 5.02\n",
"# добавил rubert в дистилляцию (лосс сумируется с лоссом labse)\n",
"loss: 26.81 1.86 3.12 8.74 8.44 4.65\n",
"loss: 27.00 1.86 3.16 8.79 8.52 4.66\n",
"# включил дропаут в моделях labse и big_model, шоб не скучно было!\n",
"loss: 26.51 1.88 3.10 8.45 8.41 4.67\n",
"loss: 26.55 1.88 3.12 8.48 8.43 4.65\n",
"loss: 26.61 1.89 3.19 8.39 8.48 4.66\n",
"loss: 27.37 2.20 3.18 8.76 8.49 4.76\n",
"loss: 27.57 2.34 3.19 8.77 8.50 4.77\n",
"loss: 27.74 2.47 3.12 8.83 8.54 4.78\n",
"loss: 27.94 2.62 3.20 8.82 8.54 4.77\n",
"loss: 28.11 2.81 3.17 8.89 8.48 4.76\n",
"loss: 28.17 2.81 3.22 8.89 8.49 4.75\n",
"loss: 28.32 2.81 3.22 8.98 8.55 4.76\n",
"# поднял температуру дистилляции MLM до 3, а вес - до 35, ибо могу!\n",
"loss: 21.25 2.82 3.18 2.08 8.41 4.76\n",
"loss: 21.28 2.83 3.16 2.06 8.47 4.75\n",
"loss: 21.31 2.84 3.22 2.08 8.42 4.75\n",
"loss: 21.35 2.86 3.25 2.07 8.41 4.76\n",
"loss: 21.38 2.86 3.21 2.08 8.48 4.76\n",
"loss: 21.42 2.87 3.26 2.07 8.45 4.76\n",
"loss: 21.49 2.89 3.27 2.09 8.48 4.75\n",
"loss: 21.55 2.96 3.22 2.08 8.54 4.76\n",
"loss: 22.57 3.38 3.42 2.13 8.66 4.99\n",
"loss: 22.94 3.63 3.40 2.12 8.66 5.14\n",
"loss: 23.12 3.84 3.33 2.12 8.65 5.18\n",
"loss: 23.42 4.09 3.47 2.10 8.52 5.23\n",
"loss: 23.55 4.11 3.42 2.11 8.68 5.22\n",
"loss: 23.69 4.25 3.36 2.13 8.72 5.24\n",
"loss: 23.82 4.28 3.36 2.13 8.81 5.24\n",
"loss: 23.93 4.42 3.40 2.11 8.77 5.24\n",
"loss: 28.08 8.75 3.52 2.11 8.79 4.91\n",
"# (above: added LABSE loss to the front, en and ru T5 losses added together, everything disrupted).\n",
"loss: 18.77 1.66 1.66 2.10 8.68 4.67\n",
"loss: 18.82 1.69 1.70 2.09 8.68 4.66\n",
"loss: 18.92 1.69 1.70 2.12 8.73 4.68\n",
"loss: 19.00 1.79 1.80 2.12 8.61 4.69\n",
"loss: 19.05 1.75 1.75 2.11 8.75 4.70\n",
"loss: 19.19 1.78 1.78 2.13 8.81 4.70\n",
"#\n",
"loss: 19.28 1.87 1.87 2.12 8.73 4.70\n",
"loss: 19.35 1.86 1.87 2.13 8.78 4.70\n",
"loss: 19.36 1.91 1.91 2.14 8.69 4.71\n",
"loss: 19.47 1.91 1.91 2.15 8.80 4.71\n",
"loss: 19.95 2.17 2.17 2.11 8.81 4.69\n",
"loss: 17.1293, 2.2217, 8.8566, 6.0510\n",
"loss: 22.68 2.04 2.04 1.99 1.98 2.15 9.06 3.42\n",
"loss: 22.14 1.94 1.95 1.91 1.90 2.13 8.91 3.40\n",
"\n",
"loss: 22.20 1.97 1.98 1.92 1.89 2.14 8.91 3.39\n",
"loss: 22.52 2.00 2.01 1.95 1.92 2.15 9.08 3.42\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "YK-1rjCT11Ef"
},
"source": [
"## Publish the model to huggingface hub\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "ecGBPcUc13oE"
},
"source": [
"from transformers import BertForPreTraining, BertTokenizer\n",
"NEW_MODEL_NAME = '/gd/MyDrive/models/tinybert-ru'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "gWH6FcAK2Cu-"
},
"source": [
"#model = BertForPreTraining.from_pretrained(NEW_MODEL_NAME)\n",
"#tokenizer = BertTokenizerFast.from_pretrained(NEW_MODEL_NAME)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "tKhKlScE8Qm-"
},
"source": [
"model.config.name_or_path = 'cointegrated/rubert-tiny'\n",
"tokenizer.name_or_path = 'cointegrated/rubert-tiny'\n",
"tokenizer.init_kwargs['name_or_path'] = 'cointegrated/rubert-tiny'"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "eas9bEos2SJr",
"outputId": "3816197b-26cd-4b51-dba6-0108dfa11d7a"
},
"source": [
"!curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash\n",
"!sudo apt-get install git-lfs\n",
"!git lfs install"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Detected operating system as Ubuntu/bionic.\n",
"Checking for curl...\n",
"Detected curl...\n",
"Checking for gpg...\n",
"Detected gpg...\n",
"Running apt-get update... done.\n",
"Installing apt-transport-https... done.\n",
"Installing /etc/apt/sources.list.d/github_git-lfs.list...done.\n",
"Importing packagecloud gpg key... done.\n",
"Running apt-get update... done.\n",
"\n",
"The repository is setup! You can now install packages.\n",
"Reading package lists... Done\n",
"Building dependency tree \n",
"Reading state information... Done\n",
"The following NEW packages will be installed:\n",
" git-lfs\n",
"0 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.\n",
"Need to get 6,229 kB of archives.\n",
"After this operation, 14.5 MB of additional disk space will be used.\n",
"Get:1 https://packagecloud.io/github/git-lfs/ubuntu bionic/main amd64 git-lfs amd64 2.13.3 [6,229 kB]\n",
"Fetched 6,229 kB in 1s (7,087 kB/s)\n",
"debconf: unable to initialize frontend: Dialog\n",
"debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 1.)\n",
"debconf: falling back to frontend: Readline\n",
"debconf: unable to initialize frontend: Readline\n",
"debconf: (This frontend requires a controlling tty.)\n",
"debconf: falling back to frontend: Teletype\n",
"dpkg-preconfigure: unable to re-open stdin: \n",
"Selecting previously unselected package git-lfs.\n",
"(Reading database ... 160776 files and directories currently installed.)\n",
"Preparing to unpack .../git-lfs_2.13.3_amd64.deb ...\n",
"Unpacking git-lfs (2.13.3) ...\n",
"Setting up git-lfs (2.13.3) ...\n",
"Git LFS initialized.\n",
"Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n",
"Git LFS initialized.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "dCNFI0D02ZUP",
"outputId": "46795703-dfd4-4210-eb3a-21defba0eacd"
},
"source": [
"!pip install huggingface_hub"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.7/dist-packages (0.0.8)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from huggingface_hub) (3.0.12)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from huggingface_hub) (2.23.0)\n",
"Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from huggingface_hub) (4.0.1)\n",
"Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from huggingface_hub) (4.41.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->huggingface_hub) (2020.12.5)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->huggingface_hub) (2.10)\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->huggingface_hub) (1.24.3)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->huggingface_hub) (3.0.4)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->huggingface_hub) (3.4.1)\n",
"Requirement already satisfied: typing-extensions>=3.6.4; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->huggingface_hub) (3.7.4.3)\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "LL-NDqRC2gy8"
},
"source": [
"!huggingface-cli login"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "bNKzawMF2h-9"
},
"source": [
"# !huggingface-cli repo create rubert-tiny"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "xQunwCAIEe-S"
},
"source": [
"! rm -rf rubert-tiny"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "PR9uJT6CXUNS"
},
"source": [
"В ячейке ниже может понадобиться ввести ваши логин и пароль, если будут проблемы с пушем"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "dFNnZkKi3H-V",
"outputId": "f566f517-6d4c-4764-ea4a-4413497582ce"
},
"source": [
"!git clone https://huggingface.co/cointegrated/rubert-tiny"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Cloning into 'rubert-tiny'...\n",
"remote: Enumerating objects: 64, done.\u001b[K\n",
"remote: Counting objects: 100% (64/64), done.\u001b[K\n",
"remote: Compressing objects: 100% (63/63), done.\u001b[K\n",
"remote: Total 64 (delta 27), reused 0 (delta 0)\u001b[K\n",
"Unpacking objects: 100% (64/64), done.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "n-y_dk2s3OVG",
"outputId": "a3e06c51-6b99-4039-f607-23e571afb392"
},
"source": [
"! cd rubert-tiny && git lfs install & git config --global user.email \"dale.david@mail.ru\""
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Updated git hooks.\n",
"Git LFS initialized.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "2HUe297y3RvQ"
},
"source": [
"model.save_pretrained('rubert-tiny')\n",
"#tokenizer.save_pretrained('rubert-tiny')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "mWFHsAoj3W5P",
"outputId": "469f30e9-368c-4344-dc4b-899b6c4b2d4a"
},
"source": [
"!ls -alsh rubert-tiny"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"total 47M\n",
"4.0K drwxr-xr-x 3 root root 4.0K Jun 9 19:43 .\n",
"4.0K drwxr-xr-x 1 root root 4.0K Jun 9 19:43 ..\n",
"4.0K -rw-r--r-- 1 root root 632 Jun 9 19:43 config.json\n",
"4.0K drwxr-xr-x 9 root root 4.0K Jun 9 19:43 .git\n",
"4.0K -rw-r--r-- 1 root root 690 Jun 9 19:43 .gitattributes\n",
" 46M -rw-r--r-- 1 root root 46M Jun 9 19:43 pytorch_model.bin\n",
"4.0K -rw-r--r-- 1 root root 1.1K Jun 9 19:43 README.md\n",
"4.0K -rw-r--r-- 1 root root 112 Jun 9 19:43 special_tokens_map.json\n",
"4.0K -rw-r--r-- 1 root root 341 Jun 9 19:43 tokenizer_config.json\n",
"460K -rw-r--r-- 1 root root 458K Jun 9 19:43 tokenizer.json\n",
"236K -rw-r--r-- 1 root root 236K Jun 9 19:43 vocab.txt\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Zt_KdJvY9ZlM",
"outputId": "6140e444-3497-4cc1-f40d-a580fb9c197a"
},
"source": [
"! cd rubert-tiny && git status"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"On branch main\n",
"Your branch is up to date with 'origin/main'.\n",
"\n",
"Changes not staged for commit:\n",
" (use \"git add <file>...\" to update what will be committed)\n",
" (use \"git checkout -- <file>...\" to discard changes in working directory)\n",
"\n",
"\t\u001b[31mmodified: pytorch_model.bin\u001b[m\n",
"\n",
"no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "kVWQZH8P3aEs",
"outputId": "5db702ae-3a38-41f5-f4c5-d3ae9d66bc8b"
},
"source": [
"! cd rubert-tiny && git add . && git status"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"On branch main\n",
"Your branch is up to date with 'origin/main'.\n",
"\n",
"Changes to be committed:\n",
" (use \"git reset HEAD <file>...\" to unstage)\n",
"\n",
"\t\u001b[32mmodified: pytorch_model.bin\u001b[m\n",
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Y2A1Kk049I3R",
"outputId": "88e859cc-d4e4-4838-d988-5beb95b7e4df"
},
"source": [
"! cd rubert-tiny && git diff --cached "
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"\u001b[1mdiff --git a/pytorch_model.bin b/pytorch_model.bin\u001b[m\n",
"\u001b[1mindex 9da29c2..eacb3f3 100644\u001b[m\n",
"\u001b[1m--- a/pytorch_model.bin\u001b[m\n",
"\u001b[1m+++ b/pytorch_model.bin\u001b[m\n",
"\u001b[36m@@ -1,3 +1,3 @@\u001b[m\n",
" version https://git-lfs.github.com/spec/v1\u001b[m\n",
"\u001b[31m-oid sha256:bab658a6372a592efa5a8f6fde8149edf07f69e889d6c821a1e3fbf21cc82099\u001b[m\n",
"\u001b[32m+\u001b[m\u001b[32moid sha256:7b46f70960011906bf9be3c46ad7490bada3845ddb5c2d7a8830c9517ee66071\u001b[m\n",
" size 47679974\u001b[m\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "zzWincPK3e9B",
"outputId": "2376737f-df38-4f05-b7dd-8c94a2eeb130"
},
"source": [
"! cd rubert-tiny && git add . && git commit -m \"Train for a couple of days more\" && git push"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"[main 0dd911d] Train for a couple of days more\n",
" 1 file changed, 1 insertion(+), 1 deletion(-)\n",
"Uploading LFS objects: 100% (1/1), 48 MB | 6.0 MB/s, done.\n",
"Counting objects: 3, done.\n",
"Delta compression using up to 2 threads.\n",
"Compressing objects: 100% (3/3), done.\n",
"Writing objects: 100% (3/3), 374 bytes | 374.00 KiB/s, done.\n",
"Total 3 (delta 1), reused 0 (delta 0)\n",
"To https://huggingface.co/cointegrated/rubert-tiny\n",
" e032bcd..0dd911d main -> main\n"
],
"name": "stdout"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment