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='