diff --git a/nb/Gemma3_(270M)_Phone_Deployment.ipynb b/nb/Gemma3_(270M)_Phone_Deployment.ipynb new file mode 100644 index 00000000..dbd67045 --- /dev/null +++ b/nb/Gemma3_(270M)_Phone_Deployment.ipynb @@ -0,0 +1,1864 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "zGJnyYTMwj5A" + }, + "source": [ + "To run this, press \"*Runtime*\" and press \"*Run all*\" on a **free** Tesla T4 Google Colab instance!\n", + "
\n", + "\n", + "\n", + " Join Discord if you need help + ⭐ Star us on Github ⭐\n", + "
\n", + "\n", + "To install Unsloth your local device, follow [our guide](https://docs.unsloth.ai/get-started/install-and-update). This notebook is licensed [LGPL-3.0](https://github.com/unslothai/notebooks?tab=LGPL-3.0-1-ov-file#readme).\n", + "\n", + "You will learn how to do [data prep](#Data), how to [train](#Train), how to [run the model](#Inference), & [how to save it](#Save)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "uD4-nXQpwj5B" + }, + "source": [ + "### News" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "YSPObkoJwj5B" + }, + "source": [ + "\n", + "Introducing FP8 precision training for faster RL inference. [Read Blog](https://docs.unsloth.ai/new/fp8-reinforcement-learning).\n", + "\n", + "Unsloth's [Docker image](https://hub.docker.com/r/unsloth/unsloth) is here! Start training with no setup & environment issues. [Read our Guide](https://docs.unsloth.ai/new/how-to-train-llms-with-unsloth-and-docker).\n", + "\n", + "[gpt-oss RL](https://docs.unsloth.ai/new/gpt-oss-reinforcement-learning) is now supported with the fastest inference & lowest VRAM. Try our [new notebook](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/gpt-oss-(20B)-GRPO.ipynb) which creates kernels!\n", + "\n", + "Introducing [Vision](https://docs.unsloth.ai/new/vision-reinforcement-learning-vlm-rl) and [Standby](https://docs.unsloth.ai/basics/memory-efficient-rl) for RL! Train Qwen, Gemma etc. VLMs with GSPO - even faster with less VRAM.\n", + "\n", + "Visit our docs for all our [model uploads](https://docs.unsloth.ai/get-started/all-our-models) and [notebooks](https://docs.unsloth.ai/get-started/unsloth-notebooks).\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "kd3u6s7wwj5B" + }, + "source": [ + "### Installation" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "id": "ypS_Ro0gwj5B" + }, + "outputs": [], + "source": [ + "%%capture\n", + "import os, re\n", + "if \"COLAB_\" not in \"\".join(os.environ.keys()):\n", + " !pip install unsloth\n", + "else:\n", + " # Do this only in Colab notebooks! Otherwise use pip install unsloth\n", + " import torch; v = re.match(r\"[0-9]{1,}\\.[0-9]{1,}\", str(torch.__version__)).group(0)\n", + " xformers = \"xformers==\" + (\"0.0.33.post1\" if v==\"2.9\" else \"0.0.32.post2\" if v==\"2.8\" else \"0.0.29.post3\")\n", + " !pip install --no-deps bitsandbytes accelerate {xformers} peft trl triton cut_cross_entropy unsloth_zoo\n", + " !pip install sentencepiece protobuf \"datasets==4.3.0\" \"huggingface_hub>=0.34.0\" hf_transfer\n", + " !pip install --no-deps unsloth\n", + "!pip install transformers==4.56.2\n", + "!pip install --no-deps trl==0.22.2\n", + "!pip install torchao==0.14.0 executorch pytorch_tokenizers optimum-executorch" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TGMWlrRdzwgf" + }, + "source": [ + "### Unsloth" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "-Xbb0cuLzwgf", + "outputId": "9aeb5e39-1e40-4589-cdd0-689c3c17155d" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "==((====))== Unsloth 2025.12.6: Fast Gemma3 patching. Transformers: 4.56.1.\n", + " \\\\ /| Tesla T4. Num GPUs = 1. Max memory: 14.741 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.9.0+cu126. CUDA: 7.5. CUDA Toolkit: 12.6. Triton: 3.5.0\n", + "\\ / Bfloat16 = FALSE. FA [Xformers = 0.0.33.post1. FA2 = False]\n", + " \"-____-\" Free license: http://github.com/unslothai/unsloth\n", + "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n", + "Unsloth: Using float16 precision for gemma3 won't work! Using float32.\n", + "Unsloth: Gemma3 does not support SDPA - switching to fast eager.\n", + "Unsloth: Using bfloat16 full finetuning which cuts memory usage by 50%.\n", + "To enable float32 training, use `float32_mixed_precision = True` during FastLanguageModel.from_pretrained\n", + "Unsloth: Applying QAT to mitigate quantization degradation\n" + ] + } + ], + "source": [ + "from unsloth import FastLanguageModel\n", + "import torch\n", + "\n", + "# Models supported for Phone Deployment\n", + "fourbit_models = [\n", + " \"unsloth/Qwen3-4B\", # Any Qwen3 model like 0.6B, 4B, 8B, 32B\n", + " \"unsloth/Qwen3-32B\",\n", + " \"unsloth/Llama-3.1-8B-Instruct\", # Llama 3 models work\n", + " \"unsloth/Llama-3.3-70B-Instruct\",\n", + " \"unsloth/gemma-3-270m-it\", # Gemma 3 models work\n", + " \"unsloth/gemma-3-27b-it\",\n", + " \"unsloth/Qwen2.5-7B-Instruct\", # And more models!\n", + " \"unsloth/Phi-4-mini-instruct\",\n", + "] # More models at https://huggingface.co/unsloth\n", + "\n", + "model, tokenizer = FastLanguageModel.from_pretrained(\n", + " model_name = \"unsloth/gemma-3-270m-it\",\n", + " max_seq_length = 2048,\n", + " dtype = None,\n", + " load_in_4bit = False,\n", + " full_finetuning = True,\n", + " qat_scheme = \"phone-deployment\", # Flag for phone deployment\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "vITh0KVJ10qX" + }, + "source": [ + "\n", + "### Data Prep\n", + "We now use the `Gemma-3` format for conversation style finetunes. We use [Maxime Labonne's FineTome-100k](https://huggingface.co/datasets/mlabonne/FineTome-100k) dataset in ShareGPT style. Gemma-3 renders multi turn conversations like below:\n", + "\n", + "```\n", + "user\n", + "Hello!\n", + "model\n", + "Hey there!\n", + "```\n", + "\n", + "We use our `get_chat_template` function to get the correct chat template. We support `zephyr, chatml, mistral, llama, alpaca, vicuna, vicuna_old, phi3, llama3, phi4, qwen2.5, gemma3` and more." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "id": "LjY75GoYUCB8" + }, + "outputs": [], + "source": [ + "from unsloth.chat_templates import get_chat_template\n", + "tokenizer = get_chat_template(\n", + " tokenizer,\n", + " chat_template = \"gemma-3\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "id": "Mkq4RvEq7FQr" + }, + "outputs": [], + "source": [ + "from datasets import load_dataset\n", + "dataset = load_dataset(\"mlabonne/FineTome-100k\", split = \"train\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "PT6uKbuPElvo" + }, + "source": [ + "We sample 10k rows to speed up training for the first successful phone deployment." + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "id": "iBm0XwDbElVY" + }, + "outputs": [], + "source": [ + "dataset = dataset.shuffle(seed=3407).select(range(10000))" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "K9CBpiISFa6C" + }, + "source": [ + "We now use `standardize_data_formats` to try converting datasets to the correct format for finetuning purposes!" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 49, + "referenced_widgets": [ + "a4ec32a6e9774744ba393a1af47f6d93", + "566b075df3014851a4abe2f834012339", + "95d97ec274304059b528f8ad73076492", + "2500a437043548328db43aea8a058bdd", + "b4046e3b58844555a7d53cb3450938d6", + "4897c13bb26144e0bfed38034c56bc37", + "3bf750a0c0294b74b08024471048f65d", + "3512d34d5e7b4f15b9fa897593c18584", + "b60e8a7be6194386b58c5d6a9e7dee35", + "528f7844ee94480a9379cd80859ac0e1", + "2d2c74ae247f4476b2095363a41ef328" + ] + }, + "id": "reoBXmAn7HlN", + "outputId": "c512d493-8d42-4b8c-d8aa-08ebcb7e6bfc" + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "a4ec32a6e9774744ba393a1af47f6d93", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Unsloth: Standardizing formats (num_proc=2): 0%| | 0/10000 [00:00` token using removeprefix(`''`) since we're finetuning. The Processor will add this token before training and the model expects only one." + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 49, + "referenced_widgets": [ + "6abbd55419124cfba4bda0b3562ed712", + "4496b181a1a44b5b995ddac456674898", + "c8ae73353cbd4b2985765f4b48a5214c", + "7826e1eb100d46bc877575a8fc9f7c94", + "eecd717a8331423e8ad8f14c1975467b", + "99b37c47cf844b12b188cddef262b793", + "647c24aebf7e4a88a08bb7e4737db2a5", + "5a0ba5c0ee0f48a8ae165ed974c66db6", + "bf11957c44e2466c9b11f544252f2fcf", + "4815e00685e84e9daf01e9dcd884bc69", + "dfc97bfeece147f4b2dadc7ae486a3ee" + ] + }, + "id": "1ahE8Ys37JDJ", + "outputId": "03967e5b-a855-4a11-e273-bd3d3c19978d" + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "6abbd55419124cfba4bda0b3562ed712", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Map: 0%| | 0/10000 [00:00') for convo in convos]\n", + " return { \"text\" : texts, }\n", + "\n", + "dataset = dataset.map(formatting_prompts_func, batched = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ndDUB23CGAC5" + }, + "source": [ + "Let's see how the chat template did! Notice there is no `` token as the processor tokenizer will be adding one." + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 157 + }, + "id": "gGFzmplrEy9I", + "outputId": "9dc0d9dc-4df7-4c7e-d238-4e7035a56056" + }, + "outputs": [ + { + "data": { + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + }, + "text/plain": [ + "\"user\\nConsider the following optimization problem: \\n\\nMinimize the function f(x) = x^2 - 5x + 6 using cuckoo search algorithm over the interval [0,6]. \\n\\nUse an initial population size of 15 cuckoos, a maximum number of generations of 1000, a step size of 0.01, and a probability of cuckoo eggs being laid in a new nest of 0.25. \\n\\nDetermine the global minimum and value of the objective function.\\nmodel\\nTo solve the optimization problem using the cuckoo search algorithm, we will follow these steps:\\n\\n1. Initialize the population of 15 cuckoos randomly within the interval [0, 6].\\n2. Evaluate the fitness of each cuckoo (i.e., calculate the objective function f(x) for each cuckoo).\\n3. Perform the search for a maximum number of generations (1000).\\n4. In each generation, update the cuckoo's position using the step size (0.01) and the probability of laying eggs in a new nest (0.25).\\n5. Evaluate the fitness of the new cuckoos and replace the worst cuckoo if the new cuckoo has better fitness.\\n6. Repeat steps 3-5 until the maximum number of generations is reached.\\n7. Determine the global minimum and the value of the objective function.\\n\\nSince the actual implementation of the cuckoo search algorithm requires programming and cannot be done directly in this text-based format, I will provide you with the global minimum and the value of the objective function for the given problem.\\n\\nThe global minimum of the function f(x) = x^2 - 5x + 6 occurs at x = 2.5. At this point, the value of the objective function is f(2.5) = 2.5^2 - 5(2.5) + 6 = 6.25 - 12.5 + 6 = -0.25.\\n\\nSo, the global minimum is x = 2.5, and the value of the objective function at this point is f(x) = -0.25.\\n\"" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dataset[100][\"text\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "idAEIeSQ3xdS" + }, + "source": [ + "\n", + "### Train the model\n", + "Fine-tuning requires careful experimentation. To avoid wasting hours on a broken pipeline, we start with a 5-step sanity check. This ensures the training stabilizes and the model exports correctly to your phone.\n", + "\n", + "Run this short test first. If the export succeeds, come back and set max_steps = -1 (or num_train_epochs = 1) for the full training run." + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 66, + "referenced_widgets": [ + "2bd80080d2d14b2e85fbd7061f527296", + "37c84f5d49b64573a03e4afdeefafabe", + "41606b74264d40e2b44faf90644ac09d", + "96d072aa159a476e8e13cf891c9c672e", + "e81ef6bf94f74bbf890e81081b31987d", + "b047bbb7800c47209e1432ea8542dff9", + "eb1b8444e56545e5a2cf415d02188423", + "c873ef710be84522b5beebfdcaa7b724", + "d666967f8e244644b9d07332a529be1d", + "16113e3635db4c3ab60614dd6e868575", + "31888169db114b6aa966060ab6bc0eba" + ] + }, + "id": "95_Nn-89DhsL", + "outputId": "f62d1c08-ded7-4b3e-d4d3-ae08cc17b337" + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2bd80080d2d14b2e85fbd7061f527296", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Unsloth: Tokenizing [\"text\"] (num_proc=6): 0%| | 0/10000 [00:00\n", + " \n", + " \n", + " [5/5 01:28, Epoch 0/1]\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
StepTraining Loss
118.145700
217.306400
318.096000
417.530900
517.311900

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "trainer_stats = trainer.train()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "pCqnaKmlO1U9", + "outputId": "d62320ca-9ef0-4dac-9291-2fe7689f6aa3" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "115.0737 seconds used for training.\n", + "1.92 minutes used for training.\n", + "Peak reserved memory = 14.111 GB.\n", + "Peak reserved memory for training = 0.0 GB.\n", + "Peak reserved memory % of max memory = 95.726 %.\n", + "Peak reserved memory for training % of max memory = 0.0 %.\n" + ] + } + ], + "source": [ + "# @title Show final memory and time stats\n", + "used_memory = round(torch.cuda.max_memory_reserved() / 1024 / 1024 / 1024, 3)\n", + "used_memory_for_training = round(used_memory - start_gpu_memory, 3)\n", + "used_percentage = round(used_memory / max_memory * 100, 3)\n", + "training_percentage = round(used_memory_for_training / max_memory * 100, 3)\n", + "print(f\"{trainer_stats.metrics['train_runtime']} seconds used for training.\")\n", + "print(\n", + " f\"{round(trainer_stats.metrics['train_runtime']/60, 2)} minutes used for training.\"\n", + ")\n", + "print(f\"Peak reserved memory = {used_memory} GB.\")\n", + "print(f\"Peak reserved memory for training = {used_memory_for_training} GB.\")\n", + "print(f\"Peak reserved memory % of max memory = {used_percentage} %.\")\n", + "print(f\"Peak reserved memory for training % of max memory = {training_percentage} %.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ekOmTR1hSNcr" + }, + "source": [ + "\n", + "### Saving, loading finetuned models\n", + "\n", + "To save the model for phone deployment, we first save the model and tokenizer via `save_pretrained`." + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "kR3gIAX-SM2q", + "outputId": "bbaf300c-0ef1-402b-a0d2-2f286f7cab09" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "('gemma_phone_model/tokenizer_config.json',\n", + " 'gemma_phone_model/special_tokens_map.json',\n", + " 'gemma_phone_model/chat_template.jinja',\n", + " 'gemma_phone_model/tokenizer.model',\n", + " 'gemma_phone_model/added_tokens.json',\n", + " 'gemma_phone_model/tokenizer.json')" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Save the model and tokenizer directly\n", + "model.save_pretrained(\"gemma_phone_model\")\n", + "tokenizer.save_pretrained(\"gemma_phone_model\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CrSvZObor0lY" + }, + "source": [ + "We then export directly from the local folder using Optimum Executorch as per [the documentation.](https://github.com/huggingface/optimum-executorch/blob/main/optimum/exporters/executorch/README.md)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "V--DeL4DMD5O", + "outputId": "f5f03485-5c91-45aa-f961-12251a27587d" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2025-12-18 07:11:27.948447: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", + "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", + "E0000 00:00:1766041888.463719 8746 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", + "E0000 00:00:1766041888.594349 8746 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "W0000 00:00:1766041889.547001 8746 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", + "W0000 00:00:1766041889.547052 8746 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", + "W0000 00:00:1766041889.547060 8746 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", + "W0000 00:00:1766041889.547067 8746 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", + "Skipping import of cpp extensions due to incompatible torch version 2.9.0+cu126 for torchao version 0.14.0 Please see GitHub issue #2919 for more info\n", + "`torch_dtype` is deprecated! Use `dtype` instead!\n", + "WARNING:coremltools:scikit-learn version 1.7.1 is not supported. Minimum required version: 0.17. Maximum required version: 1.5.1. Disabling scikit-learn conversion API.\n", + "WARNING:coremltools:XGBoost version 3.1.2 has not been tested with coremltools. You may run into unexpected errors. XGBoost 1.4.2 is the most recent version that has been tested.\n", + "WARNING:coremltools:TensorFlow version 2.19.0 has not been tested with coremltools. You may run into unexpected errors. TensorFlow 2.12.0 is the most recent version that has been tested.\n", + "WARNING:coremltools:Torch version 2.9.0+cu126 has not been tested with coremltools. You may run into unexpected errors. Torch 2.7.0 is the most recent version that has been tested.\n", + "WARNING:coremltools:Failed to load _MLModelProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLCPUComputeDeviceProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLGPUComputeDeviceProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLNeuralEngineComputeDeviceProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLModelProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLComputePlanProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLModelProxy: No module named 'coremltools.libcoremlpython'\n", + "WARNING:coremltools:Failed to load _MLModelAssetProxy: No module named 'coremltools.libcoremlpython'\n", + "/usr/local/lib/python3.12/dist-packages/torch/_dynamo/output_graph.py:1711: UserWarning: While exporting, we found certain side effects happened in the model.forward. Here are the list of potential sources you can double check: [\"L['self'].cache.layers[0]\", \"L['self'].cache.layers[1]\", \"L['self'].cache.layers[2]\", \"L['self'].cache.layers[3]\", \"L['self'].cache.layers[4]\", \"L['self'].cache.layers[6]\", \"L['self'].cache.layers[7]\", \"L['self'].cache.layers[8]\", \"L['self'].cache.layers[9]\", \"L['self'].cache.layers[10]\", \"L['self'].cache.layers[12]\", \"L['self'].cache.layers[13]\", \"L['self'].cache.layers[14]\", \"L['self'].cache.layers[15]\", \"L['self'].cache.layers[16]\"]\n", + " warnings.warn(\n", + "I tokenizers:regex.cpp:27] Registering override fallback regex\n", + "/usr/local/lib/python3.12/dist-packages/executorch/exir/emit/_emitter.py:1594: UserWarning: Mutation on a buffer in the model is detected. ExecuTorch assumes buffers that are mutated in the graph have a meaningless initial state, only the shape and dtype will be serialized, unless a pass which sets meta[\"et_init_buffer\"] to True such as InitializedMutableBufferPass is run.\n", + " warnings.warn(\n" + ] + } + ], + "source": [ + "# Export directly from your local folder using Optimum\n", + "# We use --qlinear 8da4w and --qembedding 8w to reduce size\n", + "# 8da4w = Int8 dynamic activations + Int4 weights (Fastest on mobile)\n", + "\n", + "!optimum-cli export executorch \\\n", + " --model \"gemma_phone_model\" \\\n", + " --task \"text-generation\" \\\n", + " --recipe \"xnnpack\" \\\n", + " --output_dir \"gemma_output\" \\\n", + " --qlinear 8da4w \\\n", + " --qembedding 8w" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Qc-Hd2dXHXq1" + }, + "source": [ + "And we have the file Gemma3 model.pte of size 306M!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "WqtcKfTnHZdB" + }, + "outputs": [], + "source": [ + "!ls -lh gemma_output/model.pte" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "9guDN83_HaVv" + }, + "source": [ + "And we're done! If you have any questions on Unsloth, we have a [Discord](https://discord.gg/unsloth) channel! If you find any bugs or want to keep updated with the latest LLM stuff, or need help, join projects etc, feel free to join our Discord!\n", + "\n", + "Some other links:\n", + "1. Train your own reasoning model - Llama GRPO notebook [Free Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3.1_(8B)-GRPO.ipynb)\n", + "2. Saving finetunes to Ollama. [Free notebook](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3_(8B)-Ollama.ipynb)\n", + "3. Llama 3.2 Vision finetuning - Radiography use case. [Free Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3.2_(11B)-Vision.ipynb)\n", + "6. See notebooks for DPO, ORPO, Continued pretraining, conversational finetuning and more on our [documentation](https://docs.unsloth.ai/get-started/unsloth-notebooks)!\n", + "\n", + "

\n", + " \n", + " \n", + " \n", + "\n", + " Join Discord if you need help + ⭐️ Star us on Github ⭐️\n", + "
\n", + "\n", + " This notebook and all Unsloth notebooks are licensed [LGPL-3.0](https://github.com/unslothai/notebooks?tab=LGPL-3.0-1-ov-file#readme).\n" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.11" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "16113e3635db4c3ab60614dd6e868575": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "2500a437043548328db43aea8a058bdd": { + "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_528f7844ee94480a9379cd80859ac0e1", + "placeholder": "​", + "style": "IPY_MODEL_2d2c74ae247f4476b2095363a41ef328", + "value": " 10000/10000 [00:02<00:00, 6407.58 examples/s]" + } + }, + "2bd80080d2d14b2e85fbd7061f527296": { + "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_37c84f5d49b64573a03e4afdeefafabe", + "IPY_MODEL_41606b74264d40e2b44faf90644ac09d", + "IPY_MODEL_96d072aa159a476e8e13cf891c9c672e" + ], + "layout": "IPY_MODEL_e81ef6bf94f74bbf890e81081b31987d" + } + }, + "2d2c74ae247f4476b2095363a41ef328": { + "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": "" + } + }, + "31888169db114b6aa966060ab6bc0eba": { + "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": "" + } + }, + "3512d34d5e7b4f15b9fa897593c18584": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "37c84f5d49b64573a03e4afdeefafabe": { + "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_b047bbb7800c47209e1432ea8542dff9", + "placeholder": "​", + "style": "IPY_MODEL_eb1b8444e56545e5a2cf415d02188423", + "value": "Unsloth: Tokenizing ["text"] (num_proc=6): 100%" + } + }, + "3bf750a0c0294b74b08024471048f65d": { + "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": "" + } + }, + "41606b74264d40e2b44faf90644ac09d": { + "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_c873ef710be84522b5beebfdcaa7b724", + "max": 10000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d666967f8e244644b9d07332a529be1d", + "value": 10000 + } + }, + "4496b181a1a44b5b995ddac456674898": { + "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_99b37c47cf844b12b188cddef262b793", + "placeholder": "​", + "style": "IPY_MODEL_647c24aebf7e4a88a08bb7e4737db2a5", + "value": "Map: 100%" + } + }, + "4815e00685e84e9daf01e9dcd884bc69": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "4897c13bb26144e0bfed38034c56bc37": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "528f7844ee94480a9379cd80859ac0e1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "566b075df3014851a4abe2f834012339": { + "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_4897c13bb26144e0bfed38034c56bc37", + "placeholder": "​", + "style": "IPY_MODEL_3bf750a0c0294b74b08024471048f65d", + "value": "Unsloth: Standardizing formats (num_proc=2): 100%" + } + }, + "5a0ba5c0ee0f48a8ae165ed974c66db6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "647c24aebf7e4a88a08bb7e4737db2a5": { + "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": "" + } + }, + "6abbd55419124cfba4bda0b3562ed712": { + "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_4496b181a1a44b5b995ddac456674898", + "IPY_MODEL_c8ae73353cbd4b2985765f4b48a5214c", + "IPY_MODEL_7826e1eb100d46bc877575a8fc9f7c94" + ], + "layout": "IPY_MODEL_eecd717a8331423e8ad8f14c1975467b" + } + }, + "7826e1eb100d46bc877575a8fc9f7c94": { + "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_4815e00685e84e9daf01e9dcd884bc69", + "placeholder": "​", + "style": "IPY_MODEL_dfc97bfeece147f4b2dadc7ae486a3ee", + "value": " 10000/10000 [00:01<00:00, 8606.97 examples/s]" + } + }, + "95d97ec274304059b528f8ad73076492": { + "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_3512d34d5e7b4f15b9fa897593c18584", + "max": 10000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b60e8a7be6194386b58c5d6a9e7dee35", + "value": 10000 + } + }, + "96d072aa159a476e8e13cf891c9c672e": { + "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_16113e3635db4c3ab60614dd6e868575", + "placeholder": "​", + "style": "IPY_MODEL_31888169db114b6aa966060ab6bc0eba", + "value": " 10000/10000 [00:30<00:00, 728.40 examples/s]" + } + }, + "99b37c47cf844b12b188cddef262b793": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "a4ec32a6e9774744ba393a1af47f6d93": { + "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_566b075df3014851a4abe2f834012339", + "IPY_MODEL_95d97ec274304059b528f8ad73076492", + "IPY_MODEL_2500a437043548328db43aea8a058bdd" + ], + "layout": "IPY_MODEL_b4046e3b58844555a7d53cb3450938d6" + } + }, + "b047bbb7800c47209e1432ea8542dff9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "b4046e3b58844555a7d53cb3450938d6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "b60e8a7be6194386b58c5d6a9e7dee35": { + "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": "" + } + }, + "bf11957c44e2466c9b11f544252f2fcf": { + "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": "" + } + }, + "c873ef710be84522b5beebfdcaa7b724": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "c8ae73353cbd4b2985765f4b48a5214c": { + "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_5a0ba5c0ee0f48a8ae165ed974c66db6", + "max": 10000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_bf11957c44e2466c9b11f544252f2fcf", + "value": 10000 + } + }, + "d666967f8e244644b9d07332a529be1d": { + "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": "" + } + }, + "dfc97bfeece147f4b2dadc7ae486a3ee": { + "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": "" + } + }, + "e81ef6bf94f74bbf890e81081b31987d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + }, + "eb1b8444e56545e5a2cf415d02188423": { + "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": "" + } + }, + "eecd717a8331423e8ad8f14c1975467b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "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 + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}