From 26d82035de2e60ddeff131750dcc87a0addaebf2 Mon Sep 17 00:00:00 2001 From: Hafedh <70411813+not-lain@users.noreply.github.com> Date: Wed, 19 Jun 2024 02:24:44 +0100 Subject: [PATCH 1/6] add a huggingface example --- examples/huggingface/share_models.ipynb | 2101 +++++++++++++++++++++++ 1 file changed, 2101 insertions(+) create mode 100644 examples/huggingface/share_models.ipynb diff --git a/examples/huggingface/share_models.ipynb b/examples/huggingface/share_models.ipynb new file mode 100644 index 00000000..606f6716 --- /dev/null +++ b/examples/huggingface/share_models.ipynb @@ -0,0 +1,2101 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "T4", + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "accelerator": "GPU", + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "03ed14345fcd430fa4d692440b2b92de": { + "model_module": "@jupyter-widgets/controls", + "model_name": "VBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "VBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "VBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_5d56e244ff4a4a8c870e78dfe6ce0f4e", + "IPY_MODEL_74550344bf054abd969ab40f5a90850e", + "IPY_MODEL_c22dddecf8bd4b258e39dcd17559a07c", + "IPY_MODEL_4f1ced08708b4070af3a09ab1bfd5c4a", + "IPY_MODEL_425bd24e216b4b1392670b138d33e795" + ], + "layout": "IPY_MODEL_7ac966c2fff74b999086816a16ac9825" + } + }, + "5d56e244ff4a4a8c870e78dfe6ce0f4e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_35a3481cf34d4b72ad1266a9664e2db4", + "placeholder": "​", + "style": "IPY_MODEL_3862dbd096054b7dbd3b9a3d26941a00", + "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" + } + }, + "74550344bf054abd969ab40f5a90850e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "PasswordModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "PasswordModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "PasswordView", + "continuous_update": true, + "description": "Token:", + "description_tooltip": null, + "disabled": false, + "layout": "IPY_MODEL_48e27c9c79854a2bbad92ca05cbf6842", + "placeholder": "​", + "style": "IPY_MODEL_340be088856c42f082c95c6a3db3f4b1", + "value": "" + } + }, + "c22dddecf8bd4b258e39dcd17559a07c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "CheckboxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "CheckboxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "CheckboxView", + "description": "Add token as git credential?", + "description_tooltip": null, + "disabled": false, + "indent": true, + "layout": "IPY_MODEL_d5fd0caaeb154cf28e8ea9d72587fe0d", + "style": "IPY_MODEL_f9e45fc510a1459c8cb07b1ecc3b8514", + "value": true + } + }, + "4f1ced08708b4070af3a09ab1bfd5c4a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ButtonModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ButtonModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ButtonView", + "button_style": "", + "description": "Login", + "disabled": false, + "icon": "", + "layout": "IPY_MODEL_586cbbcb2b3448b4a8bcf904965b25db", + "style": "IPY_MODEL_b0f383d785134544b2fd7e2bf3e54b33", + "tooltip": "" + } + }, + "425bd24e216b4b1392670b138d33e795": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_72e8d4713c574538aeebcee32af4960d", + "placeholder": "​", + "style": "IPY_MODEL_57537ab729da49e3a53fe8e42fbe772c", + "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " + } + }, + "7ac966c2fff74b999086816a16ac9825": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": "center", + "align_self": null, + "border": null, + "bottom": null, + "display": "flex", + "flex": null, + "flex_flow": "column", + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": "50%" + } + }, + "35a3481cf34d4b72ad1266a9664e2db4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3862dbd096054b7dbd3b9a3d26941a00": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "48e27c9c79854a2bbad92ca05cbf6842": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "340be088856c42f082c95c6a3db3f4b1": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d5fd0caaeb154cf28e8ea9d72587fe0d": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f9e45fc510a1459c8cb07b1ecc3b8514": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "586cbbcb2b3448b4a8bcf904965b25db": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b0f383d785134544b2fd7e2bf3e54b33": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ButtonStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ButtonStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "button_color": null, + "font_weight": "" + } + }, + "72e8d4713c574538aeebcee32af4960d": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "57537ab729da49e3a53fe8e42fbe772c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "33d6236ffcb449768358e100ecadff57": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d45adb4c73334cef9e999f1e528d29e8", + "IPY_MODEL_ef982f04dcfd459bb3fc18cb5e5e810b", + "IPY_MODEL_ef69f4eeba00445fac55f89be3923a82" + ], + "layout": "IPY_MODEL_97154dd426ec4a11a7439d77121a96f1" + } + }, + "d45adb4c73334cef9e999f1e528d29e8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9e9ffcded9fc42c89bd931c9f9cd3f5c", + "placeholder": "​", + "style": "IPY_MODEL_50247b1d2efd4d968590f02fa23bffdb", + "value": "model.safetensors: 100%" + } + }, + "ef982f04dcfd459bb3fc18cb5e5e810b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c7d1058e221b433785ae13759d6d8a4c", + "max": 288, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_29fd42a52e694c7bb217b226175ca3c2", + "value": 288 + } + }, + "ef69f4eeba00445fac55f89be3923a82": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_33985956758947f2b6e19049350194de", + "placeholder": "​", + "style": "IPY_MODEL_dbf965d4653f4d4a880102c90c63ac61", + "value": " 288/288 [00:00<00:00, 1.46kB/s]" + } + }, + "97154dd426ec4a11a7439d77121a96f1": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9e9ffcded9fc42c89bd931c9f9cd3f5c": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "50247b1d2efd4d968590f02fa23bffdb": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c7d1058e221b433785ae13759d6d8a4c": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "29fd42a52e694c7bb217b226175ca3c2": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "33985956758947f2b6e19049350194de": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dbf965d4653f4d4a880102c90c63ac61": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9983ddd3318d437db4c90b4ade15b0e8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_38bacf9e683249a9817f411abfc5482d", + "IPY_MODEL_648a482314e14032a1f50e8d5f7eeb77", + "IPY_MODEL_e287a127f402471e9272f1da4a20b80b" + ], + "layout": "IPY_MODEL_f51e6da0f50e421a935de925171b150f" + } + }, + "38bacf9e683249a9817f411abfc5482d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_67722103310d4320945bfa8200279c0d", + "placeholder": "​", + "style": "IPY_MODEL_c58823cc199b43fd9b52432bca24f9cc", + "value": "config.json: 100%" + } + }, + "648a482314e14032a1f50e8d5f7eeb77": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_80f8e41a6f744436a9f9ce653ca10aa4", + "max": 18, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e982786266a4416cbd9fa4e0bd95724b", + "value": 18 + } + }, + "e287a127f402471e9272f1da4a20b80b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f16a2605b0194e698603e6243ff44ecf", + "placeholder": "​", + "style": "IPY_MODEL_0109218c00c0456ab0d11144b5410229", + "value": " 18.0/18.0 [00:00<00:00, 1.38kB/s]" + } + }, + "f51e6da0f50e421a935de925171b150f": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "67722103310d4320945bfa8200279c0d": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c58823cc199b43fd9b52432bca24f9cc": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "80f8e41a6f744436a9f9ce653ca10aa4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e982786266a4416cbd9fa4e0bd95724b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f16a2605b0194e698603e6243ff44ecf": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0109218c00c0456ab0d11144b5410229": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "87e2869aa2974e69b9ae1b5ca72e89c1": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0a5baa30e4f2499f95d4707c031ef0f9", + "IPY_MODEL_3e87b1e0487a4b8193fcd1c061e31e26", + "IPY_MODEL_5e9b36295d29449094962c63dd96facd" + ], + "layout": "IPY_MODEL_b759485b7c9e4657afb85227227df069" + } + }, + "0a5baa30e4f2499f95d4707c031ef0f9": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d5792ee7d31a408bbab7d43ab5f0eef2", + "placeholder": "​", + "style": "IPY_MODEL_90aa09fd88394ff7a457e267a47349ac", + "value": "model.safetensors: 100%" + } + }, + "3e87b1e0487a4b8193fcd1c061e31e26": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_868a47b398244172bcc8d4e1179ef4f6", + "max": 288, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e2252b6903d44298a853bf89dab865d1", + "value": 288 + } + }, + "5e9b36295d29449094962c63dd96facd": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_26b77f83daba4ba8ad060e0b29e3ba25", + "placeholder": "​", + "style": "IPY_MODEL_f9a0e09376b344d6a43f340a3f194472", + "value": " 288/288 [00:00<00:00, 19.0kB/s]" + } + }, + "b759485b7c9e4657afb85227227df069": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d5792ee7d31a408bbab7d43ab5f0eef2": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "90aa09fd88394ff7a457e267a47349ac": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "868a47b398244172bcc8d4e1179ef4f6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e2252b6903d44298a853bf89dab865d1": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "26b77f83daba4ba8ad060e0b29e3ba25": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f9a0e09376b344d6a43f340a3f194472": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + } + } + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "source": [ + "!pip install -q git+https://github.com/mit-han-lab/torchquantum.git" + ], + "metadata": { + "id": "4syF6X3Fl5dg", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "3e06625a-3f45-463c-9571-70a5e37f8d2c" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.9/86.9 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m5.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m162.6/162.6 kB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.6/48.6 MB\u001b[0m \u001b[31m11.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m85.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.3/12.3 MB\u001b[0m \u001b[31m90.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m324.1/324.1 kB\u001b[0m \u001b[31m38.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.8/56.8 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m11.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.8/79.8 kB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m81.7/81.7 kB\u001b[0m \u001b[31m11.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m14.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m67.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m52.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.6/49.6 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.7/49.7 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.4/39.4 MB\u001b[0m \u001b[31m21.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.3/21.3 MB\u001b[0m \u001b[31m50.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.5/62.5 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.3/296.3 kB\u001b[0m \u001b[31m36.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.1/51.1 kB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.1/62.1 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m16.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m133.1/133.1 kB\u001b[0m \u001b[31m18.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m128.7/128.7 kB\u001b[0m \u001b[31m17.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.4/130.4 kB\u001b[0m \u001b[31m17.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m121.4/121.4 kB\u001b[0m \u001b[31m18.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.5/107.5 kB\u001b[0m \u001b[31m13.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Building wheel for torchquantum (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for pylatexenc (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for ibm-platform-services (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for ibm-cloud-sdk-core (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "# ModelHubMixin Application" + ], + "metadata": { + "id": "8J3xd8iWSEX0" + } + }, + { + "cell_type": "code", + "source": [ + "# login with your writing token\n", + "# token can be found here https://huggingface.co/settings/tokens\n", + "from huggingface_hub import notebook_login\n", + "notebook_login()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 331, + "referenced_widgets": [ + "03ed14345fcd430fa4d692440b2b92de", + "5d56e244ff4a4a8c870e78dfe6ce0f4e", + "74550344bf054abd969ab40f5a90850e", + "c22dddecf8bd4b258e39dcd17559a07c", + "4f1ced08708b4070af3a09ab1bfd5c4a", + "425bd24e216b4b1392670b138d33e795", + "7ac966c2fff74b999086816a16ac9825", + "35a3481cf34d4b72ad1266a9664e2db4", + "3862dbd096054b7dbd3b9a3d26941a00", + "48e27c9c79854a2bbad92ca05cbf6842", + "340be088856c42f082c95c6a3db3f4b1", + "d5fd0caaeb154cf28e8ea9d72587fe0d", + "f9e45fc510a1459c8cb07b1ecc3b8514", + "586cbbcb2b3448b4a8bcf904965b25db", + "b0f383d785134544b2fd7e2bf3e54b33", + "72e8d4713c574538aeebcee32af4960d", + "57537ab729da49e3a53fe8e42fbe772c" + ] + }, + "id": "ydSz4YpbUVU_", + "outputId": "958b42a4-3084-462e-e814-75324adfed09" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "VBox(children=(HTML(value='
Date: Wed, 19 Jun 2024 03:48:15 +0100 Subject: [PATCH 2/6] update huggingface example --- examples/huggingface/share_models.ipynb | 422 ++++++++---------------- 1 file changed, 136 insertions(+), 286 deletions(-) diff --git a/examples/huggingface/share_models.ipynb b/examples/huggingface/share_models.ipynb index 606f6716..ae93f742 100644 --- a/examples/huggingface/share_models.ipynb +++ b/examples/huggingface/share_models.ipynb @@ -4,7 +4,6 @@ "metadata": { "colab": { "provenance": [], - "gpuType": "T4", "include_colab_link": true }, "kernelspec": { @@ -14,7 +13,6 @@ "language_info": { "name": "python" }, - "accelerator": "GPU", "widgets": { "application/vnd.jupyter.widget-state+json": { "03ed14345fcd430fa4d692440b2b92de": { @@ -880,7 +878,7 @@ "description_width": "" } }, - "9983ddd3318d437db4c90b4ade15b0e8": { + "4c2da5cf80a94267b9faea748f82c0e0": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", @@ -895,14 +893,14 @@ "_view_name": "HBoxView", "box_style": "", "children": [ - "IPY_MODEL_38bacf9e683249a9817f411abfc5482d", - "IPY_MODEL_648a482314e14032a1f50e8d5f7eeb77", - "IPY_MODEL_e287a127f402471e9272f1da4a20b80b" + "IPY_MODEL_0ee88ce783994f38b0db6a738d2a8a48", + "IPY_MODEL_60fadc09913d42b796ef418f24618576", + "IPY_MODEL_acdfabd115ea4ef482af5820abc15b20" ], - "layout": "IPY_MODEL_f51e6da0f50e421a935de925171b150f" + "layout": "IPY_MODEL_1322fd447b6a4db8a7966e992c2cc948" } }, - "38bacf9e683249a9817f411abfc5482d": { + "0ee88ce783994f38b0db6a738d2a8a48": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", @@ -917,13 +915,13 @@ "_view_name": "HTMLView", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_67722103310d4320945bfa8200279c0d", + "layout": "IPY_MODEL_aba3fe0da5594ddd9226b35bd6f19e54", "placeholder": "​", - "style": "IPY_MODEL_c58823cc199b43fd9b52432bca24f9cc", + "style": "IPY_MODEL_23e70ca894394cf891247e897c75ae7c", "value": "config.json: 100%" } }, - "648a482314e14032a1f50e8d5f7eeb77": { + "60fadc09913d42b796ef418f24618576": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", @@ -939,15 +937,15 @@ "bar_style": "success", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_80f8e41a6f744436a9f9ce653ca10aa4", + "layout": "IPY_MODEL_bda0e8e5053f4615b4bab3833ee29d3e", "max": 18, "min": 0, "orientation": "horizontal", - "style": "IPY_MODEL_e982786266a4416cbd9fa4e0bd95724b", + "style": "IPY_MODEL_85c3bb489d894c57b9ad1c16e34b56c7", "value": 18 } }, - "e287a127f402471e9272f1da4a20b80b": { + "acdfabd115ea4ef482af5820abc15b20": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", @@ -962,13 +960,13 @@ "_view_name": "HTMLView", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_f16a2605b0194e698603e6243ff44ecf", + "layout": "IPY_MODEL_b5e89469873049adbe2f9bf3cf5d2709", "placeholder": "​", - "style": "IPY_MODEL_0109218c00c0456ab0d11144b5410229", - "value": " 18.0/18.0 [00:00<00:00, 1.38kB/s]" + "style": "IPY_MODEL_a83b0347eef547abb5dac64d7456ee22", + "value": " 18.0/18.0 [00:00<00:00, 1.08kB/s]" } }, - "f51e6da0f50e421a935de925171b150f": { + "1322fd447b6a4db8a7966e992c2cc948": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1020,7 +1018,7 @@ "width": null } }, - "67722103310d4320945bfa8200279c0d": { + "aba3fe0da5594ddd9226b35bd6f19e54": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1072,7 +1070,7 @@ "width": null } }, - "c58823cc199b43fd9b52432bca24f9cc": { + "23e70ca894394cf891247e897c75ae7c": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", @@ -1087,7 +1085,7 @@ "description_width": "" } }, - "80f8e41a6f744436a9f9ce653ca10aa4": { + "bda0e8e5053f4615b4bab3833ee29d3e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1139,7 +1137,7 @@ "width": null } }, - "e982786266a4416cbd9fa4e0bd95724b": { + "85c3bb489d894c57b9ad1c16e34b56c7": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", @@ -1155,7 +1153,7 @@ "description_width": "" } }, - "f16a2605b0194e698603e6243ff44ecf": { + "b5e89469873049adbe2f9bf3cf5d2709": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1207,7 +1205,7 @@ "width": null } }, - "0109218c00c0456ab0d11144b5410229": { + "a83b0347eef547abb5dac64d7456ee22": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", @@ -1222,7 +1220,7 @@ "description_width": "" } }, - "87e2869aa2974e69b9ae1b5ca72e89c1": { + "9cf1d08201df41a8b06c3e5956a96611": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", @@ -1237,14 +1235,14 @@ "_view_name": "HBoxView", "box_style": "", "children": [ - "IPY_MODEL_0a5baa30e4f2499f95d4707c031ef0f9", - "IPY_MODEL_3e87b1e0487a4b8193fcd1c061e31e26", - "IPY_MODEL_5e9b36295d29449094962c63dd96facd" + "IPY_MODEL_11e99e2f558049dd8ff9353b8e7ed0c9", + "IPY_MODEL_f72b9265ba8e4a45bf1049dfd8c711b9", + "IPY_MODEL_c644a223e2cb4696963d9421a39fd3d6" ], - "layout": "IPY_MODEL_b759485b7c9e4657afb85227227df069" + "layout": "IPY_MODEL_d7250c64d86a4316b9b1fb6ab5d95030" } }, - "0a5baa30e4f2499f95d4707c031ef0f9": { + "11e99e2f558049dd8ff9353b8e7ed0c9": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", @@ -1259,13 +1257,13 @@ "_view_name": "HTMLView", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_d5792ee7d31a408bbab7d43ab5f0eef2", + "layout": "IPY_MODEL_a2867777e3d248d0ab1b3c49fa18463e", "placeholder": "​", - "style": "IPY_MODEL_90aa09fd88394ff7a457e267a47349ac", + "style": "IPY_MODEL_bdbf6d0e2b0d4ddd802a2787c2927285", "value": "model.safetensors: 100%" } }, - "3e87b1e0487a4b8193fcd1c061e31e26": { + "f72b9265ba8e4a45bf1049dfd8c711b9": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", @@ -1281,15 +1279,15 @@ "bar_style": "success", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_868a47b398244172bcc8d4e1179ef4f6", + "layout": "IPY_MODEL_327b087493c44bc1bcac526a486fc7f1", "max": 288, "min": 0, "orientation": "horizontal", - "style": "IPY_MODEL_e2252b6903d44298a853bf89dab865d1", + "style": "IPY_MODEL_0b99b13bc14e4565b546d9485de0ecf7", "value": 288 } }, - "5e9b36295d29449094962c63dd96facd": { + "c644a223e2cb4696963d9421a39fd3d6": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", @@ -1304,13 +1302,13 @@ "_view_name": "HTMLView", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_26b77f83daba4ba8ad060e0b29e3ba25", + "layout": "IPY_MODEL_13922082f4d04cbbb613c3b45689c121", "placeholder": "​", - "style": "IPY_MODEL_f9a0e09376b344d6a43f340a3f194472", - "value": " 288/288 [00:00<00:00, 19.0kB/s]" + "style": "IPY_MODEL_95d55bb766ef413598a48b9a3478948a", + "value": " 288/288 [00:00<00:00, 16.1kB/s]" } }, - "b759485b7c9e4657afb85227227df069": { + "d7250c64d86a4316b9b1fb6ab5d95030": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1362,7 +1360,7 @@ "width": null } }, - "d5792ee7d31a408bbab7d43ab5f0eef2": { + "a2867777e3d248d0ab1b3c49fa18463e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1414,7 +1412,7 @@ "width": null } }, - "90aa09fd88394ff7a457e267a47349ac": { + "bdbf6d0e2b0d4ddd802a2787c2927285": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", @@ -1429,7 +1427,7 @@ "description_width": "" } }, - "868a47b398244172bcc8d4e1179ef4f6": { + "327b087493c44bc1bcac526a486fc7f1": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1481,7 +1479,7 @@ "width": null } }, - "e2252b6903d44298a853bf89dab865d1": { + "0b99b13bc14e4565b546d9485de0ecf7": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", @@ -1497,7 +1495,7 @@ "description_width": "" } }, - "26b77f83daba4ba8ad060e0b29e3ba25": { + "13922082f4d04cbbb613c3b45689c121": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", @@ -1549,7 +1547,7 @@ "width": null } }, - "f9a0e09376b344d6a43f340a3f194472": { + "95d55bb766ef413598a48b9a3478948a": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", @@ -1588,52 +1586,52 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "3e06625a-3f45-463c-9571-70a5e37f8d2c" + "outputId": "d4c21587-73a1-4e3f-d4c5-9a22e2fbd3f0" }, - "execution_count": null, + "execution_count": 1, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.9/86.9 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m5.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m162.6/162.6 kB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.9/86.9 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m162.6/162.6 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.6/48.6 MB\u001b[0m \u001b[31m11.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m85.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.3/12.3 MB\u001b[0m \u001b[31m90.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m324.1/324.1 kB\u001b[0m \u001b[31m38.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.6/48.6 MB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m58.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.3/12.3 MB\u001b[0m \u001b[31m54.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m324.1/324.1 kB\u001b[0m \u001b[31m29.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.8/56.8 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m11.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.8/79.8 kB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m81.7/81.7 kB\u001b[0m \u001b[31m11.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m14.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m67.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m52.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.6/49.6 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.7/49.7 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.4/39.4 MB\u001b[0m \u001b[31m21.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.3/21.3 MB\u001b[0m \u001b[31m50.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.5/62.5 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.3/296.3 kB\u001b[0m \u001b[31m36.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.1/51.1 kB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.1/62.1 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.8/56.8 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.8/79.8 kB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m81.7/81.7 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m43.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m42.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.6/49.6 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.7/49.7 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.4/39.4 MB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.3/21.3 MB\u001b[0m \u001b[31m57.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.5/62.5 kB\u001b[0m \u001b[31m8.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.3/296.3 kB\u001b[0m \u001b[31m29.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.1/51.1 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.1/62.1 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m16.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m133.1/133.1 kB\u001b[0m \u001b[31m18.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m128.7/128.7 kB\u001b[0m \u001b[31m17.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.4/130.4 kB\u001b[0m \u001b[31m17.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m121.4/121.4 kB\u001b[0m \u001b[31m18.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.5/107.5 kB\u001b[0m \u001b[31m13.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m14.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m16.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m133.1/133.1 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m128.7/128.7 kB\u001b[0m \u001b[31m14.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.4/130.4 kB\u001b[0m \u001b[31m16.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m121.4/121.4 kB\u001b[0m \u001b[31m14.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.5/107.5 kB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h Building wheel for torchquantum (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for pylatexenc (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for ibm-platform-services (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", @@ -1645,7 +1643,7 @@ { "cell_type": "markdown", "source": [ - "# ModelHubMixin Application" + "# login with your writing token" ], "metadata": { "id": "8J3xd8iWSEX0" @@ -1654,7 +1652,6 @@ { "cell_type": "code", "source": [ - "# login with your writing token\n", "# token can be found here https://huggingface.co/settings/tokens\n", "from huggingface_hub import notebook_login\n", "notebook_login()" @@ -1704,6 +1701,15 @@ } ] }, + { + "cell_type": "markdown", + "source": [ + "# Create an AI model" + ], + "metadata": { + "id": "hH800Lx4XFuz" + } + }, { "cell_type": "code", "source": [ @@ -1772,90 +1778,31 @@ "metadata": { "id": "6s9D_oxmRaYY" }, - "execution_count": null, + "execution_count": 2, "outputs": [] }, { - "cell_type": "code", + "cell_type": "markdown", "source": [ - "model" + "# push your weights to huggingface" ], "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "_F58q80fVlkP", - "outputId": "5954731c-fb70-4c63-aa5b-a3071089a627" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "QFCModel(\n", - " (measure): MeasureAll()\n", - " (rx0): class: RX \n", - " parameters: Parameter containing:\n", - " tensor([[-0.7394]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - " (ry0): class: RY \n", - " parameters: Parameter containing:\n", - " tensor([[-2.3291]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - " (rz0): class: RZ \n", - " parameters: Parameter containing:\n", - " tensor([[-2.2905]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - " (crx0): class: CRX \n", - " parameters: Parameter containing:\n", - " tensor([[0.6369]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - ")" - ] - }, - "metadata": {}, - "execution_count": 5 - } - ] + "id": "083_CavNXjnf" + } }, { - "cell_type": "code", + "cell_type": "markdown", "source": [ - "model.state_dict()" + "now you can push your weights to Hugginface or you can use `model.save_pretrained(\"path\")`\n", + "to save your model locally" ], "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "F_-Lh-hTQ5Su", - "outputId": "a53a73bd-9c73-42db-8390-654ddb807862" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "OrderedDict([('rx0.params', tensor([[-0.7394]])),\n", - " ('ry0.params', tensor([[-2.3291]])),\n", - " ('rz0.params', tensor([[-2.2905]])),\n", - " ('crx0.params', tensor([[0.6369]]))])" - ] - }, - "metadata": {}, - "execution_count": 6 - } - ] + "id": "eAVkBtd1XLqj" + } }, { "cell_type": "code", "source": [ - "# or you can use model.sav_pretrained(\"path\") to save the model locally\n", "model.push_to_hub(\"qfc-model\")" ], "metadata": { @@ -1911,15 +1858,22 @@ ] }, { - "cell_type": "code", + "cell_type": "markdown", "source": [ - "# my model can be found here https://huggingface.co/not-lain/qfc-model" + "my model can be found here https://huggingface.co/not-lain/qfc-model" ], "metadata": { - "id": "xW76pCg8UMb2" - }, - "execution_count": null, - "outputs": [] + "id": "kpNNU_O4XaIG" + } + }, + { + "cell_type": "markdown", + "source": [ + "# load weights from huggingface" + ], + "metadata": { + "id": "VLMzVmXEXeR1" + } }, { "cell_type": "code", @@ -1927,41 +1881,41 @@ "# use the raw class to load the model\n", "# no need to reinitialize the model or manually load the weights\n", "# from pretrained can also be used to load a local model\n", - "new_model = QFCModel.from_pretrained(\"not-lain/qfc-model\")" + "new_model = QFCModel.from_pretrained(\"not-lain/qfc-model\",force_download=True)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 81, "referenced_widgets": [ - "9983ddd3318d437db4c90b4ade15b0e8", - "38bacf9e683249a9817f411abfc5482d", - "648a482314e14032a1f50e8d5f7eeb77", - "e287a127f402471e9272f1da4a20b80b", - "f51e6da0f50e421a935de925171b150f", - "67722103310d4320945bfa8200279c0d", - "c58823cc199b43fd9b52432bca24f9cc", - "80f8e41a6f744436a9f9ce653ca10aa4", - "e982786266a4416cbd9fa4e0bd95724b", - "f16a2605b0194e698603e6243ff44ecf", - "0109218c00c0456ab0d11144b5410229", - "87e2869aa2974e69b9ae1b5ca72e89c1", - "0a5baa30e4f2499f95d4707c031ef0f9", - "3e87b1e0487a4b8193fcd1c061e31e26", - "5e9b36295d29449094962c63dd96facd", - "b759485b7c9e4657afb85227227df069", - "d5792ee7d31a408bbab7d43ab5f0eef2", - "90aa09fd88394ff7a457e267a47349ac", - "868a47b398244172bcc8d4e1179ef4f6", - "e2252b6903d44298a853bf89dab865d1", - "26b77f83daba4ba8ad060e0b29e3ba25", - "f9a0e09376b344d6a43f340a3f194472" + "4c2da5cf80a94267b9faea748f82c0e0", + "0ee88ce783994f38b0db6a738d2a8a48", + "60fadc09913d42b796ef418f24618576", + "acdfabd115ea4ef482af5820abc15b20", + "1322fd447b6a4db8a7966e992c2cc948", + "aba3fe0da5594ddd9226b35bd6f19e54", + "23e70ca894394cf891247e897c75ae7c", + "bda0e8e5053f4615b4bab3833ee29d3e", + "85c3bb489d894c57b9ad1c16e34b56c7", + "b5e89469873049adbe2f9bf3cf5d2709", + "a83b0347eef547abb5dac64d7456ee22", + "9cf1d08201df41a8b06c3e5956a96611", + "11e99e2f558049dd8ff9353b8e7ed0c9", + "f72b9265ba8e4a45bf1049dfd8c711b9", + "c644a223e2cb4696963d9421a39fd3d6", + "d7250c64d86a4316b9b1fb6ab5d95030", + "a2867777e3d248d0ab1b3c49fa18463e", + "bdbf6d0e2b0d4ddd802a2787c2927285", + "327b087493c44bc1bcac526a486fc7f1", + "0b99b13bc14e4565b546d9485de0ecf7", + "13922082f4d04cbbb613c3b45689c121", + "95d55bb766ef413598a48b9a3478948a" ] }, "id": "r8K1DsjPRqEG", - "outputId": "7b2497dc-08bf-458d-f58c-422ad342231c" + "outputId": "21027571-9d67-4bd6-b610-3c667cd8fd9e" }, - "execution_count": null, + "execution_count": 7, "outputs": [ { "output_type": "display_data", @@ -1972,7 +1926,7 @@ "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, - "model_id": "9983ddd3318d437db4c90b4ade15b0e8" + "model_id": "4c2da5cf80a94267b9faea748f82c0e0" } }, "metadata": {} @@ -1986,116 +1940,12 @@ "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, - "model_id": "87e2869aa2974e69b9ae1b5ca72e89c1" + "model_id": "9cf1d08201df41a8b06c3e5956a96611" } }, "metadata": {} } ] - }, - { - "cell_type": "code", - "source": [ - "new_model" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "AdHyn8htRtGb", - "outputId": "e42ab514-c75a-4a03-8040-53a239a4b832" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "QFCModel(\n", - " (measure): MeasureAll()\n", - " (rx0): class: RX \n", - " parameters: Parameter containing:\n", - " tensor([[-0.7394]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - " (ry0): class: RY \n", - " parameters: Parameter containing:\n", - " tensor([[-2.3291]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - " (rz0): class: RZ \n", - " parameters: Parameter containing:\n", - " tensor([[-2.2905]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - " (crx0): class: CRX \n", - " parameters: Parameter containing:\n", - " tensor([[0.6369]], requires_grad=True) \n", - " wires: None \n", - " inverse: False\n", - ")" - ] - }, - "metadata": {}, - "execution_count": 10 - } - ] - }, - { - "cell_type": "code", - "source": [ - "new_model.state_dict()" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "MB-LiTqsVsG4", - "outputId": "b6447a2f-a8fd-4fdc-8e23-405289879e6b" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "OrderedDict([('rx0.params', tensor([[-0.7394]])),\n", - " ('ry0.params', tensor([[-2.3291]])),\n", - " ('rz0.params', tensor([[-2.2905]])),\n", - " ('crx0.params', tensor([[0.6369]]))])" - ] - }, - "metadata": {}, - "execution_count": 11 - } - ] - }, - { - "cell_type": "code", - "source": [ - "# same exact weights\n", - "new_model.state_dict() == model.state_dict()" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "1KVbtSkKVylK", - "outputId": "ed4ded05-b9e5-4a4b-e223-86c3af834037" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "True" - ] - }, - "metadata": {}, - "execution_count": 12 - } - ] } ] } \ No newline at end of file From aa139173bed5b80f80730b22d6fb567e4d24f658 Mon Sep 17 00:00:00 2001 From: Lain Date: Fri, 5 Jul 2024 01:47:55 +0100 Subject: [PATCH 3/6] add a readme file to huggingface folder --- examples/huggingface/README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 examples/huggingface/README.md diff --git a/examples/huggingface/README.md b/examples/huggingface/README.md new file mode 100644 index 00000000..cf48f4ed --- /dev/null +++ b/examples/huggingface/README.md @@ -0,0 +1,5 @@ +# Huggingface + +[Huggingface](https://huggingface.co/) is a company/website that provides tools for AI tasks. Including a free place to host and share AI models. + +The files in this folder are focused on making use of the Huggingface's related tools. \ No newline at end of file From 9fb03dcc7fd6fef0cd01f2f8c526812615c625a8 Mon Sep 17 00:00:00 2001 From: Lain Date: Fri, 5 Jul 2024 02:02:09 +0100 Subject: [PATCH 4/6] fix lint for 377 --- examples/huggingface/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/huggingface/README.md b/examples/huggingface/README.md index cf48f4ed..955b0e9d 100644 --- a/examples/huggingface/README.md +++ b/examples/huggingface/README.md @@ -2,4 +2,4 @@ [Huggingface](https://huggingface.co/) is a company/website that provides tools for AI tasks. Including a free place to host and share AI models. -The files in this folder are focused on making use of the Huggingface's related tools. \ No newline at end of file +The files in this folder are focused on making use of the Huggingface's related tools. From 8e8299e9e9b7f609c40dabc01be388b9ae969583 Mon Sep 17 00:00:00 2001 From: Lain Date: Tue, 16 Jul 2024 13:25:17 +0100 Subject: [PATCH 5/6] Fix lint problems for HF notebook --- examples/huggingface/share_models.ipynb | 1515 +++++++++++------------ 1 file changed, 697 insertions(+), 818 deletions(-) diff --git a/examples/huggingface/share_models.ipynb b/examples/huggingface/share_models.ipynb index ae93f742..5638a5ed 100644 --- a/examples/huggingface/share_models.ipynb +++ b/examples/huggingface/share_models.ipynb @@ -1,24 +1,284 @@ { - "nbformat": 4, - "nbformat_minor": 0, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "view-in-github" + }, + "source": [ + "\"Open\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "4syF6X3Fl5dg", + "outputId": "d4c21587-73a1-4e3f-d4c5-9a22e2fbd3f0" + }, + "outputs": [], + "source": [ + "%pip install -q git+https://github.com/mit-han-lab/torchquantum.git" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "8J3xd8iWSEX0" + }, + "source": [ + "# login with your writing token\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 331, + "referenced_widgets": [ + "03ed14345fcd430fa4d692440b2b92de", + "5d56e244ff4a4a8c870e78dfe6ce0f4e", + "74550344bf054abd969ab40f5a90850e", + "c22dddecf8bd4b258e39dcd17559a07c", + "4f1ced08708b4070af3a09ab1bfd5c4a", + "425bd24e216b4b1392670b138d33e795", + "7ac966c2fff74b999086816a16ac9825", + "35a3481cf34d4b72ad1266a9664e2db4", + "3862dbd096054b7dbd3b9a3d26941a00", + "48e27c9c79854a2bbad92ca05cbf6842", + "340be088856c42f082c95c6a3db3f4b1", + "d5fd0caaeb154cf28e8ea9d72587fe0d", + "f9e45fc510a1459c8cb07b1ecc3b8514", + "586cbbcb2b3448b4a8bcf904965b25db", + "b0f383d785134544b2fd7e2bf3e54b33", + "72e8d4713c574538aeebcee32af4960d", + "57537ab729da49e3a53fe8e42fbe772c" + ] + }, + "id": "ydSz4YpbUVU_", + "outputId": "958b42a4-3084-462e-e814-75324adfed09" + }, + "outputs": [], + "source": [ + "# token can be found here https://huggingface.co/settings/tokens\n", + "from huggingface_hub import notebook_login\n", + "\n", + "notebook_login()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "hH800Lx4XFuz" + }, + "source": [ + "# Create an AI model\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "id": "6s9D_oxmRaYY" + }, + "outputs": [], + "source": [ + "import torch.nn as nn\n", + "import torch.nn.functional as F\n", + "import torchquantum as tq\n", + "import torchquantum.functional as tqf\n", + "from huggingface_hub import PyTorchModelHubMixin\n", + "\n", + "\n", + "class QFCModel(nn.Module, PyTorchModelHubMixin, tags=[\"torchquantum\"]):\n", + " def __init__(self, n_wires):\n", + " super().__init__()\n", + "\n", + " self.n_wires = n_wires # an init parameter\n", + "\n", + " self.measure = tq.MeasureAll(tq.PauliZ)\n", + "\n", + " self.encoder_gates = [tqf.rx] * 4 + [tqf.ry] * 4 + [tqf.rz] * 4 + [tqf.rx] * 4\n", + " self.rx0 = tq.RX(has_params=True, trainable=True)\n", + " self.ry0 = tq.RY(has_params=True, trainable=True)\n", + " self.rz0 = tq.RZ(has_params=True, trainable=True)\n", + " self.crx0 = tq.CRX(has_params=True, trainable=True)\n", + "\n", + " def forward(self, x):\n", + " bsz = x.shape[0]\n", + " # down-sample the image\n", + " x = F.avg_pool2d(x, 6).view(bsz, 16)\n", + "\n", + " # create a quantum device to run the gates\n", + " qdev = tq.QuantumDevice(n_wires=self.n_wires, bsz=bsz, device=x.device)\n", + "\n", + " # encode the classical image to quantum domain\n", + " for k, gate in enumerate(self.encoder_gates):\n", + " gate(qdev, wires=k % self.n_wires, params=x[:, k])\n", + "\n", + " # add some trainable gates (need to instantiate ahead of time)\n", + " self.rx0(qdev, wires=0)\n", + " self.ry0(qdev, wires=1)\n", + " self.rz0(qdev, wires=3)\n", + " self.crx0(qdev, wires=[0, 2])\n", + "\n", + " # add some more non-parameterized gates (add on-the-fly)\n", + " qdev.h(wires=3)\n", + " qdev.sx(wires=2)\n", + " qdev.cnot(wires=[3, 0])\n", + " qdev.qubitunitary(\n", + " wires=[1, 2],\n", + " params=[[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1j], [0, 0, -1j, 0]],\n", + " )\n", + "\n", + " # perform measurement to get expectations (back to classical domain)\n", + " x = self.measure(qdev).reshape(bsz, 2, 2)\n", + "\n", + " # classification\n", + " x = x.sum(-1).squeeze()\n", + " x = F.log_softmax(x, dim=1)\n", + "\n", + " return x\n", + "\n", + "\n", + "model = QFCModel(n_wires=4)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "083_CavNXjnf" + }, + "source": [ + "# push your weights to huggingface\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "eAVkBtd1XLqj" + }, + "source": [ + "now you can push your weights to Hugginface or you can use `model.save_pretrained(\"path\")`\n", + "to save your model locally\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 84, + "referenced_widgets": [ + "33d6236ffcb449768358e100ecadff57", + "d45adb4c73334cef9e999f1e528d29e8", + "ef982f04dcfd459bb3fc18cb5e5e810b", + "ef69f4eeba00445fac55f89be3923a82", + "97154dd426ec4a11a7439d77121a96f1", + "9e9ffcded9fc42c89bd931c9f9cd3f5c", + "50247b1d2efd4d968590f02fa23bffdb", + "c7d1058e221b433785ae13759d6d8a4c", + "29fd42a52e694c7bb217b226175ca3c2", + "33985956758947f2b6e19049350194de", + "dbf965d4653f4d4a880102c90c63ac61" + ] + }, + "id": "bJGfwC5ERpLl", + "outputId": "1389ac4f-e55f-4f5f-fb84-6e5d52ca0049" + }, + "outputs": [], + "source": [ + "model.push_to_hub(\"qfc-model\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "kpNNU_O4XaIG" + }, + "source": [ + "my model can be found here https://huggingface.co/not-lain/qfc-model\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "VLMzVmXEXeR1" + }, + "source": [ + "# load weights from huggingface\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 81, + "referenced_widgets": [ + "4c2da5cf80a94267b9faea748f82c0e0", + "0ee88ce783994f38b0db6a738d2a8a48", + "60fadc09913d42b796ef418f24618576", + "acdfabd115ea4ef482af5820abc15b20", + "1322fd447b6a4db8a7966e992c2cc948", + "aba3fe0da5594ddd9226b35bd6f19e54", + "23e70ca894394cf891247e897c75ae7c", + "bda0e8e5053f4615b4bab3833ee29d3e", + "85c3bb489d894c57b9ad1c16e34b56c7", + "b5e89469873049adbe2f9bf3cf5d2709", + "a83b0347eef547abb5dac64d7456ee22", + "9cf1d08201df41a8b06c3e5956a96611", + "11e99e2f558049dd8ff9353b8e7ed0c9", + "f72b9265ba8e4a45bf1049dfd8c711b9", + "c644a223e2cb4696963d9421a39fd3d6", + "d7250c64d86a4316b9b1fb6ab5d95030", + "a2867777e3d248d0ab1b3c49fa18463e", + "bdbf6d0e2b0d4ddd802a2787c2927285", + "327b087493c44bc1bcac526a486fc7f1", + "0b99b13bc14e4565b546d9485de0ecf7", + "13922082f4d04cbbb613c3b45689c121", + "95d55bb766ef413598a48b9a3478948a" + ] + }, + "id": "r8K1DsjPRqEG", + "outputId": "21027571-9d67-4bd6-b610-3c667cd8fd9e" + }, + "outputs": [], + "source": [ + "# use the raw class to load the model\n", + "# no need to reinitialize the model or manually load the weights\n", + "# from pretrained can also be used to load a local model\n", + "new_model = QFCModel.from_pretrained(\"not-lain/qfc-model\", force_download=True)" + ] + } + ], "metadata": { "colab": { - "provenance": [], - "include_colab_link": true + "include_colab_link": true, + "provenance": [] }, "kernelspec": { - "name": "python3", - "display_name": "Python 3" + "display_name": "Python 3", + "name": "python3" }, "language_info": { - "name": "python" + "name": "python", + "version": "3.11.3" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "03ed14345fcd430fa4d692440b2b92de": { "model_module": "@jupyter-widgets/controls", - "model_name": "VBoxModel", "model_module_version": "1.5.0", + "model_name": "VBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", @@ -39,119 +299,68 @@ "layout": "IPY_MODEL_7ac966c2fff74b999086816a16ac9825" } }, - "5d56e244ff4a4a8c870e78dfe6ce0f4e": { + "0b99b13bc14e4565b546d9485de0ecf7": { "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", "state": { - "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", + "_model_name": "ProgressStyleModel", "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_35a3481cf34d4b72ad1266a9664e2db4", - "placeholder": "​", - "style": "IPY_MODEL_3862dbd096054b7dbd3b9a3d26941a00", - "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" } }, - "74550344bf054abd969ab40f5a90850e": { + "0ee88ce783994f38b0db6a738d2a8a48": { "model_module": "@jupyter-widgets/controls", - "model_name": "PasswordModel", "model_module_version": "1.5.0", + "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "PasswordModel", + "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", - "_view_name": "PasswordView", - "continuous_update": true, - "description": "Token:", + "_view_name": "HTMLView", + "description": "", "description_tooltip": null, - "disabled": false, - "layout": "IPY_MODEL_48e27c9c79854a2bbad92ca05cbf6842", + "layout": "IPY_MODEL_aba3fe0da5594ddd9226b35bd6f19e54", "placeholder": "​", - "style": "IPY_MODEL_340be088856c42f082c95c6a3db3f4b1", - "value": "" + "style": "IPY_MODEL_23e70ca894394cf891247e897c75ae7c", + "value": "config.json: 100%" } }, - "c22dddecf8bd4b258e39dcd17559a07c": { + "11e99e2f558049dd8ff9353b8e7ed0c9": { "model_module": "@jupyter-widgets/controls", - "model_name": "CheckboxModel", "model_module_version": "1.5.0", + "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "CheckboxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "CheckboxView", - "description": "Add token as git credential?", - "description_tooltip": null, - "disabled": false, - "indent": true, - "layout": "IPY_MODEL_d5fd0caaeb154cf28e8ea9d72587fe0d", - "style": "IPY_MODEL_f9e45fc510a1459c8cb07b1ecc3b8514", - "value": true - } - }, - "4f1ced08708b4070af3a09ab1bfd5c4a": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ButtonModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ButtonModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ButtonView", - "button_style": "", - "description": "Login", - "disabled": false, - "icon": "", - "layout": "IPY_MODEL_586cbbcb2b3448b4a8bcf904965b25db", - "style": "IPY_MODEL_b0f383d785134544b2fd7e2bf3e54b33", - "tooltip": "" - } - }, - "425bd24e216b4b1392670b138d33e795": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", + "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, - "layout": "IPY_MODEL_72e8d4713c574538aeebcee32af4960d", + "layout": "IPY_MODEL_a2867777e3d248d0ab1b3c49fa18463e", "placeholder": "​", - "style": "IPY_MODEL_57537ab729da49e3a53fe8e42fbe772c", - "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks.
" + "style": "IPY_MODEL_bdbf6d0e2b0d4ddd802a2787c2927285", + "value": "model.safetensors: 100%" } }, - "7ac966c2fff74b999086816a16ac9825": { + "1322fd447b6a4db8a7966e992c2cc948": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -161,13 +370,13 @@ "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, - "align_items": "center", + "align_items": null, "align_self": null, "border": null, "bottom": null, - "display": "flex", + "display": null, "flex": null, - "flex_flow": "column", + "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, @@ -197,13 +406,13 @@ "right": null, "top": null, "visibility": null, - "width": "50%" + "width": null } }, - "35a3481cf34d4b72ad1266a9664e2db4": { + "13922082f4d04cbbb613c3b45689c121": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -252,10 +461,10 @@ "width": null } }, - "3862dbd096054b7dbd3b9a3d26941a00": { + "23e70ca894394cf891247e897c75ae7c": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", @@ -267,10 +476,26 @@ "description_width": "" } }, - "48e27c9c79854a2bbad92ca05cbf6842": { + "29fd42a52e694c7bb217b226175ca3c2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "327b087493c44bc1bcac526a486fc7f1": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -319,25 +544,10 @@ "width": null } }, - "340be088856c42f082c95c6a3db3f4b1": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "d5fd0caaeb154cf28e8ea9d72587fe0d": { + "33985956758947f2b6e19049350194de": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -386,10 +596,32 @@ "width": null } }, - "f9e45fc510a1459c8cb07b1ecc3b8514": { + "33d6236ffcb449768358e100ecadff57": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d45adb4c73334cef9e999f1e528d29e8", + "IPY_MODEL_ef982f04dcfd459bb3fc18cb5e5e810b", + "IPY_MODEL_ef69f4eeba00445fac55f89be3923a82" + ], + "layout": "IPY_MODEL_97154dd426ec4a11a7439d77121a96f1" + } + }, + "340be088856c42f082c95c6a3db3f4b1": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", @@ -401,10 +633,10 @@ "description_width": "" } }, - "586cbbcb2b3448b4a8bcf904965b25db": { + "35a3481cf34d4b72ad1266a9664e2db4": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -453,26 +685,46 @@ "width": null } }, - "b0f383d785134544b2fd7e2bf3e54b33": { + "3862dbd096054b7dbd3b9a3d26941a00": { "model_module": "@jupyter-widgets/controls", - "model_name": "ButtonStyleModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "ButtonStyleModel", + "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", - "button_color": null, - "font_weight": "" + "description_width": "" } }, - "72e8d4713c574538aeebcee32af4960d": { + "425bd24e216b4b1392670b138d33e795": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_72e8d4713c574538aeebcee32af4960d", + "placeholder": "​", + "style": "IPY_MODEL_57537ab729da49e3a53fe8e42fbe772c", + "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " + } + }, + "48e27c9c79854a2bbad92ca05cbf6842": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -521,25 +773,10 @@ "width": null } }, - "57537ab729da49e3a53fe8e42fbe772c": { + "4c2da5cf80a94267b9faea748f82c0e0": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "33d6236ffcb449768358e100ecadff57": { - "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", - "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", @@ -551,83 +788,69 @@ "_view_name": "HBoxView", "box_style": "", "children": [ - "IPY_MODEL_d45adb4c73334cef9e999f1e528d29e8", - "IPY_MODEL_ef982f04dcfd459bb3fc18cb5e5e810b", - "IPY_MODEL_ef69f4eeba00445fac55f89be3923a82" + "IPY_MODEL_0ee88ce783994f38b0db6a738d2a8a48", + "IPY_MODEL_60fadc09913d42b796ef418f24618576", + "IPY_MODEL_acdfabd115ea4ef482af5820abc15b20" ], - "layout": "IPY_MODEL_97154dd426ec4a11a7439d77121a96f1" + "layout": "IPY_MODEL_1322fd447b6a4db8a7966e992c2cc948" } }, - "d45adb4c73334cef9e999f1e528d29e8": { + "4f1ced08708b4070af3a09ab1bfd5c4a": { "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", "model_module_version": "1.5.0", + "model_name": "ButtonModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", + "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_9e9ffcded9fc42c89bd931c9f9cd3f5c", - "placeholder": "​", - "style": "IPY_MODEL_50247b1d2efd4d968590f02fa23bffdb", - "value": "model.safetensors: 100%" + "_view_name": "ButtonView", + "button_style": "", + "description": "Login", + "disabled": false, + "icon": "", + "layout": "IPY_MODEL_586cbbcb2b3448b4a8bcf904965b25db", + "style": "IPY_MODEL_b0f383d785134544b2fd7e2bf3e54b33", + "tooltip": "" } }, - "ef982f04dcfd459bb3fc18cb5e5e810b": { + "50247b1d2efd4d968590f02fa23bffdb": { "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { - "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", + "_model_name": "DescriptionStyleModel", "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_c7d1058e221b433785ae13759d6d8a4c", - "max": 288, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_29fd42a52e694c7bb217b226175ca3c2", - "value": 288 + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" } }, - "ef69f4eeba00445fac55f89be3923a82": { + "57537ab729da49e3a53fe8e42fbe772c": { "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { - "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", + "_model_name": "DescriptionStyleModel", "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_33985956758947f2b6e19049350194de", - "placeholder": "​", - "style": "IPY_MODEL_dbf965d4653f4d4a880102c90c63ac61", - "value": " 288/288 [00:00<00:00, 1.46kB/s]" - } + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } }, - "97154dd426ec4a11a7439d77121a96f1": { + "586cbbcb2b3448b4a8bcf904965b25db": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -676,10 +899,55 @@ "width": null } }, - "9e9ffcded9fc42c89bd931c9f9cd3f5c": { + "5d56e244ff4a4a8c870e78dfe6ce0f4e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_35a3481cf34d4b72ad1266a9664e2db4", + "placeholder": "​", + "style": "IPY_MODEL_3862dbd096054b7dbd3b9a3d26941a00", + "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" + } + }, + "60fadc09913d42b796ef418f24618576": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bda0e8e5053f4615b4bab3833ee29d3e", + "max": 18, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_85c3bb489d894c57b9ad1c16e34b56c7", + "value": 18 + } + }, + "72e8d4713c574538aeebcee32af4960d": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -728,25 +996,33 @@ "width": null } }, - "50247b1d2efd4d968590f02fa23bffdb": { + "74550344bf054abd969ab40f5a90850e": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", + "model_name": "PasswordModel", "state": { + "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", + "_model_name": "PasswordModel", "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "PasswordView", + "continuous_update": true, + "description": "Token:", + "description_tooltip": null, + "disabled": false, + "layout": "IPY_MODEL_48e27c9c79854a2bbad92ca05cbf6842", + "placeholder": "​", + "style": "IPY_MODEL_340be088856c42f082c95c6a3db3f4b1", + "value": "" } }, - "c7d1058e221b433785ae13759d6d8a4c": { + "7ac966c2fff74b999086816a16ac9825": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -756,13 +1032,13 @@ "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, - "align_items": null, + "align_items": "center", "align_self": null, "border": null, "bottom": null, - "display": null, + "display": "flex", "flex": null, - "flex_flow": null, + "flex_flow": "column", "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, @@ -792,13 +1068,13 @@ "right": null, "top": null, "visibility": null, - "width": null + "width": "50%" } }, - "29fd42a52e694c7bb217b226175ca3c2": { + "85c3bb489d894c57b9ad1c16e34b56c7": { "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", @@ -811,10 +1087,25 @@ "description_width": "" } }, - "33985956758947f2b6e19049350194de": { + "95d55bb766ef413598a48b9a3478948a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "97154dd426ec4a11a7439d77121a96f1": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -863,25 +1154,10 @@ "width": null } }, - "dbf965d4653f4d4a880102c90c63ac61": { + "9cf1d08201df41a8b06c3e5956a96611": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "4c2da5cf80a94267b9faea748f82c0e0": { - "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", - "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", @@ -893,83 +1169,17 @@ "_view_name": "HBoxView", "box_style": "", "children": [ - "IPY_MODEL_0ee88ce783994f38b0db6a738d2a8a48", - "IPY_MODEL_60fadc09913d42b796ef418f24618576", - "IPY_MODEL_acdfabd115ea4ef482af5820abc15b20" + "IPY_MODEL_11e99e2f558049dd8ff9353b8e7ed0c9", + "IPY_MODEL_f72b9265ba8e4a45bf1049dfd8c711b9", + "IPY_MODEL_c644a223e2cb4696963d9421a39fd3d6" ], - "layout": "IPY_MODEL_1322fd447b6a4db8a7966e992c2cc948" - } - }, - "0ee88ce783994f38b0db6a738d2a8a48": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_aba3fe0da5594ddd9226b35bd6f19e54", - "placeholder": "​", - "style": "IPY_MODEL_23e70ca894394cf891247e897c75ae7c", - "value": "config.json: 100%" - } - }, - "60fadc09913d42b796ef418f24618576": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_bda0e8e5053f4615b4bab3833ee29d3e", - "max": 18, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_85c3bb489d894c57b9ad1c16e34b56c7", - "value": 18 - } - }, - "acdfabd115ea4ef482af5820abc15b20": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_b5e89469873049adbe2f9bf3cf5d2709", - "placeholder": "​", - "style": "IPY_MODEL_a83b0347eef547abb5dac64d7456ee22", - "value": " 18.0/18.0 [00:00<00:00, 1.08kB/s]" + "layout": "IPY_MODEL_d7250c64d86a4316b9b1fb6ab5d95030" } }, - "1322fd447b6a4db8a7966e992c2cc948": { + "9e9ffcded9fc42c89bd931c9f9cd3f5c": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1018,10 +1228,10 @@ "width": null } }, - "aba3fe0da5594ddd9226b35bd6f19e54": { + "a2867777e3d248d0ab1b3c49fa18463e": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1070,10 +1280,10 @@ "width": null } }, - "23e70ca894394cf891247e897c75ae7c": { + "a83b0347eef547abb5dac64d7456ee22": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", @@ -1085,10 +1295,10 @@ "description_width": "" } }, - "bda0e8e5053f4615b4bab3833ee29d3e": { + "aba3fe0da5594ddd9226b35bd6f19e54": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1137,26 +1347,47 @@ "width": null } }, - "85c3bb489d894c57b9ad1c16e34b56c7": { + "acdfabd115ea4ef482af5820abc15b20": { "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", + "model_name": "HTMLModel", "state": { + "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b5e89469873049adbe2f9bf3cf5d2709", + "placeholder": "​", + "style": "IPY_MODEL_a83b0347eef547abb5dac64d7456ee22", + "value": " 18.0/18.0 [00:00<00:00, 1.08kB/s]" + } + }, + "b0f383d785134544b2fd7e2bf3e54b33": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ButtonStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", - "bar_color": null, - "description_width": "" + "button_color": null, + "font_weight": "" } }, "b5e89469873049adbe2f9bf3cf5d2709": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1205,92 +1436,99 @@ "width": null } }, - "a83b0347eef547abb5dac64d7456ee22": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", + "bda0e8e5053f4615b4bab3833ee29d3e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "9cf1d08201df41a8b06c3e5956a96611": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_11e99e2f558049dd8ff9353b8e7ed0c9", - "IPY_MODEL_f72b9265ba8e4a45bf1049dfd8c711b9", - "IPY_MODEL_c644a223e2cb4696963d9421a39fd3d6" - ], - "layout": "IPY_MODEL_d7250c64d86a4316b9b1fb6ab5d95030" + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null } }, - "11e99e2f558049dd8ff9353b8e7ed0c9": { + "bdbf6d0e2b0d4ddd802a2787c2927285": { "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { - "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", + "_model_name": "DescriptionStyleModel", "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_a2867777e3d248d0ab1b3c49fa18463e", - "placeholder": "​", - "style": "IPY_MODEL_bdbf6d0e2b0d4ddd802a2787c2927285", - "value": "model.safetensors: 100%" + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" } }, - "f72b9265ba8e4a45bf1049dfd8c711b9": { + "c22dddecf8bd4b258e39dcd17559a07c": { "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", "model_module_version": "1.5.0", + "model_name": "CheckboxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", + "_model_name": "CheckboxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", + "_view_name": "CheckboxView", + "description": "Add token as git credential?", "description_tooltip": null, - "layout": "IPY_MODEL_327b087493c44bc1bcac526a486fc7f1", - "max": 288, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_0b99b13bc14e4565b546d9485de0ecf7", - "value": 288 + "disabled": false, + "indent": true, + "layout": "IPY_MODEL_d5fd0caaeb154cf28e8ea9d72587fe0d", + "style": "IPY_MODEL_f9e45fc510a1459c8cb07b1ecc3b8514", + "value": true } }, "c644a223e2cb4696963d9421a39fd3d6": { "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", "model_module_version": "1.5.0", + "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", @@ -1308,10 +1546,10 @@ "value": " 288/288 [00:00<00:00, 16.1kB/s]" } }, - "d7250c64d86a4316b9b1fb6ab5d95030": { + "c7d1058e221b433785ae13759d6d8a4c": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1360,10 +1598,31 @@ "width": null } }, - "a2867777e3d248d0ab1b3c49fa18463e": { + "d45adb4c73334cef9e999f1e528d29e8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9e9ffcded9fc42c89bd931c9f9cd3f5c", + "placeholder": "​", + "style": "IPY_MODEL_50247b1d2efd4d968590f02fa23bffdb", + "value": "model.safetensors: 100%" + } + }, + "d5fd0caaeb154cf28e8ea9d72587fe0d": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1412,25 +1671,10 @@ "width": null } }, - "bdbf6d0e2b0d4ddd802a2787c2927285": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "327b087493c44bc1bcac526a486fc7f1": { + "d7250c64d86a4316b9b1fb6ab5d95030": { "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", @@ -1479,78 +1723,94 @@ "width": null } }, - "0b99b13bc14e4565b546d9485de0ecf7": { + "dbf965d4653f4d4a880102c90c63ac61": { "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", + "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", - "bar_color": null, "description_width": "" } }, - "13922082f4d04cbbb613c3b45689c121": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", + "ef69f4eeba00445fac55f89be3923a82": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_33985956758947f2b6e19049350194de", + "placeholder": "​", + "style": "IPY_MODEL_dbf965d4653f4d4a880102c90c63ac61", + "value": " 288/288 [00:00<00:00, 1.46kB/s]" } }, - "95d55bb766ef413598a48b9a3478948a": { + "ef982f04dcfd459bb3fc18cb5e5e810b": { "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c7d1058e221b433785ae13759d6d8a4c", + "max": 288, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_29fd42a52e694c7bb217b226175ca3c2", + "value": 288 + } + }, + "f72b9265ba8e4a45bf1049dfd8c711b9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_327b087493c44bc1bcac526a486fc7f1", + "max": 288, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_0b99b13bc14e4565b546d9485de0ecf7", + "value": 288 + } + }, + "f9e45fc510a1459c8cb07b1ecc3b8514": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", @@ -1565,387 +1825,6 @@ } } }, - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "view-in-github", - "colab_type": "text" - }, - "source": [ - "\"Open" - ] - }, - { - "cell_type": "code", - "source": [ - "!pip install -q git+https://github.com/mit-han-lab/torchquantum.git" - ], - "metadata": { - "id": "4syF6X3Fl5dg", - "colab": { - "base_uri": "https://localhost:8080/" - }, - "outputId": "d4c21587-73a1-4e3f-d4c5-9a22e2fbd3f0" - }, - "execution_count": 1, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.9/86.9 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m162.6/162.6 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.6/48.6 MB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m58.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.3/12.3 MB\u001b[0m \u001b[31m54.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m324.1/324.1 kB\u001b[0m \u001b[31m29.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", - " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", - " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.8/56.8 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.1/82.1 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.8/79.8 kB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m81.7/81.7 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m43.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m42.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.6/49.6 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.7/49.7 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.4/39.4 MB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.3/21.3 MB\u001b[0m \u001b[31m57.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.5/62.5 kB\u001b[0m \u001b[31m8.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.3/296.3 kB\u001b[0m \u001b[31m29.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.1/51.1 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.1/62.1 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", - " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", - " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m14.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m16.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m133.1/133.1 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m128.7/128.7 kB\u001b[0m \u001b[31m14.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.4/130.4 kB\u001b[0m \u001b[31m16.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m121.4/121.4 kB\u001b[0m \u001b[31m14.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.5/107.5 kB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h Building wheel for torchquantum (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for pylatexenc (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for ibm-platform-services (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for ibm-cloud-sdk-core (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "# login with your writing token" - ], - "metadata": { - "id": "8J3xd8iWSEX0" - } - }, - { - "cell_type": "code", - "source": [ - "# token can be found here https://huggingface.co/settings/tokens\n", - "from huggingface_hub import notebook_login\n", - "notebook_login()" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 331, - "referenced_widgets": [ - "03ed14345fcd430fa4d692440b2b92de", - "5d56e244ff4a4a8c870e78dfe6ce0f4e", - "74550344bf054abd969ab40f5a90850e", - "c22dddecf8bd4b258e39dcd17559a07c", - "4f1ced08708b4070af3a09ab1bfd5c4a", - "425bd24e216b4b1392670b138d33e795", - "7ac966c2fff74b999086816a16ac9825", - "35a3481cf34d4b72ad1266a9664e2db4", - "3862dbd096054b7dbd3b9a3d26941a00", - "48e27c9c79854a2bbad92ca05cbf6842", - "340be088856c42f082c95c6a3db3f4b1", - "d5fd0caaeb154cf28e8ea9d72587fe0d", - "f9e45fc510a1459c8cb07b1ecc3b8514", - "586cbbcb2b3448b4a8bcf904965b25db", - "b0f383d785134544b2fd7e2bf3e54b33", - "72e8d4713c574538aeebcee32af4960d", - "57537ab729da49e3a53fe8e42fbe772c" - ] - }, - "id": "ydSz4YpbUVU_", - "outputId": "958b42a4-3084-462e-e814-75324adfed09" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "display_data", - "data": { - "text/plain": [ - "VBox(children=(HTML(value='
Date: Tue, 16 Jul 2024 13:34:35 +0100 Subject: [PATCH 6/6] update readme file --- examples/huggingface/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/huggingface/README.md b/examples/huggingface/README.md index 955b0e9d..c6b56f4c 100644 --- a/examples/huggingface/README.md +++ b/examples/huggingface/README.md @@ -1,5 +1,5 @@ # Huggingface -[Huggingface](https://huggingface.co/) is a company/website that provides tools for AI tasks. Including a free place to host and share AI models. +[Huggingface](https://huggingface.co/) is a website that provides tools for AI tasks. Including a free place to host and share AI models. The files in this folder are focused on making use of the Huggingface's related tools.