From 51fb1b9d77cf4f4c785801fd15ec9ddcf5ad7b75 Mon Sep 17 00:00:00 2001 From: Ekaterina Aidova Date: Tue, 30 Jul 2024 20:28:27 +0400 Subject: [PATCH] fix minicpm int4 config loading (#2246) --- .../minicpm-v-multimodal-chatbot.ipynb | 366 ++++++++++-------- 1 file changed, 208 insertions(+), 158 deletions(-) diff --git a/notebooks/minicpm-v-multimodal-chatbot/minicpm-v-multimodal-chatbot.ipynb b/notebooks/minicpm-v-multimodal-chatbot/minicpm-v-multimodal-chatbot.ipynb index 5baf28284d1..3673bd42f14 100644 --- a/notebooks/minicpm-v-multimodal-chatbot/minicpm-v-multimodal-chatbot.ipynb +++ b/notebooks/minicpm-v-multimodal-chatbot/minicpm-v-multimodal-chatbot.ipynb @@ -55,10 +55,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "0116846d-da6f-4e81-b6be-0a882a3eb872", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.1.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.2\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", + "Note: you may need to restart the kernel to use updated packages.\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.1.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.2\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], "source": [ "%pip install -q \"torch>=2.1\" \"torchvision\" \"timm>=0.9.2\" \"transformers>=4.40\" \"Pillow\" \"gradio>=4.19\" \"tqdm\" \"sentencepiece\" \"peft\" --extra-index-url https://download.pytorch.org/whl/cpu\n", "%pip install -q \"openvino>=2024.2.0\" \"nncf>=2.11.0\"" @@ -76,7 +91,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "id": "077e5069-078c-422d-9940-0861c3444591", "metadata": { "tags": [] @@ -85,7 +100,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "4bcc83b59a314cd3a10e6133ba7c94ac", + "model_id": "a86561b698a644d8a4bf4ca6f642146a", "version_major": 2, "version_minor": 0 }, @@ -174,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, "id": "f2a62cde-0270-48e7-9d4d-43c9df8af3b3", "metadata": { "tags": [] @@ -221,7 +236,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 4, "id": "cc6caeed-0d22-42d9-af25-4d3383918737", "metadata": { "tags": [] @@ -403,7 +418,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 5, "id": "5594f67d-ccdf-46a0-90b9-37d80fa4b718", "metadata": { "tags": [] @@ -413,15 +428,15 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/ea/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/transformers/modeling_utils.py:4651: FutureWarning: `_is_quantized_training_enabled` is going to be deprecated in transformers 4.39.0. Please use `model.hf_quantizer.is_trainable` instead\n", + "/home/ea/work/openvino_notebooks_new_clone/nb_env/lib/python3.8/site-packages/transformers/modeling_utils.py:4565: FutureWarning: `_is_quantized_training_enabled` is going to be deprecated in transformers 4.39.0. Please use `model.hf_quantizer.is_trainable` instead\n", " warnings.warn(\n", - "/tmp/ipykernel_2657607/514161198.py:38: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + "/tmp/ipykernel_3381697/514161198.py:38: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", " if sequence_length != 1:\n", "/home/ea/.cache/huggingface/modules/transformers_modules/MiniCPM-V-2/modeling_minicpm.py:176: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", " if seq_len > self.max_seq_len_cached:\n", "/home/ea/.cache/huggingface/modules/transformers_modules/MiniCPM-V-2/modeling_minicpm.py:883: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", " if attention_mask.size() != (bsz, 1, q_len, kv_seq_len):\n", - "/home/ea/work/my_optimum_intel/optimum_env/lib/python3.8/site-packages/torch/jit/_trace.py:160: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the .grad field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations. (Triggered internally at aten/src/ATen/core/TensorBody.h:489.)\n", + "/home/ea/work/openvino_notebooks_new_clone/nb_env/lib/python3.8/site-packages/torch/jit/_trace.py:165: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the .grad field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations. (Triggered internally at aten/src/ATen/core/TensorBody.h:489.)\n", " if a.grad is not None:\n" ] } @@ -654,14 +669,14 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 6, "id": "da5cae73-0ae2-4683-a4d1-c85c622f7f84", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "f26858161381405991dd5075172040ef", + "model_id": "57f7041974a546b68257e45f8795e6f2", "version_major": 2, "version_minor": 0 }, @@ -669,7 +684,7 @@ "Checkbox(value=True, description='Weights Compression')" ] }, - "execution_count": 9, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -688,18 +703,10 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "6e938ae8-7e49-4c61-88b9-0b73c8fa8407", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "INFO:nncf:NNCF initialized successfully. Supported frameworks detected: torch, tensorflow, onnx, openvino\n" - ] - } - ], + "outputs": [], "source": [ "import nncf\n", "import shutil\n", @@ -722,7 +729,8 @@ " gc.collect()\n", " shutil.copy(text_emb_path, llm_int4_path.parent / text_emb_path.name)\n", " shutil.copy(text_emb_path.with_suffix(\".bin\"), llm_int4_path.parent / text_emb_path.with_suffix(\".bin\").name)\n", - " shutil.copy(llm_path.parent / \"config.json\", llm_int4_path.parent / \"config.json\")" + " shutil.copy(llm_path.parent / \"config.json\", llm_int4_path.parent / \"config.json\")\n", + " shutil.copy(llm_path.parent / \"configuration_minicpm.py\", llm_int4_path.parent / \"configuration_minicpm.py\")" ] }, { @@ -739,19 +747,39 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 8, "id": "3a6d60e0-5cc4-4a8f-ae53-772468a44a83", "metadata": { "tags": [] }, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/ea/work/openvino_notebooks_new_clone/nb_env/lib/python3.8/site-packages/timm/layers/pos_embed.py:29: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " if num_new_tokens == num_pos_tokens and new_size[0] == new_size[1]:\n", + "/home/ea/work/openvino_notebooks_new_clone/nb_env/lib/python3.8/site-packages/timm/layers/pos_embed.py:33: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " hw = int(math.sqrt(num_pos_tokens - num_prefix_tokens))\n", + "/home/ea/work/openvino_notebooks_new_clone/nb_env/lib/python3.8/site-packages/torch/functional.py:512: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3587.)\n", + " return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n", + "/home/ea/.cache/huggingface/modules/transformers_modules/MiniCPM-V-2/resampler.py:461: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " assert embed_dim == embed_dim_to_check, \\\n", + "/home/ea/.cache/huggingface/modules/transformers_modules/MiniCPM-V-2/resampler.py:468: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " assert head_dim * num_heads == embed_dim, f\"embed_dim {embed_dim} not divisible by num_heads {num_heads}\"\n", + "/home/ea/.cache/huggingface/modules/transformers_modules/MiniCPM-V-2/resampler.py:474: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " assert key.shape == value.shape, f\"key shape {key.shape} does not match value shape {value.shape}\"\n", + "/home/ea/.cache/huggingface/modules/transformers_modules/MiniCPM-V-2/resampler.py:580: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " q_scaled = q / math.sqrt(E)\n" + ] + }, { "data": { "text/plain": [ - "31" + "3486" ] }, - "execution_count": 11, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -862,7 +890,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 9, "id": "91b4388c-454d-465d-ade8-291d00a36311", "metadata": { "tags": [] @@ -1080,7 +1108,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 10, "id": "94f7e911", "metadata": { "tags": [] @@ -1515,22 +1543,22 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 11, "id": "e56db20f-7cf0-4ead-b6af-8e048e61b059", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "47c03ae2d46e4476a2fcbe597fe556d0", + "model_id": "b62447eb541d4014afe742e98b96c3fc", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "Dropdown(description='Device:', options=('CPU', 'AUTO'), value='CPU')" + "Dropdown(description='Device:', options=('CPU', 'GPU.0', 'GPU.1', 'AUTO'), value='CPU')" ] }, - "execution_count": 14, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -1564,14 +1592,14 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 12, "id": "929f25e9-f793-488b-8be3-6622b587cc01", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "197a9d78d8df4d5899a3531ad387c95a", + "model_id": "2b2779d3892c427691c646e1e0355c43", "version_major": 2, "version_minor": 0 }, @@ -1579,7 +1607,7 @@ "Checkbox(value=True, description='INT4 language model')" ] }, - "execution_count": 15, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -1596,29 +1624,19 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 13, "id": "7d4a8d6f-80da-4116-900d-8daf28f1adfd", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "A new version of the following files was downloaded from https://huggingface.co/openbmb/MiniCPM-V-2:\n", - "- configuration_minicpm.py\n", - ". Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.\n" - ] - } - ], + "outputs": [], "source": [ "llm = OvModelForCausalLMWithEmb(llm_path.parent if not use_int4_lang_model.value else llm_int4_path.parent, device.value)" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 14, "id": "c0ca248b-6a79-40a7-9614-132e2189af25", "metadata": { "tags": [] @@ -1630,7 +1648,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 15, "id": "60a1f3e5-b425-4c01-9455-77ef7f89fc74", "metadata": { "tags": [] @@ -1643,7 +1661,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 16, "id": "3fb21e88-0e8f-4959-a212-848e69dae59c", "metadata": { "tags": [] @@ -1655,7 +1673,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 17, "id": "7522d730-f039-46e6-b06d-f90bd4c76f7a", "metadata": { "tags": [] @@ -1677,7 +1695,7 @@ "" ] }, - "execution_count": 20, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -1695,7 +1713,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 18, "id": "b31e4cc5-42b3-4795-b04b-9a653228b6a4", "metadata": { "tags": [] @@ -1705,26 +1723,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Answer:\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-07-25 09:16:43.783220: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n", - "2024-07-25 09:16:43.785237: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n", - "2024-07-25 09:16:43.818262: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n", - "2024-07-25 09:16:43.818887: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", - "To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", - "2024-07-25 09:16:44.504895: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The unusual aspect of this image is the presence of a cat lying inside an open cardboard box. It's not common to see animals, especially cats in such unconventional settings like boxes on floors or couches.\n" + "Answer:\n", + "The unusual aspect of this image is the presence of a cat inside an open cardboard box.\n" ] } ], @@ -1751,7 +1751,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "cbb8e3bb-d074-4e64-a0fd-ac0780bafa52", "metadata": { "tags": [] @@ -1965,93 +1965,127 @@ "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { - "00c0cf5c882842a7ad3efaa272c7f89c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "025f63255a5f4e1c809c89d2241c7d8e": { + "1b28c5f0bf254698a77a9f934e472169": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": {} }, - "086c32882b124745acee3c3e4ce31f5a": { + "213f9de6d0534cc59191e15395d00a2d": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": {} }, - "111a27976ebb41429022d6163c41f5a0": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": {} - }, - "116fdb6632de4c5cac69a3cdd46ac2da": { - "model_module": "@jupyter-widgets/base", + "2b2779d3892c427691c646e1e0355c43": { + "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": {} + "model_name": "CheckboxModel", + "state": { + "description": "INT4 language model", + "disabled": false, + "layout": "IPY_MODEL_519bead7ab06430d9b9c7d6dbe63f0fc", + "style": "IPY_MODEL_bc3139da4a90490181b0c9e1bff77389", + "value": true + } }, - "19284b6662dd4d48a57f39c81d22f745": { + "2cbdf9fc17c54e0484613ef516e8ecf7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "DescriptionStyleModel", + "model_name": "CheckboxStyleModel", "state": { "description_width": "" } }, - "197a9d78d8df4d5899a3531ad387c95a": { + "341b92ab02ac4997af36d54ceaeef01a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "CheckboxModel", + "model_name": "HTMLStyleModel", "state": { - "description": "INT4 language model", - "disabled": false, - "layout": "IPY_MODEL_111a27976ebb41429022d6163c41f5a0", - "style": "IPY_MODEL_253c575c56f947b897781cbd40b5f2d5", - "value": true + "description_width": "", + "font_size": null, + "text_color": null } }, - "197bd8c01469448fb138892a8d6c73e0": { + "3973659e48724004b470bd6ae7fdd7d8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "HTMLModel", + "model_name": "ProgressStyleModel", "state": { - "layout": "IPY_MODEL_5fce6be1ed294eee8da40458f85e7aba", - "style": "IPY_MODEL_2afd395671ca4302b779a6eecf88ffc4", - "value": "Loading checkpoint shards: 100%" + "description_width": "" } }, - "1c7172abc52a4b33b326411e30180652": { + "519bead7ab06430d9b9c7d6dbe63f0fc": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": {} }, - "23d038a868784c0bbe990c3446f9c56e": { + "57f7041974a546b68257e45f8795e6f2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", + "model_name": "CheckboxModel", "state": { - "description_width": "" + "description": "Weights Compression", + "disabled": false, + "layout": "IPY_MODEL_e5e76c48c4374611b81194b2e7416a73", + "style": "IPY_MODEL_2cbdf9fc17c54e0484613ef516e8ecf7", + "value": true } }, - "253c575c56f947b897781cbd40b5f2d5": { + "78ac5e1508be44a995f1fcf894ce5310": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": {} + }, + "802acd7c56684fc49d12228380980a7f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": {} + }, + "9044bbce66244ff9a308d2d67eff4621": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": {} + }, + "9b412b113a114c2f807a76f7bfb7eb48": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": {} + }, + "9c268f82392446f2a06be1fe97775a90": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "CheckboxStyleModel", + "model_name": "HTMLModel", "state": { - "description_width": "" + "layout": "IPY_MODEL_1b28c5f0bf254698a77a9f934e472169", + "style": "IPY_MODEL_a387393f88aa4fe4a0800670d5e2a280", + "value": "Loading checkpoint shards: 100%" } }, - "2afd395671ca4302b779a6eecf88ffc4": { + "9fa0130fb9cc409eb32a886e4b70295f": { + "model_module": "@jupyter-widgets/output", + "model_module_version": "1.0.0", + "model_name": "OutputModel", + "state": { + "layout": "IPY_MODEL_9b412b113a114c2f807a76f7bfb7eb48", + "outputs": [ + { + "data": { + "text/html": "
Applying Weight Compression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 281/2810:01:040:00:00\n
\n", + "text/plain": "Applying Weight Compression \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[38;2;0;104;181m281/281\u001b[0m • \u001b[38;2;0;104;181m0:01:04\u001b[0m • \u001b[38;2;0;104;181m0:00:00\u001b[0m\n" + }, + "metadata": {}, + "output_type": "display_data" + } + ] + } + }, + "a387393f88aa4fe4a0800670d5e2a280": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", @@ -2061,86 +2095,102 @@ "text_color": null } }, - "4750ce7f74514b49a5045dd1d1420f7e": { - "model_module": "@jupyter-widgets/base", + "a86561b698a644d8a4bf4ca6f642146a": { + "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": {} + "model_name": "HBoxModel", + "state": { + "children": [ + "IPY_MODEL_9c268f82392446f2a06be1fe97775a90", + "IPY_MODEL_c6f2778a6fcf4d2b970cf14f4ddfdbce", + "IPY_MODEL_e54f272b1fca4c379520843b353ec756" + ], + "layout": "IPY_MODEL_802acd7c56684fc49d12228380980a7f" + } }, - "47c03ae2d46e4476a2fcbe597fe556d0": { + "b62447eb541d4014afe742e98b96c3fc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "CPU", + "GPU.0", + "GPU.1", "AUTO" ], "description": "Device:", "index": 0, - "layout": "IPY_MODEL_086c32882b124745acee3c3e4ce31f5a", - "style": "IPY_MODEL_19284b6662dd4d48a57f39c81d22f745" + "layout": "IPY_MODEL_9044bbce66244ff9a308d2d67eff4621", + "style": "IPY_MODEL_b81e05c31beb4e6b959092c3cc9677a5" } }, - "4bcc83b59a314cd3a10e6133ba7c94ac": { + "b81e05c31beb4e6b959092c3cc9677a5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "HBoxModel", + "model_name": "DescriptionStyleModel", "state": { - "children": [ - "IPY_MODEL_197bd8c01469448fb138892a8d6c73e0", - "IPY_MODEL_750f05a4b80b45caa4c381199dc60630", - "IPY_MODEL_cefb4ecaa97d4c748fa4731d12f3170c" - ], - "layout": "IPY_MODEL_025f63255a5f4e1c809c89d2241c7d8e" + "description_width": "" } }, - "5fce6be1ed294eee8da40458f85e7aba": { + "bc3139da4a90490181b0c9e1bff77389": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "2.0.0", + "model_name": "CheckboxStyleModel", + "state": { + "description_width": "" + } + }, + "c4889355e6294f5cb568279a0df7a9e7": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": {} }, - "750f05a4b80b45caa4c381199dc60630": { + "c6f2778a6fcf4d2b970cf14f4ddfdbce": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "bar_style": "success", - "layout": "IPY_MODEL_1c7172abc52a4b33b326411e30180652", + "layout": "IPY_MODEL_78ac5e1508be44a995f1fcf894ce5310", "max": 2, - "style": "IPY_MODEL_23d038a868784c0bbe990c3446f9c56e", + "style": "IPY_MODEL_3973659e48724004b470bd6ae7fdd7d8", "value": 2 } }, - "c3a82abd9f934156a885ab08ee8fbd22": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "CheckboxStyleModel", - "state": { - "description_width": "" - } - }, - "cefb4ecaa97d4c748fa4731d12f3170c": { + "e54f272b1fca4c379520843b353ec756": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { - "layout": "IPY_MODEL_116fdb6632de4c5cac69a3cdd46ac2da", - "style": "IPY_MODEL_00c0cf5c882842a7ad3efaa272c7f89c", - "value": " 2/2 [00:01<00:00,  1.65it/s]" + "layout": "IPY_MODEL_213f9de6d0534cc59191e15395d00a2d", + "style": "IPY_MODEL_341b92ab02ac4997af36d54ceaeef01a", + "value": " 2/2 [00:01<00:00,  1.60it/s]" } }, - "f26858161381405991dd5075172040ef": { - "model_module": "@jupyter-widgets/controls", + "e5e76c48c4374611b81194b2e7416a73": { + "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", - "model_name": "CheckboxModel", + "model_name": "LayoutModel", + "state": {} + }, + "ebe697d63a4c4205acf822043a1840e3": { + "model_module": "@jupyter-widgets/output", + "model_module_version": "1.0.0", + "model_name": "OutputModel", "state": { - "description": "Weights Compression", - "disabled": false, - "layout": "IPY_MODEL_4750ce7f74514b49a5045dd1d1420f7e", - "style": "IPY_MODEL_c3a82abd9f934156a885ab08ee8fbd22", - "value": true + "layout": "IPY_MODEL_c4889355e6294f5cb568279a0df7a9e7", + "outputs": [ + { + "data": { + "text/html": "
Mixed-Precision assignment ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 280/2800:00:340:00:00\n
\n", + "text/plain": "Mixed-Precision assignment \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[38;2;0;104;181m280/280\u001b[0m • \u001b[38;2;0;104;181m0:00:34\u001b[0m • \u001b[38;2;0;104;181m0:00:00\u001b[0m\n" + }, + "metadata": {}, + "output_type": "display_data" + } + ] } } },