From 4a70f8e8809116e83d1028fb82cf94f5065e0950 Mon Sep 17 00:00:00 2001 From: Roland Tannous Date: Sat, 21 Jun 2025 00:22:00 +0000 Subject: [PATCH] Additional tests for unsloth-zoo PR#174 --- tests/gemma3_fix_tests/Gemma3_4B_T4.ipynb | 8848 +++++ tests/gemma3_fix_tests/Gemma3_4B_h100.ipynb | 5292 +++ .../gemma3_4b_vision_french_ocr_H100.ipynb | 1345 + .../gemma3_4b_vision_french_ocr_T4.ipynb | 28611 ++++++++++++++++ ...est_gemma3_1b_language_model_perplexity.py | 240 + ...est_gemma3_4b_language_model_perplexity.py | 228 + .../test_gemma3_grpo_model.py | 802 + 7 files changed, 45366 insertions(+) create mode 100644 tests/gemma3_fix_tests/Gemma3_4B_T4.ipynb create mode 100644 tests/gemma3_fix_tests/Gemma3_4B_h100.ipynb create mode 100644 tests/gemma3_fix_tests/gemma3_4b_vision_french_ocr_H100.ipynb create mode 100644 tests/gemma3_fix_tests/gemma3_4b_vision_french_ocr_T4.ipynb create mode 100644 tests/gemma3_fix_tests/test_gemma3_1b_language_model_perplexity.py create mode 100644 tests/gemma3_fix_tests/test_gemma3_4b_language_model_perplexity.py create mode 100644 tests/gemma3_fix_tests/test_gemma3_grpo_model.py diff --git a/tests/gemma3_fix_tests/Gemma3_4B_T4.ipynb b/tests/gemma3_fix_tests/Gemma3_4B_T4.ipynb new file mode 100644 index 0000000000..11d336b2aa --- /dev/null +++ b/tests/gemma3_fix_tests/Gemma3_4B_T4.ipynb @@ -0,0 +1,8848 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "Ya4hWtsWgt6m" + }, + "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 on your own computer, follow the installation instructions on our Github page [here](https://docs.unsloth.ai/get-started/installing-+-updating).\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": "BOuS2Goegt6o" + }, + "source": [ + "### News" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "tfzMngqfgt6p" + }, + "source": [ + "Unsloth now supports Text-to-Speech (TTS) models. Read our [guide here](https://docs.unsloth.ai/basics/text-to-speech-tts-fine-tuning).\n", + "\n", + "Read our **[Qwen3 Guide](https://docs.unsloth.ai/basics/qwen3-how-to-run-and-fine-tune)** and check out our new **[Dynamic 2.0](https://docs.unsloth.ai/basics/unsloth-dynamic-2.0-ggufs)** quants which outperforms other quantization methods!\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": "jdo0bz0Rgt6p" + }, + "source": [ + "### Installation" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "id": "89WLvodBgt6p" + }, + "outputs": [], + "source": [ + "%%capture\n", + "import os\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", + " !pip install --no-deps bitsandbytes accelerate xformers==0.0.29.post3 peft trl triton cut_cross_entropy unsloth_zoo\n", + " !pip install sentencepiece protobuf \"datasets>=3.4.1\" huggingface_hub hf_transfer msgspec tyro einops ninja\n", + " !pip install --no-deps unsloth\n", + " !pip install --force-reinstall --no-deps git+https://github.com/unslothai/unsloth-zoo.git\n", + " !pip install --force-reinstall --no-deps git+https://github.com/unslothai/unsloth.git" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TGMWlrRdzwgf" + }, + "source": [ + "### Unsloth\n", + "\n", + "`FastModel` supports loading nearly any model now! This includes Vision and Text models!" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 649, + "referenced_widgets": [ + "d4357f34982d44b49c92d35b48b63a52", + "1e37fe89cfad4a77a1077204b42238c0", + "222338617d2d4249a92a440cafe85ef5", + "cffb8c2c82ae4ac89223ec87cbf200a9", + "b02d8c71475b42148f8e32305d3d1ed4", + "3c7fcb9a462b47fe95f9633e72c7bc49", + "c693409aa2454122a9e045f49fcc1742", + "0300298391b24647b326e8fbc2471f06", + "0c9d49b5ed0d4f7aad2121d1b0373141", + "67ae316732804b77803657115a159e23", + "5a25ef912d5f4ef3bf9f3dc754daa7ef", + "c03e144d2c494e87ba6146ba80e725a7", + "616d6f38053046aaaa12cb96becf64d6", + "9adfec4bb7f3462887bb0a24ddc3fa69", + "60fcd348eea04bf19f780202c2f13d6e", + "59b4dc1570af42d488763597d6a782e7", + "306add97e53d4c0096c1ab99b92947b5", + "6b6696c6ac99472f95b8a8c034c9556f", + "9d9590f4554b44238581f07d9d3e96c6", + "25b4ab518467463caf45c9ef7e887212", + "925cf4589b674e0a9c8902dd36c3c9cf", + "b76352afbe044bdd995ca1b1cab4e83a", + "14b22c40642846f39da17cc00ef7fb88", + "ef00f30da2dc4d1e8289afcf7c80b860", + "6bdded4a3cae49e5907e1e8a9fd4e740", + "9281201d6eb345ae9f962dcdf200a081", + "f1f1f1a1e0f74f54ade609402550c6a7", + "6c87361beb0f4cfda95b7d080d7f343e", + "08afa202d3094daeab96a49990aa9c8f", + "6551142c2ae04475a07ec463c172ef94", + "62b2d8f968cd44cc85689a9f007f2615", + "cce60bdf161342a38cc148321ad87d89", + "cd9432ae568e4d1ab95686e66f1aacfc", + "971e7cbf682240568771230b07de1851", + "20cf3c6e82aa4507848e5df26252491a", + "a4abbef450034782bdb7604452a23272", + "a1f64e37020d42d1be67d3a28041f834", + "0eb03d301f5947f5a5d3faf8dee32772", + "29655da1abc94c959f7f94ad4b6d7ceb", + "263adc24127a45069391edfd83c11a1c", + "a9f1a0430fff480daeca436391147329", + "d8412a1915fc403a9f36da76588f9135", + "a3b2f29f6c604c16b7efb3a71433e74e", + "a9260c2d28d040d89b8ac9559dea9cd6", + "4300cfae504442f2a047b535a013c364", + "c81bbf9321c14b0dbf43ffdf387d7dba", + "005bd5aaffa3414b9f38c62716fa21f3", + "377f281812074f2c88a28780b60d9090", + "d78d84e7f4174408a0bd59b71b027cd5", + "d2dbe752c1994eb3badd431451253e99", + "7c22eb210647406e90b0fb94c6c2f05e", + "745460a76a774dca88e31c59937758a6", + "0fb0b715f98644efbb171fc399d7f931", + "b3ffd445e8cb446eb3d73b811c2e44cc", + "8110b1c4057b44ad8b92dbfd18bd1664", + "35838d1c2ce349af9a0a72b8b3251240", + "48c552d0240a4b1f8e0aa20120336bab", + "dfcf0b8a6e874730aebad7500ee42962", + "ea17eb4f3ace49e0a7c6cbed28889954", + "eb9efe55ac6d4a67b0aea9adea5e4667", + "a5ba3c2194da4fec956a1308a5696d83", + "abeb2ebb23b9466786f609cc2eb0310f", + "872df6a1722b4415b76da470afcf249e", + "658aa1de62184c6fa0a582b2867334ed", + "c1a0b7b0bfe94e34b42f9fbb3eabb3d8", + "8734730bc2f44eaa818dcf1a60909e96", + "dc11e9e86024408a9415bc3fb5a23f86", + "f7610773092e451397fb9c90cdc572fe", + "e943a9b9343f40eaaac24f220284e848", + "0a72e21a56c94f0cbaff4c4d7027b696", + "61826fd6f7364eb1a63bf4185c71e70c", + "cf9a808f07544cef813777dfe8b45466", + "21c746d72bd74493aa786b578563c09b", + "c73e32012e2f49aa9c68b8ecbaade794", + "4b35dc02722b4cecb442d427d9ca1e63", + "86b9cc5844e94f399835643c49460189", + "9916b2d18aa74a3f9bcf794910510586", + "d2d0037baa9a4900891882176b6d34a6", + "cd35c22bbe9745329d9858b770fbb81e", + "f11b24ea370040a09a453b971fca31c7", + "267e82e16a1b471396e19b8456663eaa", + "ab8235ccadad4e19968ddbbaac0a16ff", + "afab8c071937454dbda89c0752314c60", + "aad16109af6b43f09e67617671759ebb", + "a35dbc25393a41e7bbb579a5b890032b", + "e298ae95556544cea377256a5d6bad67", + "0c7bb45a565b4d72b9e2708c4005495f", + "2580b74f38b74189b73c5c1adb124411", + "5508647fe53148158c264dbb73c3f32e", + "fd2fcfd902654152a1ac84bee4f93270", + "b9a75cf3a6f04ba3bc41271bbd0c6b62", + "19a5a899060f4d8db55b11c4d7e7cd9d", + "06f7299115c14218b9896db0a01667ca", + "d7e2a97b96124f6ba29ef605ba14fd65", + "9d737dfb034743829a12dbd173dd52d0", + "49c266fb3f844e8f8fe6bd059b932cd5", + "f18f9276aea6436bb714332e4652a5a6", + "1a9a0308fa62444a95e014e5e4d5c3fc", + "ea901074586043129c6a3adbcb942fad", + "9f963624927e404b81d41e9030e4fd4a", + "3fa30d51f5b24dc38f7997b00a419bde", + "2f23e495371b429e8ca9c8f05924fe97", + "f6ebb0c6780c42248e64733c442a40f5", + "d17c3102803c48e182aef09a4849468e", + "abc60719f0774ccba72431145338ab31", + "b282f87f82db4a0c8b8ecec301144a14", + "58bea53d5f0d4af6b6dc586ebf8808d6", + "1ea9ff8b681f4182b77bf6827866e47c", + "aa25e6337a51473aa30067cd214580a6", + "aaab621de1ae4d0e9c0db6bf15d5edf9", + "df2091cf02a841a1a5bb9f22802de104", + "31b75cd349334aab89e55ef02186d30c", + "05f0d644c2d24584a69f3bec4d0aa468", + "a0f99a5907084714b12756d34d7d0cc4", + "9d493b3551d14cf3983a7db93a840b2c", + "06fb7ae0129f4b1bb33745533b464c1a", + "b1bc57ad3f8044f595e839067e5b15b0", + "f2a39e1dcb474a529576ac3930b0beb7", + "8e26d862735b4e58896cdd4986df14bf", + "c144b67f69404373b4f6899839742df3", + "aadf48eeeb98475d9aff2b37a76a3255" + ] + }, + "id": "-Xbb0cuLzwgf", + "outputId": "1261eb6f-89d3-4882-c2d2-9a1ddb384d24" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.\n", + "Forward Router Patched and working\n", + "forward 1 working and being replaced\n", + "Unsloth: Patched Gemma3ForConditionalGeneration llm forward\n", + "Unsloth: Patched Gemma3ForCausalLM.forward for GRPO compatibility.\n", + "🦥 Unsloth Zoo will now patch everything to make training faster!\n", + "Unsloth: Using float32 gradient checkpointing for FORCE_FLOAT32 mode\n", + "==((====))== Unsloth 2025.6.2: Fast Gemma3 patching. Transformers: 4.52.4.\n", + " \\\\ /| Tesla T4. Num GPUs = 1. Max memory: 14.741 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.6.0+cu124. CUDA: 7.5. CUDA Toolkit: 12.4. Triton: 3.2.0\n", + "\\ / Bfloat16 = FALSE. FA [Xformers = 0.0.29.post3. 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" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "model.safetensors: 0%| | 0.00/4.56G [00:00\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": 4, + "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": 5, + "metadata": { + "id": "Mkq4RvEq7FQr", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 113, + "referenced_widgets": [ + "0c01b2a17cc14a859d65dab518e7a98f", + "1b018ab085ad4f8d91b1943de944a07c", + "6e9c3dc53a3e48cd80f81c5868a8c25b", + "23d700e3d79f4cf2b9b7829e400fb36e", + "ca50038524fe403b935951b2103b7e37", + "4e64129ef7be4605a19a00f82611f501", + "200b532be3eb4cb5b72d357d58446d56", + "74c3f8874b2d4bf08e212bcb4a2f4d30", + "e1b83736a1464936a845f4a4bb8c9c87", + "cf0aeee0b2a84161a16a80cb1dcff948", + "8762c99ed7b940f2b9de85a1d77dc7bf", + "ba8e6fb4120a40e7bf3f01be180ad698", + "e139dcb62648439197af2f75281d49e2", + "e391fcb714e246aa9a3213c50e5006af", + "5e1448a080184bce85ac3a6d75c0798c", + "bbaafcdbf60b40cd828024917ff67fc2", + "c29d400791d34064914ff2b831d5844c", + "eede6c18332f4b77a30ce14676e52307", + "34af403270d94792bca566c43bf402f0", + "012595756eef4c918cfe3f580dba2c37", + "f34cb28303bc4089bb276b9b41a3b92b", + "da7e57d90cd84b59b817e26b4a7287fa", + "48bc63a3954d4f928da7b41dc9a59221", + "09cb3384bd73421a80099a07603c34ae", + "697e7dff10344f2883c377a092645a21", + "dc21632cee14404fb785fe4d01ebc4ba", + "d04fc5687a6d42728e36c2f698739df9", + "3962af438c2345789d1ef27c2de54b7b", + "089e89e22a314a4b96d576eed56d29dc", + "6b8057ede4c544249500ea7a85ed0aca", + "456161f177ae4d83a27015ff1b03aba3", + "19b01f4701cf4ddda39d8fe44ef50859", + "acb6c9083d884baca2bfb66b86167d67" + ] + }, + "outputId": "ac72ccce-5aa2-4d94-8d03-e0af41cdd08b" + }, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "README.md: 0%| | 0.00/982 [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": 8, + "metadata": { + "id": "1ahE8Ys37JDJ", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 49, + "referenced_widgets": [ + "eae8887f2332426c8238bae4c1cd73a1", + "486251b70cce420589ad27ab14c47dcc", + "ded81d21ad544ea294ed89c0fe6a82b1", + "d904853f64224c09a109261d35c380d2", + "e05dfd2b79ed4d6ab48a71e73d4bf530", + "6249d50fc8e948f1a5621de01f71a186", + "1f9709a6ead2491ca760d3ef00a057fb", + "d9fb781f50c7445b9622923e26150e78", + "63fa705847904d43b93d2b5a3f7b798b", + "812970cf649647159678ffb30a5bf898", + "cebdd0e4ee2b4c8195c7d1a4c305e79b" + ] + }, + "outputId": "e5dbe42d-14ba-45e2-952d-fd87aa4bb551" + }, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "Map: 0%| | 0/100000 [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": 9, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 122 + }, + "id": "gGFzmplrEy9I", + "outputId": "4ff90a36-6e3c-4086-e178-ea6d87a2f791" + }, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "'user\\nWhat is the modulus operator in programming and how can I use it to calculate the modulus of two given numbers?\\nmodel\\nIn programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.\\n'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 9 + } + ], + "source": [ + "dataset[100][\"text\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "idAEIeSQ3xdS" + }, + "source": [ + "\n", + "### Train the model\n", + "Now let's use Huggingface TRL's `SFTTrainer`! More docs here: [TRL SFT docs](https://huggingface.co/docs/trl/sft_trainer). We do 60 steps to speed things up, but you can set `num_train_epochs=1` for a full run, and turn off `max_steps=None`." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 66, + "referenced_widgets": [ + "22cd66b0ba0a44aeafb6031d422105aa", + "be0dea815ff141a380af46c995e21e3d", + "68b0cfb889e1451691769455545fcc33", + "16c098858a9a469ab3235f78c4e0d412", + "1a4bfd6451114eb08a36186d9632a795", + "70c8fe0bb9df4d08925124ab6e1ff3de", + "65b7014a9ef14fd2b19048eb80b627e6", + "595b376fbf7f4471a3d91555a25baa37", + "9ea86535f09b4505ac321c0a75be87ba", + "cc96706dc78b4ef39bb7cc32b95799df", + "bc9dd3a3c6964dca8c392ba626ef0099" + ] + }, + "id": "95_Nn-89DhsL", + "outputId": "9c43fc09-7111-473b-cf5a-5ef52499aa1b" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Unsloth: Switching to float32 training since model cannot work with float16\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "Unsloth: Tokenizing [\"text\"] (num_proc=2): 0%| | 0/100000 [00:00user\\n\",\n", + " response_part = \"model\\n\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Dv1NBUozV78l" + }, + "source": [ + "Let's verify masking the instruction part is done! Let's print the 100th row again. Notice how the sample only has a single `` as expected!" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 122 + }, + "id": "LtsMVtlkUhja", + "outputId": "8e62426b-4b49-4a4b-eb05-93cebffd049b" + }, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "'user\\nWhat is the modulus operator in programming and how can I use it to calculate the modulus of two given numbers?\\nmodel\\nIn programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.\\n'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 12 + } + ], + "source": [ + "tokenizer.decode(trainer.train_dataset[100][\"input_ids\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "4Kyjy__m9KY3" + }, + "source": [ + "Now let's print the masked out example - you should see only the answer is present:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 122 + }, + "id": "_rD6fl8EUxnG", + "outputId": "3de009e1-ea7b-4c53-fefe-6ca2b6764c81" + }, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "' In programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.\\n'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 13 + } + ], + "source": [ + "tokenizer.decode([tokenizer.pad_token_id if x == -100 else x for x in trainer.train_dataset[100][\"labels\"]]).replace(tokenizer.pad_token, \" \")" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "cellView": "form", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "2ejIt2xSNKKp", + "outputId": "710edfa9-bc16-4d6e-bf44-2f3c91eb6d1e" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "GPU = Tesla T4. Max memory = 14.741 GB.\n", + "5.59 GB of memory reserved.\n" + ] + } + ], + "source": [ + "# @title Show current memory stats\n", + "gpu_stats = torch.cuda.get_device_properties(0)\n", + "start_gpu_memory = round(torch.cuda.max_memory_reserved() / 1024 / 1024 / 1024, 3)\n", + "max_memory = round(gpu_stats.total_memory / 1024 / 1024 / 1024, 3)\n", + "print(f\"GPU = {gpu_stats.name}. Max memory = {max_memory} GB.\")\n", + "print(f\"{start_gpu_memory} GB of memory reserved.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CNP1Uidk9mrz" + }, + "source": [ + "Let's train the model! To resume a training run, set `trainer.train(resume_from_checkpoint = True)`" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 368 + }, + "id": "yqxqAZ7KJ4oL", + "outputId": "a68bbefe-2fc2-4591-9016-3dfbb26a8088" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "==((====))== Unsloth - 2x faster free finetuning | Num GPUs used = 1\n", + " \\\\ /| Num examples = 100,000 | Num Epochs = 1 | Total steps = 30\n", + "O^O/ \\_/ \\ Batch size per device = 2 | Gradient accumulation steps = 4\n", + "\\ / Data Parallel GPUs = 1 | Total batch size (2 x 4 x 1) = 8\n", + " \"-____-\" Trainable parameters = 14,901,248/4,000,000,000 (0.37% trained)\n", + "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "\n", + "
\n", + " \n", + " \n", + " [30/30 08:54, 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", + " \n", + " \n", + " \n", + " \n", + "
StepTraining Loss
51.306200
100.871300
150.952600
200.929800
250.899800
300.941100

" + ] + }, + "metadata": {} + } + ], + "source": [ + "trainer_stats = trainer.train()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "pCqnaKmlO1U9", + "outputId": "5d5d33ee-7a84-4418-b038-bd15fb4614e4" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "76.5953 seconds used for training.\n", + "1.28 minutes used for training.\n", + "Peak reserved memory = 11.619 GB.\n", + "Peak reserved memory for training = 6.947 GB.\n", + "Peak reserved memory % of max memory = 14.674 %.\n", + "Peak reserved memory for training % of max memory = 8.774 %.\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_lora = round(used_memory - start_gpu_memory, 3)\n", + "used_percentage = round(used_memory / max_memory * 100, 3)\n", + "lora_percentage = round(used_memory_for_lora / 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_lora} GB.\")\n", + "print(f\"Peak reserved memory % of max memory = {used_percentage} %.\")\n", + "print(f\"Peak reserved memory for training % of max memory = {lora_percentage} %.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ekOmTR1hSNcr" + }, + "source": [ + "\n", + "### Inference\n", + "Let's run the model via Unsloth native inference! According to the `Gemma-3` team, the recommended settings for inference are `temperature = 1.0, top_p = 0.95, top_k = 64`" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "kR3gIAX-SM2q", + "outputId": "84033a7b-db31-405d-eb36-711af2e86b50" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "You have set `compile_config`, but we are unable to meet the criteria for compilation. Compilation will be skipped.\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['user\\nContinue the sequence: 1, 1, 2, 3, 5, 8,\\nmodel\\nThe sequence provided is the Fibonacci Sequence, which is defined by each number being the sum of the two previous.\\nFor example, 3 = 1 + 2 and 5 = 2 + 3. The first two numbers are 1 and 1.\\nIn this case, we are looking for']" + ] + }, + "metadata": {}, + "execution_count": 16 + } + ], + "source": [ + "from unsloth.chat_templates import get_chat_template\n", + "tokenizer = get_chat_template(\n", + " tokenizer,\n", + " chat_template = \"gemma-3\",\n", + ")\n", + "messages = [{\n", + " \"role\": \"user\",\n", + " \"content\": [{\n", + " \"type\" : \"text\",\n", + " \"text\" : \"Continue the sequence: 1, 1, 2, 3, 5, 8,\",\n", + " }]\n", + "}]\n", + "text = tokenizer.apply_chat_template(\n", + " messages,\n", + " add_generation_prompt = True, # Must add for generation\n", + ")\n", + "outputs = model.generate(\n", + " **tokenizer([text], return_tensors = \"pt\").to(\"cuda\"),\n", + " max_new_tokens = 64, # Increase for longer outputs!\n", + " # Recommended Gemma-3 settings!\n", + " temperature = 1.0, top_p = 0.95, top_k = 64,\n", + ")\n", + "tokenizer.batch_decode(outputs)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CrSvZObor0lY" + }, + "source": [ + " You can also use a `TextStreamer` for continuous inference - so you can see the generation token by token, instead of waiting the whole time!" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "e2pEuRb1r2Vg", + "outputId": "42f92b39-9d2e-40d9-dcca-5ad5d50cda6e" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "The sky is blue because of a phenomenon called Rayleigh scattering, which is the effect by which photons are scattered by particles in a medium. The higher the frequency of the photon, the more likely it is to be scattered (Scattering occurs when a photon hits an atom or molecule and bounces off).\n", + "\n", + "The atmosphere of the\n" + ] + } + ], + "source": [ + "messages = [{\n", + " \"role\": \"user\",\n", + " \"content\": [{\"type\" : \"text\", \"text\" : \"Why is the sky blue?\",}]\n", + "}]\n", + "text = tokenizer.apply_chat_template(\n", + " messages,\n", + " add_generation_prompt = True, # Must add for generation\n", + ")\n", + "\n", + "from transformers import TextStreamer\n", + "_ = model.generate(\n", + " **tokenizer([text], return_tensors = \"pt\").to(\"cuda\"),\n", + " max_new_tokens = 64, # Increase for longer outputs!\n", + " # Recommended Gemma-3 settings!\n", + " temperature = 1.0, top_p = 0.95, top_k = 64,\n", + " streamer = TextStreamer(tokenizer, skip_prompt = True),\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "uMuVrWbjAzhc" + }, + "source": [ + "\n", + "### Saving, loading finetuned models\n", + "To save the final model as LoRA adapters, either use Huggingface's `push_to_hub` for an online save or `save_pretrained` for a local save.\n", + "\n", + "**[NOTE]** This ONLY saves the LoRA adapters, and not the full model. To save to 16bit or GGUF, scroll down!" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "upcOlWe7A1vc", + "outputId": "4f28e6cb-1301-4764-c1ee-dbc594b41323" + }, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['gemma-3/processor_config.json']" + ] + }, + "metadata": {}, + "execution_count": 18 + } + ], + "source": [ + "model.save_pretrained(\"gemma-3\") # Local saving\n", + "tokenizer.save_pretrained(\"gemma-3\")\n", + "# model.push_to_hub(\"HF_ACCOUNT/gemma-3\", token = \"...\") # Online saving\n", + "# tokenizer.push_to_hub(\"HF_ACCOUNT/gemma-3\", token = \"...\") # Online saving" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "AEEcJ4qfC7Lp" + }, + "source": [ + "Now if you want to load the LoRA adapters we just saved for inference, set `False` to `True`:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "MKX_XKs_BNZR", + "outputId": "d016d936-4bd5-40f8-dffa-bcfad987f489" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gemma is a family of open-source language models created by the team at Google DeepMind. There are different sizes of Gemma models that can be downloaded from the Google Cloud Marketplace, and the open-source models can be used to generate text, translate languages, write different kinds of creative content, and answer your questions\n" + ] + } + ], + "source": [ + "if False:\n", + " from unsloth import FastModel\n", + " model, tokenizer = FastModel.from_pretrained(\n", + " model_name = \"lora_model\", # YOUR MODEL YOU USED FOR TRAINING\n", + " max_seq_length = 2048,\n", + " load_in_4bit = True,\n", + " )\n", + "\n", + "messages = [{\n", + " \"role\": \"user\",\n", + " \"content\": [{\"type\" : \"text\", \"text\" : \"What is Gemma-3?\",}]\n", + "}]\n", + "text = tokenizer.apply_chat_template(\n", + " messages,\n", + " add_generation_prompt = True, # Must add for generation\n", + ")\n", + "\n", + "from transformers import TextStreamer\n", + "_ = model.generate(\n", + " **tokenizer([text], return_tensors = \"pt\").to(\"cuda\"),\n", + " max_new_tokens = 64, # Increase for longer outputs!\n", + " # Recommended Gemma-3 settings!\n", + " temperature = 1.0, top_p = 0.95, top_k = 64,\n", + " streamer = TextStreamer(tokenizer, skip_prompt = True),\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "f422JgM9sdVT" + }, + "source": [ + "### Saving to float16 for VLLM\n", + "\n", + "We also support saving to `float16` directly for deployment! We save it in the folder `gemma-3-finetune`. Set `if False` to `if True` to let it run!" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "id": "iHjt_SMYsd3P", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 252, + "referenced_widgets": [ + "b85f7f7d75a64eaa82c9168315eeaa12", + "339a816b9f6d473ea9006828597e3b9f", + "7ef367cab0c54d7485244645787a8158", + "cc731c8351b84336a32ef79b8532e196", + "6150d9a88f9e4d89872a8018b1818175", + "1d691cb677f740908bb7f1f92c4b1cbb", + "40ea8f66d8ae44209977f84a2bf8260f", + "1fa23b65d10d4bf28cb8f39679a0ed10", + "2a6eef0d636a4ccd8b1e3df7ea8f73ce", + "d2b6586ecf2f49248941178f886b8747", + "b9ec89ab499a4483bfeef0c257815ac9", + "94ee261670d74fc586e92749195f840c", + "3f549e391ef04e87858d329713ca53fa", + "26a064257ab842ed88e4cf1a1284a72e", + "97e7187039e441ea94f6670f1fe7605d", + "3df0097f611f40858a604797a70e44f3", + "013b075b8e1d4e84932de8b7aa984b3a", + "59145eea0ee94e3b845cd212669cec58", + "6714ce7fbde04e10bc5e537703b7c744", + "eb2b167de1974ef19d4ffcaf1fe0dd65", + "4dc3d628f0f14ec2beea903375bca642", + "878f005901e24bc7b45361e41fc38cde", + "a45c64eacd084dfa9a822e86a5c003a4", + "c0c762d121f84ec7bb190a28418ae494", + "4588b16c54a649d1af49f6aef7673991", + "bf4b4ba94ba849cc8372e297b06b957a", + "ae11658399d742c2afec62941aec6b01", + "d4b7722ba8de4ed4a842dc6744508015", + "b2abfb50fbb84d9884a1faf9a98e286d", + "f5fdc873c5c54087a6cc2851cffc1e11", + "f9296c9f10234936b39902c00bb562e6", + "a8208321cb474d0e84ea5b2f085f8cfc", + "51f4df66b2c849468b6df712aaa21b61" + ] + }, + "outputId": "e97ee42d-a702-4e93-8652-73ea2da39148" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Found HuggingFace hub cache directory: /root/.cache/huggingface/hub\n", + "Checking cache directory for required files...\n", + "Cache check failed: model-00001-of-00002.safetensors not found in local cache.\n", + "Not all required files found in cache. Will proceed with downloading.\n", + "Downloading safetensors index for unsloth/gemma-3-4b-it...\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "model.safetensors.index.json: 0%| | 0.00/90.6k [00:00\n", + " \n", + " \n", + " \n", + "\n", + " Join Discord if you need help + ⭐️ Star us on Github ⭐️\n", + "\n" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [], + "machine_shape": "hm" + }, + "kernelspec": { + "display_name": "Python 3", + "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.0" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "d4357f34982d44b49c92d35b48b63a52": { + "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_1e37fe89cfad4a77a1077204b42238c0", + "IPY_MODEL_222338617d2d4249a92a440cafe85ef5", + "IPY_MODEL_cffb8c2c82ae4ac89223ec87cbf200a9" + ], + "layout": "IPY_MODEL_b02d8c71475b42148f8e32305d3d1ed4" + } + }, + "1e37fe89cfad4a77a1077204b42238c0": { + "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_3c7fcb9a462b47fe95f9633e72c7bc49", + "placeholder": "​", + "style": "IPY_MODEL_c693409aa2454122a9e045f49fcc1742", + "value": "model.safetensors: 100%" + } + }, + "222338617d2d4249a92a440cafe85ef5": { + "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_0300298391b24647b326e8fbc2471f06", + "max": 4562294331, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_0c9d49b5ed0d4f7aad2121d1b0373141", + "value": 4562294331 + } + }, + "cffb8c2c82ae4ac89223ec87cbf200a9": { + "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_67ae316732804b77803657115a159e23", + "placeholder": "​", + "style": "IPY_MODEL_5a25ef912d5f4ef3bf9f3dc754daa7ef", + "value": " 4.56G/4.56G [00:15<00:00, 480MB/s]" + } + }, + "b02d8c71475b42148f8e32305d3d1ed4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3c7fcb9a462b47fe95f9633e72c7bc49": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c693409aa2454122a9e045f49fcc1742": { + "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": "" + } + }, + "0300298391b24647b326e8fbc2471f06": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0c9d49b5ed0d4f7aad2121d1b0373141": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "67ae316732804b77803657115a159e23": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5a25ef912d5f4ef3bf9f3dc754daa7ef": { + "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": "" + } + }, + "c03e144d2c494e87ba6146ba80e725a7": { + "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_616d6f38053046aaaa12cb96becf64d6", + "IPY_MODEL_9adfec4bb7f3462887bb0a24ddc3fa69", + "IPY_MODEL_60fcd348eea04bf19f780202c2f13d6e" + ], + "layout": "IPY_MODEL_59b4dc1570af42d488763597d6a782e7" + } + }, + "616d6f38053046aaaa12cb96becf64d6": { + "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_306add97e53d4c0096c1ab99b92947b5", + "placeholder": "​", + "style": "IPY_MODEL_6b6696c6ac99472f95b8a8c034c9556f", + "value": "generation_config.json: 100%" + } + }, + "9adfec4bb7f3462887bb0a24ddc3fa69": { + "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_9d9590f4554b44238581f07d9d3e96c6", + "max": 210, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_25b4ab518467463caf45c9ef7e887212", + "value": 210 + } + }, + "60fcd348eea04bf19f780202c2f13d6e": { + "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_925cf4589b674e0a9c8902dd36c3c9cf", + "placeholder": "​", + "style": "IPY_MODEL_b76352afbe044bdd995ca1b1cab4e83a", + "value": " 210/210 [00:00<00:00, 27.9kB/s]" + } + }, + "59b4dc1570af42d488763597d6a782e7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "306add97e53d4c0096c1ab99b92947b5": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6b6696c6ac99472f95b8a8c034c9556f": { + "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": "" + } + }, + "9d9590f4554b44238581f07d9d3e96c6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "25b4ab518467463caf45c9ef7e887212": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "925cf4589b674e0a9c8902dd36c3c9cf": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b76352afbe044bdd995ca1b1cab4e83a": { + "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": "" + } + }, + "14b22c40642846f39da17cc00ef7fb88": { + "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_ef00f30da2dc4d1e8289afcf7c80b860", + "IPY_MODEL_6bdded4a3cae49e5907e1e8a9fd4e740", + "IPY_MODEL_9281201d6eb345ae9f962dcdf200a081" + ], + "layout": "IPY_MODEL_f1f1f1a1e0f74f54ade609402550c6a7" + } + }, + "ef00f30da2dc4d1e8289afcf7c80b860": { + "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_6c87361beb0f4cfda95b7d080d7f343e", + "placeholder": "​", + "style": "IPY_MODEL_08afa202d3094daeab96a49990aa9c8f", + "value": "processor_config.json: 100%" + } + }, + "6bdded4a3cae49e5907e1e8a9fd4e740": { + "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_6551142c2ae04475a07ec463c172ef94", + "max": 70, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_62b2d8f968cd44cc85689a9f007f2615", + "value": 70 + } + }, + "9281201d6eb345ae9f962dcdf200a081": { + "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_cce60bdf161342a38cc148321ad87d89", + "placeholder": "​", + "style": "IPY_MODEL_cd9432ae568e4d1ab95686e66f1aacfc", + "value": " 70.0/70.0 [00:00<00:00, 8.49kB/s]" + } + }, + "f1f1f1a1e0f74f54ade609402550c6a7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6c87361beb0f4cfda95b7d080d7f343e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "08afa202d3094daeab96a49990aa9c8f": { + "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": "" + } + }, + "6551142c2ae04475a07ec463c172ef94": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "62b2d8f968cd44cc85689a9f007f2615": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "cce60bdf161342a38cc148321ad87d89": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cd9432ae568e4d1ab95686e66f1aacfc": { + "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": "" + } + }, + "971e7cbf682240568771230b07de1851": { + "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_20cf3c6e82aa4507848e5df26252491a", + "IPY_MODEL_a4abbef450034782bdb7604452a23272", + "IPY_MODEL_a1f64e37020d42d1be67d3a28041f834" + ], + "layout": "IPY_MODEL_0eb03d301f5947f5a5d3faf8dee32772" + } + }, + "20cf3c6e82aa4507848e5df26252491a": { + "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_29655da1abc94c959f7f94ad4b6d7ceb", + "placeholder": "​", + "style": "IPY_MODEL_263adc24127a45069391edfd83c11a1c", + "value": "chat_template.json: 100%" + } + }, + "a4abbef450034782bdb7604452a23272": { + "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_a9f1a0430fff480daeca436391147329", + "max": 1615, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d8412a1915fc403a9f36da76588f9135", + "value": 1615 + } + }, + "a1f64e37020d42d1be67d3a28041f834": { + "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_a3b2f29f6c604c16b7efb3a71433e74e", + "placeholder": "​", + "style": "IPY_MODEL_a9260c2d28d040d89b8ac9559dea9cd6", + "value": " 1.61k/1.61k [00:00<00:00, 228kB/s]" + } + }, + "0eb03d301f5947f5a5d3faf8dee32772": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "29655da1abc94c959f7f94ad4b6d7ceb": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "263adc24127a45069391edfd83c11a1c": { + "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": "" + } + }, + "a9f1a0430fff480daeca436391147329": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d8412a1915fc403a9f36da76588f9135": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a3b2f29f6c604c16b7efb3a71433e74e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a9260c2d28d040d89b8ac9559dea9cd6": { + "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": "" + } + }, + "4300cfae504442f2a047b535a013c364": { + "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_c81bbf9321c14b0dbf43ffdf387d7dba", + "IPY_MODEL_005bd5aaffa3414b9f38c62716fa21f3", + "IPY_MODEL_377f281812074f2c88a28780b60d9090" + ], + "layout": "IPY_MODEL_d78d84e7f4174408a0bd59b71b027cd5" + } + }, + "c81bbf9321c14b0dbf43ffdf387d7dba": { + "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_d2dbe752c1994eb3badd431451253e99", + "placeholder": "​", + "style": "IPY_MODEL_7c22eb210647406e90b0fb94c6c2f05e", + "value": "chat_template.jinja: 100%" + } + }, + "005bd5aaffa3414b9f38c62716fa21f3": { + "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_745460a76a774dca88e31c59937758a6", + "max": 1532, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_0fb0b715f98644efbb171fc399d7f931", + "value": 1532 + } + }, + "377f281812074f2c88a28780b60d9090": { + "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_b3ffd445e8cb446eb3d73b811c2e44cc", + "placeholder": "​", + "style": "IPY_MODEL_8110b1c4057b44ad8b92dbfd18bd1664", + "value": " 1.53k/1.53k [00:00<00:00, 205kB/s]" + } + }, + "d78d84e7f4174408a0bd59b71b027cd5": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d2dbe752c1994eb3badd431451253e99": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7c22eb210647406e90b0fb94c6c2f05e": { + "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": "" + } + }, + "745460a76a774dca88e31c59937758a6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0fb0b715f98644efbb171fc399d7f931": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "b3ffd445e8cb446eb3d73b811c2e44cc": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8110b1c4057b44ad8b92dbfd18bd1664": { + "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": "" + } + }, + "35838d1c2ce349af9a0a72b8b3251240": { + "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_48c552d0240a4b1f8e0aa20120336bab", + "IPY_MODEL_dfcf0b8a6e874730aebad7500ee42962", + "IPY_MODEL_ea17eb4f3ace49e0a7c6cbed28889954" + ], + "layout": "IPY_MODEL_eb9efe55ac6d4a67b0aea9adea5e4667" + } + }, + "48c552d0240a4b1f8e0aa20120336bab": { + "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_a5ba3c2194da4fec956a1308a5696d83", + "placeholder": "​", + "style": "IPY_MODEL_abeb2ebb23b9466786f609cc2eb0310f", + "value": "preprocessor_config.json: 100%" + } + }, + "dfcf0b8a6e874730aebad7500ee42962": { + "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_872df6a1722b4415b76da470afcf249e", + "max": 570, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_658aa1de62184c6fa0a582b2867334ed", + "value": 570 + } + }, + "ea17eb4f3ace49e0a7c6cbed28889954": { + "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_c1a0b7b0bfe94e34b42f9fbb3eabb3d8", + "placeholder": "​", + "style": "IPY_MODEL_8734730bc2f44eaa818dcf1a60909e96", + "value": " 570/570 [00:00<00:00, 72.9kB/s]" + } + }, + "eb9efe55ac6d4a67b0aea9adea5e4667": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a5ba3c2194da4fec956a1308a5696d83": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "abeb2ebb23b9466786f609cc2eb0310f": { + "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": "" + } + }, + "872df6a1722b4415b76da470afcf249e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "658aa1de62184c6fa0a582b2867334ed": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c1a0b7b0bfe94e34b42f9fbb3eabb3d8": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8734730bc2f44eaa818dcf1a60909e96": { + "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": "" + } + }, + "dc11e9e86024408a9415bc3fb5a23f86": { + "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_f7610773092e451397fb9c90cdc572fe", + "IPY_MODEL_e943a9b9343f40eaaac24f220284e848", + "IPY_MODEL_0a72e21a56c94f0cbaff4c4d7027b696" + ], + "layout": "IPY_MODEL_61826fd6f7364eb1a63bf4185c71e70c" + } + }, + "f7610773092e451397fb9c90cdc572fe": { + "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_cf9a808f07544cef813777dfe8b45466", + "placeholder": "​", + "style": "IPY_MODEL_21c746d72bd74493aa786b578563c09b", + "value": "tokenizer_config.json: 100%" + } + }, + "e943a9b9343f40eaaac24f220284e848": { + "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_c73e32012e2f49aa9c68b8ecbaade794", + "max": 1158492, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4b35dc02722b4cecb442d427d9ca1e63", + "value": 1158492 + } + }, + "0a72e21a56c94f0cbaff4c4d7027b696": { + "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_86b9cc5844e94f399835643c49460189", + "placeholder": "​", + "style": "IPY_MODEL_9916b2d18aa74a3f9bcf794910510586", + "value": " 1.16M/1.16M [00:00<00:00, 5.01MB/s]" + } + }, + "61826fd6f7364eb1a63bf4185c71e70c": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cf9a808f07544cef813777dfe8b45466": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "21c746d72bd74493aa786b578563c09b": { + "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": "" + } + }, + "c73e32012e2f49aa9c68b8ecbaade794": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4b35dc02722b4cecb442d427d9ca1e63": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "86b9cc5844e94f399835643c49460189": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9916b2d18aa74a3f9bcf794910510586": { + "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": "" + } + }, + "d2d0037baa9a4900891882176b6d34a6": { + "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_cd35c22bbe9745329d9858b770fbb81e", + "IPY_MODEL_f11b24ea370040a09a453b971fca31c7", + "IPY_MODEL_267e82e16a1b471396e19b8456663eaa" + ], + "layout": "IPY_MODEL_ab8235ccadad4e19968ddbbaac0a16ff" + } + }, + "cd35c22bbe9745329d9858b770fbb81e": { + "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_afab8c071937454dbda89c0752314c60", + "placeholder": "​", + "style": "IPY_MODEL_aad16109af6b43f09e67617671759ebb", + "value": "tokenizer.model: 100%" + } + }, + "f11b24ea370040a09a453b971fca31c7": { + "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_a35dbc25393a41e7bbb579a5b890032b", + "max": 4689074, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e298ae95556544cea377256a5d6bad67", + "value": 4689074 + } + }, + "267e82e16a1b471396e19b8456663eaa": { + "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_0c7bb45a565b4d72b9e2708c4005495f", + "placeholder": "​", + "style": "IPY_MODEL_2580b74f38b74189b73c5c1adb124411", + "value": " 4.69M/4.69M [00:01<00:00, 3.89MB/s]" + } + }, + "ab8235ccadad4e19968ddbbaac0a16ff": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "afab8c071937454dbda89c0752314c60": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aad16109af6b43f09e67617671759ebb": { + "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": "" + } + }, + "a35dbc25393a41e7bbb579a5b890032b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e298ae95556544cea377256a5d6bad67": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "0c7bb45a565b4d72b9e2708c4005495f": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2580b74f38b74189b73c5c1adb124411": { + "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": "" + } + }, + "5508647fe53148158c264dbb73c3f32e": { + "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_fd2fcfd902654152a1ac84bee4f93270", + "IPY_MODEL_b9a75cf3a6f04ba3bc41271bbd0c6b62", + "IPY_MODEL_19a5a899060f4d8db55b11c4d7e7cd9d" + ], + "layout": "IPY_MODEL_06f7299115c14218b9896db0a01667ca" + } + }, + "fd2fcfd902654152a1ac84bee4f93270": { + "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_d7e2a97b96124f6ba29ef605ba14fd65", + "placeholder": "​", + "style": "IPY_MODEL_9d737dfb034743829a12dbd173dd52d0", + "value": "tokenizer.json: 100%" + } + }, + "b9a75cf3a6f04ba3bc41271bbd0c6b62": { + "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_49c266fb3f844e8f8fe6bd059b932cd5", + "max": 33384568, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f18f9276aea6436bb714332e4652a5a6", + "value": 33384568 + } + }, + "19a5a899060f4d8db55b11c4d7e7cd9d": { + "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_1a9a0308fa62444a95e014e5e4d5c3fc", + "placeholder": "​", + "style": "IPY_MODEL_ea901074586043129c6a3adbcb942fad", + "value": " 33.4M/33.4M [00:01<00:00, 28.0MB/s]" + } + }, + "06f7299115c14218b9896db0a01667ca": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d7e2a97b96124f6ba29ef605ba14fd65": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9d737dfb034743829a12dbd173dd52d0": { + "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": "" + } + }, + "49c266fb3f844e8f8fe6bd059b932cd5": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f18f9276aea6436bb714332e4652a5a6": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "1a9a0308fa62444a95e014e5e4d5c3fc": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ea901074586043129c6a3adbcb942fad": { + "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": "" + } + }, + "9f963624927e404b81d41e9030e4fd4a": { + "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_3fa30d51f5b24dc38f7997b00a419bde", + "IPY_MODEL_2f23e495371b429e8ca9c8f05924fe97", + "IPY_MODEL_f6ebb0c6780c42248e64733c442a40f5" + ], + "layout": "IPY_MODEL_d17c3102803c48e182aef09a4849468e" + } + }, + "3fa30d51f5b24dc38f7997b00a419bde": { + "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_abc60719f0774ccba72431145338ab31", + "placeholder": "​", + "style": "IPY_MODEL_b282f87f82db4a0c8b8ecec301144a14", + "value": "added_tokens.json: 100%" + } + }, + "2f23e495371b429e8ca9c8f05924fe97": { + "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_58bea53d5f0d4af6b6dc586ebf8808d6", + "max": 35, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_1ea9ff8b681f4182b77bf6827866e47c", + "value": 35 + } + }, + "f6ebb0c6780c42248e64733c442a40f5": { + "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_aa25e6337a51473aa30067cd214580a6", + "placeholder": "​", + "style": "IPY_MODEL_aaab621de1ae4d0e9c0db6bf15d5edf9", + "value": " 35.0/35.0 [00:00<00:00, 4.61kB/s]" + } + }, + "d17c3102803c48e182aef09a4849468e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "abc60719f0774ccba72431145338ab31": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b282f87f82db4a0c8b8ecec301144a14": { + "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": "" + } + }, + "58bea53d5f0d4af6b6dc586ebf8808d6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1ea9ff8b681f4182b77bf6827866e47c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "aa25e6337a51473aa30067cd214580a6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aaab621de1ae4d0e9c0db6bf15d5edf9": { + "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": "" + } + }, + "df2091cf02a841a1a5bb9f22802de104": { + "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_31b75cd349334aab89e55ef02186d30c", + "IPY_MODEL_05f0d644c2d24584a69f3bec4d0aa468", + "IPY_MODEL_a0f99a5907084714b12756d34d7d0cc4" + ], + "layout": "IPY_MODEL_9d493b3551d14cf3983a7db93a840b2c" + } + }, + "31b75cd349334aab89e55ef02186d30c": { + "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_06fb7ae0129f4b1bb33745533b464c1a", + "placeholder": "​", + "style": "IPY_MODEL_b1bc57ad3f8044f595e839067e5b15b0", + "value": "special_tokens_map.json: 100%" + } + }, + "05f0d644c2d24584a69f3bec4d0aa468": { + "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_f2a39e1dcb474a529576ac3930b0beb7", + "max": 670, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_8e26d862735b4e58896cdd4986df14bf", + "value": 670 + } + }, + "a0f99a5907084714b12756d34d7d0cc4": { + "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_c144b67f69404373b4f6899839742df3", + "placeholder": "​", + "style": "IPY_MODEL_aadf48eeeb98475d9aff2b37a76a3255", + "value": " 670/670 [00:00<00:00, 73.3kB/s]" + } + }, + "9d493b3551d14cf3983a7db93a840b2c": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "06fb7ae0129f4b1bb33745533b464c1a": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b1bc57ad3f8044f595e839067e5b15b0": { + "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": "" + } + }, + "f2a39e1dcb474a529576ac3930b0beb7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8e26d862735b4e58896cdd4986df14bf": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c144b67f69404373b4f6899839742df3": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aadf48eeeb98475d9aff2b37a76a3255": { + "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": "" + } + }, + "0c01b2a17cc14a859d65dab518e7a98f": { + "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_1b018ab085ad4f8d91b1943de944a07c", + "IPY_MODEL_6e9c3dc53a3e48cd80f81c5868a8c25b", + "IPY_MODEL_23d700e3d79f4cf2b9b7829e400fb36e" + ], + "layout": "IPY_MODEL_ca50038524fe403b935951b2103b7e37" + } + }, + "1b018ab085ad4f8d91b1943de944a07c": { + "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_4e64129ef7be4605a19a00f82611f501", + "placeholder": "​", + "style": "IPY_MODEL_200b532be3eb4cb5b72d357d58446d56", + "value": "README.md: 100%" + } + }, + "6e9c3dc53a3e48cd80f81c5868a8c25b": { + "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_74c3f8874b2d4bf08e212bcb4a2f4d30", + "max": 982, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e1b83736a1464936a845f4a4bb8c9c87", + "value": 982 + } + }, + "23d700e3d79f4cf2b9b7829e400fb36e": { + "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_cf0aeee0b2a84161a16a80cb1dcff948", + "placeholder": "​", + "style": "IPY_MODEL_8762c99ed7b940f2b9de85a1d77dc7bf", + "value": " 982/982 [00:00<00:00, 121kB/s]" + } + }, + "ca50038524fe403b935951b2103b7e37": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4e64129ef7be4605a19a00f82611f501": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "200b532be3eb4cb5b72d357d58446d56": { + "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": "" + } + }, + "74c3f8874b2d4bf08e212bcb4a2f4d30": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e1b83736a1464936a845f4a4bb8c9c87": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "cf0aeee0b2a84161a16a80cb1dcff948": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8762c99ed7b940f2b9de85a1d77dc7bf": { + "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": "" + } + }, + "ba8e6fb4120a40e7bf3f01be180ad698": { + "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_e139dcb62648439197af2f75281d49e2", + "IPY_MODEL_e391fcb714e246aa9a3213c50e5006af", + "IPY_MODEL_5e1448a080184bce85ac3a6d75c0798c" + ], + "layout": "IPY_MODEL_bbaafcdbf60b40cd828024917ff67fc2" + } + }, + "e139dcb62648439197af2f75281d49e2": { + "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_c29d400791d34064914ff2b831d5844c", + "placeholder": "​", + "style": "IPY_MODEL_eede6c18332f4b77a30ce14676e52307", + "value": "data/train-00000-of-00001.parquet: 100%" + } + }, + "e391fcb714e246aa9a3213c50e5006af": { + "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_34af403270d94792bca566c43bf402f0", + "max": 116531415, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_012595756eef4c918cfe3f580dba2c37", + "value": 116531415 + } + }, + "5e1448a080184bce85ac3a6d75c0798c": { + "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_f34cb28303bc4089bb276b9b41a3b92b", + "placeholder": "​", + "style": "IPY_MODEL_da7e57d90cd84b59b817e26b4a7287fa", + "value": " 117M/117M [00:02<00:00, 71.8MB/s]" + } + }, + "bbaafcdbf60b40cd828024917ff67fc2": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c29d400791d34064914ff2b831d5844c": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "eede6c18332f4b77a30ce14676e52307": { + "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": "" + } + }, + "34af403270d94792bca566c43bf402f0": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "012595756eef4c918cfe3f580dba2c37": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f34cb28303bc4089bb276b9b41a3b92b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "da7e57d90cd84b59b817e26b4a7287fa": { + "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": "" + } + }, + "48bc63a3954d4f928da7b41dc9a59221": { + "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_09cb3384bd73421a80099a07603c34ae", + "IPY_MODEL_697e7dff10344f2883c377a092645a21", + "IPY_MODEL_dc21632cee14404fb785fe4d01ebc4ba" + ], + "layout": "IPY_MODEL_d04fc5687a6d42728e36c2f698739df9" + } + }, + "09cb3384bd73421a80099a07603c34ae": { + "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_3962af438c2345789d1ef27c2de54b7b", + "placeholder": "​", + "style": "IPY_MODEL_089e89e22a314a4b96d576eed56d29dc", + "value": "Generating train split: 100%" + } + }, + "697e7dff10344f2883c377a092645a21": { + "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_6b8057ede4c544249500ea7a85ed0aca", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_456161f177ae4d83a27015ff1b03aba3", + "value": 100000 + } + }, + "dc21632cee14404fb785fe4d01ebc4ba": { + "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_19b01f4701cf4ddda39d8fe44ef50859", + "placeholder": "​", + "style": "IPY_MODEL_acb6c9083d884baca2bfb66b86167d67", + "value": " 100000/100000 [00:00<00:00, 141008.13 examples/s]" + } + }, + "d04fc5687a6d42728e36c2f698739df9": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3962af438c2345789d1ef27c2de54b7b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "089e89e22a314a4b96d576eed56d29dc": { + "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": "" + } + }, + "6b8057ede4c544249500ea7a85ed0aca": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "456161f177ae4d83a27015ff1b03aba3": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "19b01f4701cf4ddda39d8fe44ef50859": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "acb6c9083d884baca2bfb66b86167d67": { + "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": "" + } + }, + "3dfef9f859144f0f97657ac9e4b978fb": { + "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_6e5521052c534f31b246dd03d693f853", + "IPY_MODEL_09ef7c3eca124b79b2e9540d5f6d9eb5", + "IPY_MODEL_3bb21972b94848feb23264e70701b46d" + ], + "layout": "IPY_MODEL_d93c1e8632c44dc68fc4ce911c05bcca" + } + }, + "6e5521052c534f31b246dd03d693f853": { + "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_9197aae2ec3e4a378608d3b65ee81610", + "placeholder": "​", + "style": "IPY_MODEL_da994a41920c44a5b7228dac17ef30ae", + "value": "Unsloth: Standardizing formats (num_proc=8): 100%" + } + }, + "09ef7c3eca124b79b2e9540d5f6d9eb5": { + "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_efd4f46596eb49768a2d5650eacd04f1", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e27e20b0bf7445708620ac5d52dda0f1", + "value": 100000 + } + }, + "3bb21972b94848feb23264e70701b46d": { + "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_92eba4a0fd0e403385015f0dad410ee4", + "placeholder": "​", + "style": "IPY_MODEL_34d6ea7ba4d04a70b61b68e39d95b32a", + "value": " 100000/100000 [00:01<00:00, 116370.10 examples/s]" + } + }, + "d93c1e8632c44dc68fc4ce911c05bcca": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9197aae2ec3e4a378608d3b65ee81610": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "da994a41920c44a5b7228dac17ef30ae": { + "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": "" + } + }, + "efd4f46596eb49768a2d5650eacd04f1": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e27e20b0bf7445708620ac5d52dda0f1": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "92eba4a0fd0e403385015f0dad410ee4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "34d6ea7ba4d04a70b61b68e39d95b32a": { + "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": "" + } + }, + "eae8887f2332426c8238bae4c1cd73a1": { + "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_486251b70cce420589ad27ab14c47dcc", + "IPY_MODEL_ded81d21ad544ea294ed89c0fe6a82b1", + "IPY_MODEL_d904853f64224c09a109261d35c380d2" + ], + "layout": "IPY_MODEL_e05dfd2b79ed4d6ab48a71e73d4bf530" + } + }, + "486251b70cce420589ad27ab14c47dcc": { + "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_6249d50fc8e948f1a5621de01f71a186", + "placeholder": "​", + "style": "IPY_MODEL_1f9709a6ead2491ca760d3ef00a057fb", + "value": "Map: 100%" + } + }, + "ded81d21ad544ea294ed89c0fe6a82b1": { + "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_d9fb781f50c7445b9622923e26150e78", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_63fa705847904d43b93d2b5a3f7b798b", + "value": 100000 + } + }, + "d904853f64224c09a109261d35c380d2": { + "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_812970cf649647159678ffb30a5bf898", + "placeholder": "​", + "style": "IPY_MODEL_cebdd0e4ee2b4c8195c7d1a4c305e79b", + "value": " 100000/100000 [00:11<00:00, 8547.34 examples/s]" + } + }, + "e05dfd2b79ed4d6ab48a71e73d4bf530": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6249d50fc8e948f1a5621de01f71a186": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1f9709a6ead2491ca760d3ef00a057fb": { + "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": "" + } + }, + "d9fb781f50c7445b9622923e26150e78": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "63fa705847904d43b93d2b5a3f7b798b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "812970cf649647159678ffb30a5bf898": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cebdd0e4ee2b4c8195c7d1a4c305e79b": { + "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": "" + } + }, + "22cd66b0ba0a44aeafb6031d422105aa": { + "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_be0dea815ff141a380af46c995e21e3d", + "IPY_MODEL_68b0cfb889e1451691769455545fcc33", + "IPY_MODEL_16c098858a9a469ab3235f78c4e0d412" + ], + "layout": "IPY_MODEL_1a4bfd6451114eb08a36186d9632a795" + } + }, + "be0dea815ff141a380af46c995e21e3d": { + "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_70c8fe0bb9df4d08925124ab6e1ff3de", + "placeholder": "​", + "style": "IPY_MODEL_65b7014a9ef14fd2b19048eb80b627e6", + "value": "Unsloth: Tokenizing ["text"] (num_proc=2): 100%" + } + }, + "68b0cfb889e1451691769455545fcc33": { + "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_595b376fbf7f4471a3d91555a25baa37", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_9ea86535f09b4505ac321c0a75be87ba", + "value": 100000 + } + }, + "16c098858a9a469ab3235f78c4e0d412": { + "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_cc96706dc78b4ef39bb7cc32b95799df", + "placeholder": "​", + "style": "IPY_MODEL_bc9dd3a3c6964dca8c392ba626ef0099", + "value": " 100000/100000 [01:28<00:00, 794.85 examples/s]" + } + }, + "1a4bfd6451114eb08a36186d9632a795": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "70c8fe0bb9df4d08925124ab6e1ff3de": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "65b7014a9ef14fd2b19048eb80b627e6": { + "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": "" + } + }, + "595b376fbf7f4471a3d91555a25baa37": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9ea86535f09b4505ac321c0a75be87ba": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "cc96706dc78b4ef39bb7cc32b95799df": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bc9dd3a3c6964dca8c392ba626ef0099": { + "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": "" + } + }, + "b9bf4c2156574bfca823b1113a77463b": { + "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_abd55d5d76e54e24825e9a552bc5a8d6", + "IPY_MODEL_6c7d6e81de9e4ede8e9ea356fd2eb373", + "IPY_MODEL_f55b25973e134c2cbf70e14923e92f14" + ], + "layout": "IPY_MODEL_ef8ca365a30a45c28d5c6919a1b57752" + } + }, + "abd55d5d76e54e24825e9a552bc5a8d6": { + "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_306e1bdd4bcd42fba8ecc49a06b973b7", + "placeholder": "​", + "style": "IPY_MODEL_4ec168cd178a4c1aa543982f293e9c37", + "value": "Map (num_proc=8): 100%" + } + }, + "6c7d6e81de9e4ede8e9ea356fd2eb373": { + "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_471427b714714c6fa35379c5e1d0dd45", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b17d64b4ee9a4f7a8862381547934170", + "value": 100000 + } + }, + "f55b25973e134c2cbf70e14923e92f14": { + "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_bfd76a73918541aeaea902d0ffe31296", + "placeholder": "​", + "style": "IPY_MODEL_cceaf871c7d5456a96d072b9cf039033", + "value": " 100000/100000 [00:11<00:00, 5555.35 examples/s]" + } + }, + "ef8ca365a30a45c28d5c6919a1b57752": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "306e1bdd4bcd42fba8ecc49a06b973b7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4ec168cd178a4c1aa543982f293e9c37": { + "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": "" + } + }, + "471427b714714c6fa35379c5e1d0dd45": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b17d64b4ee9a4f7a8862381547934170": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "bfd76a73918541aeaea902d0ffe31296": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cceaf871c7d5456a96d072b9cf039033": { + "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": "" + } + }, + "b85f7f7d75a64eaa82c9168315eeaa12": { + "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_339a816b9f6d473ea9006828597e3b9f", + "IPY_MODEL_7ef367cab0c54d7485244645787a8158", + "IPY_MODEL_cc731c8351b84336a32ef79b8532e196" + ], + "layout": "IPY_MODEL_6150d9a88f9e4d89872a8018b1818175" + } + }, + "339a816b9f6d473ea9006828597e3b9f": { + "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_1d691cb677f740908bb7f1f92c4b1cbb", + "placeholder": "​", + "style": "IPY_MODEL_40ea8f66d8ae44209977f84a2bf8260f", + "value": "model.safetensors.index.json: 100%" + } + }, + "7ef367cab0c54d7485244645787a8158": { + "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_1fa23b65d10d4bf28cb8f39679a0ed10", + "max": 90558, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2a6eef0d636a4ccd8b1e3df7ea8f73ce", + "value": 90558 + } + }, + "cc731c8351b84336a32ef79b8532e196": { + "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_d2b6586ecf2f49248941178f886b8747", + "placeholder": "​", + "style": "IPY_MODEL_b9ec89ab499a4483bfeef0c257815ac9", + "value": " 90.6k/90.6k [00:00<00:00, 9.88MB/s]" + } + }, + "6150d9a88f9e4d89872a8018b1818175": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1d691cb677f740908bb7f1f92c4b1cbb": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "40ea8f66d8ae44209977f84a2bf8260f": { + "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": "" + } + }, + "1fa23b65d10d4bf28cb8f39679a0ed10": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2a6eef0d636a4ccd8b1e3df7ea8f73ce": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "d2b6586ecf2f49248941178f886b8747": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b9ec89ab499a4483bfeef0c257815ac9": { + "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": "" + } + }, + "94ee261670d74fc586e92749195f840c": { + "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_3f549e391ef04e87858d329713ca53fa", + "IPY_MODEL_26a064257ab842ed88e4cf1a1284a72e", + "IPY_MODEL_97e7187039e441ea94f6670f1fe7605d" + ], + "layout": "IPY_MODEL_3df0097f611f40858a604797a70e44f3" + } + }, + "3f549e391ef04e87858d329713ca53fa": { + "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_013b075b8e1d4e84932de8b7aa984b3a", + "placeholder": "​", + "style": "IPY_MODEL_59145eea0ee94e3b845cd212669cec58", + "value": "model-00001-of-00002.safetensors: 100%" + } + }, + "26a064257ab842ed88e4cf1a1284a72e": { + "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_6714ce7fbde04e10bc5e537703b7c744", + "max": 4961251752, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_eb2b167de1974ef19d4ffcaf1fe0dd65", + "value": 4961251752 + } + }, + "97e7187039e441ea94f6670f1fe7605d": { + "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_4dc3d628f0f14ec2beea903375bca642", + "placeholder": "​", + "style": "IPY_MODEL_878f005901e24bc7b45361e41fc38cde", + "value": " 4.96G/4.96G [00:15<00:00, 425MB/s]" + } + }, + "3df0097f611f40858a604797a70e44f3": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "013b075b8e1d4e84932de8b7aa984b3a": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "59145eea0ee94e3b845cd212669cec58": { + "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": "" + } + }, + "6714ce7fbde04e10bc5e537703b7c744": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "eb2b167de1974ef19d4ffcaf1fe0dd65": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "4dc3d628f0f14ec2beea903375bca642": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "878f005901e24bc7b45361e41fc38cde": { + "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": "" + } + }, + "a45c64eacd084dfa9a822e86a5c003a4": { + "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_c0c762d121f84ec7bb190a28418ae494", + "IPY_MODEL_4588b16c54a649d1af49f6aef7673991", + "IPY_MODEL_bf4b4ba94ba849cc8372e297b06b957a" + ], + "layout": "IPY_MODEL_ae11658399d742c2afec62941aec6b01" + } + }, + "c0c762d121f84ec7bb190a28418ae494": { + "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_d4b7722ba8de4ed4a842dc6744508015", + "placeholder": "​", + "style": "IPY_MODEL_b2abfb50fbb84d9884a1faf9a98e286d", + "value": "model-00002-of-00002.safetensors: 100%" + } + }, + "4588b16c54a649d1af49f6aef7673991": { + "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_f5fdc873c5c54087a6cc2851cffc1e11", + "max": 3639026128, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f9296c9f10234936b39902c00bb562e6", + "value": 3639026128 + } + }, + "bf4b4ba94ba849cc8372e297b06b957a": { + "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_a8208321cb474d0e84ea5b2f085f8cfc", + "placeholder": "​", + "style": "IPY_MODEL_51f4df66b2c849468b6df712aaa21b61", + "value": " 3.64G/3.64G [00:11<00:00, 421MB/s]" + } + }, + "ae11658399d742c2afec62941aec6b01": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d4b7722ba8de4ed4a842dc6744508015": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b2abfb50fbb84d9884a1faf9a98e286d": { + "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": "" + } + }, + "f5fdc873c5c54087a6cc2851cffc1e11": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f9296c9f10234936b39902c00bb562e6": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a8208321cb474d0e84ea5b2f085f8cfc": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "51f4df66b2c849468b6df712aaa21b61": { + "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": "" + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/tests/gemma3_fix_tests/Gemma3_4B_h100.ipynb b/tests/gemma3_fix_tests/Gemma3_4B_h100.ipynb new file mode 100644 index 0000000000..0f3d0d4bda --- /dev/null +++ b/tests/gemma3_fix_tests/Gemma3_4B_h100.ipynb @@ -0,0 +1,5292 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "Ya4hWtsWgt6m" + }, + "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 on your own computer, follow the installation instructions on our Github page [here](https://docs.unsloth.ai/get-started/installing-+-updating).\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": "BOuS2Goegt6o" + }, + "source": [ + "### News" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "tfzMngqfgt6p" + }, + "source": [ + "Unsloth now supports Text-to-Speech (TTS) models. Read our [guide here](https://docs.unsloth.ai/basics/text-to-speech-tts-fine-tuning).\n", + "\n", + "Read our **[Qwen3 Guide](https://docs.unsloth.ai/basics/qwen3-how-to-run-and-fine-tune)** and check out our new **[Dynamic 2.0](https://docs.unsloth.ai/basics/unsloth-dynamic-2.0-ggufs)** quants which outperforms other quantization methods!\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": "jdo0bz0Rgt6p" + }, + "source": [ + "### Installation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "89WLvodBgt6p" + }, + "outputs": [], + "source": [ + "%%capture\n", + "import os\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", + " !pip install --no-deps bitsandbytes accelerate xformers==0.0.29.post3 peft trl triton cut_cross_entropy unsloth_zoo\n", + " !pip install sentencepiece protobuf \"datasets>=3.4.1\" huggingface_hub hf_transfer\n", + " !pip install --no-deps unsloth" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TGMWlrRdzwgf" + }, + "source": [ + "### Unsloth\n", + "\n", + "`FastModel` supports loading nearly any model now! This includes Vision and Text models!" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 533, + "referenced_widgets": [ + "33815b4c0485402e838127b32ad14a15", + "81c3ee8d97d543ae83db3d2748ecd7cd", + "70f9bccb201a4ea79c1827057cd746f6", + "b32538030b8649e7851bfd58bef2786c", + "0abe1a2b12e54bb5a07db1a8f3a77738", + "e12bca7d49b149b5b1124c28a669db98", + "fab7a02d350946ae9563a05cfd04e22b", + "9be36a19ba86494389904b9fffdc2e48", + "899bf9a4dc594e178d0b95e3cbe08018", + "2fa2784330b2439ab884ce0966037961", + "51649c42cf2145f1b1e90c3436805350", + "eae020595f574192ad9d132853bbf6ec", + "17eaf723882e4efea38119978166fc75", + "409488926d2242c5a8e7b3d5b79c59db", + "26b61507603d453c8c24af24d301bdb9", + "c6c51a350a0b420aab957e3570098e18", + "cebd4fbf1fcf4ab2b65ecf539eda5a1e", + "f14ea72beac74152af5f970e634769ca", + "039f461e15214bd697501219bd9cbbd9", + "9f9d2f43fb5e47df883feb3126fe52e9", + "9e20d704e64a4aaabe5e495c468d9670", + "ae4e4537ed1d4df4b1677700d190a2d2", + "50881898da2f4b35a288ac9befe5024e", + "599375adc5f841d1864166e4d1bd617a", + "3bfc7d7dd81f49a59fc8ad0d6fff858b", + "a0c0025c82394e7fbc6d4cc9a9e9f72f", + "5f0a37b9edc74cbd822e2e71c6c8a956", + "a15e4524521b42108f49dda23ed56023", + "a4eaae1b30d442208257c1870d549738", + "84c68f2059f247628b672b1079130e9b", + "a88fccae11664baa82418c88639f3521", + "1ecb60e1d5934ea19a0d2c29aa01158d", + "f920f6cb263c45d59b851b7c6b631cb5", + "a37b4e454c6743a895f159f963366bc8", + "18fce8679d7d4961b88bb2162e7aa9eb", + "fd60bb21ba2e474cb4a6020bd302835e", + "0c3e3fbf02d84114906e939fcca108b5", + "ab71391446d8482c834429a937f7bb96", + "f9439c3c9b3b4c4a84ed67aa0601a530", + "a89575b4c58348ac98566c22ab7e4118", + "697a187a07204fdfb8556cf5c5028c6b", + "afdb7dfdc17548b39daea1f39d54b45c", + "c4a69698321d435c94211a9dee913c45", + "36c8135711194884be0e03cb5d3ae7e5", + "69a9d565de6a4d54b8f3989fa8b11941", + "090b146b8c6f4fa1ab0261d2a61be9de", + "d2df1617a4094dd295c49a0a72b269c3", + "54d963afc22a46ae93a6ca4bfaa18cf8", + "0b1768a5b5be4a4d9e14ed9e168044b4", + "708d05af00a64d19bb11dc839a5e68db", + "3d20e28d74e549c0a43686b214eebd87", + "dfac71c6372c46bfad46308bdb04480b", + "df50d8daa49a4955914704edb89baf61", + "52f091f99f0442f8bd14a50b7c870c1e", + "c859133fca324effb73ebc3520e746b6", + "f89c08592a25432497bb312f58a13c5c", + "c307400fb17e49ea9d835822e6e22633", + "57ed5097e05f4d92a5c492826f989123", + "db7e622bbd0f4357b5687a7c09c1f6fd", + "8864799f440c440c8ff8c0696e64215d", + "353fa47fb98c4070a150edec64503eaa", + "40bf6f1ffbc5479082fdd7ab153ea974", + "b5a06422fcac41eb97d2de95f14b1806", + "efa41d07d0fa4adda8025fe9490ed850", + "457c60d6a15d4314ba25d370be956a60", + "bc6f29c9a1e14ce8be374867b8be86ac", + "e003ee5cf1804ce3928b544b3fa7ba77", + "dd6e4f9b4c6d4260a62b920a6812fd07", + "4466f20e614a4cdabe1704859c2f1034", + "8949c35d68a043c5b1384774bb07b2ea", + "fca09f95775047efa9d481173f1ba261", + "879c6a0498e54e5c87145c7f7d32de7e", + "740d351b7de241a6acabf6c2853585b6", + "be2b1fb954444be089045a378673a958", + "9520485cc7c24c8584c3838717655012", + "94d9900bc8934de688e95e15c9d0c9bb", + "b469cdf580404f498feb062e4dbad10b", + "5975cf24b18e4082bd80e3f177e0ec15", + "b5b8482ef7c44e12a83795e7337521c2", + "ea9045a5c4504a5e96e6a7b13767fe4e", + "0cba80b626574c11a44c6ce09b5d6e80", + "f344c1ab154b4abdb84b2c221b6162a1", + "0881c055108340f7ab4b840ac1545cbb", + "77907c3444174858bbdc548dee8d0d37", + "a92be3fb752148d887e20afe300f9371", + "aa36bff36ae5448b892afea071fc1f1d", + "12d3049cca4a46c08cf5cdfcd5225248", + "6a9baf0a739c4790baf99b0ccadd6873", + "86c6d49a55b3477bbccc275dcb55fb52", + "77c5f8b431ba4c08b8f4d9d8f9fafc16", + "19c3ef35452d406cb18b72e38b631ee7", + "063db74d47814f95b560bd3bab11b55f", + "5c01ab4767104c0c96c42858317f8877", + "73a283e64f324c27b38216e683050b92", + "81bddfaa180d4875b5cdb5cc4ae45dab", + "77e843913b6e439ead9cf42725eedf3d", + "4f7e8b6b71484cce80ae9cdf0c481825", + "3530e2b431c041c6aeeaca4808ba0424", + "cc14e51320f34274ae12aa28b04183b7", + "f373f2c24f3b413aaa9fe1ccfb9c1eab", + "360142dac8c54a5eb902078ec42abb65", + "a4a64136f6fc48c799abf1701725534e", + "4c5e29de7224428bb87de46854ea915a", + "a3ce4f38be9a456c81146fba440c8e3f", + "70fdd31291b04dd68d66cf31c03d23ff", + "6feaf338d39440e78221649ac84af4a6", + "c9fbf40fa3dd4ba1b363802dc88764da", + "ae7f1fd06ddc4881934690675891855c", + "5e9ba3247edc4fafa7687338424ddccb", + "97d7e3420e24436cb351b1e9679ff8b6" + ] + }, + "id": "-Xbb0cuLzwgf", + "outputId": "3396a9bf-5d9b-45e7-a13e-ac57a78dd441" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.\n", + "Forward Router Patched and working\n", + "forward 1 working and being replaced\n", + "Unsloth: Patched Gemma3ForConditionalGeneration llm forward\n", + "🦥 Unsloth Zoo will now patch everything to make training faster!\n", + "INFO 06-19 09:41:59 [__init__.py:244] Automatically detected platform cuda.\n", + "==((====))== Unsloth 2025.6.2: Fast Gemma3 patching. Transformers: 4.52.4. vLLM: 0.9.1.\n", + " \\\\ /| NVIDIA H100 80GB HBM3. Num GPUs = 1. Max memory: 79.179 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.7.0+cu126. CUDA: 9.0. CUDA Toolkit: 12.6. Triton: 3.3.0\n", + "\\ / Bfloat16 = TRUE. FA [Xformers = None. FA2 = True]\n", + " \"-____-\" Free license: http://github.com/unslothai/unsloth\n", + "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`.\n" + ] + } + ], + "source": [ + "from unsloth import FastModel\n", + "import torch\n", + "\n", + "fourbit_models = [\n", + " # 4bit dynamic quants for superior accuracy and low memory use\n", + " \"unsloth/gemma-3-1b-it-unsloth-bnb-4bit\",\n", + " \"unsloth/gemma-3-4b-it-unsloth-bnb-4bit\",\n", + " \"unsloth/gemma-3-12b-it-unsloth-bnb-4bit\",\n", + " \"unsloth/gemma-3-27b-it-unsloth-bnb-4bit\",\n", + "\n", + " # Other popular models!\n", + " \"unsloth/Llama-3.1-8B\",\n", + " \"unsloth/Llama-3.2-3B\",\n", + " \"unsloth/Llama-3.3-70B\",\n", + " \"unsloth/mistral-7b-instruct-v0.3\",\n", + " \"unsloth/Phi-4\",\n", + "] # More models at https://huggingface.co/unsloth\n", + "\n", + "model, tokenizer = FastModel.from_pretrained(\n", + " model_name = \"unsloth/gemma-3-4b-it\",\n", + " max_seq_length = 2048, # Choose any for long context!\n", + " load_in_4bit = True, # 4 bit quantization to reduce memory\n", + " load_in_8bit = False, # [NEW!] A bit more accurate, uses 2x memory\n", + " full_finetuning = False, # [NEW!] We have full finetuning now!\n", + " # token = \"hf_...\", # use one if using gated models\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "SXd9bTZd1aaL" + }, + "source": [ + "We now add LoRA adapters so we only need to update a small amount of parameters!" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "id": "6bZsfBuZDeCL", + "outputId": "af5ba973-a3ce-4b2c-b66f-c5c7bc2cdb8e" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Unsloth: Making `model.base_model.model.model.language_model` require gradients\n" + ] + } + ], + "source": [ + "model = FastModel.get_peft_model(\n", + " model,\n", + " finetune_vision_layers = False, # Turn off for just text!\n", + " finetune_language_layers = True, # Should leave on!\n", + " finetune_attention_modules = True, # Attention good for GRPO\n", + " finetune_mlp_modules = True, # SHould leave on always!\n", + "\n", + " r = 8, # Larger = higher accuracy, but might overfit\n", + " lora_alpha = 8, # Recommended alpha == r at least\n", + " lora_dropout = 0,\n", + " bias = \"none\",\n", + " random_state = 3407,\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": 3, + "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": 4, + "metadata": { + "id": "Mkq4RvEq7FQr" + }, + "outputs": [], + "source": [ + "from datasets import load_dataset\n", + "dataset = load_dataset(\"mlabonne/FineTome-100k\", split = \"train\")" + ] + }, + { + "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": 5, + "metadata": { + "id": "reoBXmAn7HlN" + }, + "outputs": [], + "source": [ + "from unsloth.chat_templates import standardize_data_formats\n", + "dataset = standardize_data_formats(dataset)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "6i5Sx9In7vHi" + }, + "source": [ + "Let's see how row 100 looks like!" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "dzE1OEXi7s3P", + "outputId": "233eab5d-45b8-4ac2-e64d-20e0b6a13a0e" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'conversations': [{'content': 'What is the modulus operator in programming and how can I use it to calculate the modulus of two given numbers?',\n", + " 'role': 'user'},\n", + " {'content': 'In programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.',\n", + " 'role': 'assistant'}],\n", + " 'source': 'infini-instruct-top-500k',\n", + " 'score': 4.774171352386475}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dataset[100]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "8Xs0LXio7rfd" + }, + "source": [ + "We now have to apply the chat template for `Gemma-3` onto the conversations, and save it to `text`. We remove the `` 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": 7, + "metadata": { + "id": "1ahE8Ys37JDJ" + }, + "outputs": [], + "source": [ + "def formatting_prompts_func(examples):\n", + " convos = examples[\"conversations\"]\n", + " texts = [tokenizer.apply_chat_template(convo, tokenize = False, add_generation_prompt = False).removeprefix('') 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": 8, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 175 + }, + "id": "gGFzmplrEy9I", + "outputId": "7acc565b-0759-4438-cd0c-fa68d0570863" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'user\\nWhat is the modulus operator in programming and how can I use it to calculate the modulus of two given numbers?\\nmodel\\nIn programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.\\n'" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dataset[100][\"text\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "idAEIeSQ3xdS" + }, + "source": [ + "\n", + "### Train the model\n", + "Now let's use Huggingface TRL's `SFTTrainer`! More docs here: [TRL SFT docs](https://huggingface.co/docs/trl/sft_trainer). We do 60 steps to speed things up, but you can set `num_train_epochs=1` for a full run, and turn off `max_steps=None`." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 112, + "referenced_widgets": [ + "730aa679b5ac483b929a3646bb5947fa", + "1f333859babd4c1abac69cacda6df864", + "e7f8d2c781a64e83988b0bdd090bdb97", + "3e3feb4fcca74c87abb608c0543236b1", + "2970cbc657d244bab22715bcb788be6a", + "c5b1d1476ddc45249e037df07a96ae37", + "19c27988e01d47e79319f89b5cfd73e2", + "5e48531593d741eaa3669f9118ba8afc", + "62838ffab83d486f86e86417caf0b498", + "7e5378838c114195ba3919fdd683fd7d", + "3350d22f463643ef9a726227f262ac49", + "a8559112c61949318ef9e4ab4cadfeda" + ] + }, + "id": "95_Nn-89DhsL", + "outputId": "2ffe3c70-8c46-41a1-ef51-07c220b5935d" + }, + "outputs": [], + "source": [ + "from trl import SFTTrainer, SFTConfig\n", + "from unsloth import is_bfloat16_supported\n", + "\n", + "trainer = SFTTrainer(\n", + " model=model,\n", + " tokenizer=tokenizer,\n", + " train_dataset=dataset, \n", + " max_seq_length=2048,\n", + " packing=False,\n", + " args=SFTConfig(\n", + " dataset_text_field=\"text\",\n", + " per_device_train_batch_size=2,\n", + " gradient_accumulation_steps=4,\n", + " gradient_checkpointing=True,\n", + " gradient_checkpointing_kwargs={\"use_reentrant\":False},\n", + " warmup_ratio=0.03,\n", + " max_steps=30,\n", + " learning_rate=3e-4,\n", + " fp16=not is_bfloat16_supported(),\n", + " bf16=is_bfloat16_supported(),\n", + " logging_steps=5,\n", + " #optim=\"adamw_8bit\",\n", + " optim=\"adamw_8bit\",\n", + " lr_scheduler_type=\"linear\",\n", + " seed=3407,\n", + " output_dir=\"outputs\",\n", + " report_to=\"none\",\n", + " max_grad_norm=0.3,\n", + " dataset_num_proc=2,\n", + " ),\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "C_sGp5XlG6dq" + }, + "source": [ + "We also use Unsloth's `train_on_completions` method to only train on the assistant outputs and ignore the loss on the user's inputs. This helps increase accuracy of finetunes!" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 49, + "referenced_widgets": [ + "30918e50f2174d1c8e7af3eef332b6ee", + "f4b34bc9a62f405383c3b81dc87792b9", + "1be74564b60c48d6b21615adf29009fb", + "148125f955954041a8f5631f9338c43e", + "91693f16da7b421885fe8474cf533327", + "28de62814a6847e0a0b41ec6bf8fdc66", + "c43cef665c9542f982986a74dc50ca98", + "ded71beadafd438ebff07bb0594771e4", + "677e4d7a08ab408e9430d67a2870f707", + "54d2fb7e7c2b4107ba758a7c7ef4f382", + "34da5010faa749e0940c2821f2f46e59", + "d94e1d86e3274277a9d908a7498ef1fa" + ] + }, + "id": "juQiExuBG5Bt", + "outputId": "6f017a0d-2ccc-429e-8a27-ab76c6c23b57" + }, + "outputs": [], + "source": [ + "from unsloth.chat_templates import train_on_responses_only\n", + "trainer = train_on_responses_only(\n", + " trainer,\n", + " instruction_part = \"user\\n\",\n", + " response_part = \"model\\n\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Dv1NBUozV78l" + }, + "source": [ + "Let's verify masking the instruction part is done! Let's print the 100th row again. Notice how the sample only has a single `` as expected!" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 175 + }, + "id": "LtsMVtlkUhja", + "outputId": "aebb55c2-3883-4494-e9f8-78d60b9b08e8" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'user\\nWhat is the modulus operator in programming and how can I use it to calculate the modulus of two given numbers?\\nmodel\\nIn programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.\\n'" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tokenizer.decode(trainer.train_dataset[100][\"input_ids\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "4Kyjy__m9KY3" + }, + "source": [ + "Now let's print the masked out example - you should see only the answer is present:" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 175 + }, + "id": "_rD6fl8EUxnG", + "outputId": "e9012c2a-60eb-437e-f145-3e11e9a0dd34" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "' In programming, the modulus operator is represented by the \\'%\\' symbol. It calculates the remainder when one number is divided by another. To calculate the modulus of two given numbers, you can use the modulus operator in the following way:\\n\\n```python\\n# Calculate the modulus\\nModulus = a % b\\n\\nprint(\"Modulus of the given numbers is: \", Modulus)\\n```\\n\\nIn this code snippet, the variables \\'a\\' and \\'b\\' represent the two given numbers for which you want to calculate the modulus. By using the modulus operator \\'%\\', we calculate the remainder when \\'a\\' is divided by \\'b\\'. The result is then stored in the variable \\'Modulus\\'. Finally, the modulus value is printed using the \\'print\\' statement.\\n\\nFor example, if \\'a\\' is 10 and \\'b\\' is 4, the modulus calculation would be 10 % 4, which equals 2. Therefore, the output of the above code would be:\\n\\n```\\nModulus of the given numbers is: 2\\n```\\n\\nThis means that the modulus of 10 and 4 is 2.\\n'" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tokenizer.decode([tokenizer.pad_token_id if x == -100 else x for x in trainer.train_dataset[100][\"labels\"]]).replace(tokenizer.pad_token, \" \")" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "cellView": "form", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "2ejIt2xSNKKp", + "outputId": "ba6de9bc-35f1-48ed-8552-5cf1943d0478" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "GPU = NVIDIA H100 80GB HBM3. Max memory = 79.179 GB.\n", + "4.672 GB of memory reserved.\n" + ] + } + ], + "source": [ + "# @title Show current memory stats\n", + "gpu_stats = torch.cuda.get_device_properties(0)\n", + "start_gpu_memory = round(torch.cuda.max_memory_reserved() / 1024 / 1024 / 1024, 3)\n", + "max_memory = round(gpu_stats.total_memory / 1024 / 1024 / 1024, 3)\n", + "print(f\"GPU = {gpu_stats.name}. Max memory = {max_memory} GB.\")\n", + "print(f\"{start_gpu_memory} GB of memory reserved.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CNP1Uidk9mrz" + }, + "source": [ + "Let's train the model! To resume a training run, set `trainer.train(resume_from_checkpoint = True)`" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "yqxqAZ7KJ4oL", + "outputId": "b44425bc-2ccf-4683-ce72-a837e5a07e9e" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "==((====))== Unsloth - 2x faster free finetuning | Num GPUs used = 1\n", + " \\\\ /| Num examples = 100,000 | Num Epochs = 1 | Total steps = 30\n", + "O^O/ \\_/ \\ Batch size per device = 2 | Gradient accumulation steps = 4\n", + "\\ / Data Parallel GPUs = 1 | Total batch size (2 x 4 x 1) = 8\n", + " \"-____-\" Trainable parameters = 14,901,248/4,000,000,000 (0.37% trained)\n", + "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " \n", + " [30/30 01:08, 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", + " \n", + " \n", + " \n", + " \n", + "
StepTraining Loss
51.338200
100.867400
150.894900
200.846400
250.837000
300.886700

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "trainer_stats = trainer.train()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "cellView": "form", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "pCqnaKmlO1U9", + "outputId": "5d5d33ee-7a84-4418-b038-bd15fb4614e4" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "76.5953 seconds used for training.\n", + "1.28 minutes used for training.\n", + "Peak reserved memory = 11.619 GB.\n", + "Peak reserved memory for training = 6.947 GB.\n", + "Peak reserved memory % of max memory = 14.674 %.\n", + "Peak reserved memory for training % of max memory = 8.774 %.\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_lora = round(used_memory - start_gpu_memory, 3)\n", + "used_percentage = round(used_memory / max_memory * 100, 3)\n", + "lora_percentage = round(used_memory_for_lora / 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_lora} GB.\")\n", + "print(f\"Peak reserved memory % of max memory = {used_percentage} %.\")\n", + "print(f\"Peak reserved memory for training % of max memory = {lora_percentage} %.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ekOmTR1hSNcr" + }, + "source": [ + "\n", + "### Inference\n", + "Let's run the model via Unsloth native inference! According to the `Gemma-3` team, the recommended settings for inference are `temperature = 1.0, top_p = 0.95, top_k = 64`" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "kR3gIAX-SM2q", + "outputId": "407daa07-ae31-4771-8c31-779665e53bd8" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "You have set `compile_config`, but we are unable to meet the criteria for compilation. Compilation will be skipped.\n" + ] + }, + { + "data": { + "text/plain": [ + "['user\\nContinue the sequence: 1, 1, 2, 3, 5, 8,\\nmodel\\nThe next term in the sequence is 13, and the next is 21, following the pattern of the Fibonacci sequence.']" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from unsloth.chat_templates import get_chat_template\n", + "tokenizer = get_chat_template(\n", + " tokenizer,\n", + " chat_template = \"gemma-3\",\n", + ")\n", + "messages = [{\n", + " \"role\": \"user\",\n", + " \"content\": [{\n", + " \"type\" : \"text\",\n", + " \"text\" : \"Continue the sequence: 1, 1, 2, 3, 5, 8,\",\n", + " }]\n", + "}]\n", + "text = tokenizer.apply_chat_template(\n", + " messages,\n", + " add_generation_prompt = True, # Must add for generation\n", + ")\n", + "outputs = model.generate(\n", + " **tokenizer([text], return_tensors = \"pt\").to(\"cuda\"),\n", + " max_new_tokens = 64, # Increase for longer outputs!\n", + " # Recommended Gemma-3 settings!\n", + " temperature = 1.0, top_p = 0.95, top_k = 64,\n", + ")\n", + "tokenizer.batch_decode(outputs)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CrSvZObor0lY" + }, + "source": [ + " You can also use a `TextStreamer` for continuous inference - so you can see the generation token by token, instead of waiting the whole time!" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "e2pEuRb1r2Vg", + "outputId": "de757d2d-a66b-4be6-c9c9-78cf491dfeba" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sky appears blue due to a phenomenon called Rayleigh scattering. Here's how it works:\n", + "\n", + "1. Sunlight, or white light, is made up of all the colors of the rainbow.\n", + "\n", + "2. As sunlight travels through the Earth's atmosphere, it collides with tiny air molecules, such as nitrogen and\n" + ] + } + ], + "source": [ + "messages = [{\n", + " \"role\": \"user\",\n", + " \"content\": [{\"type\" : \"text\", \"text\" : \"Why is the sky blue?\",}]\n", + "}]\n", + "text = tokenizer.apply_chat_template(\n", + " messages,\n", + " add_generation_prompt = True, # Must add for generation\n", + ")\n", + "\n", + "from transformers import TextStreamer\n", + "_ = model.generate(\n", + " **tokenizer([text], return_tensors = \"pt\").to(\"cuda\"),\n", + " max_new_tokens = 64, # Increase for longer outputs!\n", + " # Recommended Gemma-3 settings!\n", + " temperature = 1.0, top_p = 0.95, top_k = 64,\n", + " streamer = TextStreamer(tokenizer, skip_prompt = True),\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "uMuVrWbjAzhc" + }, + "source": [ + "\n", + "### Saving, loading finetuned models\n", + "To save the final model as LoRA adapters, either use Huggingface's `push_to_hub` for an online save or `save_pretrained` for a local save.\n", + "\n", + "**[NOTE]** This ONLY saves the LoRA adapters, and not the full model. To save to 16bit or GGUF, scroll down!" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "upcOlWe7A1vc", + "outputId": "a99a1086-5a2d-4828-d599-7e3634a069cd" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "['gemma-3/processor_config.json']" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.save_pretrained(\"gemma-3\") # Local saving\n", + "tokenizer.save_pretrained(\"gemma-3\")\n", + "# model.push_to_hub(\"HF_ACCOUNT/gemma-3\", token = \"...\") # Online saving\n", + "# tokenizer.push_to_hub(\"HF_ACCOUNT/gemma-3\", token = \"...\") # Online saving" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "AEEcJ4qfC7Lp" + }, + "source": [ + "Now if you want to load the LoRA adapters we just saved for inference, set `False` to `True`:" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "MKX_XKs_BNZR", + "outputId": "d016d936-4bd5-40f8-dffa-bcfad987f489" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gemma is a family of open-source language models created by the team at Google DeepMind. There are different sizes of Gemma models that can be downloaded from the Google Cloud Marketplace, and the open-source models can be used to generate text, translate languages, write different kinds of creative content, and answer your questions\n" + ] + } + ], + "source": [ + "if False:\n", + " from unsloth import FastModel\n", + " model, tokenizer = FastModel.from_pretrained(\n", + " model_name = \"lora_model\", # YOUR MODEL YOU USED FOR TRAINING\n", + " max_seq_length = 2048,\n", + " load_in_4bit = True,\n", + " )\n", + "\n", + "messages = [{\n", + " \"role\": \"user\",\n", + " \"content\": [{\"type\" : \"text\", \"text\" : \"What is Gemma-3?\",}]\n", + "}]\n", + "text = tokenizer.apply_chat_template(\n", + " messages,\n", + " add_generation_prompt = True, # Must add for generation\n", + ")\n", + "\n", + "from transformers import TextStreamer\n", + "_ = model.generate(\n", + " **tokenizer([text], return_tensors = \"pt\").to(\"cuda\"),\n", + " max_new_tokens = 64, # Increase for longer outputs!\n", + " # Recommended Gemma-3 settings!\n", + " temperature = 1.0, top_p = 0.95, top_k = 64,\n", + " streamer = TextStreamer(tokenizer, skip_prompt = True),\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "f422JgM9sdVT" + }, + "source": [ + "### Saving to float16 for VLLM\n", + "\n", + "We also support saving to `float16` directly for deployment! We save it in the folder `gemma-3-finetune`. Set `if False` to `if True` to let it run!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "iHjt_SMYsd3P" + }, + "outputs": [], + "source": [ + "if False: # Change to True to save finetune!\n", + " model.save_pretrained_merged(\"gemma-3-finetune\", tokenizer)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "z6O48DbNIAr0" + }, + "source": [ + "If you want to upload / push to your Hugging Face account, set `if False` to `if True` and add your Hugging Face token and upload location!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ZV-CiKPrIFG0" + }, + "outputs": [], + "source": [ + "if False: # Change to True to upload finetune\n", + " model.push_to_hub_merged(\n", + " \"HF_ACCOUNT/gemma-3-finetune\", tokenizer,\n", + " token = \"hf_...\"\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TCv4vXHd61i7" + }, + "source": [ + "### GGUF / llama.cpp Conversion\n", + "To save to `GGUF` / `llama.cpp`, we support it natively now for all models! For now, you can convert easily to `Q8_0, F16 or BF16` precision. `Q4_K_M` for 4bit will come later!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "FqfebeAdT073" + }, + "outputs": [], + "source": [ + "if False: # Change to True to save to GGUF\n", + " model.save_pretrained_gguf(\n", + " \"gemma-3-finetune\",\n", + " quantization_type = \"Q8_0\", # For now only Q8_0, BF16, F16 supported\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Q974YEVPI7JS" + }, + "source": [ + "Likewise, if you want to instead push to GGUF to your Hugging Face account, set `if False` to `if True` and add your Hugging Face token and upload location!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ZgcJIhJ0I_es" + }, + "outputs": [], + "source": [ + "if False: # Change to True to upload GGUF\n", + " model.push_to_hub_gguf(\n", + " \"gemma-3-finetune\",\n", + " quantization_type = \"Q8_0\", # Only Q8_0, BF16, F16 supported\n", + " repo_id = \"HF_ACCOUNT/gemma-finetune-gguf\",\n", + " token = \"hf_...\",\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "IXhcqGKAgt7E" + }, + "source": [ + "Now, use the `gemma-3-finetune.gguf` file or `gemma-3-finetune-Q4_K_M.gguf` file in llama.cpp or a UI based system like Jan or Open WebUI. You can install Jan [here](https://github.com/janhq/jan) and Open WebUI [here](https://github.com/open-webui/open-webui)\n", + "\n", + "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" + ] + } + ], + "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.0" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "039f461e15214bd697501219bd9cbbd9": { + "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 + } + }, + "063db74d47814f95b560bd3bab11b55f": { + "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_3530e2b431c041c6aeeaca4808ba0424", + "placeholder": "​", + "style": "IPY_MODEL_cc14e51320f34274ae12aa28b04183b7", + "value": " 35.0/35.0 [00:00<00:00, 2.05kB/s]" + } + }, + "0881c055108340f7ab4b840ac1545cbb": { + "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 + } + }, + "090b146b8c6f4fa1ab0261d2a61be9de": { + "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_708d05af00a64d19bb11dc839a5e68db", + "placeholder": "​", + "style": "IPY_MODEL_3d20e28d74e549c0a43686b214eebd87", + "value": "preprocessor_config.json: 100%" + } + }, + "0abe1a2b12e54bb5a07db1a8f3a77738": { + "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 + } + }, + "0b1768a5b5be4a4d9e14ed9e168044b4": { + "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 + } + }, + "0c3e3fbf02d84114906e939fcca108b5": { + "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_c4a69698321d435c94211a9dee913c45", + "placeholder": "​", + "style": "IPY_MODEL_36c8135711194884be0e03cb5d3ae7e5", + "value": " 1.61k/1.61k [00:00<00:00, 181kB/s]" + } + }, + "0cba80b626574c11a44c6ce09b5d6e80": { + "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_12d3049cca4a46c08cf5cdfcd5225248", + "placeholder": "​", + "style": "IPY_MODEL_6a9baf0a739c4790baf99b0ccadd6873", + "value": " 33.4M/33.4M [00:00<00:00, 70.2MB/s]" + } + }, + "12d3049cca4a46c08cf5cdfcd5225248": { + "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 + } + }, + "148125f955954041a8f5631f9338c43e": { + "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_54d2fb7e7c2b4107ba758a7c7ef4f382", + "placeholder": "​", + "style": "IPY_MODEL_34da5010faa749e0940c2821f2f46e59", + "value": " 100000/100000 [00:43<00:00, 2627.58 examples/s]" + } + }, + "17eaf723882e4efea38119978166fc75": { + "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_cebd4fbf1fcf4ab2b65ecf539eda5a1e", + "placeholder": "​", + "style": "IPY_MODEL_f14ea72beac74152af5f970e634769ca", + "value": "generation_config.json: 100%" + } + }, + "18fce8679d7d4961b88bb2162e7aa9eb": { + "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_f9439c3c9b3b4c4a84ed67aa0601a530", + "placeholder": "​", + "style": "IPY_MODEL_a89575b4c58348ac98566c22ab7e4118", + "value": "chat_template.json: 100%" + } + }, + "19c27988e01d47e79319f89b5cfd73e2": { + "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": "" + } + }, + "19c3ef35452d406cb18b72e38b631ee7": { + "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_77e843913b6e439ead9cf42725eedf3d", + "max": 35, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4f7e8b6b71484cce80ae9cdf0c481825", + "value": 35 + } + }, + "1be74564b60c48d6b21615adf29009fb": { + "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_ded71beadafd438ebff07bb0594771e4", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_677e4d7a08ab408e9430d67a2870f707", + "value": 100000 + } + }, + "1ecb60e1d5934ea19a0d2c29aa01158d": { + "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 + } + }, + "1f333859babd4c1abac69cacda6df864": { + "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_c5b1d1476ddc45249e037df07a96ae37", + "placeholder": "​", + "style": "IPY_MODEL_19c27988e01d47e79319f89b5cfd73e2", + "value": "Unsloth: Tokenizing ["text"] (num_proc=2): 100%" + } + }, + "26b61507603d453c8c24af24d301bdb9": { + "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_9e20d704e64a4aaabe5e495c468d9670", + "placeholder": "​", + "style": "IPY_MODEL_ae4e4537ed1d4df4b1677700d190a2d2", + "value": " 192/192 [00:00<00:00, 20.1kB/s]" + } + }, + "28de62814a6847e0a0b41ec6bf8fdc66": { + "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 + } + }, + "2970cbc657d244bab22715bcb788be6a": { + "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 + } + }, + "2fa2784330b2439ab884ce0966037961": { + "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 + } + }, + "30918e50f2174d1c8e7af3eef332b6ee": { + "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_f4b34bc9a62f405383c3b81dc87792b9", + "IPY_MODEL_1be74564b60c48d6b21615adf29009fb", + "IPY_MODEL_148125f955954041a8f5631f9338c43e" + ], + "layout": "IPY_MODEL_91693f16da7b421885fe8474cf533327" + } + }, + "3350d22f463643ef9a726227f262ac49": { + "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": "" + } + }, + "33815b4c0485402e838127b32ad14a15": { + "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_81c3ee8d97d543ae83db3d2748ecd7cd", + "IPY_MODEL_70f9bccb201a4ea79c1827057cd746f6", + "IPY_MODEL_b32538030b8649e7851bfd58bef2786c" + ], + "layout": "IPY_MODEL_0abe1a2b12e54bb5a07db1a8f3a77738" + } + }, + "34da5010faa749e0940c2821f2f46e59": { + "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": "" + } + }, + "3530e2b431c041c6aeeaca4808ba0424": { + "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 + } + }, + "353fa47fb98c4070a150edec64503eaa": { + "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 + } + }, + "360142dac8c54a5eb902078ec42abb65": { + "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_70fdd31291b04dd68d66cf31c03d23ff", + "placeholder": "​", + "style": "IPY_MODEL_6feaf338d39440e78221649ac84af4a6", + "value": "special_tokens_map.json: 100%" + } + }, + "36c8135711194884be0e03cb5d3ae7e5": { + "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": "" + } + }, + "3bfc7d7dd81f49a59fc8ad0d6fff858b": { + "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_84c68f2059f247628b672b1079130e9b", + "max": 70, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a88fccae11664baa82418c88639f3521", + "value": 70 + } + }, + "3d20e28d74e549c0a43686b214eebd87": { + "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": "" + } + }, + "3e3feb4fcca74c87abb608c0543236b1": { + "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_7e5378838c114195ba3919fdd683fd7d", + "placeholder": "​", + "style": "IPY_MODEL_3350d22f463643ef9a726227f262ac49", + "value": " 100000/100000 [03:03<00:00, 568.03 examples/s]" + } + }, + "409488926d2242c5a8e7b3d5b79c59db": { + "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_039f461e15214bd697501219bd9cbbd9", + "max": 192, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_9f9d2f43fb5e47df883feb3126fe52e9", + "value": 192 + } + }, + "40bf6f1ffbc5479082fdd7ab153ea974": { + "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": "" + } + }, + "4466f20e614a4cdabe1704859c2f1034": { + "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_be2b1fb954444be089045a378673a958", + "max": 4689074, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_9520485cc7c24c8584c3838717655012", + "value": 4689074 + } + }, + "457c60d6a15d4314ba25d370be956a60": { + "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 + } + }, + "4c5e29de7224428bb87de46854ea915a": { + "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_5e9ba3247edc4fafa7687338424ddccb", + "placeholder": "​", + "style": "IPY_MODEL_97d7e3420e24436cb351b1e9679ff8b6", + "value": " 670/670 [00:00<00:00, 42.7kB/s]" + } + }, + "4f7e8b6b71484cce80ae9cdf0c481825": { + "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": "" + } + }, + "50881898da2f4b35a288ac9befe5024e": { + "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_599375adc5f841d1864166e4d1bd617a", + "IPY_MODEL_3bfc7d7dd81f49a59fc8ad0d6fff858b", + "IPY_MODEL_a0c0025c82394e7fbc6d4cc9a9e9f72f" + ], + "layout": "IPY_MODEL_5f0a37b9edc74cbd822e2e71c6c8a956" + } + }, + "51649c42cf2145f1b1e90c3436805350": { + "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": "" + } + }, + "52f091f99f0442f8bd14a50b7c870c1e": { + "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 + } + }, + "54d2fb7e7c2b4107ba758a7c7ef4f382": { + "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 + } + }, + "54d963afc22a46ae93a6ca4bfaa18cf8": { + "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_52f091f99f0442f8bd14a50b7c870c1e", + "placeholder": "​", + "style": "IPY_MODEL_c859133fca324effb73ebc3520e746b6", + "value": " 570/570 [00:00<00:00, 61.1kB/s]" + } + }, + "57ed5097e05f4d92a5c492826f989123": { + "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_b5a06422fcac41eb97d2de95f14b1806", + "max": 1157008, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_efa41d07d0fa4adda8025fe9490ed850", + "value": 1157008 + } + }, + "5975cf24b18e4082bd80e3f177e0ec15": { + "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_b5b8482ef7c44e12a83795e7337521c2", + "IPY_MODEL_ea9045a5c4504a5e96e6a7b13767fe4e", + "IPY_MODEL_0cba80b626574c11a44c6ce09b5d6e80" + ], + "layout": "IPY_MODEL_f344c1ab154b4abdb84b2c221b6162a1" + } + }, + "599375adc5f841d1864166e4d1bd617a": { + "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_a15e4524521b42108f49dda23ed56023", + "placeholder": "​", + "style": "IPY_MODEL_a4eaae1b30d442208257c1870d549738", + "value": "processor_config.json: 100%" + } + }, + "5c01ab4767104c0c96c42858317f8877": { + "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 + } + }, + "5e48531593d741eaa3669f9118ba8afc": { + "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 + } + }, + "5e9ba3247edc4fafa7687338424ddccb": { + "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 + } + }, + "5f0a37b9edc74cbd822e2e71c6c8a956": { + "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 + } + }, + "62838ffab83d486f86e86417caf0b498": { + "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": "" + } + }, + "677e4d7a08ab408e9430d67a2870f707": { + "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": "" + } + }, + "697a187a07204fdfb8556cf5c5028c6b": { + "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 + } + }, + "69a9d565de6a4d54b8f3989fa8b11941": { + "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_090b146b8c6f4fa1ab0261d2a61be9de", + "IPY_MODEL_d2df1617a4094dd295c49a0a72b269c3", + "IPY_MODEL_54d963afc22a46ae93a6ca4bfaa18cf8" + ], + "layout": "IPY_MODEL_0b1768a5b5be4a4d9e14ed9e168044b4" + } + }, + "6a9baf0a739c4790baf99b0ccadd6873": { + "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": "" + } + }, + "6feaf338d39440e78221649ac84af4a6": { + "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": "" + } + }, + "708d05af00a64d19bb11dc839a5e68db": { + "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 + } + }, + "70f9bccb201a4ea79c1827057cd746f6": { + "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": "danger", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9be36a19ba86494389904b9fffdc2e48", + "max": 4437712931, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_899bf9a4dc594e178d0b95e3cbe08018", + "value": 4437712508 + } + }, + "70fdd31291b04dd68d66cf31c03d23ff": { + "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 + } + }, + "730aa679b5ac483b929a3646bb5947fa": { + "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_1f333859babd4c1abac69cacda6df864", + "IPY_MODEL_e7f8d2c781a64e83988b0bdd090bdb97", + "IPY_MODEL_3e3feb4fcca74c87abb608c0543236b1" + ], + "layout": "IPY_MODEL_2970cbc657d244bab22715bcb788be6a" + } + }, + "73a283e64f324c27b38216e683050b92": { + "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 + } + }, + "740d351b7de241a6acabf6c2853585b6": { + "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": "" + } + }, + "77907c3444174858bbdc548dee8d0d37": { + "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": "" + } + }, + "77c5f8b431ba4c08b8f4d9d8f9fafc16": { + "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_73a283e64f324c27b38216e683050b92", + "placeholder": "​", + "style": "IPY_MODEL_81bddfaa180d4875b5cdb5cc4ae45dab", + "value": "added_tokens.json: 100%" + } + }, + "77e843913b6e439ead9cf42725eedf3d": { + "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 + } + }, + "7e5378838c114195ba3919fdd683fd7d": { + "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 + } + }, + "81bddfaa180d4875b5cdb5cc4ae45dab": { + "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": "" + } + }, + "81c3ee8d97d543ae83db3d2748ecd7cd": { + "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_e12bca7d49b149b5b1124c28a669db98", + "placeholder": "​", + "style": "IPY_MODEL_fab7a02d350946ae9563a05cfd04e22b", + "value": "model.safetensors: 100%" + } + }, + "84c68f2059f247628b672b1079130e9b": { + "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 + } + }, + "86c6d49a55b3477bbccc275dcb55fb52": { + "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_77c5f8b431ba4c08b8f4d9d8f9fafc16", + "IPY_MODEL_19c3ef35452d406cb18b72e38b631ee7", + "IPY_MODEL_063db74d47814f95b560bd3bab11b55f" + ], + "layout": "IPY_MODEL_5c01ab4767104c0c96c42858317f8877" + } + }, + "879c6a0498e54e5c87145c7f7d32de7e": { + "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 + } + }, + "8864799f440c440c8ff8c0696e64215d": { + "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 + } + }, + "8949c35d68a043c5b1384774bb07b2ea": { + "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_94d9900bc8934de688e95e15c9d0c9bb", + "placeholder": "​", + "style": "IPY_MODEL_b469cdf580404f498feb062e4dbad10b", + "value": " 4.69M/4.69M [00:00<00:00, 22.1MB/s]" + } + }, + "899bf9a4dc594e178d0b95e3cbe08018": { + "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": "" + } + }, + "91693f16da7b421885fe8474cf533327": { + "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 + } + }, + "94d9900bc8934de688e95e15c9d0c9bb": { + "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 + } + }, + "9520485cc7c24c8584c3838717655012": { + "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": "" + } + }, + "97d7e3420e24436cb351b1e9679ff8b6": { + "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": "" + } + }, + "9be36a19ba86494389904b9fffdc2e48": { + "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 + } + }, + "9e20d704e64a4aaabe5e495c468d9670": { + "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 + } + }, + "9f9d2f43fb5e47df883feb3126fe52e9": { + "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": "" + } + }, + "a0c0025c82394e7fbc6d4cc9a9e9f72f": { + "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_1ecb60e1d5934ea19a0d2c29aa01158d", + "placeholder": "​", + "style": "IPY_MODEL_f920f6cb263c45d59b851b7c6b631cb5", + "value": " 70.0/70.0 [00:00<00:00, 8.21kB/s]" + } + }, + "a15e4524521b42108f49dda23ed56023": { + "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 + } + }, + "a37b4e454c6743a895f159f963366bc8": { + "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_18fce8679d7d4961b88bb2162e7aa9eb", + "IPY_MODEL_fd60bb21ba2e474cb4a6020bd302835e", + "IPY_MODEL_0c3e3fbf02d84114906e939fcca108b5" + ], + "layout": "IPY_MODEL_ab71391446d8482c834429a937f7bb96" + } + }, + "a3ce4f38be9a456c81146fba440c8e3f": { + "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 + } + }, + "a4a64136f6fc48c799abf1701725534e": { + "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_c9fbf40fa3dd4ba1b363802dc88764da", + "max": 670, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ae7f1fd06ddc4881934690675891855c", + "value": 670 + } + }, + "a4eaae1b30d442208257c1870d549738": { + "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": "" + } + }, + "a88fccae11664baa82418c88639f3521": { + "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": "" + } + }, + "a89575b4c58348ac98566c22ab7e4118": { + "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": "" + } + }, + "a92be3fb752148d887e20afe300f9371": { + "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 + } + }, + "aa36bff36ae5448b892afea071fc1f1d": { + "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": "" + } + }, + "ab71391446d8482c834429a937f7bb96": { + "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 + } + }, + "ae4e4537ed1d4df4b1677700d190a2d2": { + "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": "" + } + }, + "ae7f1fd06ddc4881934690675891855c": { + "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": "" + } + }, + "afdb7dfdc17548b39daea1f39d54b45c": { + "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": "" + } + }, + "b32538030b8649e7851bfd58bef2786c": { + "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_2fa2784330b2439ab884ce0966037961", + "placeholder": "​", + "style": "IPY_MODEL_51649c42cf2145f1b1e90c3436805350", + "value": " 4.44G/4.44G [00:31<00:00, 142MB/s]" + } + }, + "b469cdf580404f498feb062e4dbad10b": { + "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": "" + } + }, + "b5a06422fcac41eb97d2de95f14b1806": { + "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 + } + }, + "b5b8482ef7c44e12a83795e7337521c2": { + "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_0881c055108340f7ab4b840ac1545cbb", + "placeholder": "​", + "style": "IPY_MODEL_77907c3444174858bbdc548dee8d0d37", + "value": "tokenizer.json: 100%" + } + }, + "bc6f29c9a1e14ce8be374867b8be86ac": { + "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": "" + } + }, + "be2b1fb954444be089045a378673a958": { + "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 + } + }, + "c307400fb17e49ea9d835822e6e22633": { + "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_353fa47fb98c4070a150edec64503eaa", + "placeholder": "​", + "style": "IPY_MODEL_40bf6f1ffbc5479082fdd7ab153ea974", + "value": "tokenizer_config.json: 100%" + } + }, + "c43cef665c9542f982986a74dc50ca98": { + "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": "" + } + }, + "c4a69698321d435c94211a9dee913c45": { + "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 + } + }, + "c5b1d1476ddc45249e037df07a96ae37": { + "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 + } + }, + "c6c51a350a0b420aab957e3570098e18": { + "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 + } + }, + "c859133fca324effb73ebc3520e746b6": { + "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": "" + } + }, + "c9fbf40fa3dd4ba1b363802dc88764da": { + "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 + } + }, + "cc14e51320f34274ae12aa28b04183b7": { + "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": "" + } + }, + "cebd4fbf1fcf4ab2b65ecf539eda5a1e": { + "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 + } + }, + "d2df1617a4094dd295c49a0a72b269c3": { + "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_dfac71c6372c46bfad46308bdb04480b", + "max": 570, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_df50d8daa49a4955914704edb89baf61", + "value": 570 + } + }, + "db7e622bbd0f4357b5687a7c09c1f6fd": { + "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_457c60d6a15d4314ba25d370be956a60", + "placeholder": "​", + "style": "IPY_MODEL_bc6f29c9a1e14ce8be374867b8be86ac", + "value": " 1.16M/1.16M [00:00<00:00, 10.7MB/s]" + } + }, + "dd6e4f9b4c6d4260a62b920a6812fd07": { + "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_879c6a0498e54e5c87145c7f7d32de7e", + "placeholder": "​", + "style": "IPY_MODEL_740d351b7de241a6acabf6c2853585b6", + "value": "tokenizer.model: 100%" + } + }, + "ded71beadafd438ebff07bb0594771e4": { + "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 + } + }, + "df50d8daa49a4955914704edb89baf61": { + "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": "" + } + }, + "dfac71c6372c46bfad46308bdb04480b": { + "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 + } + }, + "e003ee5cf1804ce3928b544b3fa7ba77": { + "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_dd6e4f9b4c6d4260a62b920a6812fd07", + "IPY_MODEL_4466f20e614a4cdabe1704859c2f1034", + "IPY_MODEL_8949c35d68a043c5b1384774bb07b2ea" + ], + "layout": "IPY_MODEL_fca09f95775047efa9d481173f1ba261" + } + }, + "e12bca7d49b149b5b1124c28a669db98": { + "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 + } + }, + "e7f8d2c781a64e83988b0bdd090bdb97": { + "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_5e48531593d741eaa3669f9118ba8afc", + "max": 100000, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_62838ffab83d486f86e86417caf0b498", + "value": 100000 + } + }, + "ea9045a5c4504a5e96e6a7b13767fe4e": { + "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_a92be3fb752148d887e20afe300f9371", + "max": 33384568, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_aa36bff36ae5448b892afea071fc1f1d", + "value": 33384568 + } + }, + "eae020595f574192ad9d132853bbf6ec": { + "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_17eaf723882e4efea38119978166fc75", + "IPY_MODEL_409488926d2242c5a8e7b3d5b79c59db", + "IPY_MODEL_26b61507603d453c8c24af24d301bdb9" + ], + "layout": "IPY_MODEL_c6c51a350a0b420aab957e3570098e18" + } + }, + "efa41d07d0fa4adda8025fe9490ed850": { + "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": "" + } + }, + "f14ea72beac74152af5f970e634769ca": { + "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": "" + } + }, + "f344c1ab154b4abdb84b2c221b6162a1": { + "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 + } + }, + "f373f2c24f3b413aaa9fe1ccfb9c1eab": { + "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_360142dac8c54a5eb902078ec42abb65", + "IPY_MODEL_a4a64136f6fc48c799abf1701725534e", + "IPY_MODEL_4c5e29de7224428bb87de46854ea915a" + ], + "layout": "IPY_MODEL_a3ce4f38be9a456c81146fba440c8e3f" + } + }, + "f4b34bc9a62f405383c3b81dc87792b9": { + "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_28de62814a6847e0a0b41ec6bf8fdc66", + "placeholder": "​", + "style": "IPY_MODEL_c43cef665c9542f982986a74dc50ca98", + "value": "Map (num_proc=2): 100%" + } + }, + "f89c08592a25432497bb312f58a13c5c": { + "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_c307400fb17e49ea9d835822e6e22633", + "IPY_MODEL_57ed5097e05f4d92a5c492826f989123", + "IPY_MODEL_db7e622bbd0f4357b5687a7c09c1f6fd" + ], + "layout": "IPY_MODEL_8864799f440c440c8ff8c0696e64215d" + } + }, + "f920f6cb263c45d59b851b7c6b631cb5": { + "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": "" + } + }, + "f9439c3c9b3b4c4a84ed67aa0601a530": { + "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 + } + }, + "fab7a02d350946ae9563a05cfd04e22b": { + "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": "" + } + }, + "fca09f95775047efa9d481173f1ba261": { + "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 + } + }, + "fd60bb21ba2e474cb4a6020bd302835e": { + "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_697a187a07204fdfb8556cf5c5028c6b", + "max": 1615, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_afdb7dfdc17548b39daea1f39d54b45c", + "value": 1615 + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/tests/gemma3_fix_tests/gemma3_4b_vision_french_ocr_H100.ipynb b/tests/gemma3_fix_tests/gemma3_4b_vision_french_ocr_H100.ipynb new file mode 100644 index 0000000000..003d7049ba --- /dev/null +++ b/tests/gemma3_fix_tests/gemma3_4b_vision_french_ocr_H100.ipynb @@ -0,0 +1,1345 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "4800978d", + "metadata": { + "colab_type": "text", + "id": "view-in-github" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "e83fc6ff-29f2-4a57-9ce4-59d91b43ac3d", + "metadata": { + "editable": true, + "id": "e83fc6ff-29f2-4a57-9ce4-59d91b43ac3d", + "outputId": "856c05b4-d520-4dfe-d8e4-d597ae969839", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.\n", + "forward 1 working and being replaced\n", + "🦥 Unsloth Zoo will now patch everything to make training faster!\n", + "INFO 06-18 05:14:05 [__init__.py:244] Automatically detected platform cuda.\n" + ] + } + ], + "source": [ + "from unsloth import FastVisionModel" + ] + }, + { + "cell_type": "markdown", + "id": "9bca3f87-5973-4d2f-88e8-6de6e05dc4fa", + "metadata": { + "id": "9bca3f87-5973-4d2f-88e8-6de6e05dc4fa" + }, + "source": [ + "# Dataset Preparation" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "12ba9d1e-0ad3-43b7-9a94-fa58f6b1a4f2", + "metadata": { + "colab": { + "referenced_widgets": [ + "905e0b0bcab74845a4858b6de6199c45", + "61e16790b19f496794d91eecc10d369a", + "62ab7989b1bd4179aaff9b09515cad6d" + ] + }, + "id": "12ba9d1e-0ad3-43b7-9a94-fa58f6b1a4f2", + "outputId": "0561eb67-9383-4ecc-ea0d-6cca4e76d006" + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "ec0110526de74ff589e959db6ee94af5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Resolving data files: 0%| | 0/50 [00:00 Tuple[Optional[float], Optional[float]]:\n", + " \"\"\"\n", + " Evaluate a Gemma3 model on an OCR dataset.\n", + " \"\"\"\n", + " # Create output directory if it doesn't exist\n", + " os.makedirs(output_dir, exist_ok=True)\n", + "\n", + " # Initialize results storage\n", + " results = []\n", + "\n", + " # Process each sample in the dataset\n", + " for i, sample in enumerate(tqdm(dataset, desc=\"Evaluating OCR performance\", disable=not verbose)):\n", + " try:\n", + " # Extract components from sample\n", + " messages = sample['messages']\n", + "\n", + " # Get ground truth, image, and question, input_messages\n", + " ground_truth, image, question, input_messages = self._extract_sample_components(\n", + " messages, i, verbose\n", + " )\n", + "\n", + " if ground_truth is None or image is None or question is None:\n", + " continue\n", + "\n", + " # Generate model response\n", + " generated_response = self._generate_response(\n", + " model, processor, input_messages, max_new_tokens, temperature, top_p, top_k, do_sample\n", + " )\n", + "\n", + " # Calculate metrics\n", + " word_error = wer(ground_truth, generated_response)\n", + " char_error = cer(ground_truth, generated_response)\n", + "\n", + " # Save individual result\n", + " self._save_individual_result(\n", + " output_dir, i, question, generated_response, ground_truth, word_error, char_error\n", + " )\n", + "\n", + " # Store results for summary\n", + " results.append({\n", + " 'sample_id': i,\n", + " 'wer': word_error,\n", + " 'cer': char_error,\n", + " 'model_output': generated_response.strip(),\n", + " 'ground_truth': ground_truth,\n", + " 'question': question\n", + " })\n", + "\n", + " except Exception as e:\n", + " if verbose:\n", + " print(f\"Error processing sample {i}: {str(e)}\")\n", + " traceback.print_exc()\n", + "\n", + " # Generate summary report\n", + " return self._generate_summary_report(results, output_dir, verbose)\n", + "\n", + " def _extract_sample_components(\n", + " self,\n", + " messages: List[Dict],\n", + " sample_idx: int,\n", + " verbose: bool\n", + " ) -> Tuple[Optional[str], Optional[Any], Optional[str], List[Dict]]:\n", + " \"\"\"Extract ground truth, image, question, and input messages from sample.\"\"\"\n", + "\n", + " # Extract system message (if present)\n", + " system_message = next((msg for msg in messages if msg['role'] == 'system'), None)\n", + "\n", + " # Extract user message with the image and question\n", + " user_message = next((msg for msg in messages if msg['role'] == 'user'), None)\n", + " if not user_message:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No user message found\")\n", + " return None, None, None, []\n", + "\n", + " # Extract assistant message with ground truth\n", + " assistant_message = next((msg for msg in messages if msg['role'] == 'assistant'), None)\n", + " if not assistant_message:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No assistant message (ground truth) found\")\n", + " return None, None, None, []\n", + "\n", + " # Extract ground truth text\n", + " ground_truth = None\n", + " for content_item in assistant_message['content']:\n", + " if content_item['type'] == 'text':\n", + " ground_truth = content_item['text']\n", + " break\n", + "\n", + " if not ground_truth:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No text found in assistant message\")\n", + " return None, None, None, []\n", + "\n", + " # Extract image and question from user message\n", + " image = None\n", + " question = None\n", + "\n", + " for content_item in user_message['content']:\n", + " if content_item['type'] == 'image':\n", + " image = content_item['image']\n", + " # Ensure image is in RGB format\n", + " if hasattr(image, 'convert'):\n", + " image = image.convert('RGB')\n", + " elif content_item['type'] == 'text':\n", + " question = content_item['text']\n", + "\n", + " if not image:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No image found in user message\")\n", + " return None, None, None, []\n", + "\n", + " if not question:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No question found in user message\")\n", + " return None, None, None, []\n", + "\n", + " # Construct messages for the model input (excluding assistant message)\n", + " input_messages = []\n", + " if system_message:\n", + " input_messages.append(system_message)\n", + " input_messages.append(user_message)\n", + "\n", + " return ground_truth, image, question, input_messages\n", + "\n", + " def _process_vision_info(self, messages: List[Dict]) -> List[Image.Image]:\n", + " \"\"\"Extract images from messages in Gemma3 format.\"\"\"\n", + " image_inputs = []\n", + " # Iterate through each conversation\n", + " for msg in messages:\n", + " # Get content (ensure it's a list)\n", + " content = msg.get(\"content\", [])\n", + " if not isinstance(content, list):\n", + " content = [content]\n", + "\n", + " # Check each content element for images\n", + " for element in content:\n", + " if isinstance(element, dict) and (\n", + " \"image\" in element or element.get(\"type\") == \"image\"\n", + " ):\n", + " # Get the image and convert to RGB\n", + " if \"image\" in element:\n", + " image = element[\"image\"]\n", + " else:\n", + " image = element\n", + " if hasattr(image, 'convert'):\n", + " image_inputs.append(image.convert(\"RGB\"))\n", + " else:\n", + " image_inputs.append(image)\n", + " return image_inputs\n", + "\n", + " def _generate_response(\n", + " self,\n", + " model: Any,\n", + " processor: Any,\n", + " input_messages: List[Dict],\n", + " max_new_tokens: int,\n", + " temperature: float,\n", + " top_p: float,\n", + " top_k: int,\n", + " do_sample: bool,\n", + " ) -> str:\n", + " \"\"\"Generate response from the Gemma3 model using the official approach.\"\"\"\n", + "\n", + " # Apply chat template to convert messages to text\n", + " text = processor.apply_chat_template(\n", + " input_messages, tokenize=False, add_generation_prompt=True\n", + " )\n", + "\n", + " # Process the images using the official vision processing function\n", + " image_inputs = self._process_vision_info(input_messages)\n", + "\n", + " # Tokenize the text and process the images\n", + " inputs = processor(\n", + " text=[text],\n", + " images=image_inputs,\n", + " padding=True,\n", + " return_tensors=\"pt\",\n", + " )\n", + "\n", + " # Move the inputs to the device\n", + " inputs = inputs.to(model.device)\n", + "\n", + " # Set up stop tokens (following the official implementation)\n", + " stop_token_ids = [\n", + " processor.tokenizer.eos_token_id, \n", + " processor.tokenizer.convert_tokens_to_ids(\"\")\n", + " ]\n", + "\n", + " # Generate the output with proper parameters\n", + " with torch.inference_mode():\n", + " generated_ids = model.generate(\n", + " **inputs, \n", + " max_new_tokens=max_new_tokens, \n", + " top_p=top_p,\n", + " top_k=top_k,\n", + " do_sample=do_sample, \n", + " temperature=temperature, \n", + " eos_token_id=stop_token_ids,\n", + " disable_compile=True # Following official implementation\n", + " )\n", + "\n", + " # Trim the generation (remove input tokens)\n", + " generated_ids_trimmed = [\n", + " out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)\n", + " ]\n", + "\n", + " # Decode the generated text\n", + " output_text = processor.batch_decode(\n", + " generated_ids_trimmed, \n", + " skip_special_tokens=True, \n", + " clean_up_tokenization_spaces=False\n", + " )\n", + "\n", + " return output_text[0] if output_text else \"\"\n", + "\n", + " def _save_individual_result(\n", + " self,\n", + " output_dir: str,\n", + " sample_idx: int,\n", + " question: str,\n", + " generated_response: str,\n", + " ground_truth: str,\n", + " word_error: float,\n", + " char_error: float\n", + " ):\n", + " \"\"\"Save individual sample result to file.\"\"\"\n", + " output_file = os.path.join(output_dir, f\"sample_{sample_idx}.txt\")\n", + " with open(output_file, 'w', encoding='utf-8') as f:\n", + " f.write(f\"Sample {sample_idx}\\n\")\n", + " f.write(f\"Question: {question}\\n\\n\")\n", + " f.write(f\"Model output:\\n{generated_response.strip()}\\n\\n\")\n", + " f.write(f\"Ground truth:\\n{ground_truth}\\n\\n\")\n", + " f.write(f\"WER: {word_error:.4f}, CER: {char_error:.4f}\")\n", + "\n", + " def _generate_summary_report(\n", + " self,\n", + " results: List[Dict],\n", + " output_dir: str,\n", + " verbose: bool\n", + " ) -> Tuple[Optional[float], Optional[float]]:\n", + " \"\"\"Generate and save summary report.\"\"\"\n", + " if not results:\n", + " if verbose:\n", + " print(\"No results to summarize.\")\n", + " return None, None\n", + "\n", + " df = pd.DataFrame(results)\n", + "\n", + " # Calculate overall averages\n", + " avg_wer = df['wer'].mean()\n", + " avg_cer = df['cer'].mean()\n", + "\n", + " # Save average metrics\n", + " with open(os.path.join(output_dir, \"avg_metrics.txt\"), 'w') as f:\n", + " f.write(f\"Average WER: {avg_wer:.4f}\\n\")\n", + " f.write(f\"Average CER: {avg_cer:.4f}\\n\")\n", + "\n", + " # Save detailed results\n", + " df.to_csv(os.path.join(output_dir, \"detailed_results.csv\"), index=False)\n", + "\n", + " if verbose:\n", + " print(\"\\nResults Summary:\")\n", + " print(f\"Average WER: {avg_wer:.4f}\")\n", + " print(f\"Average CER: {avg_cer:.4f}\")\n", + " print(f\"\\nDetailed results saved to {output_dir}/\")\n", + "\n", + " return avg_wer, avg_cer\n", + "\n", + " def add_to_comparison(self, model_name: str, wer: float, cer: float):\n", + " \"\"\"Add model results to the comparison tracker.\"\"\"\n", + " self.model_comparison_results[model_name] = {\n", + " \"wer\": wer,\n", + " \"cer\": cer\n", + " }\n", + "\n", + " def print_model_comparison(self, save_csv: bool = True, save_plot: bool = True) -> Optional[pd.DataFrame]:\n", + " \"\"\"Print a comparison of all models evaluated so far.\"\"\"\n", + " if not self.model_comparison_results:\n", + " print(\"No model results available for comparison\")\n", + " return None\n", + "\n", + " print(\"\\n==== MODEL COMPARISON REPORT ====\")\n", + "\n", + " # Create a comparison dataframe\n", + " comparison_df = pd.DataFrame({\n", + " \"Model\": list(self.model_comparison_results.keys()),\n", + " \"WER\": [results[\"wer\"] for results in self.model_comparison_results.values()],\n", + " \"CER\": [results[\"cer\"] for results in self.model_comparison_results.values()]\n", + " })\n", + "\n", + " # Sort by WER (best performance first)\n", + " comparison_df = comparison_df.sort_values(\"WER\")\n", + "\n", + " # Display the comparison table\n", + " print(\"\\nComparison Table (sorted by WER):\")\n", + " print(comparison_df.to_string(index=False))\n", + "\n", + " # Save the comparison table\n", + " if save_csv:\n", + " comparison_file = \"model_comparison_results.csv\"\n", + " comparison_df.to_csv(comparison_file, index=False)\n", + " print(f\"\\nComparison table saved to {comparison_file}\")\n", + "\n", + " # Generate a bar chart visualization\n", + " if save_plot:\n", + " self._create_comparison_plot(comparison_df)\n", + "\n", + " return comparison_df\n", + "\n", + " def _create_comparison_plot(self, comparison_df: pd.DataFrame):\n", + " \"\"\"Create and save comparison plot.\"\"\"\n", + " plt.figure(figsize=(12, 6))\n", + "\n", + " # Plot WER\n", + " plt.subplot(1, 2, 1)\n", + " plt.bar(comparison_df[\"Model\"], comparison_df[\"WER\"], color='skyblue')\n", + " plt.title('Word Error Rate Comparison')\n", + " plt.ylabel('WER (lower is better)')\n", + " plt.ylim(bottom=0)\n", + " plt.xticks(rotation=45, ha='right')\n", + "\n", + " # Plot CER\n", + " plt.subplot(1, 2, 2)\n", + " plt.bar(comparison_df[\"Model\"], comparison_df[\"CER\"], color='lightgreen')\n", + " plt.title('Character Error Rate Comparison')\n", + " plt.ylabel('CER (lower is better)')\n", + " plt.ylim(bottom=0)\n", + " plt.xticks(rotation=45, ha='right')\n", + "\n", + " plt.tight_layout()\n", + " plt.savefig('ocr_model_comparison.png')\n", + " plt.show()\n", + "\n", + " print(f\"\\nVisualization saved to ocr_model_comparison.png\")\n", + "\n", + " def get_comparison_results(self) -> Dict[str, Dict[str, float]]:\n", + " \"\"\"Get the current comparison results.\"\"\"\n", + " return self.model_comparison_results.copy()\n", + "\n", + " def clear_comparison_results(self):\n", + " \"\"\"Clear all comparison results.\"\"\"\n", + " self.model_comparison_results.clear()\n", + "\n", + "\n", + "# Convenience functions for backward compatibility\n", + "def evaluate_ocr_model(model, processor, dataset, output_dir=\"ocr_evaluation_results\", **kwargs):\n", + " \"\"\"\n", + " Convenience function that maintains backward compatibility with the original function.\n", + " \"\"\"\n", + " evaluator = OCRModelEvaluator()\n", + " return evaluator.evaluate_model(model, processor, dataset, output_dir, **kwargs)\n", + "\n", + "\n", + "def create_evaluator():\n", + " \"\"\"Create a new OCR evaluator instance.\"\"\"\n", + " return OCRModelEvaluator()" + ] + }, + { + "cell_type": "markdown", + "id": "45f7eeec-ffde-4992-86a7-fd78266219ef", + "metadata": { + "id": "45f7eeec-ffde-4992-86a7-fd78266219ef" + }, + "source": [ + "# Load and finetune gema3 model" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "4777f7fe-8fda-449a-b60b-91dfaa159fda", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "==((====))== Unsloth 2025.6.2: Fast Gemma3 patching. Transformers: 4.52.4. vLLM: 0.9.1.\n", + " \\\\ /| NVIDIA H100 80GB HBM3. Num GPUs = 1. Max memory: 79.179 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.7.0+cu126. CUDA: 9.0. CUDA Toolkit: 12.6. Triton: 3.3.0\n", + "\\ / Bfloat16 = TRUE. FA [Xformers = None. FA2 = True]\n", + " \"-____-\" Free license: http://github.com/unslothai/unsloth\n", + "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`.\n" + ] + } + ], + "source": [ + "import torch\n", + "model, processor = FastVisionModel.from_pretrained(\n", + " model_name = \"unsloth/gemma-3-4b-it\",\n", + " #model_name = \"meta-llama/Llama-3.2-11B-Vision-Instruct\",\n", + " max_seq_length = 2048, # Choose any for long context!\n", + " load_in_4bit = True, # 4 bit quantization to reduce memory\n", + " load_in_8bit = False, # [NEW!] A bit more accurate, uses 2x memory\n", + " full_finetuning = False, # [NEW!] We have full finetuning now!\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "bba132b7-c9ba-4f43-bf24-7b782dd00eb4", + "metadata": {}, + "outputs": [], + "source": [ + "ocr_evaluator = OCRModelEvaluator()\n", + "model_comparison_results = {}" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "44cf255a-50b6-445e-85b8-1fe3d8798d1b", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Evaluating OCR performance: 100%|████████████████████████████████████████████████████████████████████████████████████████| 200/200 [08:01<00:00, 2.41s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Results Summary:\n", + "Average WER: 0.8584\n", + "Average CER: 0.6946\n", + "\n", + "Detailed results saved to base_model_results/\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "# benchmark lora model performance\n", + "model_name = \"Base model\" \n", + "avg_wer, avg_cer = ocr_evaluator.evaluate_model(model=model, processor=processor, dataset=eval_dataset, top_p=0.95, top_k=64, output_dir=\"base_model_results\", max_new_tokens=64, temperature=1.0)\n", + "ocr_evaluator.add_to_comparison(model_name, avg_wer, avg_cer)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "50dda6a4-ede1-4811-82c0-e0a055d12df6", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "You have set `compile_config`, but we are unable to meet the criteria for compilation. Compilation will be skipped.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Here's the transcription of the text in the image:\n", + "\n", + "“Beaucoup d'entre vous savent à quel point Jimmy était pour nous, surtout sa maman.”\n" + ] + } + ], + "source": [ + "FastVisionModel.for_inference(model) # Enable for inference!\n", + "\n", + "sample = dataset[1]\n", + "image = sample[\"image\"].convert('RGB')\n", + "messages = [\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": [\n", + " {\n", + " \"type\": \"text\",\n", + " \"text\": sample[\"question\"],\n", + " },{\n", + " \"type\": \"image\",\n", + " }\n", + " ],\n", + " },\n", + " ]\n", + "input_text = processor.apply_chat_template(messages, add_generation_prompt = True)\n", + "inputs = processor(\n", + " image,\n", + " input_text,\n", + " add_special_tokens = False,\n", + " return_tensors = \"pt\",\n", + ").to(\"cuda\")\n", + "\n", + "from transformers import TextStreamer\n", + "text_streamer = TextStreamer(processor.tokenizer, skip_prompt = True)\n", + "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n", + " use_cache = True, temperature = 1.5, min_p = 0.1)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "3a2deb57-cd2e-47bf-988e-919d3db4d0b2", + "metadata": { + "id": "3a2deb57-cd2e-47bf-988e-919d3db4d0b2", + "outputId": "3cc5911a-cfe5-43e2-e6ca-dfa4a464dfcb" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Unsloth: Making `base_model.model.model.vision_tower.vision_model` require gradients\n" + ] + } + ], + "source": [ + "model = FastVisionModel.get_peft_model(\n", + " model,\n", + " finetune_vision_layers = True, # False if not finetuning vision layers\n", + " finetune_language_layers = True, # False if not finetuning language layers\n", + " finetune_attention_modules = True, # False if not finetuning attention layers\n", + " finetune_mlp_modules = True, # False if not finetuning MLP layers\n", + "\n", + " r = 16, # The larger, the higher the accuracy, but might overfit\n", + " lora_alpha = 16, # Recommended alpha == r at least\n", + " lora_dropout = 0,\n", + " bias = \"none\",\n", + " random_state = 3407,\n", + " use_rslora = False, # We support rank stabilized LoRA\n", + " loftq_config = None, # And LoftQ\n", + " target_modules = \"all-linear\", # Optional now! Can specify a list if needed\n", + " modules_to_save=[\n", + " \"lm_head\",\n", + " \"embed_tokens\",\n", + " ],\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "2c7c4695-e93a-4e6d-a943-690543bcbb72", + "metadata": { + "id": "2c7c4695-e93a-4e6d-a943-690543bcbb72" + }, + "outputs": [], + "source": [ + "from unsloth import is_bf16_supported\n", + "from unsloth.trainer import UnslothVisionDataCollator\n", + "from trl import SFTConfig, SFTTrainer\n", + "FastVisionModel.for_training(model) # Enable for training!\n", + "model.config.use_cache = False\n", + "\n", + "\n", + "args = SFTConfig(\n", + " per_device_train_batch_size = 1,\n", + " gradient_accumulation_steps = 4,\n", + " gradient_checkpointing=True,\n", + " gradient_checkpointing_kwargs = {\"use_reentrant\": False}, # use reentrant checkpointing\n", + " max_grad_norm=0.3, # max gradient norm based on QLoRA paper\n", + " warmup_ratio=0.03,\n", + " max_steps=60,\n", + " #num_train_epochs = 2, # Set this instead of max_steps for full training runs\n", + " learning_rate = 2e-4,\n", + " fp16 = not is_bf16_supported(),\n", + " bf16 = is_bf16_supported(),\n", + " logging_steps = 5,\n", + " save_strategy=\"epoch\",\n", + " optim = \"adamw_torch_fused\",\n", + " weight_decay = 0.01,\n", + " lr_scheduler_type = \"cosine\",\n", + " seed = 3407,\n", + " output_dir = \"gemma3-french-ocr-checkpoints\",\n", + " report_to = \"none\", # For Weights and Biases\n", + "\n", + " # You MUST put the below items for vision finetuning:\n", + " remove_unused_columns = False,\n", + " dataset_text_field = \"\",\n", + " dataset_kwargs = {\"skip_prepare_dataset\": True},\n", + " dataset_num_proc = 4,\n", + " max_seq_length = 2048,\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "37acf3c3-2804-4f95-9b78-fdec749112ce", + "metadata": {}, + "outputs": [], + "source": [ + "from trl import SFTTrainer\n", + "from unsloth.trainer import UnslothVisionDataCollator\n", + "trainer = SFTTrainer(\n", + " model=model,\n", + " args=args,\n", + " train_dataset=train_dataset,\n", + " processing_class=processor.tokenizer,\n", + " data_collator=UnslothVisionDataCollator(model,processor),\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "70ccb372-8d17-4076-8b2f-692fca151396", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "==((====))== Unsloth - 2x faster free finetuning | Num GPUs used = 1\n", + " \\\\ /| Num examples = 2,000 | Num Epochs = 1 | Total steps = 60\n", + "O^O/ \\_/ \\ Batch size per device = 1 | Gradient accumulation steps = 4\n", + "\\ / Data Parallel GPUs = 1 | Total batch size (1 x 4 x 1) = 4\n", + " \"-____-\" Trainable parameters = 38,497,792/4,000,000,000 (0.96% trained)\n", + "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " \n", + " [60/60 02:40, 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", + " \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
522.401200
105.552700
151.127400
200.705900
250.626100
300.519600
350.530200
400.414300
450.512800
500.401000
550.406500
600.512800

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "trainer_stats = trainer.train()" + ] + }, + { + "cell_type": "markdown", + "id": "fb5aa90d-2f90-4e9f-b99c-5bcba0ff68c3", + "metadata": { + "id": "fb5aa90d-2f90-4e9f-b99c-5bcba0ff68c3" + }, + "source": [ + "# save qlora adapter" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "7fa983e6-d0f7-4b4c-a924-5612b47acb2b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tu aurais dû voir ces hommes, mère.\n" + ] + } + ], + "source": [ + "sample=dataset[9]\n", + "image = sample[\"image\"].convert('RGB')\n", + "messages = [\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": [\n", + " {\n", + " \"type\": \"text\",\n", + " \"text\": sample[\"question\"],\n", + " },{\n", + " \"type\": \"image\",\n", + " }\n", + " ],\n", + " },\n", + " ]\n", + "input_text = processor.apply_chat_template(messages, add_generation_prompt = True)\n", + "inputs = processor(\n", + " image,\n", + " input_text,\n", + " add_special_tokens = False,\n", + " return_tensors = \"pt\",\n", + ").to(\"cuda\")\n", + "\n", + "from transformers import TextStreamer\n", + "text_streamer = TextStreamer(processor.tokenizer, skip_prompt = True)\n", + "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n", + " use_cache = True, temperature = 1.5, min_p = 0.1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "13aaa234-8452-4a60-92bd-624b58ee91ec", + "metadata": { + "id": "13aaa234-8452-4a60-92bd-624b58ee91ec", + "outputId": "22ebd55a-c605-43fa-d564-46556b506cf5" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "['unsloth-gemma3-ocr-adapter/processor_config.json']" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.save_pretrained(\"unsloth-gemma3-ocr-adapter\", processor)\n", + "processor.save_pretrained(\"unsloth-gemma3-ocr-adapter\")" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "73b835c5-ea65-4bbe-bc73-8a712759115d", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Evaluating OCR performance: 100%|████████████████████████████████████████████████████████████████████████████████████████| 200/200 [08:26<00:00, 2.53s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Results Summary:\n", + "Average WER: 0.0451\n", + "Average CER: 0.0084\n", + "\n", + "Detailed results saved to peft_model_results/\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "# benchmark lora model performance\n", + "model_name = \"Peft model\" \n", + "avg_wer, avg_cer = ocr_evaluator.evaluate_model(model=model, processor=processor, dataset=eval_dataset, top_p=0.95, top_k=64, output_dir=\"peft_model_results\", max_new_tokens=64, temperature=1.0)\n", + "ocr_evaluator.add_to_comparison(model_name, avg_wer, avg_cer)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "bc35b36a-e1f9-4c27-812f-54c36083238b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tu aurais dû voir ces hommes, mère.\n" + ] + } + ], + "source": [ + "FastVisionModel.for_inference(model) # Enable for inference! \n", + "\n", + "sample=dataset[9]\n", + "image = sample[\"image\"].convert('RGB')\n", + "messages = [\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": [\n", + " {\n", + " \"type\": \"text\",\n", + " \"text\": sample[\"question\"],\n", + " },{\n", + " \"type\": \"image\",\n", + " }\n", + " ],\n", + " },\n", + " ]\n", + "input_text = processor.apply_chat_template(messages, add_generation_prompt = True)\n", + "inputs = processor(\n", + " image,\n", + " input_text,\n", + " add_special_tokens = False,\n", + " return_tensors = \"pt\",\n", + ").to(\"cuda\")\n", + "\n", + "from transformers import TextStreamer\n", + "text_streamer = TextStreamer(processor.tokenizer, skip_prompt = True)\n", + "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n", + " use_cache = True, temperature = 1.5, min_p = 0.1)\n" + ] + }, + { + "cell_type": "markdown", + "id": "c966d45e-6c06-44fd-a98d-c07831bee864", + "metadata": { + "id": "c966d45e-6c06-44fd-a98d-c07831bee864" + }, + "source": [ + "# Merge model" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "c88e0a60-9dc9-43e5-a539-7e3430096bfa", + "metadata": { + "id": "c88e0a60-9dc9-43e5-a539-7e3430096bfa", + "outputId": "7de6ef5a-95d1-4212-dddc-9c24c436f54a" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found HuggingFace hub cache directory: /mnt/disks/unslothai/.cache/huggingface/hub\n", + "Checking cache directory for required files...\n", + "Successfully copied all 2 files from cache to gemma3-merged-finetune-merge-16bit.\n", + "Downloading safetensors index for unsloth/gemma-3-4b-it...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Unsloth: Merging weights into 16bit: 100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:23<00:00, 11.69s/it]\n" + ] + } + ], + "source": [ + "# merge default 16 bits\n", + "model.save_pretrained_merged(save_directory=\"gemma3-merged-finetune-merge-16bit\", tokenizer=processor)" + ] + }, + { + "cell_type": "markdown", + "id": "ddfab9db-f358-4372-aece-00997ce2275f", + "metadata": { + "id": "ddfab9db-f358-4372-aece-00997ce2275f" + }, + "source": [ + "# Load Merged model and benchmark" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "322a3a1f-5c5d-4a58-aad0-b348701bbfba", + "metadata": {}, + "outputs": [], + "source": [ + "del model\n", + "del trainer\n", + "torch.cuda.empty_cache()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "8f7fc197-1d0d-430e-b41d-33d1a9a930e5", + "metadata": { + "colab": { + "referenced_widgets": [ + "933fb595cfa5475b87350d81cae515be" + ] + }, + "id": "8f7fc197-1d0d-430e-b41d-33d1a9a930e5", + "outputId": "d34bbe75-1651-4238-f2e0-e207202b68e9" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "==((====))== Unsloth 2025.6.2: Fast Gemma3 patching. Transformers: 4.52.4. vLLM: 0.9.1.\n", + " \\\\ /| NVIDIA H100 80GB HBM3. Num GPUs = 1. Max memory: 79.179 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.7.0+cu126. CUDA: 9.0. CUDA Toolkit: 12.6. Triton: 3.3.0\n", + "\\ / Bfloat16 = TRUE. FA [Xformers = None. FA2 = True]\n", + " \"-____-\" Free license: http://github.com/unslothai/unsloth\n", + "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "c5c24481316e4e2f9528e0d5aafe172f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Loading checkpoint shards: 0%| | 0/2 [00:00\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "e83fc6ff-29f2-4a57-9ce4-59d91b43ac3d", + "metadata": { + "editable": true, + "id": "e83fc6ff-29f2-4a57-9ce4-59d91b43ac3d", + "outputId": "396321e7-5726-4cd7-c4bb-64c21cf57f2a", + "tags": [], + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.\n", + "forward 1 working and being replaced\n", + "🦥 Unsloth Zoo will now patch everything to make training faster!\n" + ] + } + ], + "source": [ + "from unsloth import FastVisionModel" + ] + }, + { + "cell_type": "markdown", + "id": "9bca3f87-5973-4d2f-88e8-6de6e05dc4fa", + "metadata": { + "id": "9bca3f87-5973-4d2f-88e8-6de6e05dc4fa" + }, + "source": [ + "# Dataset Preparation" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "12ba9d1e-0ad3-43b7-9a94-fa58f6b1a4f2", + "metadata": { + "colab": { + "referenced_widgets": [ + "7051217239fc4348a65d95767f1e98d0", + "a6dd11a1a22e4c41bd649cf508322401", + "01a1fe43179645acbaec2910a8d5ff2d", + "a921c6279b7643f19c4928c9854488bd", + "302e6cbf2ef64d8b946456091cb16b56", + "1b70e010e5504f94bd2b148cfd77b626", + "fa41a757aebe4b418afe376143320e4f", + "147a55da5c3e4f9993222c6cd7751a40", + "c5651fb5a57d4e22b6f58a2756cda4ef", + "0572e4da10e4407e88e2638b6a167fd1", + "af038a990de44f1e8369ff5248740dee", + "53f7bf7db8634e999cf6c94322e884c1", + "6750a77aaabc4e348812d8babdb9d7cb", + "50f8daf2eb2f4bebb29b931ac736ade8", + "7d1721e68e104b5c8d4379376c99323c", + "8e8920fba6e74dad9cffbcf94e5e1b38", + "997d588c13c84a25b109b3fddd90e29e", + "8dc565d10a564ed4a81e0d6a59ba62ba", + "d4a89e4e7115402c8dc5f53a1b7176ef", + "f15c4d24123c467ebb5f68691d07462d", + "8050bcc159a54d5b9ee8dee02cbfa952", + "fe0c5885e8bb4b36a20131263a305d75", + "13ee540d2ab343898fcce948f14446be", + "4996711556b0436ea27ce3a0e55e140b", + "112149582d594cac822f6e40592d2d52", + "078ab257cd934a68bef8c837afe76485", + "5876b64f425c4b8793e308a426a73ec5", + "a9f7bc8abfff4487a0661a1f3238f320", + "e68a83b665f94657b76aac9822ffd79f", + "f56528805cfc448486092d570bee0391", + "19804f5ee7bc4033b76dc283f487ebd1", + "63b7287e2d3344868ae1cc90b590281c", + "5eb264f87ec14d09a8ec2c913d6fe431", + "d0d6fd80cb914d598733aadea8e4ddce", + "c2867f1657e747048a5693558ecc7ba2", + "5601931dc346429183d74a5eb9314189", + "db3171c9c42d4f238476ad65d632f5c3", + "b824a8c11d0544b7af240000b998d967", + "f3e621d5ef964efaa4f1887628ef0d06", + "4668bf27f7c6400693373506566b1546", + "becc3371483245e5a61e6be5218991aa", + "9abc52c940804a598033e844b8b82657", + "cc137be709514145840f3014010e6629", + "7d8ef2d3e6b444b48d8ea62509a7f00d", + "560852db63294f739d3d0b3c1a03edb7", + "4637b69f099d46df9acb8bef5ec0d4cd", + "6bd89e1206d54e42a7186c2720e88e26", + "54abeab07f854a8ab6eb602e0ac71406", + "49db50b74aec440c95230c33714acbd4", + "b9e8d47fa6264fbfbec94b803eb1a33d", + "6f5c7a7ddf374c8aba44005c643571ae", + "9d592ff3a4074e78a76bc65e6a1f0aa2", + "6617e88a9b514a6e8987ce0d840e96f4", + "7133e325a33c45e8bccd43d4ba632660", + "75ee8ee461cc4725b048d563f7bbf643", + "112e31ace6f2473897d39b4375eef129", + "83102f0bc5bf4e6c8a3df64fff797b73", + "9f79b4b9d81e4ea6906b9e0f3d45670f", + "8bb66957bfce45f58daea73e47baaf44", + "ea774b9f66cb40d9819fb4da074e85d2", + "5cbb1118727e4cc7a73887ea560bb6f2", + "9a68bcb277a34ea4ae0c842fa2831da9", + "8d28c1e7cb0f442e8efb9903b3ad2aeb", + "c0fb1f07491441cea318db3a4ff73ed3", + "f187371f68834986a2ae3cd2f4cd2e49", + "0a60a2617cae49309b37835aacfff186", + "478f5aa3a53748bd8ae6580b21e58018", + "04f63240d673499497dbfd24f59cf82a", + "f9bb4854ad8c470e9a5288325ad29668", + "7ebd689a9f4b41da9597b07abbaec7df", + "4969877761804db39e2f64ed5a2dcdc0", + "0ab08ddf1bea404596d99b875b7364e0", + "200e789e031e44c2ae0d1c5e538de964", + "7334640e5ddb41c887b46e40f4b394f2", + "165190d956f841609da21ed070ca77e6", + "feaec0dc962645aebcacacef60960539", + "c5c3c7f816e4496b8cf40645e5a81270", + "92800f522a9f4e84947053aaf8dc77e8", + "219b0dc0460941e9b82f1dc1d6459e54", + "e498909710854c2dbb42ce4dadec3ad5", + "1fde10729b714fea876541436ed31bb1", + "8e0a3512fa43412787f5b2eb5bec1928", + "590717f51fd44c39a7a5371663d1f02a", + "e0fb3429463c4fa991f78cc4a3d79ffe", + "ff4ee330af114812906926384a706ad1", + "c2e1c5d293ba44c38a1bc22de16268cb", + "d40244ea570b4674aff5e5795954f1b8", + "1357688ec17d4d43b24a8f052e15f22c", + "c2336b8bb73944af947ae10023253cca", + "14e4c628e4f14baeb3183ab3a6812a24", + "4f9f86e71c334163a91e20c8c94df4d7", + "7732cc84c4b64d3991df5c541e462c09", + "bc2e478b6eaa4d91b5f34258ed86c37d", + "044d54cca4e74dd197ab0ce31e4fd3e1", + "bcb3662053194450a29659a5f809b9dc", + "0169a32bf8d34588b3a9c261ab974dbf", + "636f659d5502419fbf20915ccb864210", + "ec4ef80194204ebf96e5cdab6ac5f9ce", + "c0cf4f0bf3f04cff92faaa839f19cccf", + "e972770f40ea4da7ad1c1280465e49ab", + "aa7bd9979bac4f2b9c6b8bf0b0c27e5f", + "331ba200fb7c49e4aa8b33dee546dcb5", + "9e9208fa547f41d9903c2aeab36bf2e5", + "795f36d4aba04c35bade97b88aa09a3f", + "ec6ff265d8854216ba4251b66acde39b", + "e1cc80faa0774492ac3395f53de438c2", + "7edbffd7ff314c3fa995ec1f09b6bd21", + "0a2d6ff094ea4e44aac2df010ebf2aa1", + "1b8e36d19ded47cda8f574af8111c035", + "de163053973d4979bbc402a3b11607f0", + "7221af3dfaa94bb286b6f27c9e4e9a3e", + "8f7f77eac8aa4547b8daacf6e72df839", + "cbdfc7093c494bfeb3f5afb1d2f29dd5", + "8611866d84d044b18b8b222995964574", + "aff9009665e84ccf8ae683da08fa4f74", + "c4b479ffc4a14ecb9e5401940536756b", + "5aa59bf45a8b4ad293f79cd65c1f2287", + "b262ad083653406fa468665231f020f6", + "74f1692c34de478093212d35ec511820", + "f01e4de964f64531bb8bf06ced5c3a92", + "ffdabae4d027474ebe4be7e07ba1749d", + "7c0fd15ee4fd4f5b9af89d664bb58ab3", + "5f0be45aa0f54d9eb2411bc937bbd3c6", + "c27ce07dc8db490688ba5f6343087958", + "85ca9e909fd84f31a4f52c5a4e6cde61", + "d97d29043d324bc7af6bd7b53e29422f", + "64b372638eea4201b614ab319ba9b9ae", + "0d75f8ed36f14c87bcbc9f1ff5ddbc4a", + "f10222285e9541fd9d1db8c881ccc09b", + "18b1cf93232a447f8518471d4a9c1e8c", + "1ffc565aeed74ac996d557b0159b2c33", + "af4717d52e504abfaea0c358ae7e0f76", + "9642104f40cf40da95314a6cd44a5fef", + "e6d55ae7d4ed44efafe27101f02aa8f0", + "a92e898d92a74ce495bf77386dc9f21f", + "fe7e19c7622a47ec8e9e2d9d04500213", + "8805aa5076a24ae9bc223fe6cb910005", + "faba1704c59b4d699931f84b6bfa61aa", + "09ac76be51b24d7e9b9be8f7f6614059", + "b83e93f456bc429dabb682a89e128835", + "b5989b8df12e43fea1afef32ac430af3", + "6a25bc3ab90e4314942c447b08650ca7", + "af62a6cf872e43fd8cdb76f7d6e6df0d", + "985d8e12e67c4d07ab103a2d76f99028", + "63852f3e2eeb493d94e3c34771259db5", + "2262d5545b0b4375820e00c7e613ac92", + "ca842b2763d144aea843b59acbda8022", + "832b2db50bfb4fe1b1ab817c2be1ac01", + "0ac6f176dca842f2ba4e09468ab83043", + "6da2a2d4704b4806aacd771b59a43f84", + "5863661aee18406082b51825d69d0a44", + "27d1e9da5dee45fdb63f6de08ae65143", + "8b9886aa35a54a41a6af2afa6e661fbc", + "bddbcef57c864e6286363e858035a169", + "c8535acf855e41f1abd0d8065ed0680c", + "26c17bb78e9945bba56b3a3ce5a42d0d", + "17962665afef4956af6a6e76f35f5b96", + "0b20e34867a44376aac7d93d02df224c", + "2f938f0f854d48b6ad68b7cd0187e470", + "d4266b9e926c47e1a4ce7dad4b4325b5", + "70f966b6a89244a08ec63a16cc248b70", + "f5846789aab34454a1bfcce453a1df09", + "57f0d36ec289411e80c3a2461605a0a7", + "7deb73e1ee7f458ea32b4fd007c19069", + "a64fba89c9d34d81a526a12f21fcf08f", + "4273ac7e401a44d39c6843af8aa31572", + "d1de4b7ddb4c48d58b8be1051eadf140", + "1e23b909290b4962916925ebf586917e", + "92afa2d3ee1f4a5baa8f6f97f7e71892", + "3163cecaab6f4320be2369199d69b5fb", + "f7bab0d3ef5647ffac774871cc0f504c", + "d6efb37d02ab42a1a60ba8965a8d56ac", + "0a657c05ef7e47289a588646411b4318", + "f8c6f7eed198409e815f5845db51b928", + "5e20cc77b7da40fc9135f3ecca62e197", + "f24a39462b914fe99c542ded294aea04", + "ec935b25b52444f3b74c6d7d33f52122", + "3d411c020fe0409a93da112dcabc783a", + "23593594403e45a7b0244f753bcf5b0c", + "5905ab2a69fc49098aa7035e1c6c261d", + "f9e794c3c31847728edc9804702af29f", + "4cd84aaa9186481cb982d2af7e6a11a3", + "509c37b08f63481e9337f9d9a0e5c5ea", + "78b8db32936c423895488078e5a13ce9", + "eb522a2822e24b2dadbc76d48026cf4a", + "20b23431b2694afc812ed0cde81c7f23", + "a9d9b03863104bcfb1c41a5f112bcc9c", + "ce4e8b0534d34514985e8caa3d544621", + "60c913354b83467f8bf77ba2965967ea", + "c46c568119704de5a8962917e89a5079", + "9f94b485a3fa4aec92b7e8722d870695", + "e549fe82aae648a6a0bd98c431b65b32", + "dc5a8326e1384c29b6fd3d7d31d97954", + "db6e37e5de574e609e186a1c21fbe4ac", + "312b93f39f324225b77478b3eac11915", + "05339d7d916c4152ae95ac84a8237d07", + "657d24eb9a6041b6882ecfa975e2cf96", + "fd7f4340dc59470c89a8eaaef13c0a4c", + "08f4a0fdd81c4cb2bf5446516f40874a", + "8c8e21a7d19e44989840e76bb65f2b5e", + "646fed691bbc4fd5b8b56ec0a8ea505a", + "dd9b725937b94e07b1f722fb2e604132", + "32ad13d2aa544eb58acc0fe50c5f6654", + "b47cff39fc3149b4a0298beb3efdbf1d", + "983409daf43f46c3a6a1e033a530d89d", + "a3349a6ffbc44356a2dc3d0a7f294d22", + "aa755212dcb74aba8be832d2354dbf60", + "11cb86d66c204521b1ed7d610c8c5b84", + "fe56f1dc6e32476ab46a11dda735bf41", + "45c99abc8d444aa7bb97e9b21ddff9dd", + "1b9d61e9d6c14318ba9fce0758ec3c12", + "d55026bb9f964155bd4ebaaad01c971a", + "1f3d289555e24b249a866722a75162ab", + "acddaa31d3d9416ba748faf2622cac12", + "fa12a38d74ef4e03bd2fded049321362", + "6f3adce8869f46e1afed76a3f977d511", + "c9ca3f85df284d46bf9d82a8585a980e", + "c020c75e83a0468380a2d1146b6d3c51", + "3afe75b32aef492f9a3a56709ce200d2", + "48a5d54a5282465696c5e1459a02a9ca", + "2c00ce8b031143c1802564b9669f2e32", + "dd0d9f3c7f42445c8cbc29dc301863d4", + "6dcca1ce0d0748309236a2f9c071c8b2", + "1d2e775366874667a9fe2874910cb4a1", + "7ae6c88b4a1c424e886a0ccda1fc5c40", + "54e9e186fb3f4e76b8e814a0e12ab641", + "8221a569768543fe974c86c7e4ee6575", + "f3adfa816f604bdc9cdfc0216aeb2004", + "f77dac6b4b934bdb9b40677120549a3f", + "3f646621f58c4c4f96452e87429f4f54", + "25ee32d48f5c407eb34959eae01b7b5b", + "68ec097813134d2ba0314e95cb830b5c", + "a798d07b6a3747f9b18d4e68b1df59db", + "0f5e3eed24b342ee83bc1099c01d000d", + "b4592d91c67f4743aada76e476a7d139", + "5f216943827748f3abfad381165e7075", + "eabb9fc975574081b78a0904b7d4954e", + "671589b32ef047e3afb754932496ab8c", + "6d21367f9a53420291e7fb17157b222f", + "1a44b5e08e9f45ab9107b2d057d861bf", + "8be205d92e50498fb2e88ff1d561df44", + "963140e969d2478cb5c59bf2a5a26453", + "72806b37f61447cda790213af48f751a", + "ace8c0fe0e8148dd95bb167681e9a3cd", + "e3ab2529e1474cddba6c7139a8a0e333", + "585257c96cd543ce8ce452a1ba5add28", + "d92a97641bfa4878be01ee0b80a754c7", + "c5bb29716c3541bab1a9ccf1ce793826", + "b3f84185ecba40afad401d0321356d25", + "64874f38d09e46d0a5c68d673c089c8f", + "ee0010858a3044d3bcf1d93948ef18f2", + "27edde6ec9ba43eaae22ba337e714d72", + "65d8a9468fb64327ad94d83519931ba6", + "6565f8ad0e9e4d0ca1a47e037db1b44a", + "523183f7233349a686283624460b3825", + "d696b0b1f19b43a5a83eceac504ac011", + "7d12f4cdb7fb4f1088e7b7ba8d249397", + "75d1a3d949884db9b21729286aa0e631", + "db48a7a20f684b348cc4cec8e7a6cd47", + "7c7bc3b6557d4319aaefe186391f642d", + "d9a6ff2fb7a947b3923aab384082234f", + "c4f6d945e9164b56a6a15ef88f1f3228", + "360409dc5471456baacba72e7a00a3a0", + "4d67ac8d60ab47eb90d06f746af28b54", + "6a101771822f4b8bba51fb6b1ab521d5", + "f0b73af7bd6c48e1a3ed32f5dfcb967f", + "b67e83dc3ca64d839b599b4b873954f1", + "8771e565e29349f3a85f734baf794fac", + "b79f4fa45c0e4623bed283bbd03dd631", + "88689860baed4e9cb6c4c66ef172230b", + "bc4972a0f5f14f00975e8028e810cce6", + "2dcb1a510f264f34b9ae43ee2ba25cef", + "17f99d6aea284d5d86ee1e8132c88091", + "aebe0b9972e64924a03b7cd285b4db82", + "036ea88814ad4c58ba0f19dad8a32563", + "6d359082af44449db8488d71389ef000", + "51fd767beb95414683823b012e79ef0b", + "e0e3849e7a994d5693c5b51ca61c6d40", + "0dd0d00ec5294db99a9307083aaaa6b5", + "4bb6c279794542188be3e695e9feae9a", + "562c596d23884806ad08f1ed74167768", + "2e9d338d534442a2b122b383ebb867ae", + "8cbda26cab1a45af8cf03c8c465e47a9", + "8d61f513e66c4049aa47890b9df5da0c", + "cc29fa0ee239448db172375510a6ab90", + "e11d535c20ae45709652f8f318dc1c39", + "4da7a397e1a94c67a8a9331f9d973742", + "5bf9df8c0d2c4b8a97d6313494249c49", + "4ada248b2ecf4cdd82af32788ae57038", + "0db35e6b4dc04217b667e1a8d95e2f28", + "7222fa82d25c4d2eb5a8fad8f8ce65fe", + "120daeed5c8e42afb7acc37b58dc6752", + "7eb0722228714767bc6c51c9dd533dc9", + "1f1c87bda8a54ceca5837240e8012069", + "d1af63f0f32d425e8f0097af7e76530c", + "0a5037c5afd54bae9e416d5e5a487973", + "c57a1526a40449218a8d6c6c29489cbe", + "c2281693bbbb490d9f15e79079156817", + "52d298be3d57438798c2eb2b8a0fd6f8", + "b167952bad4b468ea6a3e7ed9cb9c142", + "76c93458ff434ad3938d307e0dea6111", + "b869eeeb7e2b4c688e7c2ddf2948ac07", + "bc4b7bfb931b4ddcb982cce850bb5ef3", + "7af4c13555c547a6ab1bb2850bdb2bdb", + "1f7a1272b6ac43cc83910147cbf3c4b2", + "73851764bf8846918e33cb1eb60206b3", + "aa6d57c8e72145b69b3b54f433b206e6", + "8d3aafc33e0d461d96ee87acaa13dc2a", + "316c98a8fb444d9a8f19f87be80ce5ac", + "abd31323e4fc43a48121556e861ef276", + "237e55b3a3c745e3897bb86bab57104d", + "bb28b887bfd84e9a85b0e8536f852eef", + "f6081e4103a846d4bcdfaf273069152f", + "de9a8f6653974b54b7fed5afe653c1ed", + "8d792cc582bc44c2ae20a62792e51f9c", + "cfc7c93895c64a4db718cca436f8aa5e", + "58238c55747a45068c5290f4b6a3de0d", + "002f1e63a5e74c9f8a51a0abacd7c98f", + "9f25254c9bad425dbb62a5958c3ad957", + "0d00081b1c104d6e81cad91213515623", + "49bdac785ca94a10a661b52519fc38a7", + "4cbcc8eb76f64207b882996533ea8b98", + "461b184571d04c669b8a2a83065850d1", + "6fa66c3ac5334696b74e4d1fdbe33735", + "5d1195ae5adc414e9ac8a674e4c1afb8", + "5c327b1c06b24f3c926a74a74e26421a", + "9a5c6544e7b64bc5a7cf5226aa8f71a1", + "88ef4babd66f47b09d9b2fe2d7c6180d", + "9f3cb7c933e84da7b74a0cbb636a21fd", + "efe8db89a81b4a1cbbbec77c0120ad9c", + "7e0fdd74bb224767b33075412cdec5c8", + "ff0677ec2cd0481ba0511d50f109701b", + "2574ba7a2d794fffa3efdce1f6d44edf", + "9d6f99b13d6c41dfbe5a29bf46840ce7", + "c5e796e58340425eb169000dcdcace1d", + "b03f35a18a874a0e869c870f0e502f84", + "8bfd97c65d1642788c104034bfa02821", + "db5a4525a19b49f39130df1cbf76338c", + "59262037c8744138bba0161187479447", + "ca730fc329304a13a1b92a2c230880b4", + "78e7bdcb674142fa94b3f5b104b3937b", + "0a9a352990104a87893e109ba065185d", + "e5de48cab8534dbbbe16e72600476d2a", + "af988da28f3b480cad980314cbd2c497", + "8355a644af774487ad283662235950bc", + "cb4124b1c9594270bbddb839b805c157", + "42a8668c2b7d4a7fa724479f3ca791bd", + "4c839e085dd44ff7897abf2e79034233", + "c875b141bcd548399e5a86ddadd3a296", + "ed64d377ea364088a937ffd099b46042", + "243620cd87194a908f18f07d88c7e2fa", + "26772f6eefa64736a6f761889abf19ac", + "93d03f8fe18c4a7aaa421230c021b2fd", + "27b4e61ecc8e49ee8a14bc255199a921", + "dfa1221fa5b84f6b933adf9cbe816de5", + "3025773d5e7642f1b883239b94106284", + "d63e3ff9f7bb403cb023128390fa7e93", + "bda3ad1df50844c8acaa66dea34ec248", + "0c50a4cb12fd42419797ceca32a44875", + "18ed8583cb8b448b91f011e52684d7a1", + "99f420804f15471f963df6c2b390c955", + "b7e1f5d67a4345debdbd9ce6845ddaec", + "d58cdf0fd91f4180b9d392de79eacda0", + "badb295b4c5d420493cd345fe68a2e02", + "beb4a5aa792d4726aa8d3323af17ddda", + "7e1b1d2d574b4e16889802798c645d34", + "2b72097536c743628fca8765700dcb94", + "117de765b0cd4d40babad6018994526d", + "49ac527bd7b94c9892d022319c706a9c", + "f3b05205f76b4c82a5505c94e1f305b2", + "63cf807e22974c62b2728f7d53840c38", + "4599049b64c14b978f28841e7601e469", + "729e3f41652f4d3b8ea797bdaf7b6d69", + "edc968e2053e4fa397fc8c8bc9b78453", + "115f1452356f499b89662160143fb660", + "a1a37ed448254e4c8bc89fd92c8f7040", + "1e4e6ba1baa64e738a71d4c47db3ab33", + "ecda9e28aa554909b550d4ee15b2da2f", + "3a971bac4b30494391b5c02b89749340", + "3c67ae5fd3d047ac8f37b676080cda16", + "7961235508754fe4a2f64e1268d2eb63", + "e1d4c7c49d57454d91fef60f029480a5", + "5c1eee8f6c8540eeb92540ed06d4463b", + "cf14ba2e218b4ff4b265c2fbf3db70ed", + "71dbe847ce6c429184b53514784603c8", + "7531bf2b1d794a4396015e999a533981", + "5fb685a0a1bd4619930518292089415e", + "286823dc618a40978e2914c33643c502", + "668a6f0128d646f0893cd1252a87aa22", + "b3ce9cf69fe1472aa79e68df2310170f", + "53aceed2624c49d5b0eef3aab3348b15", + "cc3ff740f4784abfa12a3531dcadf224", + "265e7613406146b18ba0072dab5c9ff3", + "f0d8c652bd9a44f48628c8fd6980cc58", + "61c258a5a75b46bd8ee3043d230c3d41", + "ea0fced22c124068a3e49d77780c6224", + "e820e75601874758a011a7da12beec6b", + "21c76a8f2fee4d40a5db21b6f4a78606", + "5acc8272e0d74533834ca2b861297a60", + "6c7e109523b84fc1a561f4f6037eebb8", + "d9de028c32a046ad9190f96a14813a85", + "e5f73de6d68241d59dcb9378775e3e1c", + "9707b351538d4f29931718d5223b40d0", + "d6cf3c9612e845a296015f516378457b", + "c7de9cf652ba49dd9b704e31541ec706", + "1f7a25a8512d430a82dad69156a76c38", + "fa7e72cbd0274917b9b03689cff1e499", + "3dd80f9219f0440495052e3eb036a451", + "d941ec9e27224c5aadc4a7190cd65a3a", + "ebcf3497432d441bb4dc3fe431f79c15", + "f877229daf424ea3a80207fc5268c6e9", + "4d4cb7a9a12f40f994d910c1c90140c5", + "7015879beee24afab430f7929ab081ef", + "0c27fdf9d4964fce9ca00783f82d4cae", + "86adbc9233394a748abff850661d4a48", + "1f223c0f8beb433fbd72ca2968ec05c4", + "c0f9f01c88ad46c9bb2d83ba246dd36f", + "8e54310ee90b469ba1015e9bca0ea3f2", + "30d18011729646d8b66d09e7bda3ce34", + "7ec3c478feb2490ba12259bbb6dc1e16", + "55c5a58dd5cd4df7a81b1a5f899b0fe6", + "b246ef088704488abd7dccb64a4dfe8a", + "b8937036edaf4122a51869db85532480", + "cef4c9ff6d5a4667b733525ff79f31a5", + "12243ee700d6495db6dfada2bd2d20c6", + "aa4ac8fee77b4a0ea88626c11d88927a", + "88d97b7486b644daa0e689b7136d26cd", + "5e9d81e06d1e4ff992e20ab4ec893178", + "e58e12291270488ea2c1c082e9d675cf", + "e7beec8597a74b178340af648d2800ea", + "a3ef5b89ec274bdfa1ecdd183f3de92f", + "eeba79e7bdbe423f95dac5a7f85f4d4d", + "c632675e604d4fa8a69709e549b6fad5", + "166ea3a0d64443d2a047a4db97ace0f4", + "c5fcc02e22614f8582a74194b6568073", + "c87bd9146b7f4c7aad89035ebcdf4bbd", + "1bf90eaa0a494dceb1b4944c57905006", + "27f3afb0c9f14e4c922905fcafaf0ce6", + "1e56449472e9432286b27a77ffbc77e7", + "e88a14a3910f4c158136f6075884ae04", + "db1927de659c46c981a3c4c8baa2e80c", + "a59b0fbf659c4a9a8cafcb7f9bb543db", + "0532be16e6cc4e84acfdc2dd863690f8", + "2b802e0dbe3946bb885c4282661fa6b1", + "3da94777a7684c91833dc822c98bdebc", + "11ea467ae3f440a7b3fc46317878ceb3", + "810434bfcba6436aabc64f472ce80a83", + "f93b451500c14f64b8da79c45c6b29cb", + "1d9e88d19d224252bf7a272a1bdf61ce", + "de7bd228a6eb416187c8a8759b42f25c", + "6b62622727d14dba8e4d4387e8afdcc3", + "15193e30504d481ead96c2f3b1c65c5b", + "bb05861217b94fd3998e032c6bf91e3c", + "f00b3345f1504547b449efe5a7f8fba6", + "da69d29f922a4a8ca0354d33bbc55e8a", + "0ad42c1bc319481d87c3cbe9fafec6a7", + "8e98997cec574b5c859257db1a0e4aff", + "8fca739bdcca4a45b51a65abfac5361f", + "78952538bade49a280a3ca0399bdcec6", + "ca764af7caa041f886f7de767f592ef3", + "4da47b74f4484170b3c24c7bd1ff21fd", + "3a730745e39a483bb4c9034ed155cdc0", + "1bac6203840d4d809e813e70e9055e1e", + "36d566082e424061994818bafcb656e9", + "e40a63bd97f34b48bcc508b1bdeaf964", + "66f8e3b0c0c24655ad88a58bba54944d", + "4a1287f18a2a48f69e344463ee7c8507", + "165e4d0577d84f32baf0eafd1c3f41c0", + "630b1906cf744f9885007b0a94ee1fc7", + "4729a8de72614642b488b1eecb415950", + "c9e3d8560523474daab73f0a05b2f692", + "839c19db5677497abb2ecd98ad8650d5", + "1a43aa51ade34190ab35b88d3f654bc5", + "fd78ed13057e4fbd991e21b84898c63f", + "ee321da4379641c48a252374d7f176b0", + "1981578d7dab4cab8d8a4142ae0bb283", + "71177a557ae14884b1fe707040de48be", + "7b012d50f401446b997a808e6d026745", + "880e48841d3b499ca31b7abe9a404df2", + "dceaec8aa4cb45dc91d6640e719a6f3a", + "d0ef85f47d6e46d8bf117261c4955927", + "691ca77011684000874da00fac019bc3", + "f2f1566a4f974d0c8584bfec50d0a2a8", + "294646f425be46d8b2a517184d8edb7d", + "ceda2e4252284898bebea50b42bf01ef", + "6dd882e5b1044aedbb99ee4d82e8399a", + "ad42a472cad04102973a21b19eb1a1c2", + "d0d78609dde74a809af0d81ac6b770bf", + "55a91ec95812429c8112ef20558ca17c", + "e11bceda0ee4428bae61b2b4c547b4f4", + "395f1eeaf28942059b17e2d83434ced8", + "3fd25bb631f5497caaeb184b043c3ab6", + "73f3cec4f20d4a87960803fbb6c6712a", + "0e0b7e13fb20413389ebbc2e11281906", + "be604a38466a45c182f5bbdf886ffdbf", + "f50b356bd6c844efa43297d22cdc053a", + "fa793d5cb0854c73b283872182afea14", + "c82ef4b59fd5480f817d2f59a5cc113f", + "9e10769dc4ae436c9604f6421b93e6b4", + "0cfeb87fd3054c66ae0810e0a7166479", + "704d2e559cb743868769a7bbf40603f8", + "ff4207c786fd4a238c70d2fffbd7dfe6", + "f01dccc90ad54bc99e3f5d2959ab6800", + "82303c74d5be480da718f32bfd7301fe", + "36dacbcbaa5748999b3b49f01cee149b", + "c16dda2a6cad49ddab73494a1bb24eff", + "f46423db7b944ba7a3d690dd598eb0c4", + "a0e1521fc11842f7868edaf660b43cd1", + "f81692540b27432ab2a8cc2d38939f7c", + "78b3d233f2f349938011779a73662b7a", + "ed93ae2fedca4a2b8c4e2c3d7275cf04", + "9dda4ee7d40242828b420b7e424d9d74", + "12c5260fb31b4765b5c338dd5aa4df3e", + "615d5a7c4afc4f51b4eb8dea348455c5", + "80183f885fb34af1950af04b433afe1a", + "8d3ccc1be7b54915911b7823ffa269e9", + "4296a710cc7b44c59f577a66e0245a48", + "6cb05c60a8b44c9d81f76869156fe6bf", + "149313cd47fb46e886a4fe0ad67cc8ca", + "992320681f074a6dbb2b5b2176e5f283", + "5af79e407a58479aa26fb56bb6528a57", + "76028dc817ca44e798058dfd9e6026a2", + "b107a348b5e041cba439903cc8422f16", + "2cadaadaf66d4c498536db2d97a902bf", + "9417690b1a524de886943827820674b8", + "17ef159cc0b04053a4d7e000a35add3a", + "c7c4b55d98a84f328899626963bade34", + "3b4a1442067543238f1e035969f07374", + "19ed115b38084a908384b484f6d7cb92", + "f35b421692fe42fcb6ef6036e7a25aea", + "b71d3c8cd9e6492c8cdc1d380e38cab8", + "d28626c9200b46bfa756beac0a62c076", + "f40dd70206d1434e9ba8947fc6efeb2d", + "6d5179519acb44ad9ec614b3fe549d1c", + "a6d9879eb523449b9b56019705a341c7", + "dc87662e881542efb1b35ca3af11caa9", + "dd3c819ea76f4783ad90b36576793c90", + "c63ab595f72743f6a66241d39a11cf7a", + "493a5a8326804dd88c9db77a5afb4a8c", + "7d5f3540380c4a25aea23a035cee796f", + "a44dfcc6cdbc4cd29e176e2ebcfb1a70", + "4e247a7f4790458499ea761e56fb2a64", + "1d1ea6baaa4140a1bc0e8aec084b36b4", + "426504f1b66e4b448ca112f66bb64933", + "4da735f1ec58438f8eb147d292cf7521", + "f41f40892f494bf180d410e7e47bf8ca", + "32c0af899d7f45b3a886e02ff18bfd02", + "00a371b694d44e85a1e30ef3fdf999b2", + "1c3918a4a6304e018a0e3e2ed3f80d83", + "22029a9301c9405493115e61b5e09673", + "552a17a5896649c8b060ceacd8f44b69", + "1dda5f9dd3d044c38c0d0a434e8e7723", + "121a972f334b455d9978d7cb73d0184e", + "2718767e45e34f21884a6017afffa4d7", + "2e4127908f1440438a6b5987bddb02af", + "151d62dbbf314cf88faa153d71ec7c9a", + "86e982e8d8c04d849eacd203458bba92", + "1bea5782683d42a6a108a6ac7ce64e5e", + "96547033d0a049d79fd9ed3cf3150d25", + "5a167c725a7f46fdbb1cca24e4398d9a", + "f281142bd3b94e33bf9b9b08d4e22711", + "97a1b1d278a04edab83079ee1a05bc3a", + "0c27ad1ab5f9414a9032137ec392d5a3", + "85e5b5b7870b479b93228a7180963507", + "87f14017fe2142ca9ff5553670656cab", + "5de5588bf2bf4cf784ccf7843c40962f", + "1a91cc1e10d2457d9b992f1c0c871203", + "e671fb12eada4b1b9eb6fb4d57b39189", + "7190a803f2464301a7adac2b6c9f47f2", + "6afc05b14609412bb8ee11833bb9f056", + "598e6a44d25b43c290bfe544ad11710b", + "713fe01a522a49b88e5fa8d5457b33b4", + "90f9c5eeaf24472a90f69575c56f42ba", + "6d9ed12955694511b4a4a942fbf10f8a", + "bdad09e44bfd4afaaea35ed9af6c0063", + "9a5d40d24f9c4def86bb156adbe15f99", + "ccfb8149121d442daf5eb11fb486be8c", + "798f83d089c74c5d994ac60b9348849b", + "bae92963e4c3459f82f2d6f3e7f2a0b2", + "9100566c5cfa4091be117bf1abf9e057", + "89117fb0240d4e4ea18677f52f6c47be", + "af9912968457493fa76eedb6e5ffe459", + "a27dd69930bb4974a920c0139be81c1e", + "dad5b83a9e4c4e478afac0cd537e59a2", + "c8a605adf0184a888e8d168064ebf350", + "13948d4594b34f93a299b471c0498d00", + "8b67d17ff1d74fc7805ac968c1bc9092", + "c0ce48bd3ce44f3bad1c95e3e3755656", + "a7833ca4e21b4e9e8102976d46361403", + "17dc5039afca4063852d91d9e91329f7", + "d27ff9f3405a43eca53397ebe39f4ad8", + "101f5ac9e8c743738bb54393a3f61ab2", + "dc03d56a5ffa49159f2a36bfa4406bc8", + "1fcf944c13974eee97fea6ae86186c43", + "8a26beb8090941c3b6cc94b89aacd3d8", + "c0618aae0f664acdbd8f787e06cbd104", + "a9b3fc18da254aa3b91b4ca7d0a403be", + "e3a8ef1048174cca8ff1b43e7369f5b8", + "21969e3e807b4e1788fc6750e29f3703", + "785f05edf93246a5a5d349c26d819dce", + "182a5cd793944bafaf5d96dd4daff5eb", + "f250f11c0f3f49059f45e56142726dcf", + "c20b5faa0e784d449444edd97100d327", + "b28e965ddcb148999e778f65968a2585", + "fc1a4c0040c34a958988eeef131cb6d1", + "37727ecc029b4c5595d9e488f872f2f3", + "9548e0034c5f448bbbe36cfb73ef8f71", + "1ab5f685dde6477c8b5b70d44826d005", + "9cdf2abf84284a768ccc894329574742", + "e7ab554b60aa445b9210145d64997889", + "211019de85a8401da8daac8117a65661", + "bd71637126eb4a41b0ee7e64820b6b3f", + "9f69ccb5992941b0ba11618a0cdeb37a", + "46f48594039f46949f01012f6422f385", + "cd2d74b4f71a4711bef0410a54692b12", + "e3bdcb432caf419990e2974feb58fdb6", + "474f2ff062c141b4be8e0b25f38ac372", + "c6001759a925469c93d33a27741b4e5e", + "11b0592d6210466d8bb94292b678fb20", + "0093de4412684178b1cbc6df6b751552", + "b56ceda414f44b07a24ea1de04aadb75", + "3e4000ce3b86404c8b23abdcb444f94c", + "02508f26a836433982430ac8f24452bb", + "149e4f5d0a3142388a5d1715879f6869", + "1d6446a1c0fd4d7e885eaba16d1ac852", + "ed8c9e810ee84cc29fd9b6654d36d735", + "ea11ad0cd1ee4e5b92736444e30dc92b", + "75b16c475502414cb3b594f995975be6", + "bf96353f30a648e7a4c937973f27e158", + "8f5e37a8aeb14bc4b494816d8cf218de", + "72a4ecfb47d847259c18ab3cf83e8fb7", + "47ba45902ac3432aaa6ee3212614162a", + "a3eb4369b7a34eca84ef9f3f994aa3c8", + "59d500dbb1664995ad7ed6a82e487842", + "493af2603c71475a9431b3cb117900d2", + "bb99c14acc334711834b69dbf8af0617", + "34f8cbfb8d6b49149730867abe768fb3", + "8006f4182b9940a9add1e82da35eb354" + ], + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "12ba9d1e-0ad3-43b7-9a94-fa58f6b1a4f2", + "outputId": "6f42309a-c94c-4375-cd63-9700f9cb90ed" + }, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "README.md: 0%| | 0.00/1.20k [00:00 Tuple[Optional[float], Optional[float]]:\n", + " \"\"\"\n", + " Evaluate a Gemma3 model on an OCR dataset.\n", + " \"\"\"\n", + " # Create output directory if it doesn't exist\n", + " os.makedirs(output_dir, exist_ok=True)\n", + "\n", + " # Initialize results storage\n", + " results = []\n", + "\n", + " # Process each sample in the dataset\n", + " for i, sample in enumerate(tqdm(dataset, desc=\"Evaluating OCR performance\", disable=not verbose)):\n", + " try:\n", + " # Extract components from sample\n", + " messages = sample['messages']\n", + "\n", + " # Get ground truth, image, and question, input_messages\n", + " ground_truth, image, question, input_messages = self._extract_sample_components(\n", + " messages, i, verbose\n", + " )\n", + "\n", + " if ground_truth is None or image is None or question is None:\n", + " continue\n", + "\n", + " # Generate model response\n", + " generated_response = self._generate_response(\n", + " model, processor, input_messages, max_new_tokens, temperature, top_p, top_k, do_sample\n", + " )\n", + "\n", + " # Calculate metrics\n", + " word_error = wer(ground_truth, generated_response)\n", + " char_error = cer(ground_truth, generated_response)\n", + "\n", + " # Save individual result\n", + " self._save_individual_result(\n", + " output_dir, i, question, generated_response, ground_truth, word_error, char_error\n", + " )\n", + "\n", + " # Store results for summary\n", + " results.append({\n", + " 'sample_id': i,\n", + " 'wer': word_error,\n", + " 'cer': char_error,\n", + " 'model_output': generated_response.strip(),\n", + " 'ground_truth': ground_truth,\n", + " 'question': question\n", + " })\n", + "\n", + " except Exception as e:\n", + " if verbose:\n", + " print(f\"Error processing sample {i}: {str(e)}\")\n", + " traceback.print_exc()\n", + "\n", + " # Generate summary report\n", + " return self._generate_summary_report(results, output_dir, verbose)\n", + "\n", + " def _extract_sample_components(\n", + " self,\n", + " messages: List[Dict],\n", + " sample_idx: int,\n", + " verbose: bool\n", + " ) -> Tuple[Optional[str], Optional[Any], Optional[str], List[Dict]]:\n", + " \"\"\"Extract ground truth, image, question, and input messages from sample.\"\"\"\n", + "\n", + " # Extract system message (if present)\n", + " system_message = next((msg for msg in messages if msg['role'] == 'system'), None)\n", + "\n", + " # Extract user message with the image and question\n", + " user_message = next((msg for msg in messages if msg['role'] == 'user'), None)\n", + " if not user_message:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No user message found\")\n", + " return None, None, None, []\n", + "\n", + " # Extract assistant message with ground truth\n", + " assistant_message = next((msg for msg in messages if msg['role'] == 'assistant'), None)\n", + " if not assistant_message:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No assistant message (ground truth) found\")\n", + " return None, None, None, []\n", + "\n", + " # Extract ground truth text\n", + " ground_truth = None\n", + " for content_item in assistant_message['content']:\n", + " if content_item['type'] == 'text':\n", + " ground_truth = content_item['text']\n", + " break\n", + "\n", + " if not ground_truth:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No text found in assistant message\")\n", + " return None, None, None, []\n", + "\n", + " # Extract image and question from user message\n", + " image = None\n", + " question = None\n", + "\n", + " for content_item in user_message['content']:\n", + " if content_item['type'] == 'image':\n", + " image = content_item['image']\n", + " # Ensure image is in RGB format\n", + " if hasattr(image, 'convert'):\n", + " image = image.convert('RGB')\n", + " elif content_item['type'] == 'text':\n", + " question = content_item['text']\n", + "\n", + " if not image:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No image found in user message\")\n", + " return None, None, None, []\n", + "\n", + " if not question:\n", + " if verbose:\n", + " print(f\"Skipping sample {sample_idx}: No question found in user message\")\n", + " return None, None, None, []\n", + "\n", + " # Construct messages for the model input (excluding assistant message)\n", + " input_messages = []\n", + " if system_message:\n", + " input_messages.append(system_message)\n", + " input_messages.append(user_message)\n", + "\n", + " return ground_truth, image, question, input_messages\n", + "\n", + " def _process_vision_info(self, messages: List[Dict]) -> List[Image.Image]:\n", + " \"\"\"Extract images from messages in Gemma3 format.\"\"\"\n", + " image_inputs = []\n", + " # Iterate through each conversation\n", + " for msg in messages:\n", + " # Get content (ensure it's a list)\n", + " content = msg.get(\"content\", [])\n", + " if not isinstance(content, list):\n", + " content = [content]\n", + "\n", + " # Check each content element for images\n", + " for element in content:\n", + " if isinstance(element, dict) and (\n", + " \"image\" in element or element.get(\"type\") == \"image\"\n", + " ):\n", + " # Get the image and convert to RGB\n", + " if \"image\" in element:\n", + " image = element[\"image\"]\n", + " else:\n", + " image = element\n", + " if hasattr(image, 'convert'):\n", + " image_inputs.append(image.convert(\"RGB\"))\n", + " else:\n", + " image_inputs.append(image)\n", + " return image_inputs\n", + "\n", + " def _generate_response(\n", + " self,\n", + " model: Any,\n", + " processor: Any,\n", + " input_messages: List[Dict],\n", + " max_new_tokens: int,\n", + " temperature: float,\n", + " top_p: float,\n", + " top_k: int,\n", + " do_sample: bool,\n", + " ) -> str:\n", + " \"\"\"Generate response from the Gemma3 model using the official approach.\"\"\"\n", + "\n", + " # Apply chat template to convert messages to text\n", + " text = processor.apply_chat_template(\n", + " input_messages, tokenize=False, add_generation_prompt=True\n", + " )\n", + "\n", + " # Process the images using the official vision processing function\n", + " image_inputs = self._process_vision_info(input_messages)\n", + "\n", + " # Tokenize the text and process the images\n", + " inputs = processor(\n", + " text=[text],\n", + " images=image_inputs,\n", + " padding=True,\n", + " return_tensors=\"pt\",\n", + " )\n", + "\n", + " # Move the inputs to the device\n", + " inputs = inputs.to(model.device)\n", + "\n", + " # Set up stop tokens (following the official implementation)\n", + " stop_token_ids = [\n", + " processor.tokenizer.eos_token_id,\n", + " processor.tokenizer.convert_tokens_to_ids(\"\")\n", + " ]\n", + "\n", + " # Generate the output with proper parameters\n", + " with torch.inference_mode():\n", + " generated_ids = model.generate(\n", + " **inputs,\n", + " max_new_tokens=max_new_tokens,\n", + " top_p=top_p,\n", + " top_k=top_k,\n", + " do_sample=do_sample,\n", + " temperature=temperature,\n", + " eos_token_id=stop_token_ids,\n", + " disable_compile=True # Following official implementation\n", + " )\n", + "\n", + " # Trim the generation (remove input tokens)\n", + " generated_ids_trimmed = [\n", + " out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)\n", + " ]\n", + "\n", + " # Decode the generated text\n", + " output_text = processor.batch_decode(\n", + " generated_ids_trimmed,\n", + " skip_special_tokens=True,\n", + " clean_up_tokenization_spaces=False\n", + " )\n", + "\n", + " return output_text[0] if output_text else \"\"\n", + "\n", + " def _save_individual_result(\n", + " self,\n", + " output_dir: str,\n", + " sample_idx: int,\n", + " question: str,\n", + " generated_response: str,\n", + " ground_truth: str,\n", + " word_error: float,\n", + " char_error: float\n", + " ):\n", + " \"\"\"Save individual sample result to file.\"\"\"\n", + " output_file = os.path.join(output_dir, f\"sample_{sample_idx}.txt\")\n", + " with open(output_file, 'w', encoding='utf-8') as f:\n", + " f.write(f\"Sample {sample_idx}\\n\")\n", + " f.write(f\"Question: {question}\\n\\n\")\n", + " f.write(f\"Model output:\\n{generated_response.strip()}\\n\\n\")\n", + " f.write(f\"Ground truth:\\n{ground_truth}\\n\\n\")\n", + " f.write(f\"WER: {word_error:.4f}, CER: {char_error:.4f}\")\n", + "\n", + " def _generate_summary_report(\n", + " self,\n", + " results: List[Dict],\n", + " output_dir: str,\n", + " verbose: bool\n", + " ) -> Tuple[Optional[float], Optional[float]]:\n", + " \"\"\"Generate and save summary report.\"\"\"\n", + " if not results:\n", + " if verbose:\n", + " print(\"No results to summarize.\")\n", + " return None, None\n", + "\n", + " df = pd.DataFrame(results)\n", + "\n", + " # Calculate overall averages\n", + " avg_wer = df['wer'].mean()\n", + " avg_cer = df['cer'].mean()\n", + "\n", + " # Save average metrics\n", + " with open(os.path.join(output_dir, \"avg_metrics.txt\"), 'w') as f:\n", + " f.write(f\"Average WER: {avg_wer:.4f}\\n\")\n", + " f.write(f\"Average CER: {avg_cer:.4f}\\n\")\n", + "\n", + " # Save detailed results\n", + " df.to_csv(os.path.join(output_dir, \"detailed_results.csv\"), index=False)\n", + "\n", + " if verbose:\n", + " print(\"\\nResults Summary:\")\n", + " print(f\"Average WER: {avg_wer:.4f}\")\n", + " print(f\"Average CER: {avg_cer:.4f}\")\n", + " print(f\"\\nDetailed results saved to {output_dir}/\")\n", + "\n", + " return avg_wer, avg_cer\n", + "\n", + " def add_to_comparison(self, model_name: str, wer: float, cer: float):\n", + " \"\"\"Add model results to the comparison tracker.\"\"\"\n", + " self.model_comparison_results[model_name] = {\n", + " \"wer\": wer,\n", + " \"cer\": cer\n", + " }\n", + "\n", + " def print_model_comparison(self, save_csv: bool = True, save_plot: bool = True) -> Optional[pd.DataFrame]:\n", + " \"\"\"Print a comparison of all models evaluated so far.\"\"\"\n", + " if not self.model_comparison_results:\n", + " print(\"No model results available for comparison\")\n", + " return None\n", + "\n", + " print(\"\\n==== MODEL COMPARISON REPORT ====\")\n", + "\n", + " # Create a comparison dataframe\n", + " comparison_df = pd.DataFrame({\n", + " \"Model\": list(self.model_comparison_results.keys()),\n", + " \"WER\": [results[\"wer\"] for results in self.model_comparison_results.values()],\n", + " \"CER\": [results[\"cer\"] for results in self.model_comparison_results.values()]\n", + " })\n", + "\n", + " # Sort by WER (best performance first)\n", + " comparison_df = comparison_df.sort_values(\"WER\")\n", + "\n", + " # Display the comparison table\n", + " print(\"\\nComparison Table (sorted by WER):\")\n", + " print(comparison_df.to_string(index=False))\n", + "\n", + " # Save the comparison table\n", + " if save_csv:\n", + " comparison_file = \"model_comparison_results.csv\"\n", + " comparison_df.to_csv(comparison_file, index=False)\n", + " print(f\"\\nComparison table saved to {comparison_file}\")\n", + "\n", + " # Generate a bar chart visualization\n", + " if save_plot:\n", + " self._create_comparison_plot(comparison_df)\n", + "\n", + " return comparison_df\n", + "\n", + " def _create_comparison_plot(self, comparison_df: pd.DataFrame):\n", + " \"\"\"Create and save comparison plot.\"\"\"\n", + " plt.figure(figsize=(12, 6))\n", + "\n", + " # Plot WER\n", + " plt.subplot(1, 2, 1)\n", + " plt.bar(comparison_df[\"Model\"], comparison_df[\"WER\"], color='skyblue')\n", + " plt.title('Word Error Rate Comparison')\n", + " plt.ylabel('WER (lower is better)')\n", + " plt.ylim(bottom=0)\n", + " plt.xticks(rotation=45, ha='right')\n", + "\n", + " # Plot CER\n", + " plt.subplot(1, 2, 2)\n", + " plt.bar(comparison_df[\"Model\"], comparison_df[\"CER\"], color='lightgreen')\n", + " plt.title('Character Error Rate Comparison')\n", + " plt.ylabel('CER (lower is better)')\n", + " plt.ylim(bottom=0)\n", + " plt.xticks(rotation=45, ha='right')\n", + "\n", + " plt.tight_layout()\n", + " plt.savefig('ocr_model_comparison.png')\n", + " plt.show()\n", + "\n", + " print(f\"\\nVisualization saved to ocr_model_comparison.png\")\n", + "\n", + " def get_comparison_results(self) -> Dict[str, Dict[str, float]]:\n", + " \"\"\"Get the current comparison results.\"\"\"\n", + " return self.model_comparison_results.copy()\n", + "\n", + " def clear_comparison_results(self):\n", + " \"\"\"Clear all comparison results.\"\"\"\n", + " self.model_comparison_results.clear()\n", + "\n", + "\n", + "# Convenience functions for backward compatibility\n", + "def evaluate_ocr_model(model, processor, dataset, output_dir=\"ocr_evaluation_results\", **kwargs):\n", + " \"\"\"\n", + " Convenience function that maintains backward compatibility with the original function.\n", + " \"\"\"\n", + " evaluator = OCRModelEvaluator()\n", + " return evaluator.evaluate_model(model, processor, dataset, output_dir, **kwargs)\n", + "\n", + "\n", + "def create_evaluator():\n", + " \"\"\"Create a new OCR evaluator instance.\"\"\"\n", + " return OCRModelEvaluator()" + ] + }, + { + "cell_type": "markdown", + "id": "45f7eeec-ffde-4992-86a7-fd78266219ef", + "metadata": { + "id": "45f7eeec-ffde-4992-86a7-fd78266219ef" + }, + "source": [ + "# Load and finetune gema3 model" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "4777f7fe-8fda-449a-b60b-91dfaa159fda", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 545, + "referenced_widgets": [ + "d1eef6bdbe3d4bb78ef2a16736b32d34", + "55c496da74c74845a35e8f1a4ac2e67d", + "41d7fbc0616049fda691a4e5ae271c59", + "1f2b028fb40846be9e3ac071a966580d", + "ca5d98cb646c4275bb9d14e492f45ef5", + "5cf9c9ac2fe84e6492b1d8597ebd2761", + "25098380d28f4d44b966855fa704cc18", + "e86d0b9c02504595bcba5832c5c81187", + "ce297effb81648efb902e6e277373731", + "5b871dc4911a4608906666d38b41e81a", + "bf8614f8384f4d43b7b5076d72728be8", + "e1ad1b67a5af44459cbe9c017a9dd548", + "4cd9f972fd484440a44fd5c0463a0837", + "4e86953eae8c404baf740c2179f2db4a", + "397b35406ee54e7e9d395879e8b02100", + "704cdc837e294dd5bc6bc2e1327572ec", + "b5c611e165a3463e8cab311be6b50d92", + "50b26cabf40c4a93990f63cb8b1b7eac", + "3757318cfe7f484ca3ee58a93aa86e51", + "6b54908b0e2047fea06c86c0da4de5e5", + "76d7ca472bd841b392039b0822e9075d", + "a218a8f879b24775989613458acef7d0", + "9956c0622f074f1b9aa49df9552995c4", + "dda301f5f4cc415fa9c838b61cc03a1c", + "8f68fd6d20cd4a458d532a2998a2ac86", + "a7b4aca963fc4fecb3cd76487bfa005e", + "5fef441c8ead4d8a847d7bf0fe4e0ee7", + "e7ccdde727724a3f983073db55829a4a", + "40f9581376d64fb3a02c390f8fd28e70", + "3c980011e337453ab7ad5b23aec3f740", + "00b976f13199467ba4ed1974dc0939be", + "5a9cc93c73484a2290146f6cbb03007b", + "c4d249461c14458881ec61dcd1265366", + "47f94cdb685841bb9c52fb5ee4889dbd", + "d428053cd1d54e789dd56069b4534e73", + "e4959808ccfb4e438fcdbb27f3cbcbf7", + "2db711b173404e81bfb322d2f1bf5674", + "6b7a124075d342c292071da7df1ad6f8", + "d3cb7b784052494392bf54efed0e4ceb", + "ccb6eb195f2c4d52b1b9e43786e4c335", + "eb3ecb80ff4c4a808166255b063f1acb", + "5c98a866c8f54789bca2503576ffb48d", + "6941d9f4f5144fe3af0a7c0670c265fe", + "928eb0bb10154c1ea6c485c0829ca601", + "153052ab0f214ccc812f336a8b9fdb10", + "258606f52534426d809a31ca16c83cff", + "664dee44d4db489ebac3f0f300ae358e", + "6be2e0d618de482ab8449fa4d8f3602c", + "9c6948a5931d4e2991599dd8c67ec96a", + "5c08683bba434c8682abf70ef1e4b236", + "12fcc18072474d73b6c7095a9d89ee38", + "cafa418c77a8446fbcf6e1404cddf727", + "d351059bf934403984334a9d8262877b", + "a7cc713d43da44329d34030a74ce129d", + "99612b25241048f6a4fd7c7787a5146a", + "0aea2306a17b4ed1a17a1c0bf84671cb", + "b73617d7fdf042ac8eb1fb921202485f", + "d22663ed41d54def99f8a7c4054073dc", + "ea938db6cecd421f8a86e8cad059b99e", + "0a35fe04ea534cb1928e332ab26e4464", + "e1b08699068e458eb91f7257eb8b67ba", + "bddebac3960d47eda8d14b7a3821a8e6", + "6c9e1a70a2734c1f90cf1d7e27dfe0bc", + "0a24f30660a04e768d9dd42aa058f570", + "adc63922c235442a82eeaa677e567bfa", + "3119e91b42f647a98c68337633245905", + "97166fdcc29941b5ab43c5b0e8a4b4a1", + "625bd8cb2f73454ba3cfdd09243625b2", + "f8bdca37858149449fd6dee994230866", + "c2d86492980f4cd5bda1b23d2bbec2f9", + "601d02a830f64302ad3e7195070afd18", + "b8395091164147978340c8994f868716", + "c02c7f8724f449fe98f43b18e7ac7683", + "150df82d82be4125881b4d3a4aca7481", + "45dec945707449ffbedaf2a0b02d32ec", + "f252cdafd81c47549d312f8d1389571b", + "6d4a408cac5f476486632163f21c3f9f", + "03f9c0dab35c4598bf0df4cf736ed7ec", + "405a61475e554b7dbd93a179142bef04", + "1db4a4d17f4f4fb6bda53edf385f610c", + "88cb4090c9dc416fbbd8e0bf1cb2237a", + "791806ccfaca49f48a3559aeafbbb4cb", + "3f788ccab44247bdba092c09a466fb29", + "13d85f50a1e044a59c8758dbfe876387", + "9c2afc15277b40d0bd457d080d362b38", + "8afa6211f80f4f08b206c41643615e54", + "71a192bbfe824cb4ade2dc9958214b19", + "d31dff526b7e499788c2bde4e762cf6b", + "f34a03fe9aff48b7b73318c4c3637df6", + "b2cfb1f473524d2a959c2bfca4fb5e00", + "560a298e46c848208acb0f2aed84db05", + "867cce2202344b20ae7df65d465633d9", + "e17b530b233a4ccfa88c0fc33ef2e199", + "24fbbff577e743fbbc638c8980a6d2d9", + "35f5a8497baf44c59e6653d911de8e57", + "6146f1b535ec4b128b631e35b0dce301", + "2367eaa0b63143699bce66ceb523d76b", + "e813e17f60f54f3bbc07eabf67f5b9e0", + "a17917337e644feea716ab7d5fb597ea", + "c6e9dc293eec482f8c2ea928ec13edbd", + "74245415239c44ddbd9691cf6e3d0be5", + "a59a4a271ffb4e8ea0120b6079922e81", + "cea087ca10cf4122902ede311be21b62", + "efa352415a314c4385673f71e65a6021", + "220ffbcb06de430d99a049016cf1b637", + "c0fe9034afcf41ceb79fe41e72b4e691", + "ca9b6376e7904dddbdce29bddba01ead", + "e1f8584327ec473cad71eff637e0ff0d", + "f970303663fc409486ad85cab5382365", + "3dee35b1dde04fa8bfdd9e16a60a0fd8", + "8ea08c40ba58415d97b7a21fa2555c12", + "d17c0c915585494daeaf10b92ff32154", + "7cb8697e17c24045b5987759c09ec345", + "0df79ba1c89745bb9148bfdec51cb1b0", + "4fcf4c4618074a798eafdc6c0ce61337", + "fe5f751c66c24b2996b293f5ec32956a", + "f9a949c4ae8b471f862bfe2835cc876f", + "235945dfb09748e9a139bf901566387c", + "ef94f88b1cb643d0ab04802b542036b8", + "7e02819973814f74953d00d4b5126222", + "2f1e3f1615134b2f8a4f15558a259787" + ] + }, + "id": "4777f7fe-8fda-449a-b60b-91dfaa159fda", + "outputId": "557ba751-acfe-4aa2-d90a-735556d3d4af" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Unsloth: Using float32 gradient checkpointing for FORCE_FLOAT32 mode\n", + "==((====))== Unsloth 2025.6.2: Fast Gemma3 patching. Transformers: 4.52.4.\n", + " \\\\ /| Tesla T4. Num GPUs = 1. Max memory: 14.741 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.6.0+cu124. CUDA: 7.5. CUDA Toolkit: 12.4. Triton: 3.2.0\n", + "\\ / Bfloat16 = FALSE. FA [Xformers = 0.0.29.post3. 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" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "model.safetensors: 0%| | 0.00/4.56G [00:00\n" + ] + } + ], + "source": [ + "FastVisionModel.for_inference(model) # Enable for inference!\n", + "\n", + "sample = dataset[1]\n", + "\n", + "image = sample[\"image\"].convert('RGB')\n", + "messages = [\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": [\n", + " {\n", + " \"type\": \"text\",\n", + " \"text\": sample[\"question\"],\n", + " },{\n", + " \"type\": \"image\",\n", + " }\n", + " ],\n", + " },\n", + " ]\n", + "input_text = processor.apply_chat_template(messages, add_generation_prompt = True)\n", + "inputs = processor(\n", + " image,\n", + " input_text,\n", + " add_special_tokens = False,\n", + " return_tensors = \"pt\",\n", + ").to(\"cuda\")\n", + "\n", + "from transformers import TextStreamer\n", + "text_streamer = TextStreamer(processor.tokenizer, skip_prompt = True)\n", + "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n", + " use_cache = True, temperature = 1.5, min_p = 0.1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "3a2deb57-cd2e-47bf-988e-919d3db4d0b2", + "metadata": { + "id": "3a2deb57-cd2e-47bf-988e-919d3db4d0b2", + "outputId": "aaeb5c2d-db5a-4394-e2c4-2733b1354860", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Unsloth: Making `base_model.model.model.vision_tower.vision_model` require gradients\n" + ] + } + ], + "source": [ + "model = FastVisionModel.get_peft_model(\n", + " model,\n", + " finetune_vision_layers = True, # False if not finetuning vision layers\n", + " finetune_language_layers = True, # False if not finetuning language layers\n", + " finetune_attention_modules = True, # False if not finetuning attention layers\n", + " finetune_mlp_modules = True, # False if not finetuning MLP layers\n", + "\n", + " r = 16, # The larger, the higher the accuracy, but might overfit\n", + " lora_alpha = 16, # Recommended alpha == r at least\n", + " lora_dropout = 0,\n", + " bias = \"none\",\n", + " random_state = 3407,\n", + " use_rslora = False, # We support rank stabilized LoRA\n", + " loftq_config = None, # And LoftQ\n", + " target_modules = \"all-linear\", # Optional now! Can specify a list if needed\n", + " modules_to_save=[\n", + " \"lm_head\",\n", + " \"embed_tokens\",\n", + " ],\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "2c7c4695-e93a-4e6d-a943-690543bcbb72", + "metadata": { + "id": "2c7c4695-e93a-4e6d-a943-690543bcbb72" + }, + "outputs": [], + "source": [ + "from unsloth import is_bf16_supported\n", + "from unsloth.trainer import UnslothVisionDataCollator\n", + "from trl import SFTConfig, SFTTrainer\n", + "FastVisionModel.for_training(model) # Enable for training!\n", + "model.config.use_cache = False\n", + "\n", + "\n", + "args = SFTConfig(\n", + " per_device_train_batch_size = 1,\n", + " gradient_accumulation_steps = 4,\n", + " gradient_checkpointing=True,\n", + " gradient_checkpointing_kwargs = {\"use_reentrant\": False}, # use reentrant checkpointing\n", + " max_grad_norm=0.3, # max gradient norm based on QLoRA paper\n", + " warmup_ratio=0.03,\n", + " max_steps=60,\n", + " #num_train_epochs = 2, # Set this instead of max_steps for full training runs\n", + " learning_rate = 2e-4,\n", + " fp16 = not is_bf16_supported(),\n", + " bf16 = is_bf16_supported(),\n", + " logging_steps = 5,\n", + " save_strategy=\"epoch\",\n", + " optim = \"adamw_torch_fused\",\n", + " weight_decay = 0.01,\n", + " lr_scheduler_type = \"cosine\",\n", + " seed = 3407,\n", + " output_dir = \"gemma3-french-ocr-checkpoints\",\n", + " report_to = \"none\", # For Weights and Biases\n", + "\n", + " # You MUST put the below items for vision finetuning:\n", + " remove_unused_columns = False,\n", + " dataset_text_field = \"\",\n", + " dataset_kwargs = {\"skip_prepare_dataset\": True},\n", + " dataset_num_proc = 4,\n", + " max_seq_length = 2048,\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "37acf3c3-2804-4f95-9b78-fdec749112ce", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "37acf3c3-2804-4f95-9b78-fdec749112ce", + "outputId": "26384b4e-2f6c-4223-d32a-d1d9dee5a6b7" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Unsloth: Switching to float32 training since model cannot work with float16\n" + ] + } + ], + "source": [ + "from trl import SFTTrainer\n", + "from unsloth.trainer import UnslothVisionDataCollator\n", + "trainer = SFTTrainer(\n", + " model=model,\n", + " args=args,\n", + " train_dataset=train_dataset,\n", + " processing_class=processor.tokenizer,\n", + " data_collator=UnslothVisionDataCollator(model,processor),\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "70ccb372-8d17-4076-8b2f-692fca151396", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 556 + }, + "id": "70ccb372-8d17-4076-8b2f-692fca151396", + "outputId": "93f4674e-3fe8-46ce-d08b-a5246c7edd47" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "==((====))== Unsloth - 2x faster free finetuning | Num GPUs used = 1\n", + " \\\\ /| Num examples = 2,000 | Num Epochs = 1 | Total steps = 60\n", + "O^O/ \\_/ \\ Batch size per device = 1 | Gradient accumulation steps = 4\n", + "\\ / Data Parallel GPUs = 1 | Total batch size (1 x 4 x 1) = 4\n", + " \"-____-\" Trainable parameters = 38,497,792/4,000,000,000 (0.96% trained)\n", + "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "\n", + "

\n", + " \n", + " \n", + " [60/60 13:11, 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", + " \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
520.030800
104.455900
150.891400
200.677600
250.571900
300.537200
350.535200
400.405400
450.494500
500.407900
550.384700
600.463700

" + ] + }, + "metadata": {} + } + ], + "source": [ + "trainer_stats = trainer.train()" + ] + }, + { + "cell_type": "markdown", + "id": "fb5aa90d-2f90-4e9f-b99c-5bcba0ff68c3", + "metadata": { + "id": "fb5aa90d-2f90-4e9f-b99c-5bcba0ff68c3" + }, + "source": [ + "# save qlora adapter" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "7fa983e6-d0f7-4b4c-a924-5612b47acb2b", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "7fa983e6-d0f7-4b4c-a924-5612b47acb2b", + "outputId": "db180cdd-8a92-4ef9-dd13-2d7929f829eb" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Voulez-vous connaître cette langue belle et mystérieuse qui est le russe?\n" + ] + } + ], + "source": [ + "sample=dataset[6]\n", + "image = sample[\"image\"].convert('RGB')\n", + "messages = [\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": [\n", + " {\n", + " \"type\": \"text\",\n", + " \"text\": sample[\"question\"],\n", + " },{\n", + " \"type\": \"image\",\n", + " }\n", + " ],\n", + " },\n", + " ]\n", + "input_text = processor.apply_chat_template(messages, add_generation_prompt = True)\n", + "inputs = processor(\n", + " image,\n", + " input_text,\n", + " add_special_tokens = False,\n", + " return_tensors = \"pt\",\n", + ").to(\"cuda\")\n", + "\n", + "from transformers import TextStreamer\n", + "text_streamer = TextStreamer(processor.tokenizer, skip_prompt = True)\n", + "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n", + " use_cache = True, temperature = 1.5, min_p = 0.1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "13aaa234-8452-4a60-92bd-624b58ee91ec", + "metadata": { + "id": "13aaa234-8452-4a60-92bd-624b58ee91ec", + "outputId": "d8ef4ffb-a3cb-40e3-ef23-a143f961598b", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['unsloth-gemma3-ocr-adapter/processor_config.json']" + ] + }, + "metadata": {}, + "execution_count": 22 + } + ], + "source": [ + "model.save_pretrained(\"unsloth-gemma3-ocr-adapter\", processor)\n", + "processor.save_pretrained(\"unsloth-gemma3-ocr-adapter\")" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "73b835c5-ea65-4bbe-bc73-8a712759115d", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "73b835c5-ea65-4bbe-bc73-8a712759115d", + "outputId": "f949b94b-7976-484d-fd88-a7cb398bb185" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "Evaluating OCR performance: 100%|██████████| 200/200 [20:46<00:00, 6.23s/it]" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "Results Summary:\n", + "Average WER: 0.0475\n", + "Average CER: 0.0085\n", + "\n", + "Detailed results saved to peft_model_results/\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "\n" + ] + } + ], + "source": [ + "# benchmark lora model performance\n", + "model_name = \"Peft model\"\n", + "avg_wer, avg_cer = ocr_evaluator.evaluate_model(model=model, processor=processor, dataset=eval_dataset, top_p=0.95, top_k=64, output_dir=\"peft_model_results\", max_new_tokens=64, temperature=1.0)\n", + "ocr_evaluator.add_to_comparison(model_name, avg_wer, avg_cer)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "bc35b36a-e1f9-4c27-812f-54c36083238b", + "metadata": { + "id": "bc35b36a-e1f9-4c27-812f-54c36083238b", + "outputId": "42394d8f-9818-4bf2-ff91-154ab9685968", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Tuaurais dû voir ces hommes, mère.\n" + ] + } + ], + "source": [ + "sample=dataset[9]\n", + "image = sample[\"image\"].convert('RGB')\n", + "messages = [\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": [\n", + " {\n", + " \"type\": \"text\",\n", + " \"text\": sample[\"question\"],\n", + " },{\n", + " \"type\": \"image\",\n", + " }\n", + " ],\n", + " },\n", + " ]\n", + "input_text = processor.apply_chat_template(messages, add_generation_prompt = True)\n", + "inputs = processor(\n", + " image,\n", + " input_text,\n", + " add_special_tokens = False,\n", + " return_tensors = \"pt\",\n", + ").to(\"cuda\")\n", + "\n", + "from transformers import TextStreamer\n", + "text_streamer = TextStreamer(processor.tokenizer, skip_prompt = True)\n", + "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n", + " use_cache = True, temperature = 1.5, min_p = 0.1)\n" + ] + }, + { + "cell_type": "markdown", + "id": "c966d45e-6c06-44fd-a98d-c07831bee864", + "metadata": { + "id": "c966d45e-6c06-44fd-a98d-c07831bee864" + }, + "source": [ + "# Merge model" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "922f02f5-1c14-4927-a22c-b7efa57324e5", + "metadata": { + "id": "922f02f5-1c14-4927-a22c-b7efa57324e5" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "c88e0a60-9dc9-43e5-a539-7e3430096bfa", + "metadata": { + "id": "c88e0a60-9dc9-43e5-a539-7e3430096bfa", + "outputId": "9b5d6e21-bd4a-4b93-914c-f66de92a4f73", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 252, + "referenced_widgets": [ + "aaf4dca7fc2043aa9450cda3cac4a035", + "3c5797f551b54b7cbfeb8abae998d0aa", + "dd0d6209659548918f28179b10bb07f3", + "be5684f4cebc4db99ea76c5dbbfef8a5", + "65b3e158093842288ecac2b6e6f5a7d1", + "6c52ec6005b04251b12c2179de74fdb6", + "eb92790c78ea46f8b980f0235ef798bc", + "2db204cc714d43edb27884c8224c0192", + "bb16b9f789664c64a49fe77c4a269b7a", + "a1dbd08fb74349c2a9769171105e337b", + "1121007f078a4f9eae9edc761258bbd0", + "27d6b7e5deeb4371944b28ff4cfbc4f9", + "88d00e895eff48b59264741987e8ae22", + "4bfd10c842fd49558fa55c9aff701751", + "c01279595f894b079a53fc9a27b85065", + "eee4edf3a74949bba86170aa1f9a9d73", + "64bb8860d5a445e9a0692c556386759a", + "2d511c15f15443f5851cb2f7d0f19657", + "b75ad3dc69b148abb1d7e10da0c4cfa8", + "6f4e2f46cf1b4bdda468f7a7698cd4d2", + "b7140418f90b407abec20f7237da867c", + "c4131b63695d4d7eb917b59073376008", + "de3de45141d64ffb826faefe6b226b1a", + "3921056cf27a4a8a9fe2629d709ccee4", + "396c50ab4b15487bb05d56bd9a44ac1a", + "6f26197b12fc4cd6a39a55b6eb7f082c", + "bdff733a77e7491996cc5282b705ec00", + "2142394c3bdc4c65816d28e8a81b45aa", + "0f9bfb2c3a704bdd908253faf2091041", + "8e1440439c0740d88d2922818393dca7", + "edf7763f12c542d7974e1a89451c6018", + "a770c66d46944da7ad82fdae8300b96a", + "854d90236ebc4fb293345a3bb8b136c2" + ] + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Found HuggingFace hub cache directory: /root/.cache/huggingface/hub\n", + "Checking cache directory for required files...\n", + "Cache check failed: model-00001-of-00002.safetensors not found in local cache.\n", + "Not all required files found in cache. Will proceed with downloading.\n", + "Downloading safetensors index for unsloth/gemma-3-4b-it...\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "model.safetensors.index.json: 0%| | 0.00/90.6k [00:00') for convo in convos] + return { "text" : texts, } + +def load_and_compute_8bit_ppl(result_queue, load_in_4bit=False, load_in_8bit=False): + """Load model and compute perplexity in subprocess""" + from unsloth import FastModel + from unsloth.chat_templates import get_chat_template + from perplexity_eval import ppl_model + + # Load model + merged_model, merged_tokenizer = FastModel.from_pretrained( + model_name="./unsloth_out/merged_gemma3_text_model", + max_seq_length=2048, + load_in_4bit=load_in_4bit, + load_in_8bit=load_in_8bit, + ) + # Set up tokenizer + merged_tokenizer = get_chat_template( + merged_tokenizer, + chat_template = "gemma-3", +) + + # Load dataset fresh in subprocess + dataset_ppl = load_dataset("allenai/openassistant-guanaco-reformatted", split="eval") + + # Format the dataset + def formatting_prompts_func(examples): + convos = examples["messages"] + texts = [merged_tokenizer.apply_chat_template(convo, tokenize = False, add_generation_prompt = False).removeprefix('') for convo in convos] + return { "text" : texts, } + dataset_ppl = dataset_ppl.map(formatting_prompts_func, batched=True) + + # Compute perplexity using the passed dataset + ppl_value = ppl_model(merged_model, merged_tokenizer, dataset_ppl) + + + # IMPORTANT: Convert to Python float if it's a tensor + if torch.is_tensor(ppl_value): + ppl_value = ppl_value.cpu().item() # Move to CPU and convert to Python scalar + elif hasattr(ppl_value, 'item'): + ppl_value = ppl_value.item() # Convert numpy or other array types + else: + ppl_value = float(ppl_value) # Ensure it's a float + + # Return only the perplexity value + result_queue.put(ppl_value) + + # Clean up + del merged_model + del merged_tokenizer + del dataset_ppl + torch.cuda.empty_cache() + gc.collect() + +# Main execution code should be wrapped in this guard +if __name__ == "__main__": + mp.set_start_method('spawn', force=True) + + if torch.cuda.is_bf16_supported(): + compute_dtype = torch.bfloat16 + attn_implementation = 'flash_attention_2' + else: + compute_dtype = torch.float16 + attn_implementation = 'sdpa' + + model, tokenizer = FastModel.from_pretrained( + model_name="unsloth/gemma-3-1b-it", + max_seq_length=2048, + dtype=compute_dtype, + load_in_4bit=True, + load_in_8bit=False, + full_finetuning=False, + attn_implementation=attn_implementation + ) + + tokenizer = get_chat_template( + tokenizer, + chat_template = "gemma-3", + ) + + from unsloth.chat_templates import standardize_sharegpt + dataset_train = load_dataset("allenai/openassistant-guanaco-reformatted", split="train") + dataset_ppl = load_dataset("allenai/openassistant-guanaco-reformatted", split="eval") + + dataset_train = dataset_train.map(formatting_prompts_func, batched=True) + dataset_ppl = dataset_ppl.map(formatting_prompts_func, batched=True) + + add_to_comparison("Base model 4 bits", ppl_model(model, tokenizer, dataset_ppl)) + + + model = FastModel.get_peft_model( + model, + finetune_vision_layers = False, # Turn off for just text! + finetune_language_layers = True, # Should leave on! + finetune_attention_modules = True, # Attention good for GRPO + finetune_mlp_modules = True, # SHould leave on always! + + r=16, + #target_modules=['k_proj', 'q_proj', 'v_proj', 'o_proj', "gate_proj", "down_proj", "up_proj"], + target_modules = "all-linear", + lora_alpha=16, + lora_dropout=0, + bias="none", + use_gradient_checkpointing="unsloth", + random_state=3407, + use_rslora=False, + loftq_config=None, + modules_to_save=[ + "lm_head", + "embed_tokens" + ] + ) + + from unsloth import is_bfloat16_supported + + + trainer = SFTTrainer( + model=model, + tokenizer=tokenizer, + train_dataset=dataset_train, + max_seq_length=2048, + packing=False, + args=SFTConfig( + dataset_text_field="text", + per_device_train_batch_size=2, + gradient_accumulation_steps=4, + gradient_checkpointing=True, + gradient_checkpointing_kwargs={"use_reentrant":False}, + warmup_ratio=0.03, + max_steps=40, + learning_rate=3e-4, + fp16=not is_bfloat16_supported(), + bf16=is_bfloat16_supported(), + logging_steps=5, + #optim="adamw_8bit", + optim="adamw_8bit", + lr_scheduler_type="linear", + seed=3407, + output_dir="outputs", + report_to="none", + max_grad_norm=0.3, + dataset_num_proc=2, + ), + ) + + from unsloth.chat_templates import train_on_responses_only + trainer = train_on_responses_only( + trainer, + instruction_part = "user\n", + response_part = "model\n", + ) + + # run training + trainer_stats = trainer.train() + + add_to_comparison("Qlora model", ppl_model(model, tokenizer, dataset_ppl)) + + # saving and merging the model to local disk + print("merge and save to local disk") + model.save_pretrained_merged( + save_directory='./unsloth_out/merged_gemma3_text_model', + tokenizer=tokenizer + ) + + # Clean up + del model + del tokenizer + del trainer + torch.cuda.empty_cache() + gc.collect() + + + # load model from local disk and test + print("Loading merged model in 4 bit for perplexity test") + merged_model, merged_tokenizer = FastModel.from_pretrained( + model_name="./unsloth_out/merged_gemma3_text_model", + max_seq_length=2048, + load_in_4bit=True, + load_in_8bit=False, + ) + + add_to_comparison("merged model load 4bit", ppl_model(merged_model, merged_tokenizer, dataset_ppl)) + + # Clean up + del merged_model + del merged_tokenizer + torch.cuda.empty_cache() + gc.collect() + + + print("Computing 8-bit model perplexity in subprocess...") + result_queue = mp.Queue() + p = mp.Process(target=load_and_compute_8bit_ppl, args=(result_queue, False, True)) + p.start() + p.join() + + ppl_8bit = result_queue.get() + add_to_comparison("merged model loaded 8bits", ppl_8bit) + + print("Loading merged model in 16 bit for perplexity test") + merged_model, merged_tokenizer = FastModel.from_pretrained( + model_name="./unsloth_out/merged_gemma3_text_model", + max_seq_length=2048, + load_in_4bit=False, + load_in_8bit=False, + ) + + add_to_comparison("merged model loaded 16bits", ppl_model(merged_model, merged_tokenizer, dataset_ppl)) + + print_model_comparison() + + # final cleanup + safe_remove_directory("./outputs") + safe_remove_directory("./unsloth_compiled_cache") + safe_remove_directory("./unsloth_out") diff --git a/tests/gemma3_fix_tests/test_gemma3_4b_language_model_perplexity.py b/tests/gemma3_fix_tests/test_gemma3_4b_language_model_perplexity.py new file mode 100644 index 0000000000..aeb8b0b1d4 --- /dev/null +++ b/tests/gemma3_fix_tests/test_gemma3_4b_language_model_perplexity.py @@ -0,0 +1,228 @@ +from unsloth import FastModel, FastVisionModel, UnslothVisionDataCollator +from unsloth.chat_templates import get_chat_template +from trl import SFTTrainer, SFTConfig +from transformers import DataCollatorForLanguageModeling, DataCollatorForSeq2Seq, TrainingArguments +from datasets import load_dataset, Dataset +import torch +from tqdm import tqdm +import pandas as pd +import multiprocessing as mp +from multiprocessing import Process, Queue +import gc + +# ruff: noqa +import sys +from pathlib import Path + + +REPO_ROOT = Path(__file__).parents[2] +sys.path.insert(0, str(REPO_ROOT)) +print(sys.path) + + +from tests.utils.cleanup_utils import safe_remove_directory +from tests.utils.perplexity_eval import ppl_model, add_to_comparison, print_model_comparison + +# Define helper functions outside of main +def formatting_prompts_func(examples): + convos = examples["messages"] + texts = [tokenizer.apply_chat_template(convo, tokenize = False, add_generation_prompt = False).removeprefix('') for convo in convos] + return { "text" : texts, } + +def load_and_compute_8bit_ppl(result_queue, load_in_4bit=False, load_in_8bit=False): + """Load model and compute perplexity in subprocess""" + from unsloth import FastModel + from unsloth.chat_templates import get_chat_template + from tests.utils.perplexity_eval import ppl_model + + # Load model + merged_model, merged_tokenizer = FastModel.from_pretrained( + model_name="./unsloth_out/merged_gemma3_text_model", + max_seq_length=2048, + load_in_4bit=load_in_4bit, + load_in_8bit=load_in_8bit, + ) + # Set up tokenizer + merged_tokenizer = get_chat_template( + merged_tokenizer, + chat_template = "gemma-3", +) + + # Load dataset fresh in subprocess + dataset_ppl = load_dataset("allenai/openassistant-guanaco-reformatted", split="eval") + + # Format the dataset + def formatting_prompts_func(examples): + convos = examples["messages"] + texts = [merged_tokenizer.apply_chat_template(convo, tokenize = False, add_generation_prompt = False).removeprefix('') for convo in convos] + return { "text" : texts, } + dataset_ppl = dataset_ppl.map(formatting_prompts_func, batched=True) + + # Compute perplexity using the passed dataset + ppl_value = ppl_model(merged_model, merged_tokenizer, dataset_ppl) + + + # IMPORTANT: Convert to Python float if it's a tensor + if torch.is_tensor(ppl_value): + ppl_value = ppl_value.cpu().item() # Move to CPU and convert to Python scalar + elif hasattr(ppl_value, 'item'): + ppl_value = ppl_value.item() # Convert numpy or other array types + else: + ppl_value = float(ppl_value) # Ensure it's a float + + # Return only the perplexity value + result_queue.put(ppl_value) + + # Clean up + del merged_model + del merged_tokenizer + del dataset_ppl + torch.cuda.empty_cache() + gc.collect() + +# Main execution code should be wrapped in this guard +if __name__ == "__main__": + mp.set_start_method('spawn', force=True) + + if torch.cuda.is_bf16_supported(): + compute_dtype = torch.bfloat16 + attn_implementation = 'flash_attention_2' + else: + compute_dtype = torch.float16 + attn_implementation = 'sdpa' + + model, tokenizer = FastModel.from_pretrained( + model_name="unsloth/gemma-3-4b-it", + max_seq_length=2048, + dtype=compute_dtype, + load_in_4bit=True, + load_in_8bit=False, + full_finetuning=False, + attn_implementation=attn_implementation + ) + + tokenizer = get_chat_template( + tokenizer, + chat_template = "gemma-3", + ) + + from unsloth.chat_templates import standardize_sharegpt + dataset_train = load_dataset("allenai/openassistant-guanaco-reformatted", split="train") + dataset_ppl = load_dataset("allenai/openassistant-guanaco-reformatted", split="eval") + + dataset_train = dataset_train.map(formatting_prompts_func, batched=True) + dataset_ppl = dataset_ppl.map(formatting_prompts_func, batched=True) + + add_to_comparison("Base model 4 bits", ppl_model(model, tokenizer, dataset_ppl)) + + model = FastModel.get_peft_model( + model, + finetune_vision_layers = False, # Turn off for just text! + finetune_language_layers = True, # Should leave on! + finetune_attention_modules = True, # Attention good for GRPO + finetune_mlp_modules = True, # SHould leave on always! + + r=16, + #target_modules=['k_proj', 'q_proj', 'v_proj', 'o_proj', "gate_proj", "down_proj", "up_proj"], + target_modules = "all-linear", + lora_alpha=16, + lora_dropout=0, + bias="none", + use_gradient_checkpointing="unsloth", + random_state=3407, + use_rslora=False, + loftq_config=None, + modules_to_save=[ + "lm_head", + "embed_tokens" + ] + ) + + from unsloth import is_bfloat16_supported + + trainer = SFTTrainer( + model=model, + tokenizer=tokenizer, + train_dataset=dataset_train, + max_seq_length=2048, + packing=False, + args=SFTConfig( + dataset_text_field="text", + per_device_train_batch_size=2, + gradient_accumulation_steps=4, + gradient_checkpointing=True, + gradient_checkpointing_kwargs={"use_reentrant":False}, + warmup_ratio=0.03, + max_steps=40, + learning_rate=3e-4, + fp16=not is_bfloat16_supported(), + bf16=is_bfloat16_supported(), + logging_steps=5, + #optim="adamw_8bit", + optim="adamw_8bit", + lr_scheduler_type="linear", + seed=3407, + output_dir="outputs", + report_to="none", + max_grad_norm=0.3, + dataset_num_proc=2, + ), + ) + + from unsloth.chat_templates import train_on_responses_only + trainer = train_on_responses_only( + trainer, + instruction_part = "user\n", + response_part = "model\n", + ) + + # run training + trainer_stats = trainer.train() + + add_to_comparison("Qlora model", ppl_model(model, tokenizer, dataset_ppl)) + + # saving and merging the model to local disk + print("merge and save to local disk") + model.save_pretrained_merged( + save_directory='./unsloth_out/merged_gemma3_text_model', + tokenizer=tokenizer + ) + + + # load model from local disk and test + print("Loading merged model in 4 bit for perplexity test") + merged_model, merged_tokenizer = FastModel.from_pretrained( + model_name="./unsloth_out/merged_gemma3_text_model", + max_seq_length=2048, + load_in_4bit=True, + load_in_8bit=False, + ) + + add_to_comparison("merged model load 4bit", ppl_model(merged_model, merged_tokenizer, dataset_ppl)) + + + print("Computing 8-bit model perplexity in subprocess...") + result_queue = mp.Queue() + p = mp.Process(target=load_and_compute_8bit_ppl, args=(result_queue, False, True)) + p.start() + p.join() + + ppl_8bit = result_queue.get() + add_to_comparison("merged model loaded 8bits", ppl_8bit) + + print("Loading merged model in 16 bit for perplexity test") + merged_model, merged_tokenizer = FastModel.from_pretrained( + model_name="./unsloth_out/merged_gemma3_text_model", + max_seq_length=2048, + load_in_4bit=False, + load_in_8bit=False, + ) + + add_to_comparison("merged model loaded 16bits", ppl_model(merged_model, merged_tokenizer, dataset_ppl)) + + print_model_comparison() + + # final cleanup + safe_remove_directory("./outputs") + safe_remove_directory("./unsloth_compiled_cache") + safe_remove_directory("./unsloth_out") diff --git a/tests/gemma3_fix_tests/test_gemma3_grpo_model.py b/tests/gemma3_fix_tests/test_gemma3_grpo_model.py new file mode 100644 index 0000000000..1ae94fc645 --- /dev/null +++ b/tests/gemma3_fix_tests/test_gemma3_grpo_model.py @@ -0,0 +1,802 @@ +# -*- coding: utf-8 -*- +"""test_Llama3_1_(3B)_GRPO_LoRA (1).ipynb + +### Unsloth + +""" +# import os +# os.environ['CUDA_LAUNCH_BLOCKING'] = '1' +# os.environ['TORCH_USE_CUDA_DSA'] = '1' +# +# # Add at the beginning of your training script +# import torch +# torch.backends.cuda.matmul.allow_tf32 = False +# torch.backends.cudnn.allow_tf32 = False + +from unsloth import FastLanguageModel +import torch +import sys +from pathlib import Path +import multiprocessing as mp +import gc +from multiprocessing import Queue + +REPO_ROOT = Path(__file__).parents[2] +sys.path.insert(0, str(REPO_ROOT)) + +from tests.utils.cleanup_utils import safe_remove_directory +from tests.utils.aime_eval import evaluate_model_aime, compare_aime_results + + +max_seq_length = 2048 # Can increase for longer reasoning traces +lora_rank = 64 # Larger rank = smarter, but slower + + +def evaluate_merged_model(result_queue, load_in_4bit=False, load_in_8bit=False): + from unsloth import FastLanguageModel + from tests.utils.aime_eval import evaluate_model_aime + max_seq_length = 2048 # Can increase for longer reasoning traces + lora_rank = 64 # Larger rank = smarter, but slower + + model, tokenizer = FastLanguageModel.from_pretrained( + model_name = "./final_merged_model", + max_seq_length = max_seq_length, + load_in_4bit = True, # False for LoRA 16bit + fast_inference = True, # Enable vLLM fast inference + max_lora_rank = lora_rank, + gpu_memory_utilization = 0.8, # Reduce if out of memory + ) + + print(f"\n{'='*60}") + if load_in_4bit: + print("🔍 EVALUATION Merged model: 4 bits load") + model_type="merged_model_4bits" + elif load_in_8bit: + print("🔍 EVALUATION Merged model: 8 bits load") + model_type="merged_model_8bits" + else: + print("🔍 EVALUATION Merged model: 16 bits load") + model_type="merged_model_16bits" + print(f"{'='*60}") + + evaluate_model_aime( + model=model, + tokenizer=tokenizer, + model_type=model_type, + temperature=0.3, + n_sampling=8, + max_tokens=32768, + top_p=0.95, + seed=0 + ) + + result_queue.put(results) + + del model + del tokenizer + torch.cuda.empty_cache() + gc.collect() + + + +# Main execution code should be wrapped in this guard +def training_run(result_queue): + model, tokenizer = FastLanguageModel.from_pretrained( + model_name = "unsloth/gemma-3-1b-it", + max_seq_length = max_seq_length, + load_in_4bit = False, # False for LoRA 16bit + fast_inference = True, # Enable vLLM fast inference + max_lora_rank = lora_rank, + gpu_memory_utilization = 0.8, # Reduce if out of memory + ) + + """### Helper Functions + + +#### Helper functions - Data Prep + """ + + import re + import json + + reasoning_start = "" + reasoning_end = "" + solution_start = "" + solution_end = "" + + def extract_hash_answer(text): + """Extract answer from GSM8K format""" + if "####" not in text: + return None + return text.split("####")[1].strip() + + def prepare_gsm8k_dataset(dataset): + """Format GSM8K dataset for training""" + reasoning_start = "" + reasoning_end = "" + solution_start = "" + solution_end = "" + + system_prompt = ( + f"You are given a problem. Think about the problem and reason step by step. " + f"Place your thinking process between {reasoning_start} and {reasoning_end}. " + f"Then, provide your final numerical solution between {solution_start}{solution_end}" + ) + + def format_gsm8k(example): + return { + "prompt": [ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": example["question"]}, + ], + "answer": extract_hash_answer(example["answer"]), + } + + return dataset.map(format_gsm8k) + + def prepare_limo_dataset(dataset): + """Format LIMO dataset for SFT training""" + if dataset is None: + return None + + system_prompt = """You are a helpful reasoning assistant. When given a problem, think through it step by step and provide your answer in the following format: + + + [Your detailed step-by-step reasoning and solution process] + + + [Your final numerical answer] + """ + + def format_limo(example): + # Create the assistant response + assistant_response = f"\n{example['solution']}\n\n\n{example['answer']}\n" + + # Return a DICTIONARY with the conversation in a field + return { + "prompt": [ # ← This is the key change - wrap in a dict + {"role": "system", "content": system_prompt}, + {"role": "user", "content": example["question"]}, + {"role": "assistant", "content": assistant_response} + ] + } + + return dataset.map(format_limo) + + print("\n✅ Dataset preparation functions defined!") + + """#### Helper functions - Evaluation""" + + def get_max_prompt_length(dataset, tokenizer): + """Calculate maximum and average prompt length in dataset""" + print("Analyzing prompt lengths...") + + lengths = dataset.map( + lambda x: { + "tokens": tokenizer.apply_chat_template( + x["prompt"], + add_generation_prompt=True, + tokenize=True + ) + }, + batched=True, + ).map(lambda x: {"length": len(x["tokens"])})["length"] + + max_length = max(lengths) + avg_length = sum(lengths) / len(lengths) + min_length = min(lengths) + + print(f"Prompt lengths - Min: {min_length}, Max: {max_length}, Avg: {avg_length:.1f}") + return max_length, avg_length + + def extract_unsloth_answer(text, start_tag="", end_tag=""): + """Extract answer from Unsloth SOLUTION tags""" + pattern = re.escape(start_tag) + r"(.*?)" + re.escape(end_tag) + matches = re.findall(pattern, text, re.DOTALL) + + if matches: + answer = matches[-1] # Get the last match + answer = re.sub(r"[%$,]", "", answer).strip() + return answer + return "" + + def find_number(search_string): + """Find the last number in a string""" + numbers = re.compile( + r"-?[\d,]*\.?\d+", + re.MULTILINE | re.DOTALL | re.IGNORECASE, + ).findall(search_string) + + if numbers: + return numbers[-1].replace(",", "").strip() + return "" + + def remove_symbols(x: str) -> str: + """Remove commas, percent and dollar symbols""" + if not x: + return "" + return x.replace(",", "").replace("%", "").replace("$", "").strip() + + def get_num_tokens(text, tokenizer_instance): + """Count tokens in text""" + if not text: + return 0 + encoding = tokenizer_instance(text, return_tensors="pt") + return len(encoding["input_ids"][0]) + + def check_format_compliance(text, format_type="unsloth"): + """Check if response follows expected format""" + if format_type == "unsloth": + reasoning_start = "" + reasoning_end = "" + solution_start = "" + solution_end = "" + + pattern = ( + rf"^[\s]*{re.escape(reasoning_start)}.+?{re.escape(reasoning_end)}.*?" + rf"{re.escape(solution_start)}.+?{re.escape(solution_end)}[\s]*$" + ) + else: + return False + + return bool(re.match(pattern, text.strip(), re.DOTALL)) + + def normalize_answer(answer): + """Normalize answer for comparison""" + if not answer: + return "" + + normalized = remove_symbols(str(answer)) + + try: + float_val = float(normalized) + if float_val.is_integer(): + return str(int(float_val)) + else: + return str(float_val) + except (ValueError, TypeError): + return normalized + + def evaluate_answer_correctness(extracted_answer, ground_truth): + """Evaluate answer correctness with multiple criteria""" + if not extracted_answer or not ground_truth: + return False, False, 0.0 + + norm_extracted = normalize_answer(extracted_answer) + norm_ground_truth = normalize_answer(ground_truth) + + if norm_extracted == norm_ground_truth: + return True, True, 1.0 + + try: + extracted_num = float(norm_extracted) + ground_truth_num = float(norm_ground_truth) + + if ground_truth_num != 0: + relative_error = abs(extracted_num - ground_truth_num) / abs(ground_truth_num) + + if relative_error < 0.01: + return True, True, 0.9 + elif relative_error < 0.05: + return False, True, 0.7 + elif relative_error < 0.10: + return False, True, 0.5 + else: + if extracted_num == 0: + return True, True, 1.0 + elif abs(extracted_num) < 0.01: + return False, True, 0.7 + + except (ValueError, TypeError): + if norm_extracted.lower() == norm_ground_truth.lower(): + return True, True, 1.0 + + return False, False, 0.0 + + """#### Reward Functions for GRPO""" + + def match_format_exactly(completions, **kwargs): + """Reward function for exact format matching""" + reasoning_start = "" + reasoning_end = "" + solution_start = "" + solution_end = "" + + pattern = ( + rf"^[\s]*{re.escape(reasoning_start)}.+?{re.escape(reasoning_end)}.*?" + rf"{re.escape(solution_start)}.+?{re.escape(solution_end)}[\s]*$" + ) + + responses = [completion[0]["content"] for completion in completions] + rewards = [3.0 if re.match(pattern, response, re.DOTALL) else 0.0 for response in responses] + return rewards + + def match_format_approximately(completions, **kwargs): + """Reward function for approximate format matching""" + reasoning_start = "" + reasoning_end = "" + solution_start = "" + solution_end = "" + + scores = [] + for completion in completions: + score = 0 + response = completion[0]["content"] + score += 0.5 if response.count(reasoning_start) == 1 else -1.0 + score += 0.5 if response.count(reasoning_end) == 1 else -1.0 + score += 0.5 if response.count(solution_start) == 1 else -1.0 + score += 0.5 if response.count(solution_end) == 1 else -1.0 + scores.append(score) + return scores + + def check_answer_correctness(prompts, completions, answer, **kwargs): + """Reward function for answer correctness""" + def extract_solution_answer(text): + pattern = r"(.*?)" + match = re.search(pattern, text, re.DOTALL) + if match: + return re.sub(r"[%$,]", "", match.group(1)).strip() + return "" + + responses = [completion[0]["content"] for completion in completions] + extracted_responses = [extract_solution_answer(r) for r in responses] + + scores = [] + for guess, true_answer in zip(extracted_responses, answer): + score = 0 + if not guess: + scores.append(0) + continue + + if guess == true_answer: + score += 3.0 + elif guess.strip() == true_answer.strip(): + score += 1.5 + else: + try: + ratio = float(guess) / float(true_answer) + if 0.9 <= ratio <= 1.1: + score += 1.0 + elif 0.8 <= ratio <= 1.2: + score += 0.5 + else: + score -= 1.5 + except: + score -= 1.5 + scores.append(score) + return scores + + print("✅ Reward functions defined!") + + """#### Main Evaluation Function""" + + import gc + + + + """#### Comparison and Memory Management""" + + def compare_model_results(all_results): + """Generate comprehensive comparison of multiple model results""" + print(f"\n{'='*80}") + print("COMPREHENSIVE MODEL COMPARISON") + print(f"{'='*80}") + + # Main table + print(f"{'Model':<15} {'Format %':<10} {'Exact %':<10} {'Plausible %':<12} {'Confidence':<12}") + print("-" * 80) + + for result in all_results: + print(f"{result['model_type']:<15} " + f"{result['correct_format_pct']:<10.1f} " + f"{result['exact_match_pct']:<10.1f} " + f"{result['plausible_match_pct']:<12.1f} " + f"{result['avg_confidence']:<12.3f}") + + # Improvement analysis + if len(all_results) > 1: + print(f"\n{'='*50}") + print("IMPROVEMENT ANALYSIS") + print(f"{'='*50}") + + base_result = all_results[0] + for result in all_results[1:]: + print(f"\n{result['model_type']} vs {base_result['model_type']}:") + format_improvement = result['correct_format_pct'] - base_result['correct_format_pct'] + exact_improvement = result['exact_match_pct'] - base_result['exact_match_pct'] + plausible_improvement = result['plausible_match_pct'] - base_result['plausible_match_pct'] + + print(f" Format compliance: {format_improvement:+.1f}%") + print(f" Exact matches: {exact_improvement:+.1f}%") + print(f" Plausible matches: {plausible_improvement:+.1f}%") + + # Save comparison + comparison_data = { + "summary": all_results, + "best_model": max(all_results, key=lambda x: x['exact_match_pct']), + } + + with open("model_comparison_comprehensive.json", "w") as f: + json.dump(comparison_data, f, indent=4) + + print(f"\nBest performing model: {comparison_data['best_model']['model_type']} " + f"({comparison_data['best_model']['exact_match_pct']:.1f}% exact matches)") + + def cleanup_memory(): + """Comprehensive memory cleanup""" + print("🧹 Cleaning up GPU memory...") + for _ in range(10): + torch.cuda.empty_cache() + gc.collect() + + if torch.cuda.is_available(): + allocated = torch.cuda.memory_allocated() / 1024**3 + reserved = torch.cuda.memory_reserved() / 1024**3 + print(f"GPU memory - Allocated: {allocated:.2f} GB, Reserved: {reserved:.2f} GB") + + """#### Data Loading and Preparation""" + + from datasets import load_dataset + + +# Load GSM8K + gsm8k_dataset = load_dataset("openai/gsm8k", "main", split="train") + +# Load LIMO (adjust this based on your access method) + limo_train = load_dataset("GAIR/LIMO", split="train") + +# Prepare datasets + gsm8k_train = prepare_gsm8k_dataset(gsm8k_dataset) + limo_train = prepare_limo_dataset(limo_train) + + + print(f" GSM8K train: {len(gsm8k_train)}") + print(f" LIMO train: {len(limo_train) if limo_train else 0}") + +# Store results + all_results = [] + +# Single temperature evaluation on combined dataset + # results = evaluate_model_aime( + # model=model, + # tokenizer=tokenizer, + # model_type="base", + # temperature=0.3, + # n_sampling=8, + # max_tokens=32768, + # top_p=0.95, + # seed=0 + # ) + # + from unsloth.chat_templates import get_chat_template + + tokenizer = get_chat_template( + tokenizer, + chat_template = "gemma-3", + ) + + def formatting_prompts_func(examples): + convos = examples["prompt"] + texts = [tokenizer.apply_chat_template(convo, tokenize = False, add_generation_prompt = False).removeprefix('') for convo in convos] + return { "text" : texts, } + + limo_train = limo_train.map(formatting_prompts_func, batched = True,) + + from trl import SFTTrainer + from transformers import DataCollatorForSeq2Seq, TrainingArguments + from unsloth import is_bfloat16_supported + + + print(f"\n{'*'*60}") + print("🎯 STAGE 1: Qlora Fine-Tuning on LIMO") + print(f"{'*'*60}") + + model = FastLanguageModel.get_peft_model( + model, + r = lora_rank, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128 + target_modules = [ + "q_proj", "k_proj", "v_proj", "o_proj", + "gate_proj", "up_proj", "down_proj", + ], # Remove QKVO if out of memory + lora_alpha = lora_rank, + use_gradient_checkpointing = "unsloth", # Enable long context finetuning + random_state = 3407, + ) + + + if limo_train is not None: + trainer = SFTTrainer( + model = model, + tokenizer = tokenizer, + train_dataset = limo_train, + dataset_text_field = "text", + max_seq_length = max_seq_length, + data_collator = DataCollatorForSeq2Seq(tokenizer = tokenizer), + dataset_num_proc = 2, + packing = False, # Can make training 5x faster for short sequences. + args = TrainingArguments( + per_device_train_batch_size = 2, + gradient_accumulation_steps = 4, + warmup_steps = 5, + num_train_epochs = 1, # Set this for 1 full training run. + #max_steps = 60, + learning_rate = 2e-4, + fp16 = not is_bfloat16_supported(), + bf16 = is_bfloat16_supported(), + logging_steps = 1, + optim = "adamw_8bit", + weight_decay = 0.01, + lr_scheduler_type = "linear", + seed = 3407, + output_dir = "outputs", + report_to = "none", # Use this for WandB etc + ), + ) + + + from unsloth.chat_templates import train_on_responses_only + trainer = train_on_responses_only( + trainer, + instruction_part = "user\n", + response_part = "model\n", + ) + + # Train + #print(f"🚂 Starting SFT training on {len(limo_train)} examples...") + #trainer.train() + + # Save checkpoint + #model.save_pretrained("qlora_checkpoint") + #tokenizer.save_pretrained("qlora_checkpoint") + #print("💾 Qlora checkpoint saved!") + + # Cleanup + del trainer + cleanup_memory() + + #print("✅ Qlora training completed!") + else: + print("⚠️ Skipping Qlora training - no LIMO dataset available") + +# Cleanup + cleanup_memory() + + global PRINTED_TIMES + PRINTED_TIMES = 0 + global PRINT_EVERY_STEPS + PRINT_EVERY_STEPS = 5 + + match_numbers = re.compile( + solution_start + r".*?([\d\.\,]{1,})", + flags = re.MULTILINE | re.DOTALL + ) + + def check_numbers(prompts, completions, answer, **kwargs): + question = prompts[0][-1]["content"] + responses = [completion[0]["content"] for completion in completions] + + extracted_responses = [ + guess.group(1) + if (guess := match_numbers.search(r)) is not None else None \ + for r in responses + ] + + scores = [] + # Print only every few steps + global PRINTED_TIMES + global PRINT_EVERY_STEPS + if PRINTED_TIMES % PRINT_EVERY_STEPS == 0: + print('*'*20, f"Question:\n{question}", f"\nAnswer:\n{answer[0]}", f"\nResponse:\n{responses[0]}", f"\nExtracted:\n{extracted_responses[0]}") + PRINTED_TIMES += 1 + + for guess, true_answer in zip(extracted_responses, answer): + if guess is None: + scores.append(0) + continue + # Convert to numbers + try: + true_answer = float(true_answer.strip()) + # Remove commas like in 123,456 + guess = float(guess.strip().replace(",", "")) + scores.append(1.5 if guess == true_answer else -0.5) + except: + scores.append(0) + continue + return scores + + print(f"\n{'*'*60}") + print("🎯 STAGE 2: GRPO Fine-Tuning on GSM8K") + print(f"{'*'*60}") + +# Get max prompt length + max_prompt_length, _ = get_max_prompt_length(gsm8k_train, tokenizer) + max_prompt_length = min(max_prompt_length + 10, 512) # Add buffer, cap at 512 + + print(f"Using max_prompt_length: {max_prompt_length}") + + from trl import GRPOConfig, GRPOTrainer + training_args = GRPOConfig( + learning_rate = 5e-6, + weight_decay = 0.1, + warmup_ratio = 0.1, + lr_scheduler_type = "cosine", + optim = "adamw_torch_fused", + logging_steps = 1, + per_device_train_batch_size = 1, + gradient_accumulation_steps = 4, # Increase to 4 for smoother training + num_generations = 8, # Decrease if out of memory + max_prompt_length = max_prompt_length, + max_completion_length = max_seq_length - max_prompt_length, + # num_train_epochs = 1, # Set to 1 for a full training run + #max_steps = 250, + max_steps = 1000, + save_steps = 250, + max_grad_norm = 0.1, + report_to = "none", # Can use Weights & Biases + output_dir = "outputs", + ) + + trainer = GRPOTrainer( + model = model, + processing_class = tokenizer, + reward_funcs = [ + match_format_exactly, + match_format_approximately, + check_answer_correctness, + check_numbers, + ], + args = training_args, + train_dataset = gsm8k_train, + ) + + +# Train + print(f"🚂 Starting GRPO training on {len(gsm8k_train)} examples...") + trainer.train() + +# Save checkpoint + model.save_pretrained("grpo_checkpoint") + tokenizer.save_pretrained("grpo_checkpoint") + print("💾 GRPO checkpoint saved!") + +# Cleanup + del trainer + del training_args + cleanup_memory() + + print("✅ GRPO training completed!") + + print(f"\n{'='*60}") + print("🔍 EVALUATION 3: Final GRPO Model") + print(f"{'='*60}") + + grpo_results = evaluate_model_aime( + model=model, + tokenizer=tokenizer, + model_type="grpo", + temperature=0.3, + n_sampling=8, + max_tokens=32768, + top_p=0.95, + seed=0 + ) + + all_results.append(grpo_results) + print("✅ Final model evaluation complete!") + + print(f"\n{'='*60}") + print("💾 SAVING FINAL MODEL") + print(f"{'='*60}") + + # Save as merged model + try: + model.save_pretrained_merged("final_merged_model", tokenizer, save_method="merged_16bit") + print("✅ Merged model saved to: final_merged_model/") + except Exception as e: + print(f"⚠️ Could not save merged model: {e}") + print("Final model saved as LoRA adapter only") + + print("💾 Model saving complete!") + + + safe_remove_directory("./unsloth_compiled_cache") + + result_queue.put(results) + + # Clean up + del model + del tokenizer + torch.cuda.empty_cache() + gc.collect() + + + # # Merged model load 16 bits model AIME eval + # result_queue = mp.Queue() + # p = mp.Process(target=evaluate_merged_model, args=(result_queue, False, False)) + # p.start() + # p.join() + # + # merged_16bits = result_queue.get() + # all_results.append(merged_16bits) + # + # # Clean up + # del merged_model + # del merged_tokenizer + # del dataset_ppl + # torch.cuda.empty_cache() + # gc.collect() + # + # safe_remove_directory("./unsloth_compiled_cache") + # + # # Merged model load 8 bits model AIME eval + # + # result_queue = mp.Queue() + # p = mp.Process(target=evaluate_merged_model, args=(result_queue, False, True)) + # p.start() + # p.join() + # + # merged_16bits = result_queue.get() + # all_results.append(merged_16bits) + + + # Merged model load 4 bits AIME eval + # result_queue = mp.Queue() + # p = mp.Process(target=evaluate_merged_model, args=(result_queue, True, False)) + # p.start() + # p.join() + # + # merged_16bits = result_queue.get() + # all_results.append(merged_16bits) + +if __name__ == "__main__": + mp.set_start_method('spawn', force=True) + result_queue = mp.Queue() + all_results = [] + + + # run main finetuning and grpo loop + p = mp.Process(target=training_run, args=(result_queue,)) + p.start() + p.join() + + results = result_queue.get() + all_results = results + + # evaluate merged model loaded 16bits + p = mp.Process(target=evaluate_merged_model, args=(result_queue, False, False)) + p.start() + p.join() + + merged_load_16bits = result_queue.get() + all_results.append(merged_load_16bits) + safe_remove_directory("./unsloth_compiled_cache") + + # Merged model load 8 bits model AIME eval + p = mp.Process(target=evaluate_merged_model, args=(result_queue, False, True)) + p.start() + p.join() + + merged_load_8bits = result_queue.get() + all_results.append(merged_load_8bits) + + safe_remove_directory("./unsloth_compiled_cache") + + # Merged model load 4 bits model AIME eval + p = mp.Process(target=evaluate_merged_model, args=(result_queue, True, False)) + p.start() + p.join() + + merged_load_4bits = result_queue.get() + all_results.append(merged_load_4bits) + + safe_remove_directory("./unsloth_compiled_cache") + + +# AIME-specific comparison function + + print(f"\n{'='*80}") + print("🏆 FINAL TRAINING PIPELINE RESULTS") + print(f"{'='*80}") + +# Use the AIME-specific comparison + compare_aime_results(all_results)