From ce2fa1f1860d8f3aeac2b3a5f1a4c704067dd0a5 Mon Sep 17 00:00:00 2001 From: Xmuluneh Date: Mon, 29 Jan 2024 14:09:51 +0000 Subject: [PATCH 1/2] Save changes in mistral_7b.ipynb --- train/notebooks/mistral_7b.ipynb | 7507 ++++++++++++++++++++++++++++++ 1 file changed, 7507 insertions(+) create mode 100644 train/notebooks/mistral_7b.ipynb diff --git a/train/notebooks/mistral_7b.ipynb b/train/notebooks/mistral_7b.ipynb new file mode 100644 index 0000000..828a20b --- /dev/null +++ b/train/notebooks/mistral_7b.ipynb @@ -0,0 +1,7507 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "id": "3sqPzXakzsjr" + }, + "outputs": [], + "source": [ + "import locale\n", + "locale.getpreferredencoding = lambda: \"UTF-8\"" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "PnGFYa7BRtl7", + "outputId": "e678d227-d402-4867-e849-8e7ef53fd08e" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: torch in /opt/miniconda/lib/python3.11/site-packages (2.1.2)\n", + "Requirement already satisfied: filelock in /opt/miniconda/lib/python3.11/site-packages (from torch) (3.13.1)\n", + "Requirement already satisfied: typing-extensions in /opt/miniconda/lib/python3.11/site-packages (from torch) (4.9.0)\n", + "Requirement already satisfied: sympy in /opt/miniconda/lib/python3.11/site-packages (from torch) (1.12)\n", + "Requirement already satisfied: networkx in /opt/miniconda/lib/python3.11/site-packages (from torch) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /opt/miniconda/lib/python3.11/site-packages (from torch) (3.1.3)\n", + "Requirement already satisfied: fsspec in /opt/miniconda/lib/python3.11/site-packages (from torch) (2023.10.0)\n", + "Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch) (12.1.105)\n", + "Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch) (12.1.105)\n", + "Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch) (12.1.105)\n", + "Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /opt/miniconda/lib/python3.11/site-packages (from torch) (8.9.2.26)\n", + "Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /opt/miniconda/lib/python3.11/site-packages (from torch) (12.1.3.1)\n", + "Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /opt/miniconda/lib/python3.11/site-packages (from torch) (11.0.2.54)\n", + "Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /opt/miniconda/lib/python3.11/site-packages (from torch) (10.3.2.106)\n", + "Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /opt/miniconda/lib/python3.11/site-packages (from torch) (11.4.5.107)\n", + "Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /opt/miniconda/lib/python3.11/site-packages (from torch) (12.1.0.106)\n", + "Requirement already satisfied: nvidia-nccl-cu12==2.18.1 in /opt/miniconda/lib/python3.11/site-packages (from torch) (2.18.1)\n", + "Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch) (12.1.105)\n", + "Requirement already satisfied: triton==2.1.0 in /opt/miniconda/lib/python3.11/site-packages (from torch) (2.1.0)\n", + "Requirement already satisfied: nvidia-nvjitlink-cu12 in /opt/miniconda/lib/python3.11/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch) (12.3.101)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: MarkupSafe>=2.0 in /opt/miniconda/lib/python3.11/site-packages (from jinja2->torch) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /opt/miniconda/lib/python3.11/site-packages (from sympy->torch) (1.3.0)\n", + "\u001b[31mERROR: Invalid requirement: '@'\u001b[0m\u001b[31m\n", + "\u001b[0mRequirement already satisfied: bitsandbytes in /opt/miniconda/lib/python3.11/site-packages (0.42.0)\n", + "Requirement already satisfied: scipy in /opt/miniconda/lib/python3.11/site-packages (from bitsandbytes) (1.12.0)\n", + "Requirement already satisfied: numpy<1.29.0,>=1.22.4 in /opt/miniconda/lib/python3.11/site-packages (from scipy->bitsandbytes) (1.26.3)\n", + "Requirement already satisfied: datasets==2.13.1 in /opt/miniconda/lib/python3.11/site-packages (2.13.1)\n", + "Requirement already satisfied: numpy>=1.17 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (1.26.3)\n", + "Requirement already satisfied: pyarrow>=8.0.0 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (15.0.0)\n", + "Requirement already satisfied: dill<0.3.7,>=0.3.0 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (0.3.6)\n", + "Requirement already satisfied: pandas in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (2.2.0)\n", + "Requirement already satisfied: requests>=2.19.0 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (2.31.0)\n", + "Requirement already satisfied: tqdm>=4.62.1 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (4.65.0)\n", + "Requirement already satisfied: xxhash in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (3.4.1)\n", + "Requirement already satisfied: multiprocess in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (0.70.14)\n", + "Requirement already satisfied: fsspec>=2021.11.1 in /opt/miniconda/lib/python3.11/site-packages (from fsspec[http]>=2021.11.1->datasets==2.13.1) (2023.10.0)\n", + "Requirement already satisfied: aiohttp in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (3.9.1)\n", + "Requirement already satisfied: huggingface-hub<1.0.0,>=0.11.0 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (0.20.3)\n", + "Requirement already satisfied: packaging in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (23.1)\n", + "Requirement already satisfied: pyyaml>=5.1 in /opt/miniconda/lib/python3.11/site-packages (from datasets==2.13.1) (6.0.1)\n", + "Requirement already satisfied: attrs>=17.3.0 in /opt/miniconda/lib/python3.11/site-packages (from aiohttp->datasets==2.13.1) (23.2.0)\n", + "Requirement already satisfied: multidict<7.0,>=4.5 in /opt/miniconda/lib/python3.11/site-packages (from aiohttp->datasets==2.13.1) (6.0.4)\n", + "Requirement already satisfied: yarl<2.0,>=1.0 in /opt/miniconda/lib/python3.11/site-packages (from aiohttp->datasets==2.13.1) (1.9.4)\n", + "Requirement already satisfied: frozenlist>=1.1.1 in /opt/miniconda/lib/python3.11/site-packages (from aiohttp->datasets==2.13.1) (1.4.1)\n", + "Requirement already satisfied: aiosignal>=1.1.2 in /opt/miniconda/lib/python3.11/site-packages (from aiohttp->datasets==2.13.1) (1.3.1)\n", + "Requirement already satisfied: filelock in /opt/miniconda/lib/python3.11/site-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets==2.13.1) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=3.7.4.3 in /opt/miniconda/lib/python3.11/site-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets==2.13.1) (4.9.0)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/miniconda/lib/python3.11/site-packages (from requests>=2.19.0->datasets==2.13.1) (2.0.4)\n", + "Requirement already satisfied: idna<4,>=2.5 in /opt/miniconda/lib/python3.11/site-packages (from requests>=2.19.0->datasets==2.13.1) (3.4)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/miniconda/lib/python3.11/site-packages (from requests>=2.19.0->datasets==2.13.1) (1.26.18)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /opt/miniconda/lib/python3.11/site-packages (from requests>=2.19.0->datasets==2.13.1) (2023.11.17)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/miniconda/lib/python3.11/site-packages (from pandas->datasets==2.13.1) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /opt/miniconda/lib/python3.11/site-packages (from pandas->datasets==2.13.1) (2023.3.post1)\n", + "Requirement already satisfied: tzdata>=2022.7 in /opt/miniconda/lib/python3.11/site-packages (from pandas->datasets==2.13.1) (2023.4)\n", + "Requirement already satisfied: six>=1.5 in /opt/miniconda/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas->datasets==2.13.1) (1.16.0)\n", + "\u001b[31mERROR: Invalid requirement: '@'\u001b[0m\u001b[31m\n", + "\u001b[0m\u001b[31mERROR: Invalid requirement: '@'\u001b[0m\u001b[31m\n", + "\u001b[0m\u001b[31mERROR: Invalid requirement: '@'\u001b[0m\u001b[31m\n", + "\u001b[0mRequirement already satisfied: scipy in /opt/miniconda/lib/python3.11/site-packages (1.12.0)\n", + "Requirement already satisfied: numpy<1.29.0,>=1.22.4 in /opt/miniconda/lib/python3.11/site-packages (from scipy) (1.26.3)\n", + "Requirement already satisfied: peft in /opt/miniconda/lib/python3.11/site-packages (0.7.2.dev0)\n", + "Requirement already satisfied: numpy>=1.17 in /opt/miniconda/lib/python3.11/site-packages (from peft) (1.26.3)\n", + "Requirement already satisfied: packaging>=20.0 in /opt/miniconda/lib/python3.11/site-packages (from peft) (23.1)\n", + "Requirement already satisfied: psutil in /opt/miniconda/lib/python3.11/site-packages (from peft) (5.9.0)\n", + "Requirement already satisfied: pyyaml in /opt/miniconda/lib/python3.11/site-packages (from peft) (6.0.1)\n", + "Requirement already satisfied: torch>=1.13.0 in /opt/miniconda/lib/python3.11/site-packages (from peft) (2.1.2)\n", + "Requirement already satisfied: transformers in /opt/miniconda/lib/python3.11/site-packages (from peft) (4.38.0.dev0)\n", + "Requirement already satisfied: tqdm in /opt/miniconda/lib/python3.11/site-packages (from peft) (4.65.0)\n", + "Requirement already satisfied: accelerate>=0.21.0 in /opt/miniconda/lib/python3.11/site-packages (from peft) (0.27.0.dev0)\n", + "Requirement already satisfied: safetensors in /opt/miniconda/lib/python3.11/site-packages (from peft) (0.4.2)\n", + "Requirement already satisfied: huggingface-hub>=0.17.0 in /opt/miniconda/lib/python3.11/site-packages (from peft) (0.20.3)\n", + "Requirement already satisfied: filelock in /opt/miniconda/lib/python3.11/site-packages (from huggingface-hub>=0.17.0->peft) (3.13.1)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /opt/miniconda/lib/python3.11/site-packages (from huggingface-hub>=0.17.0->peft) (2023.10.0)\n", + "Requirement already satisfied: requests in /opt/miniconda/lib/python3.11/site-packages (from huggingface-hub>=0.17.0->peft) (2.31.0)\n", + "Requirement already satisfied: typing-extensions>=3.7.4.3 in /opt/miniconda/lib/python3.11/site-packages (from huggingface-hub>=0.17.0->peft) (4.9.0)\n", + "Requirement already satisfied: sympy in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (1.12)\n", + "Requirement already satisfied: networkx in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (3.1.3)\n", + "Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (12.1.105)\n", + "Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (12.1.105)\n", + "Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (12.1.105)\n", + "Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (8.9.2.26)\n", + "Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (12.1.3.1)\n", + "Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (11.0.2.54)\n", + "Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (10.3.2.106)\n", + "Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (11.4.5.107)\n", + "Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (12.1.0.106)\n", + "Requirement already satisfied: nvidia-nccl-cu12==2.18.1 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (2.18.1)\n", + "Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (12.1.105)\n", + "Requirement already satisfied: triton==2.1.0 in /opt/miniconda/lib/python3.11/site-packages (from torch>=1.13.0->peft) (2.1.0)\n", + "Requirement already satisfied: nvidia-nvjitlink-cu12 in /opt/miniconda/lib/python3.11/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.13.0->peft) (12.3.101)\n", + "Requirement already satisfied: regex!=2019.12.17 in /opt/miniconda/lib/python3.11/site-packages (from transformers->peft) (2023.12.25)\n", + "Requirement already satisfied: tokenizers<0.19,>=0.14 in /opt/miniconda/lib/python3.11/site-packages (from transformers->peft) (0.15.1)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /opt/miniconda/lib/python3.11/site-packages (from jinja2->torch>=1.13.0->peft) (2.1.4)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/miniconda/lib/python3.11/site-packages (from requests->huggingface-hub>=0.17.0->peft) (2.0.4)\n", + "Requirement already satisfied: idna<4,>=2.5 in /opt/miniconda/lib/python3.11/site-packages (from requests->huggingface-hub>=0.17.0->peft) (3.4)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/miniconda/lib/python3.11/site-packages (from requests->huggingface-hub>=0.17.0->peft) (1.26.18)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /opt/miniconda/lib/python3.11/site-packages (from requests->huggingface-hub>=0.17.0->peft) (2023.11.17)\n", + "Requirement already satisfied: mpmath>=0.19 in /opt/miniconda/lib/python3.11/site-packages (from sympy->torch>=1.13.0->peft) (1.3.0)\n" + ] + } + ], + "source": [ + "!pip install torch\n", + "!pip install accelerate @ git+https://github.com/huggingface/accelerate.git\n", + "!pip install bitsandbytes\n", + "!pip install datasets==2.13.1\n", + "!pip install transformers @ git+https://github.com/huggingface/transformers.git\n", + "!pip install peft @ git+https://github.com/huggingface/peft.git\n", + "!pip install trl @ git+https://github.com/lvwerra/trl.git\n", + "!pip install scipy\n", + "!pip install peft" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "2RN7-BfNmL_a" + }, + "source": [ + "Set up Python environment" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "xjSiIqgfkRBm" + }, + "source": [ + "***fine-tune LLaMA 2 models on datasets***\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "id": "RlCJkFt-SOcR" + }, + "outputs": [], + "source": [ + "import argparse\n", + "import bitsandbytes as bnb\n", + "from datasets import load_dataset\n", + "from functools import partial\n", + "import os\n", + "from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training, AutoPeftModelForCausalLM\n", + "import torch\n", + "from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed, Trainer, TrainingArguments, BitsAndBytesConfig, \\\n", + " DataCollatorForLanguageModeling, Trainer, TrainingArguments" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Yv3eCc3lkSax", + "outputId": "0c37df8e-e0f7-4498-8594-47b3f0ab0598" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import torch\n", + "torch.cuda.is_available()" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "id": "qe37RE3_ok1u" + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import time" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LO9NEhmFp2Rr", + "outputId": "d4d06b96-1f19-4b61-f139-c31309c0fa4b" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "id": "TrsDmPP_p5WN" + }, + "outputs": [], + "source": [ + "file_path = \"/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/TIKVAH.csv\"\n", + "dataset_file_path = \"/content/drive/My Drive/Datasets/W_7/TIKVAH_dataset.csv\"" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "file_path = '/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/TIKVAH.csv'" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "id": "9qe5fS_7txOv" + }, + "outputs": [], + "source": [ + "df = pd.read_csv(file_path)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 206 + }, + "id": "JB_c6v95wWRm", + "outputId": "e73473cc-34bb-4299-8d8a-7ea7c836f2fc" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idtextdatechannel_idhashtagsemojissymbolslinksmentions
3974984203#AddisAbaba በእኛ የህግ አማካሪ በኩል ጥፋት ነበረ ” አቶ አበባው...2024-01-11T21:34:061130580549['#AddisAbaba', '#ጥፋት', '#‘ታስሮ', '#መመሪያውም']NaN“-““““““““[]['tikvahethiopia']
3975084205ቀብሩ ዛሬ ተፈፅሟል በቢሾፍቱ ቃጂማ ጊዮርጊስ ቤተክርስቲያን። የ8 ኣመት ...2024-01-11T21:59:261130580549[]NaN“-““““[]['tikvahethiopia']
3975184207የግብፁ መሪ የኤርትራው ፕሬዜዳንት ኢሳያስ አፈወርቂ ግብፅን እንዲጎበኙ ግ...2024-01-12T00:16:191130580549[]NaN[]['tikvahethiopia']
3975284209#Ethiopia የጠቅላይ ሚኒስትሩ የብሄራዊ ደህንነት አማካሪ አምባሳደር ...2024-01-12T00:19:121130580549['#Ethiopia', '#ጫና']NaN\"\"\"\"[]['tikvahethiopia']
3975384217በምጥ የተያዘችን እናት ሊያመጣ ሲሄድ በተተኮሰበት ጥይት ተመቶ ህይወቱ አ...2024-01-12T00:54:131130580549['#ተገደለ።']NaN\"\"-[]['tikvahethiopia']
\n", + "
" + ], + "text/plain": [ + " id text \\\n", + "39749 84203 #AddisAbaba በእኛ የህግ አማካሪ በኩል ጥፋት ነበረ ” አቶ አበባው... \n", + "39750 84205 ቀብሩ ዛሬ ተፈፅሟል በቢሾፍቱ ቃጂማ ጊዮርጊስ ቤተክርስቲያን። የ8 ኣመት ... \n", + "39751 84207 የግብፁ መሪ የኤርትራው ፕሬዜዳንት ኢሳያስ አፈወርቂ ግብፅን እንዲጎበኙ ግ... \n", + "39752 84209 #Ethiopia የጠቅላይ ሚኒስትሩ የብሄራዊ ደህንነት አማካሪ አምባሳደር ... \n", + "39753 84217 በምጥ የተያዘችን እናት ሊያመጣ ሲሄድ በተተኮሰበት ጥይት ተመቶ ህይወቱ አ... \n", + "\n", + " date channel_id \\\n", + "39749 2024-01-11T21:34:06 1130580549 \n", + "39750 2024-01-11T21:59:26 1130580549 \n", + "39751 2024-01-12T00:16:19 1130580549 \n", + "39752 2024-01-12T00:19:12 1130580549 \n", + "39753 2024-01-12T00:54:13 1130580549 \n", + "\n", + " hashtags emojis symbols links \\\n", + "39749 ['#AddisAbaba', '#ጥፋት', '#‘ታስሮ', '#መመሪያውም'] NaN “-““““““““ [] \n", + "39750 [] NaN “-““““ [] \n", + "39751 [] NaN ℹ [] \n", + "39752 ['#Ethiopia', '#ጫና'] NaN \"\"\"\" [] \n", + "39753 ['#ተገደለ።'] NaN \"\"- [] \n", + "\n", + " mentions \n", + "39749 ['tikvahethiopia'] \n", + "39750 ['tikvahethiopia'] \n", + "39751 ['tikvahethiopia'] \n", + "39752 ['tikvahethiopia'] \n", + "39753 ['tikvahethiopia'] " + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.tail()" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 206 + }, + "id": "_o6EC87Dwvqe", + "outputId": "c5924c12-b8fd-44f3-c63c-45c92004d96d" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\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", + "
texthashtags
39749#AddisAbaba በእኛ የህግ አማካሪ በኩል ጥፋት ነበረ ” አቶ አበባው...['#AddisAbaba', '#ጥፋት', '#‘ታስሮ', '#መመሪያውም']
39750ቀብሩ ዛሬ ተፈፅሟል በቢሾፍቱ ቃጂማ ጊዮርጊስ ቤተክርስቲያን። የ8 ኣመት ...[]
39751የግብፁ መሪ የኤርትራው ፕሬዜዳንት ኢሳያስ አፈወርቂ ግብፅን እንዲጎበኙ ግ...[]
39752#Ethiopia የጠቅላይ ሚኒስትሩ የብሄራዊ ደህንነት አማካሪ አምባሳደር ...['#Ethiopia', '#ጫና']
39753በምጥ የተያዘችን እናት ሊያመጣ ሲሄድ በተተኮሰበት ጥይት ተመቶ ህይወቱ አ...['#ተገደለ።']
\n", + "
" + ], + "text/plain": [ + " text \\\n", + "39749 #AddisAbaba በእኛ የህግ አማካሪ በኩል ጥፋት ነበረ ” አቶ አበባው... \n", + "39750 ቀብሩ ዛሬ ተፈፅሟል በቢሾፍቱ ቃጂማ ጊዮርጊስ ቤተክርስቲያን። የ8 ኣመት ... \n", + "39751 የግብፁ መሪ የኤርትራው ፕሬዜዳንት ኢሳያስ አፈወርቂ ግብፅን እንዲጎበኙ ግ... \n", + "39752 #Ethiopia የጠቅላይ ሚኒስትሩ የብሄራዊ ደህንነት አማካሪ አምባሳደር ... \n", + "39753 በምጥ የተያዘችን እናት ሊያመጣ ሲሄድ በተተኮሰበት ጥይት ተመቶ ህይወቱ አ... \n", + "\n", + " hashtags \n", + "39749 ['#AddisAbaba', '#ጥፋት', '#‘ታስሮ', '#መመሪያውም'] \n", + "39750 [] \n", + "39751 [] \n", + "39752 ['#Ethiopia', '#ጫና'] \n", + "39753 ['#ተገደለ።'] " + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dataset = df[['text','hashtags']]\n", + "dataset.tail()" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "id": "fCQmhnuG0AsL" + }, + "outputs": [], + "source": [ + "dataset = dataset.dropna(subset=['hashtags'])\n", + "#dataset = dataset[dataset['hashtags'].astype(bool)] # Keep only non-empty lists\n", + "dataset = dataset[dataset['hashtags'].apply(lambda x: x != '[]')]\n", + "\n", + "# Reset the index after dropping rows\n", + "dataset = dataset.reset_index(drop=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 206 + }, + "id": "FtIDQqA7z__A", + "outputId": "b91cc8a8-4287-4811-a253-52f145a7d8d5" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\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", + "
texthashtags
0ሰበር ዜና : ደህና ሁኑ ልጆች! / RIP #ETHIOPIA | አርቲስት ተ...['#ETHIOPIA']
1# ተስፋዬ ሳህሉ #['#', '#']
2️መልካም ቀን️ # በህይወት እስካለህ: : ልትሳሳት ፣ልትወድቅ ትቸላለህ ...['#', '#', '#', '#']
3አስመሳይ ነው የበዛው ጥቅሙን ፈላጊ ሳንቲም ባገኘም ቁጥር እራሱን አስቀዳ...['#Panfalon']
4# ክብር ለኢትዮጵያ እናቶች #['#', '#']
\n", + "
" + ], + "text/plain": [ + " text hashtags\n", + "0 ሰበር ዜና : ደህና ሁኑ ልጆች! / RIP #ETHIOPIA | አርቲስት ተ... ['#ETHIOPIA']\n", + "1 # ተስፋዬ ሳህሉ # ['#', '#']\n", + "2 ️መልካም ቀን️ # በህይወት እስካለህ: : ልትሳሳት ፣ልትወድቅ ትቸላለህ ... ['#', '#', '#', '#']\n", + "3 አስመሳይ ነው የበዛው ጥቅሙን ፈላጊ ሳንቲም ባገኘም ቁጥር እራሱን አስቀዳ... ['#Panfalon']\n", + "4 # ክብር ለኢትዮጵያ እናቶች # ['#', '#']" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "dataset.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "nFfm1ETLvD0_", + "outputId": "5760ce68-5a33-4db7-f3b5-2ae6dcfddc32" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "(23005, 2)" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dataset.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 206 + }, + "id": "uy4HECoOwt0C", + "outputId": "ed4fb107-8ac8-4b5d-c296-54604dca577e" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\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", + "
texthashtags
0ሰበር ዜና : ደህና ሁኑ ልጆች! / RIP #ETHIOPIA | አርቲስት ተ...#ETHIOPIA
1#ተስፋዬ ሳህሉ ##ተስፋዬ
2️መልካም ቀን️ #በህይወት እስካለህ: : ልትሳሳት ፣ልትወድቅ ትቸላለህ ፣...#ስብሀት
3አስመሳይ ነው የበዛው ጥቅሙን ፈላጊ ሳንቲም ባገኘም ቁጥር እራሱን አስቀዳ...#Panfalon
4#ክብር ለኢትዮጵያ እናቶች ##ክብር
\n", + "
" + ], + "text/plain": [ + " text hashtags\n", + "0 ሰበር ዜና : ደህና ሁኑ ልጆች! / RIP #ETHIOPIA | አርቲስት ተ... #ETHIOPIA\n", + "1 #ተስፋዬ ሳህሉ # #ተስፋዬ\n", + "2 ️መልካም ቀን️ #በህይወት እስካለህ: : ልትሳሳት ፣ልትወድቅ ትቸላለህ ፣... #ስብሀት\n", + "3 አስመሳይ ነው የበዛው ጥቅሙን ፈላጊ ሳንቲም ባገኘም ቁጥር እራሱን አስቀዳ... #Panfalon\n", + "4 #ክብር ለኢትዮጵያ እናቶች # #ክብር" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import re\n", + "\n", + "def update_hashtags(dataset):\n", + " ''' Preprocess data : if # followed by space/s then by word ,\n", + " concatenate the # and the word'''\n", + "\n", + " for index, row in dataset.iterrows():\n", + " text = row['text']\n", + "\n", + " # Using regular expression to find hashtags followed by one or more spaces and a word\n", + " matches = re.findall(r'#\\s*(\\w+)', text)\n", + "\n", + " for match in matches:\n", + " hashtag = '#' + match\n", + " # Update 'hashtag' column\n", + " dataset.at[index, 'hashtags'] = hashtag\n", + " # Update 'text' column\n", + " dataset.at[index, 'text'] = re.sub(r'#\\s*' + match, hashtag, row['text'])\n", + "\n", + "\n", + "# Call the function to update hashtags\n", + "update_hashtags(dataset)\n", + "\n", + "# Display the updated DataFrame\n", + "dataset.head()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "id": "rAm4ic1L2Mem" + }, + "outputs": [], + "source": [ + "df2 = dataset.copy()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "id": "xHtbKDZJziL1" + }, + "outputs": [], + "source": [ + "from datasets import Dataset\n", + "\n", + "# Create a dictionary containing your Amharic text data\n", + "data_dict = {\"text\": dataset['text'].tolist(), \"hashtags\": dataset['hashtags'].tolist()}\n", + "\n", + "# Create a Dataset object\n", + "dataset = Dataset.from_dict(data_dict)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "id": "zcuKnMHq10gC" + }, + "outputs": [], + "source": [ + "# df2['formatted_text'] = 'text: ' + df2['text'] +',' + 'hashtags: #' + df2['hashtags'].astype(str)\n", + "\n", + "# # Create a dictionary containing your Amharic text data\n", + "# data_dict = {\"formatted_text\": df2['formatted_text'].tolist()}\n", + "\n", + "# # Create a Dataset object\n", + "# fullDataset = Dataset.from_dict(data_dict)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "MQKyXGDP3URh" + }, + "outputs": [], + "source": [ + "# # Print the first few examples\n", + "# print(fullDataset['formatted_text'][:5])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "6n3SHdeE5OYK" + }, + "outputs": [], + "source": [ + "# print(len(fullDataset))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "9p8cyWsqAjyg" + }, + "outputs": [], + "source": [ + "# # Save the dataset to a file (e.g., in Arrow format)\n", + "# fullDataset.to_csv(\"sample_data/fullDataset.csv\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "id": "Pu9HWrDC5caf" + }, + "outputs": [], + "source": [ + "train_dataset = dataset.select(range(18404))\n", + "test_dataset = dataset.select(range(18404, len(dataset)))\n", + "dataset = train_dataset\n", + "dataset_subset = test_dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "axcMEZl85cTv", + "outputId": "4503a157-9a63-41f4-e801-4661702fbdb0" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ሰበር ዜና : ደህና ሁኑ ልጆች! / RIP #ETHIOPIA | አርቲስት ተስፋዬ ሳህሉ(አባባ ተስፋዬ) ከዚህ ኣለም በ94 ኣመታቸው ተለዩ። ጤና ይስጥልኝ ልጆች! የዛሬ አበባዎች፤ የነገ ፍሬዎች! እንደምን አላችሁ ልጆች! አያችሁ ልጆች! የኢትዮጵያ ቴሌቪዥን የልጆች ክፍለ ጊዜ ዝግጅት እናንተን ለማስደሰት ልክ በሰኣቱ ይገኛል። አባባ ደሞ የልጆች ሰኣት እንዳያልፍባቸው በሩጫ ዲ ዲ ዲ ከተፍ ፤ እናንተ ደግሞ ቆማችሃል። ይሄ በጣም ጥሩ ነው ልጆች። አንድ አባት ሲመጣ በአክብሮት መነሳት አስፈላጊ ነው ። ደህና ሁኑ ልጆች! ደህና ሁኑ ልጆች! ደህና ሁኑ ልጆች! ነፍስ ይማር Getu Temesgen\n" + ] + } + ], + "source": [ + "print(dataset['text'][0])" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "_Cp6VQ096npb", + "outputId": "63acbb48-3cc8-42fe-f5be-e64fa6b31136" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#አብን የአማራ ብሄራዊ ንቅናቄ (አብን) ዶ/ር በለጠ ሞላን በድጋሚ የፓርቲው ሊቀመንበር አድርጎ መረጠ። አቶ መልካሙ ሹምዬ ደግሞ የፓርቲው ምክትል ሊቀመንበር ሆነው ተመርጠዋል። የአብን የሕዝብ ግንኙነት ሃላፊ አቶ ጣሂር መሀመድ ፤ ፓርቲው ለ3 ቀናት የማእከላዊ ኮሚቴ ስብሰባውን ሲያካሂድ እንደቆየና የሥራ አስፈፃሚ አባላቱን በአዲስ በማደራጀት ማጠናቀቁን ገልፀዋል። በዚህም መሰረት፦ ዶ/ር በለጠ ሞላ ሊቀመንበር አቶ መልካሙ ሹምዬ ምክትል ሊቀመንበር ዶ/ር ደሳለኝ ጫኔ የውጭ ግንኙነት ሃላፊ አቶ ዩሱፍ ኢብራሂም የሕግ ጉዳዮች ሃላፊ አቶ ክርስቲያን ታደለ የፖሊሲ እና ስትራቴጂ ክፍል ሃላፊ አቶ ጋሻው መርሻ የፖለቲካ ጉዳዮች ሃላፊ አቶ ጣሂር መሀመድ የሕዝብ ግንኙነት ሃላፊ ዶ/ር ቴዎድሮስ ሃ/ማርያም የአብን ፅ/ቤት ሃላፊ አቶ ሀሳቡ ተስፋየ አደረጃጀት ጉዳዮች ሃላፊ አድርጎ የሥራ አስፈፃሚውን በአዲስ አደራጅቷል። ከተመረጡት የፓርቲው የሥራ አስፈፃሚዎች መካከል ስስቱ አዲስ መሆናቸው ተገልጿል። ፓርቲው ዛሬ 3ኛ መደበኛ ጠቅላላ ጉባኤውን በአማራ ክልል መዲና ባህር ዳር ማካሄድ መጀመሩን #ኢብኮ / #አሚኮ ዘግቧል።\n" + ] + } + ], + "source": [ + "print(dataset_subset['text'][0])" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "id": "lVM7md74vcLh" + }, + "outputs": [], + "source": [ + "# Custom Tokenizer\n", + "class CustomTokenizer:\n", + " def __init__(self):\n", + " self.pad_token = \"[PAD]\" # You can choose any string for the pad_token\n", + "\n", + " def tokenize(self, text):\n", + " # Custom tokenization logic here\n", + " # For simplicity, let's split the text into tokens based on spaces\n", + " tokens = text.split()\n", + " return tokens\n", + "\n", + "# Instantiate the custom tokenizer\n", + "custom_tokenizer = CustomTokenizer()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "OJOm-fDp8v_U" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "9qbd6aX5QgMQ" + }, + "source": [ + "Function to download LLaMA 2 model and its tokenizer. It requires a bitsandbytes configuration" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "id": "P-j9fm5WSbKG" + }, + "outputs": [], + "source": [ + "def load_model(model_name, bnb_config):\n", + " n_gpus = torch.cuda.device_count()\n", + " max_memory = f'{40960}MB'\n", + "\n", + "#method from the Hugging Face Transformers library to load a pre-trained language model\n", + " model = AutoModelForCausalLM.from_pretrained(\n", + " model_name,\n", + " quantization_config=bnb_config,\n", + " device_map=\"auto\", # dispatch efficiently the model on the available ressources\n", + " max_memory = {i: max_memory for i in range(n_gpus)},\n", + " )\n", + " tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=True)\n", + "\n", + " # Needed for LLaMA tokenizer\n", + " tokenizer.pad_token = tokenizer.eos_token\n", + "\n", + " return model, tokenizer" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "g2yfDXvSTeAh" + }, + "source": [ + "\n", + "Pre-processing dataset\n", + "\n", + "Instruction fine-tuning is a common technique used to fine-tune a base LLM for a specific downstream use-case.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "id": "oVwsZvBmTTZR" + }, + "outputs": [], + "source": [ + "def create_prompt_formats(sample):\n", + " \"\"\"\n", + " Format various fields of the sample ('text', 'hashtags',)\n", + " Then concatenate them using two newline characters\n", + " :param sample: Sample dictionnary\n", + " \"\"\"\n", + "\n", + " INTRO_BLURB = \"Identify Hashtags from the given text.\"\n", + " INSTRUCTION_KEY = \"### Text:\"\n", + " RESPONSE_KEY = \"Hashtags:\"\n", + " END_KEY = \"### End\"\n", + "\n", + " blurb = f\"{INTRO_BLURB}\"\n", + " text = f\"{INSTRUCTION_KEY}\\n{sample['text']}\"\n", + " response = f\"{RESPONSE_KEY}\\n{sample['hashtags']}\"\n", + " end = f\"{END_KEY}\"\n", + "\n", + " parts = [part for part in [blurb, text, response, end] if part]\n", + "\n", + " formatted_prompt = \"\\n\\n\".join(parts)\n", + "\n", + " sample[\"text\"] = formatted_prompt\n", + "\n", + " return sample" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "pR9givO6R6ka" + }, + "source": [ + "use the model tokenizer to process these prompts into tokenized ones.\n", + "\n", + "* The goal is to create input sequences of uniform length (which are suitable for fine-tuning the language model\n", + "\n", + "because it maximizes efficiency and minimize computational overhead), that must not exceed the model’s maximum token limit." + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "id": "TxPb4NvLTl4l" + }, + "outputs": [], + "source": [ + "def get_max_length(model):\n", + " conf = model.config\n", + " max_length = None\n", + " for length_setting in [\"n_positions\", \"max_position_embeddings\", \"seq_length\"]:\n", + " max_length = getattr(model.config, length_setting, None)\n", + " if max_length:\n", + " print(f\"Found max lenth: {max_length}\")\n", + " break\n", + " if not max_length:\n", + " max_length = 1024\n", + " print(f\"Using default max length: {max_length}\")\n", + " return max_length\n", + "\n", + "\n", + "def preprocess_batch(batch, tokenizer, max_length):\n", + " \"\"\"\n", + " Tokenizing a batch\n", + " \"\"\"\n", + " return tokenizer(\n", + " batch[\"text\"],\n", + " max_length=max_length,\n", + " truncation=True,\n", + " )\n", + "\n", + "\n", + "def preprocess_dataset(tokenizer, max_length: int, seed, dataset):\n", + " \"\"\"Format & tokenize it so it is ready for training\n", + " :param tokenizer (AutoTokenizer): Model Tokenizer\n", + " :param max_length (int): Maximum number of tokens to emit from tokenizer\n", + " \"\"\"\n", + "\n", + " # Add prompt to each sample\n", + " print(\"Preprocessing dataset...\")\n", + " dataset = dataset.map(create_prompt_formats)#, batched=True)\n", + "\n", + " # Apply preprocessing to each batch of the dataset & and remove 'instruction', 'context', 'response', 'category' fields\n", + " _preprocessing_function = partial(preprocess_batch, max_length=max_length, tokenizer=tokenizer)\n", + " dataset = dataset.map(\n", + " _preprocessing_function,\n", + " batched=True,\n", + " remove_columns=[\"text\", \"hashtags\"],\n", + " )\n", + "\n", + " # Filter out samples that have input_ids exceeding max_length\n", + " dataset = dataset.filter(lambda sample: len(sample[\"input_ids\"]) < max_length)\n", + "\n", + " # Shuffle dataset\n", + " dataset = dataset.shuffle(seed=seed)\n", + "\n", + " return dataset" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "S8KglT2yT0gc" + }, + "source": [ + "**Create a bitsandbytes configuration**\n", + "\n", + "> This allows to load our LLM in 4 bits. This way, we can divide the used memory by 4 and import the model on smaller devices. We choose to apply bfloat16 compute data type and nested quantization for memory-saving purposes.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "id": "lPVyx5osTv_y" + }, + "outputs": [], + "source": [ + "''' This function, create_bnb_config(), is designed to create and return a\n", + "configuration object for quantization using the Bits and Bytes (BNB)\n", + "quantization scheme. '''\n", + "def create_bnb_config():\n", + " bnb_config = BitsAndBytesConfig(\n", + " load_in_4bit=True,\n", + " bnb_4bit_use_double_quant=True,\n", + " bnb_4bit_quant_type=\"nf4\",\n", + " bnb_4bit_compute_dtype=torch.bfloat16,\n", + " )\n", + "\n", + " return bnb_config" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "q6cN4wENTR3z" + }, + "source": [ + "** LoRa configuration**\n", + "\n", + "> To leverage the LoRa method, we need to wrap the model as a PeftModel.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "id": "cbcQLbDJT1it" + }, + "outputs": [], + "source": [ + "def create_peft_config(modules):\n", + " \"\"\"\n", + " Create Parameter-Efficient Fine-Tuning config for the model\n", + " :param modules: Names of the modules to apply Lora to\n", + " \"\"\"\n", + " config = LoraConfig(\n", + " r=16, # dimension of the updated matrices\n", + " lora_alpha=64, # parameter for scaling\n", + " target_modules=modules,\n", + " lora_dropout=0.1, # dropout probability for layers\n", + " bias=\"none\",\n", + " task_type=\"CAUSAL_LM\",\n", + " )\n", + "\n", + " return config" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "uau-sYddTwXk" + }, + "source": [ + "> Previous function needs the target modules to update the necessary\n", + "matrices. The following function will get them for our model:" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "id": "6yi6TI1ST-lV" + }, + "outputs": [], + "source": [ + "\n", + "\n", + "def find_all_linear_names(model):\n", + " cls = bnb.nn.Linear4bit #if args.bits == 4 else (bnb.nn.Linear8bitLt if args.bits == 8 else torch.nn.Linear)\n", + " lora_module_names = set()\n", + " for name, module in model.named_modules():\n", + " if isinstance(module, cls):\n", + " names = name.split('.')\n", + " lora_module_names.add(names[0] if len(names) == 1 else names[-1])\n", + "\n", + " if 'lm_head' in lora_module_names: # needed for 16-bit\n", + " lora_module_names.remove('lm_head')\n", + " return list(lora_module_names)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CXEs9fIvT69N" + }, + "source": [ + "> Once everything is set up and the base model is prepared, we can\n", + "use the print_trainable_parameters() helper function to see how many trainable parameters are in the model." + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "id": "sc9ff9v0UEXJ" + }, + "outputs": [], + "source": [ + "def print_trainable_parameters(model, use_4bit=False):\n", + " \"\"\"\n", + " Prints the number of trainable parameters in the model.\n", + " \"\"\"\n", + " trainable_params = 0\n", + " all_param = 0\n", + " for _, param in model.named_parameters():\n", + " num_params = param.numel()\n", + " # if using DS Zero 3 and the weights are initialized empty\n", + " if num_params == 0 and hasattr(param, \"ds_numel\"):\n", + " num_params = param.ds_numel\n", + "\n", + " all_param += num_params\n", + " if param.requires_grad:\n", + " trainable_params += num_params\n", + " if use_4bit:\n", + " trainable_params /= 2\n", + " print(\n", + " f\"all params: {all_param:,d} || trainable params: {trainable_params:,d} || trainable%: {100 * trainable_params / all_param}\"\n", + " )\n" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: python-dotenv in /opt/miniconda/lib/python3.11/site-packages (1.0.1)\n" + ] + } + ], + "source": [ + "!pip install python-dotenv" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "pc3xSbFwUP3t" + }, + "source": [ + "**Train**\n", + "\n", + "Now, we can pre-process our dataset and load our model using the set configurations\n" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "UQ1ygyYmjav9", + "outputId": "2e276454-d7ab-42a3-9dda-09120d5838aa" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Token will not been saved to git credential helper. Pass `add_to_git_credential=True` if you want to set the git credential as well.\n", + "Token is valid (permission: read).\n", + "Your token has been saved to /home/nasrallah_hassan/.cache/huggingface/token\n", + "Login successful\n" + ] + } + ], + "source": [ + "from dotenv import load_dotenv\n", + "from huggingface_hub import login\n", + "\n", + "load_dotenv()\n", + "token = os.environ[\"huggingface_token\"]\n", + "login(token)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 528, + "referenced_widgets": [ + "9e4adea806be46d49b7f37e92748a338", + "9f27bdce93994bc0bc5655c97879d637", + "07c82a6818454130be13570faf77d1a7", + "2df80d3d454b442388a2e3127e736e3e", + "7651d0f306884b53848bd64bc56df500", + "17de6afe24e94ff2960760c0bbbb7146", + "70b33dfa18db4e768458fa6930d00a4a", + "a3e05d1e704f46f7bfdca2cefc04a610", + "60a679a1d13b475c835785c765012444", + "900a336dc6a744cf8f6221bc63aaa633", + "0539d23c4c064f4a90296fe22a8a84b3", + "0a0e8f6c7a2645bfbd2df9509a21909d", + "afaa2c18a1eb47dc955ae934c4968a01", + "b36b878e0b7347e59fe87bb0de806cfb", + "87570f6d2e644c318196678a46bcf922", + "db589f37bf4c419284f21c6267d6f408", + "407f7d85e7964983a1ec685b6db14f1c", + "c6ed5de47d194f56899a01f4795274ce", + "46be584dddd84634b539117fcecdc4b7", + "c71a37bd40a448d1aa9bd760fd8692ee", + "a37699cadc064618bcc850ba37b01145", + "5fc5433f4f9f48e59dac63c0c3bd156a", + "74233ec9e4b94e64ba5ed3bfc544cab1", + "1142fcef536a4f0a914322bbce538054", + "9ab388c3b879402a899fc953e650a117", + "0fe7a638601c4d62ab15a1edaab7f5e1", + "51985bec0a1947fead86dabe1b605193", + "353889488fb941ab9de818997d64d6b7", + "64f4d807b9d04a89b7abe9792236dc4a", + "6c64e8c244134d07a92a76bd5903c519", + "db11269c0c2143e79c8e1be2a3fe29a0", + "b2f36e79b411454b9c648f07a7053bf7", + "e7091d8f4455432795782b522d5ee9b6", + "5c1f9ab6c1594871b8b5afdf51e19726", + "3f7c91d894b2499591501e8b70b51dc9", + "92a8a3349bf942fe8a91fb36efad1e60", + "4b78213b465e416d9f7fd547d11059af", + "77b5a275d26e4f4ba826f2c9198e0d65", + "98f1e2e0824f40ab92048e9f5a2ed067", + "3eb3fd49d093408a8dff8097bad6c2f6", + "bc482a1b71e846008d64347303e8da53", + "4a5bbd81ea2b424c953ddabce0633d90", + "215483dd3721466ebdb9a383eac7580a", + "7f2597d2478a4320bc191e878697d5a7", + "055187fe1d204467892336b850a986c5", + "c47945ffea92487ab3b5f0184fcd4aac", + "c2473c5645dc47f585d63c11536b097a", + "0e51aad4b7e844f69f5c81f97d3673a7", + "31e1bb79a79e48f4aaefbd145a6ccb0e", + "ffa4f33221a64507bf53a25574e8a4e3", + "393f451ec81940b181e259c5fbb62e84", + "1af6d6ba6365401a96a6a4e6d2b39b87", + "6776efc6b05a43149515f8a9ab8c4102", + "f642eeb766eb4c33b6e42e43d2108d5a", + "52b4491a79564237829ab02c8500e089", + "deae19c5a56e4ec58e33701f22872455", + "b9c70871f78b41aaa579b26621dd79a7", + "9b81c580bd7a4b24b9aeadc891f8bb41", + "edad5b919b974aa3bbb6af0ebf988bee", + "b42bae80865e46478356dfe1658db451", + "7f7ef54bc5b14f709279b53311b48524", + "1fe6f1ef4e924bc9b08495077671c39d", + "ac51732e189445098e1a60011e4aebd5", + "7650d6d7fd5f490d9901f0bf8b970eff", + "12fc2f4a906e4806b50fcd145f7726e1", + "9d34c0676891432e8fbcb20a1dda07c0", + "89a6f68b747f4a7f9708081dd205e995", + "ba98a5af142a46ac979d43f45c7f1bc2", + "ceb1be11f57d4c57893ad22ef99b6653", + "6c87c5570fac4712a1a77c9e78aa9105", + "4105500f56514764856fdd104feb4a63", + "3ade97e55b8247c2a2f440db4b56bced", + "e7296da44e6d4f1ab1708f5c1d344f44", + "1dac838ad78c4f89844d34309ff71013", + "7c1fc07ce3b64a23835ec167bd9e11a7", + "004123701b5c4085b7bbaf6024a1c6a0", + "b994b8fcf9d64f46bce1ededbd2d0042", + "6a00fd4fd52d4f87a7d1df2e86ce25d6", + "7928cbeebc5c48ee826531612770ad7f", + "8d3330dcb56242cf881ed948978d8dc5", + "6eb867a7932a482c8095054be7a62f0c", + "7e3cdef7cafb48d6a11549b90cbd14a4", + "0531d921ee994496bc356b165f843918", + "10a27dc44b1f43ba9c774564169c617f", + "6733d61830d143af9dcdfea0a1200e60", + "94a3ee09029a46cf8a62f2ea03a8bc62", + "cf84406cd1be464ca9caf07b3ab7cecf", + "cd21e232645e41d4834badc1fb0a860d", + "379912692baf4f0a8e629d9273071984", + "02c0da9b2dd24f2186e0b80eba63728b", + "2e11546d6bab47b9917cd7751651e04e", + "d0327ceb4e9a4e8f93624c522450f8f6", + "2d1801b723f74ee6ade584e95f23696e", + "6b7c3bd8a0aa422cbfe29eba10281783", + "3cde60fe9c314ab1890c56b3e22982fb", + "b91fa9edc65a4093a13931160210d5e5", + "adbc64a4b9f245ab86258cbffa805241", + "6e6dfc7b5e7c4393b32440417c759a0f", + "48c4888d267e46a69fbd7648250b5a93", + "b65badf0c84c4bfdb720944a7206df18", + "9576b1746f414e0890747c5113880148", + "14206e17bdf14c9f8a81ed30bea678cf", + "cfe5eb2326654c4a92ef520bf059d7e1", + "a55ac6497b434d328caaccd03833459a", + "081c408abd914a29b48faf34ee12a6cd", + "ca09604bb55249b7913c84e681c348dc", + "fcc9664580b6482dbe8ad7f4c2fabb09", + "a94f5ffc1e864be6b95a7372c471d9bf", + "a2d7c8e9d87d43389e8b70cfe59a1232", + "2acdb638a06d4764b2479c861605b266", + "68a2dd2fbcdf45f4b96ac5ab1d33c32b", + "64133685cf1043149c999e654c5e247f", + "86090b230d71463989f09b6860f8d2c6", + "66febca78ca84452b72499635a8b259b", + "226b0ff5917b49a5bbdd6ec45fa307d9", + "fef86b2372094c71b7f75ac7dd0caabd", + "1057a900755a44ee973109682bd1a285", + "2ee7f2e534c24c8ba888f01db059bdbb", + "7c50fd8a551846c4a1c3d1244f6f9f46", + "87efe32842c741918e411eb68a3fe69f", + "0dd65cecc4f84cfc9cf58ecd5d610c01" + ] + }, + "id": "Ce7JRmR1UL0w", + "outputId": "824a4762-f9ff-4118-ccee-01efba073ba8" + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "eaad283665864b0eaf4949aee7b2d020", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Loading checkpoint shards: 0%| | 0/2 [00:00" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Run data is saved locally in /home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/wandb/run-20240127_153243-kma1v3cd" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Syncing run splendid-snowflake-5 to Weights & Biases (docs)
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + " View project at https://wandb.ai/mulabr673/huggingface" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + " View run at https://wandb.ai/mulabr673/huggingface/runs/kma1v3cd" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/miniconda/lib/python3.11/site-packages/torch/utils/checkpoint.py:429: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.\n", + " warnings.warn(\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " \n", + " [10/10 01:12, 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", + "
StepTraining Loss
11.210600
21.495300
31.879900
41.544800
51.224200
61.200900
71.225100
81.187800
91.174600
101.228200

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "***** train metrics *****\n", + " epoch = 0.0\n", + " total_flos = 1632784GF\n", + " train_loss = 1.3371\n", + " train_runtime = 0:01:35.33\n", + " train_samples_per_second = 0.42\n", + " train_steps_per_second = 0.105\n", + "{'train_runtime': 95.3372, 'train_samples_per_second': 0.42, 'train_steps_per_second': 0.105, 'total_flos': 1753188859871232.0, 'train_loss': 1.3371334671974182, 'epoch': 0.0}\n", + "Saving last checkpoint of the model...\n" + ] + } + ], + "source": [ + "def train(model, tokenizer, dataset, output_dir):\n", + " # Apply preprocessing to the model to prepare it by\n", + " # 1 - Enabling gradient checkpointing to reduce memory usage during fine-tuning\n", + " model.gradient_checkpointing_enable()\n", + "\n", + " # 2 - Using the prepare_model_for_kbit_training method from PEFT\n", + " model = prepare_model_for_kbit_training(model)\n", + "\n", + " # Get lora module names\n", + " modules = find_all_linear_names(model)\n", + "\n", + " # Create PEFT config for these modules and wrap the model to PEFT\n", + " peft_config = create_peft_config(modules)\n", + " model = get_peft_model(model, peft_config)\n", + "\n", + " # Print information about the percentage of trainable parameters\n", + " print_trainable_parameters(model)\n", + "\n", + " # Training parameters\n", + " trainer = Trainer(\n", + " model=model,\n", + " train_dataset=dataset,\n", + " args=TrainingArguments(\n", + " per_device_train_batch_size=1,\n", + " gradient_accumulation_steps=4,\n", + " warmup_steps=2,\n", + " max_steps=10,\n", + " learning_rate=2e-4,\n", + " fp16=True,\n", + " logging_steps=1,\n", + " output_dir=\"outputs\",\n", + " optim=\"paged_adamw_8bit\",\n", + " ),\n", + " data_collator=DataCollatorForLanguageModeling(tokenizer, mlm=False)\n", + " )\n", + "\n", + " model.config.use_cache = False # re-enable for inference to speed up predictions for similar inputs\n", + "\n", + "\n", + " # Verifying the datatypes before training\n", + "\n", + " dtypes = {}\n", + " for _, p in model.named_parameters():\n", + " dtype = p.dtype\n", + " if dtype not in dtypes: dtypes[dtype] = 0\n", + " dtypes[dtype] += p.numel()\n", + " total = 0\n", + " for k, v in dtypes.items(): total+= v\n", + " for k, v in dtypes.items():\n", + " print(k, v, v/total)\n", + "\n", + " do_train = True\n", + "\n", + " # Launch training\n", + " print(\"Training...\")\n", + "\n", + " if do_train:\n", + " train_result = trainer.train()\n", + " metrics = train_result.metrics\n", + " trainer.log_metrics(\"train\", metrics)\n", + " trainer.save_metrics(\"train\", metrics)\n", + " trainer.save_state()\n", + " print(metrics)\n", + "\n", + " ###\n", + "\n", + " # Saving model\n", + " print(\"Saving last checkpoint of the model...\")\n", + " os.makedirs(output_dir, exist_ok=True)\n", + " trainer.model.save_pretrained(output_dir)\n", + "\n", + " # Free memory for merging weights\n", + " del model\n", + " del trainer\n", + " torch.cuda.empty_cache()\n", + "\n", + "\n", + "output_dir = \"/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output\"\n", + "train(model, tokenizer2, dataset, output_dir)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Ogu9SXLgVosr" + }, + "source": [ + "* If we prefer to have a number of epochs (entire training dataset\n", + " will be passed through the model) instead of a number of training\n", + " steps (forward and backward passes through the model with one batch\n", + " of data), we can replace the max_steps argument by num_train_epochs.\n", + "\n", + "* The trainer.model.save_pretrained(output_dir) function, saves the fine-tuned model’s weights, configuration, and tokenizer files to load later and use the model for inference." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "3XCfOCLzmDcR" + }, + "source": [ + "**Merge weights**\n", + "\n", + "> Once we have our fine-tuned weights, we can build our fine-tuned\n", + "model and save it to a new directory, with its associated tokenizer\n", + "By performing these steps, we can have a memory-efficient fine-tuned\n", + "model and tokenizer ready for inference!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "model = AutoPeftModelForCausalLM.from_pretrained(output_dir, device_map=\"auto\", torch_dtype=torch.bfloat16)\n", + "model = model.merge_and_unload()" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "id": "Wkr8Li03lh6K" + }, + "outputs": [], + "source": [ + "output_merged_dir = \"/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output/new\"\n", + "os.makedirs(output_merged_dir, exist_ok=True)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "dCDXHUx0x9YD", + "outputId": "0616744e-ab43-40da-f8a0-f090d1a86d01" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "('/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output/new/tokenizer_config.json',\n", + " '/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output/new/special_tokens_map.json',\n", + " '/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output/new/tokenizer.model',\n", + " '/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output/new/added_tokens.json',\n", + " '/home/nasrallah_hassan/AmharicAI-AdGen/research/mistral/output/new/tokenizer.json')" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# save tokenizer for easy inference\n", + "tokenizer = AutoTokenizer.from_pretrained(model_name)\n", + "tokenizer.save_pretrained(output_merged_dir)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "q4kzB6rzooG_" + }, + "outputs": [], + "source": [ + "#model.save_pretrained(output_merged_dir, safe_serialization=True)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "id": "Meb9IwiwAobs" + }, + "outputs": [], + "source": [ + "def create_prompt_formats_for_test(sample):\n", + " \"\"\"\n", + " Format various fields of the sample ('text', 'hashtags',)\n", + " Then concatenate them using two newline characters\n", + " :param sample: Sample dictionnary\n", + " \"\"\"\n", + "\n", + " INTRO_BLURB = \"Identify Hashtags from the given text.\"\n", + " INSTRUCTION_KEY = \"### Text:\"\n", + " # RESPONSE_KEY = \"Hashtags:\"\n", + " END_KEY = \"### End\"\n", + "\n", + " blurb = f\"{INTRO_BLURB}\"\n", + " text = f\"{INSTRUCTION_KEY}\\n{sample['text']}\"\n", + " # response = f\"{RESPONSE_KEY}\\n{sample['hashtags']}\"\n", + " # end = f\"{END_KEY}\"\n", + "\n", + " parts = [part for part in [blurb, text] if part]\n", + "\n", + " formatted_prompt = \"\\n\\n\".join(parts)\n", + "\n", + " sample[\"text\"] = formatted_prompt\n", + "\n", + " return sample" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "id": "lFGmUSKMCYul" + }, + "outputs": [], + "source": [ + "sample = dataset_subset[10]\n", + "\n", + "prompt = create_prompt_formats_for_test(sample)" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "gVTSIU8tIST4", + "outputId": "317b78c2-6eb8-4878-cdd3-7e17a639d97d" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'text': 'Identify Hashtags from the given text.\\n\\n### Text:\\n#DrAbiyAhmed ጠ/ሚር ዶክተር አቢይ አህመድ በሰርቢያ ቤልግሬድ በተካሄደው 18ኛው የአለም የቤት ውስጥ ውድድር ኢትዮጵያ በአንደኝነት ደረጃ ስላጠናቀቀች የተሰማቸውን ደስታ ገለፁ። ጠቅላይ ሚኒስትሩ ለመላው ኢትዮጵያውያን እንኳን ደስ አለን ! እንኳን ደስ አላችሁ ! ብለዋል።', 'hashtags': '#DrAbiyAhmed'}\n" + ] + } + ], + "source": [ + "print(prompt)" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "id": "4bNAmwZdp_-Z" + }, + "outputs": [], + "source": [ + "import time" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "kZL3HRc9nWCC" + }, + "source": [ + "**Inference using Instruction or Question Only**\n" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "id": "q_kyOVVodUfR" + }, + "outputs": [], + "source": [ + "input_text = f\"Instruction: {prompt['text']}\"" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "id": "ePVbmJyqt1UI" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/miniconda/lib/python3.11/site-packages/transformers/generation/configuration_utils.py:398: UserWarning: `do_sample` is set to `False`. However, `top_p` is set to `0.95` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_p`.\n", + " warnings.warn(\n", + "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", + "Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.\n", + "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...\n", + "/opt/miniconda/lib/python3.11/site-packages/torch/utils/checkpoint.py:429: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.\n", + " warnings.warn(\n", + "/opt/miniconda/lib/python3.11/site-packages/torch/utils/checkpoint.py:61: UserWarning: None of the inputs have requires_grad=True. Gradients will be None\n", + " warnings.warn(\n" + ] + } + ], + "source": [ + "# Tokenize the input\n", + "input_ids = tokenizer.encode(input_text, return_tensors=\"pt\").to(model.device)\n", + "\n", + "# Measure inference time\n", + "start_time = time.time()\n", + "\n", + "# Generate predictions\n", + "output = model.generate(input_ids, max_length=500, temperature=1.0, top_k=50, top_p=0.95, num_return_sequences=1)\n", + "generated_output = tokenizer.decode(output[0], skip_special_tokens=True)\n", + "\n", + "end_time = time.time()\n", + "\n", + "# Calculate and print the inference time\n", + "inference_time = end_time - start_time\n" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "DuNNApSVA4jg", + "outputId": "2c19f47a-246b-4dd4-9227-196038d41417" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "======\n", + "Input:\n", + "======\n", + "Instruction: Identify Hashtags from the given text.\n", + "\n", + "### Text:\n", + "#DrAbiyAhmed ጠ/ሚር ዶክተር አቢይ አህመድ በሰርቢያ ቤልግሬድ በተካሄደው 18ኛው የአለም የቤት ውስጥ ውድድር ኢትዮጵያ በአንደኝነት ደረጃ ስላጠናቀቀች የተሰማቸውን ደስታ ገለፁ። ጠቅላይ ሚኒስትሩ ለመላው ኢትዮጵያውያን እንኳን ደስ አለን ! እንኳን ደስ አላችሁ ! ብለዋል።\n", + "\n", + "======================\n", + "Generated Output:\n", + "======================\n", + "Instruction: Identify Hashtags from the given text.\n", + "\n", + "### Text:\n", + "#DrAbiyAhmed ጠ/ሚር ዶክተር አቢይ አህመድ በሰርቢያ ቤልግሬድ በተካሄደው 18ኛው የአለም የቤት ውስጥ ውድድር ኢትዮጵያ በአንደኝነት ደረጃ ስላጠናቀቀች የተሰማቸውን ደስታ ገለፁ። ጠቅላይ ሚኒስትሩ ለመላው ኢትዮጵያውያን እንኳን ደስ አለን ! እንኳን ደስ አላችሁ ! ብለዋል።\n", + "\n", + "Hashtags:\n", + "#DrAbiyAhmed\n", + "\n", + "### End of Text:\n", + "#DrAbiyAhmed\n", + "\n", + "### End of Instruction:\n", + "Identify Hashtags from the given text.\n", + "\n", + "[END]\n", + "\n", + "=========================================\n", + "Inference Time:29.108078241348267 seconds\n", + "==========================================\n" + ] + } + ], + "source": [ + "# Print the formatted input\n", + "print(f\"======\")\n", + "print(f\"Input:\\n======\\n{input_text}\\n\")\n", + "print(f\"======================\")\n", + "print(f\"Generated Output:\\n======================\\n{generated_output}\\n\")\n", + "print(f\"=========================================\")\n", + "print(f\"Inference Time:{inference_time} seconds\\n==========================================\")" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "giMBGdYTl-m3", + "outputId": "5de5e4aa-eb71-4f5f-8677-5964fae88341" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "======\n", + "Input:\n", + "======\n", + "Instruction: Identify Hashtags from the given text.\n", + "\n", + "### Text:\n", + "#DrAbiyAhmed ጠ/ሚር ዶክተር አቢይ አህመድ በሰርቢያ ቤልግሬድ በተካሄደው 18ኛው የአለም የቤት ውስጥ ውድድር ኢትዮጵያ በአንደኝነት ደረጃ ስላጠናቀቀች የተሰማቸውን ደስታ ገለፁ። ጠቅላይ ሚኒስትሩ ለመላው ኢትዮጵያውያን እንኳን ደስ አለን ! እንኳን ደስ አላችሁ ! ብለዋል።\n", + "\n", + "======================\n", + "Generated Output:\n", + "======================\n", + "Instruction: Identify Hashtags from the given text.\n", + "\n", + "### Text:\n", + "#DrAbiyAhmed ጠ/ሚር ዶክተር አቢይ አህመድ በሰርቢያ ቤልግሬድ በተካሄደው 18ኛው የአለም የቤት ውስጥ ውድድር ኢትዮጵያ በአንደኝነት ደረጃ ስላጠናቀቀች የተሰማቸውን ደስታ ገለፁ። ጠቅላይ ሚኒስትሩ ለመላው ኢትዮጵያውያን እንኳን ደስ አለን ! እንኳን ደስ አላችሁ ! ብለዋል።\n", + "\n", + "Hashtags:\n", + "#DrAbiyAhmed\n", + "\n", + "### End of Text:\n", + "#DrAbiyAhmed\n", + "\n", + "### End of Instruction:\n", + "Identify Hashtags from the given text.\n", + "\n", + "[END]\n", + "\n", + "=========================================\n", + "Inference Time:29.108078241348267 seconds\n", + "==========================================\n" + ] + } + ], + "source": [ + "# Print the formatted input\n", + "print(f\"======\")\n", + "print(f\"Input:\\n======\\n{input_text}\\n\")\n", + "print(f\"======================\")\n", + "print(f\"Generated Output:\\n======================\\n{generated_output}\\n\")\n", + "print(f\"=========================================\")\n", + "print(f\"Inference Time:{inference_time} seconds\\n==========================================\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "fA17-7t8wwQT" + }, + "source": [ + "**Fine Tuning Using multiple GPU**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "80-p1mV5wvUG" + }, + "outputs": [], + "source": [ + "# def train(model, tokenizer, dataset, output_dir):\n", + "# # Apply preprocessing to the model to prepare it by\n", + "# # 1 - Enabling gradient checkpointing to reduce memory usage during fine-tuning\n", + "# model.gradient_checkpointing_enable()\n", + "\n", + "# # 2 - Using the prepare_model_for_kbit_training method from PEFT\n", + "# model = prepare_model_for_kbit_training(model)\n", + "\n", + "# # Get lora module names\n", + "# modules = find_all_linear_names(model)\n", + "\n", + "# # Create PEFT config for these modules and wrap the model to PEFT\n", + "# peft_config = create_peft_config(modules)\n", + "# model = get_peft_model(model, peft_config)\n", + "\n", + "# # Print information about the percentage of trainable parameters\n", + "# print_trainable_parameters(model)\n", + "\n", + "# #total_batch_size = n_gpus * per_device_batch_size\n", + "# # Training parameters\n", + "# trainer = Trainer(\n", + "# model=model,\n", + "# train_dataset=dataset,\n", + "# args=TrainingArguments(\n", + "# n_gpu=2,\n", + "# per_device_train_batch_size=2,\n", + "# gradient_accumulation_steps=4,\n", + "# warmup_steps=2,\n", + "# max_steps=20,\n", + "# learning_rate=2e-4,\n", + "# fp16=True,\n", + "# logging_steps=1,\n", + "# output_dir=\"outputs\",\n", + "# optim=\"paged_adamw_8bit\",\n", + "\n", + "# ),\n", + "# data_collator=DataCollatorForLanguageModeling(tokenizer, mlm=False)\n", + "# )\n", + "\n", + "# model.config.use_cache = False # re-enable for inference to speed up predictions for similar inputs\n", + "\n", + "\n", + "# # Verifying the datatypes before training\n", + "\n", + "# dtypes = {}\n", + "# for _, p in model.named_parameters():\n", + "# dtype = p.dtype\n", + "# if dtype not in dtypes: dtypes[dtype] = 0\n", + "# dtypes[dtype] += p.numel()\n", + "# total = 0\n", + "# for k, v in dtypes.items(): total+= v\n", + "# for k, v in dtypes.items():\n", + "# print(k, v, v/total)\n", + "\n", + "# do_train = True\n", + "\n", + "# # Launch training\n", + "# print(\"Training...\")\n", + "\n", + "# if do_train:\n", + "# train_result = trainer.train()\n", + "# metrics = train_result.metrics\n", + "# trainer.log_metrics(\"train\", metrics)\n", + "# trainer.save_metrics(\"train\", metrics)\n", + "# trainer.save_state()\n", + "# print(metrics)\n", + "\n", + "# ###\n", + "\n", + "# # Saving model\n", + "# print(\"Saving last checkpoint of the model...\")\n", + "# os.makedirs(output_dir, exist_ok=True)\n", + "# trainer.model.save_pretrained(output_dir)\n", + "\n", + "# # Free memory for merging weights\n", + "# del model\n", + "# del trainer\n", + "# torch.cuda.empty_cache()\n", + "\n", + "\n", + "# output_dir = \"results/llama2/final_checkpoint_2g\"\n", + "# train(model, tokenizer, dataset, output_dir)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "CTKpwm9JyJA2" + }, + "outputs": [], + "source": [ + "# model_2g = AutoPeftModelForCausalLM.from_pretrained(output_dir, device_map=\"auto\", torch_dtype=torch.bfloat16)\n", + "# model_2g = model_2g.merge_and_unload()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "CtQAk2i_yKJP" + }, + "outputs": [], + "source": [ + "# # save tokenizer for easy inference\n", + "# tokenizer_2g = AutoTokenizer.from_pretrained(model_name)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "t5tznOVlC9UK" + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "A100", + "machine_shape": "hm", + "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.5" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "004123701b5c4085b7bbaf6024a1c6a0": { + "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 + } + }, + "0213bde523d843a69e34b32aad8ce8c0": { + "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_4e4ee24a2da7418d8f41aa50dfe13c48", + "IPY_MODEL_221160933ee84438bf9191a0183bd727", + "IPY_MODEL_96c01f8404264611b18167586f114a67" + ], + "layout": "IPY_MODEL_de87494d800e40cc9139807cedb5378b" + } + }, + "02c0da9b2dd24f2186e0b80eba63728b": { + "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_6b7c3bd8a0aa422cbfe29eba10281783", + "placeholder": "​", + "style": "IPY_MODEL_3cde60fe9c314ab1890c56b3e22982fb", + "value": "tokenizer.model: 100%" + } + }, + "0531d921ee994496bc356b165f843918": { + "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 + } + }, + "0539d23c4c064f4a90296fe22a8a84b3": { + "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": "" + } + }, + "055187fe1d204467892336b850a986c5": { + "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_c47945ffea92487ab3b5f0184fcd4aac", + "IPY_MODEL_c2473c5645dc47f585d63c11536b097a", + "IPY_MODEL_0e51aad4b7e844f69f5c81f97d3673a7" + ], + "layout": "IPY_MODEL_31e1bb79a79e48f4aaefbd145a6ccb0e" + } + }, + "07c82a6818454130be13570faf77d1a7": { + "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_a3e05d1e704f46f7bfdca2cefc04a610", + "max": 609, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_60a679a1d13b475c835785c765012444", + "value": 609 + } + }, + "081c408abd914a29b48faf34ee12a6cd": { + "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 + } + }, + "089965f75c0840b2a668241d75e6ed92": { + "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": "", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_929e7cc6c8c6468b98ac4b9f9ed37947", + "max": 18404, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2408301332bf46028f478451e29e27d0", + "value": 18404 + } + }, + "0a0e8f6c7a2645bfbd2df9509a21909d": { + "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_afaa2c18a1eb47dc955ae934c4968a01", + "IPY_MODEL_b36b878e0b7347e59fe87bb0de806cfb", + "IPY_MODEL_87570f6d2e644c318196678a46bcf922" + ], + "layout": "IPY_MODEL_db589f37bf4c419284f21c6267d6f408" + } + }, + "0dd65cecc4f84cfc9cf58ecd5d610c01": { + "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": "" + } + }, + "0e51aad4b7e844f69f5c81f97d3673a7": { + "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_f642eeb766eb4c33b6e42e43d2108d5a", + "placeholder": "​", + "style": "IPY_MODEL_52b4491a79564237829ab02c8500e089", + "value": " 3.50G/3.50G [00:13<00:00, 239MB/s]" + } + }, + "0fe7a638601c4d62ab15a1edaab7f5e1": { + "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_b2f36e79b411454b9c648f07a7053bf7", + "placeholder": "​", + "style": "IPY_MODEL_e7091d8f4455432795782b522d5ee9b6", + "value": " 2/2 [00:59<00:00, 26.83s/it]" + } + }, + "1057a900755a44ee973109682bd1a285": { + "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": "" + } + }, + "10a27dc44b1f43ba9c774564169c617f": { + "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": "" + } + }, + "1142fcef536a4f0a914322bbce538054": { + "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_353889488fb941ab9de818997d64d6b7", + "placeholder": "​", + "style": "IPY_MODEL_64f4d807b9d04a89b7abe9792236dc4a", + "value": "Downloading shards: 100%" + } + }, + "12fc2f4a906e4806b50fcd145f7726e1": { + "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 + } + }, + "14206e17bdf14c9f8a81ed30bea678cf": { + "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_fcc9664580b6482dbe8ad7f4c2fabb09", + "max": 1842767, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a94f5ffc1e864be6b95a7372c471d9bf", + "value": 1842767 + } + }, + "17de6afe24e94ff2960760c0bbbb7146": { + "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 + } + }, + "18454784ad24444ca34b726f83ce8248": { + "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": "hidden", + "width": null + } + }, + "1af6d6ba6365401a96a6a4e6d2b39b87": { + "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 + } + }, + "1dac838ad78c4f89844d34309ff71013": { + "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 + } + }, + "1fe6f1ef4e924bc9b08495077671c39d": { + "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": "" + } + }, + "215483dd3721466ebdb9a383eac7580a": { + "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 + } + }, + "221160933ee84438bf9191a0183bd727": { + "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_3d5ea8d8acba467d85704a73a223c6af", + "max": 2, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_cf20581b6f3d498dbd25711e626d6f15", + "value": 2 + } + }, + "226b0ff5917b49a5bbdd6ec45fa307d9": { + "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 + } + }, + "2408301332bf46028f478451e29e27d0": { + "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": "" + } + }, + "28bb7249f8e54cdfa8ea222ccb5482c6": { + "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_684a973060d9456a86d444fbbeaa2133", + "IPY_MODEL_089965f75c0840b2a668241d75e6ed92", + "IPY_MODEL_a7712b27e6c94e45aa2a060ab49f0e04" + ], + "layout": "IPY_MODEL_bb1f598f9aea44f1a7fe4da9b3d869fb" + } + }, + "2acdb638a06d4764b2479c861605b266": { + "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": "" + } + }, + "2d1801b723f74ee6ade584e95f23696e": { + "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 + } + }, + "2df80d3d454b442388a2e3127e736e3e": { + "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_900a336dc6a744cf8f6221bc63aaa633", + "placeholder": "​", + "style": "IPY_MODEL_0539d23c4c064f4a90296fe22a8a84b3", + "value": " 609/609 [00:00<00:00, 53.7kB/s]" + } + }, + "2e11546d6bab47b9917cd7751651e04e": { + "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_b91fa9edc65a4093a13931160210d5e5", + "max": 499723, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_adbc64a4b9f245ab86258cbffa805241", + "value": 499723 + } + }, + "2ee7f2e534c24c8ba888f01db059bdbb": { + "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 + } + }, + "31e1bb79a79e48f4aaefbd145a6ccb0e": { + "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 + } + }, + "353889488fb941ab9de818997d64d6b7": { + "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 + } + }, + "379912692baf4f0a8e629d9273071984": { + "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_02c0da9b2dd24f2186e0b80eba63728b", + "IPY_MODEL_2e11546d6bab47b9917cd7751651e04e", + "IPY_MODEL_d0327ceb4e9a4e8f93624c522450f8f6" + ], + "layout": "IPY_MODEL_2d1801b723f74ee6ade584e95f23696e" + } + }, + "393f451ec81940b181e259c5fbb62e84": { + "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": "" + } + }, + "3ade97e55b8247c2a2f440db4b56bced": { + "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 + } + }, + "3cde60fe9c314ab1890c56b3e22982fb": { + "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": "" + } + }, + "3d5ea8d8acba467d85704a73a223c6af": { + "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 + } + }, + "3eb3fd49d093408a8dff8097bad6c2f6": { + "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": "" + } + }, + "3f7c91d894b2499591501e8b70b51dc9": { + "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_98f1e2e0824f40ab92048e9f5a2ed067", + "placeholder": "​", + "style": "IPY_MODEL_3eb3fd49d093408a8dff8097bad6c2f6", + "value": "model-00001-of-00002.safetensors: 100%" + } + }, + "407f7d85e7964983a1ec685b6db14f1c": { + "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 + } + }, + "4105500f56514764856fdd104feb4a63": { + "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 + } + }, + "43ef1a6f9cef4e08bc9237b3ec7856e5": { + "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_7435a21f09ea4131bd61284634db5b7a", + "placeholder": "​", + "style": "IPY_MODEL_7a714cab0fa24fa3b11f5eb626d51efd", + "value": "Map: 100%" + } + }, + "46be584dddd84634b539117fcecdc4b7": { + "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 + } + }, + "48c4888d267e46a69fbd7648250b5a93": { + "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": "" + } + }, + "48d300a81ab544708d44ac7049a0bd3a": { + "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": "" + } + }, + "4a5bbd81ea2b424c953ddabce0633d90": { + "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": "" + } + }, + "4b78213b465e416d9f7fd547d11059af": { + "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_215483dd3721466ebdb9a383eac7580a", + "placeholder": "​", + "style": "IPY_MODEL_7f2597d2478a4320bc191e878697d5a7", + "value": " 9.98G/9.98G [00:44<00:00, 174MB/s]" + } + }, + "4e4ee24a2da7418d8f41aa50dfe13c48": { + "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_8f8bd8aa9c1141a09a4becad4aa80418", + "placeholder": "​", + "style": "IPY_MODEL_6d93880e03644c59bb2aa97a6524d246", + "value": "Loading checkpoint shards: 100%" + } + }, + "51985bec0a1947fead86dabe1b605193": { + "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 + } + }, + "52b4491a79564237829ab02c8500e089": { + "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": "" + } + }, + "54de021924594864b79016c42242f9e9": { + "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": "" + } + }, + "5c1f9ab6c1594871b8b5afdf51e19726": { + "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_3f7c91d894b2499591501e8b70b51dc9", + "IPY_MODEL_92a8a3349bf942fe8a91fb36efad1e60", + "IPY_MODEL_4b78213b465e416d9f7fd547d11059af" + ], + "layout": "IPY_MODEL_77b5a275d26e4f4ba826f2c9198e0d65" + } + }, + "5fc5433f4f9f48e59dac63c0c3bd156a": { + "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": "" + } + }, + "60a679a1d13b475c835785c765012444": { + "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": "" + } + }, + "64133685cf1043149c999e654c5e247f": { + "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_fef86b2372094c71b7f75ac7dd0caabd", + "placeholder": "​", + "style": "IPY_MODEL_1057a900755a44ee973109682bd1a285", + "value": "special_tokens_map.json: 100%" + } + }, + "64f4d807b9d04a89b7abe9792236dc4a": { + "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": "" + } + }, + "66febca78ca84452b72499635a8b259b": { + "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_87efe32842c741918e411eb68a3fe69f", + "placeholder": "​", + "style": "IPY_MODEL_0dd65cecc4f84cfc9cf58ecd5d610c01", + "value": " 414/414 [00:00<00:00, 39.6kB/s]" + } + }, + "6733d61830d143af9dcdfea0a1200e60": { + "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 + } + }, + "6776efc6b05a43149515f8a9ab8c4102": { + "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": "" + } + }, + "684a973060d9456a86d444fbbeaa2133": { + "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_f3b6da9b49f547c7ad92d1b86af2fa78", + "placeholder": "​", + "style": "IPY_MODEL_77dc8fce07a04fc1988737496ef09c09", + "value": "Filter: 100%" + } + }, + "68a2dd2fbcdf45f4b96ac5ab1d33c32b": { + "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_64133685cf1043149c999e654c5e247f", + "IPY_MODEL_86090b230d71463989f09b6860f8d2c6", + "IPY_MODEL_66febca78ca84452b72499635a8b259b" + ], + "layout": "IPY_MODEL_226b0ff5917b49a5bbdd6ec45fa307d9" + } + }, + "6a00fd4fd52d4f87a7d1df2e86ce25d6": { + "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_7928cbeebc5c48ee826531612770ad7f", + "IPY_MODEL_8d3330dcb56242cf881ed948978d8dc5", + "IPY_MODEL_6eb867a7932a482c8095054be7a62f0c" + ], + "layout": "IPY_MODEL_7e3cdef7cafb48d6a11549b90cbd14a4" + } + }, + "6b7c3bd8a0aa422cbfe29eba10281783": { + "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 + } + }, + "6c64e8c244134d07a92a76bd5903c519": { + "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 + } + }, + "6c87c5570fac4712a1a77c9e78aa9105": { + "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_004123701b5c4085b7bbaf6024a1c6a0", + "placeholder": "​", + "style": "IPY_MODEL_b994b8fcf9d64f46bce1ededbd2d0042", + "value": " 188/188 [00:00<00:00, 17.6kB/s]" + } + }, + "6d93880e03644c59bb2aa97a6524d246": { + "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": "" + } + }, + "6e6dfc7b5e7c4393b32440417c759a0f": { + "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 + } + }, + "6eb867a7932a482c8095054be7a62f0c": { + "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_cf84406cd1be464ca9caf07b3ab7cecf", + "placeholder": "​", + "style": "IPY_MODEL_cd21e232645e41d4834badc1fb0a860d", + "value": " 776/776 [00:00<00:00, 72.7kB/s]" + } + }, + "70918a1c19a443b380bed9b87978cf51": { + "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_43ef1a6f9cef4e08bc9237b3ec7856e5", + "IPY_MODEL_aad494542dc1422abe803ecdb6c77e76", + "IPY_MODEL_a05250531071414585d29876f1f05319" + ], + "layout": "IPY_MODEL_7bb63bb641034fe7b0f3f422eec3b9d4" + } + }, + "70b33dfa18db4e768458fa6930d00a4a": { + "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": "" + } + }, + "719ee4a0fe29440c8185eaec857cbc0d": { + "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_d63611b41599470a84357222964933e7", + "placeholder": "​", + "style": "IPY_MODEL_54de021924594864b79016c42242f9e9", + "value": "Map: 100%" + } + }, + "74233ec9e4b94e64ba5ed3bfc544cab1": { + "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_1142fcef536a4f0a914322bbce538054", + "IPY_MODEL_9ab388c3b879402a899fc953e650a117", + "IPY_MODEL_0fe7a638601c4d62ab15a1edaab7f5e1" + ], + "layout": "IPY_MODEL_51985bec0a1947fead86dabe1b605193" + } + }, + "7435a21f09ea4131bd61284634db5b7a": { + "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 + } + }, + "7650d6d7fd5f490d9901f0bf8b970eff": { + "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": "" + } + }, + "7651d0f306884b53848bd64bc56df500": { + "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 + } + }, + "77b5a275d26e4f4ba826f2c9198e0d65": { + "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 + } + }, + "77dc8fce07a04fc1988737496ef09c09": { + "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": "" + } + }, + "7928cbeebc5c48ee826531612770ad7f": { + "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_0531d921ee994496bc356b165f843918", + "placeholder": "​", + "style": "IPY_MODEL_10a27dc44b1f43ba9c774564169c617f", + "value": "tokenizer_config.json: 100%" + } + }, + "7a714cab0fa24fa3b11f5eb626d51efd": { + "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": "" + } + }, + "7bb63bb641034fe7b0f3f422eec3b9d4": { + "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": "hidden", + "width": null + } + }, + "7c1fc07ce3b64a23835ec167bd9e11a7": { + "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": "" + } + }, + "7c50fd8a551846c4a1c3d1244f6f9f46": { + "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": "" + } + }, + "7e3cdef7cafb48d6a11549b90cbd14a4": { + "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 + } + }, + "7f2597d2478a4320bc191e878697d5a7": { + "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": "" + } + }, + "7f7ef54bc5b14f709279b53311b48524": { + "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 + } + }, + "86090b230d71463989f09b6860f8d2c6": { + "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_2ee7f2e534c24c8ba888f01db059bdbb", + "max": 414, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7c50fd8a551846c4a1c3d1244f6f9f46", + "value": 414 + } + }, + "87570f6d2e644c318196678a46bcf922": { + "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_a37699cadc064618bcc850ba37b01145", + "placeholder": "​", + "style": "IPY_MODEL_5fc5433f4f9f48e59dac63c0c3bd156a", + "value": " 26.8k/26.8k [00:00<00:00, 2.05MB/s]" + } + }, + "87efe32842c741918e411eb68a3fe69f": { + "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 + } + }, + "89a6f68b747f4a7f9708081dd205e995": { + "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_ba98a5af142a46ac979d43f45c7f1bc2", + "IPY_MODEL_ceb1be11f57d4c57893ad22ef99b6653", + "IPY_MODEL_6c87c5570fac4712a1a77c9e78aa9105" + ], + "layout": "IPY_MODEL_4105500f56514764856fdd104feb4a63" + } + }, + "8a0340af2ed54f47a3b7e585ea80cb43": { + "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 + } + }, + "8d3330dcb56242cf881ed948978d8dc5": { + "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_6733d61830d143af9dcdfea0a1200e60", + "max": 776, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_94a3ee09029a46cf8a62f2ea03a8bc62", + "value": 776 + } + }, + "8f8bd8aa9c1141a09a4becad4aa80418": { + "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 + } + }, + "900a336dc6a744cf8f6221bc63aaa633": { + "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 + } + }, + "929e7cc6c8c6468b98ac4b9f9ed37947": { + "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 + } + }, + "92a8a3349bf942fe8a91fb36efad1e60": { + "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_bc482a1b71e846008d64347303e8da53", + "max": 9976578928, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4a5bbd81ea2b424c953ddabce0633d90", + "value": 9976578928 + } + }, + "94a3ee09029a46cf8a62f2ea03a8bc62": { + "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": "" + } + }, + "9576b1746f414e0890747c5113880148": { + "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_081c408abd914a29b48faf34ee12a6cd", + "placeholder": "​", + "style": "IPY_MODEL_ca09604bb55249b7913c84e681c348dc", + "value": "tokenizer.json: 100%" + } + }, + "96c01f8404264611b18167586f114a67": { + "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_d590bf4d7b6a4aea8db3b8a800ee343f", + "placeholder": "​", + "style": "IPY_MODEL_f8991a7f787d427ca9215135ce2c3c77", + "value": " 2/2 [00:07<00:00, 3.49s/it]" + } + }, + "97cb7a52ca3543a1be62650e0bf026f1": { + "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 + } + }, + "98f1e2e0824f40ab92048e9f5a2ed067": { + "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 + } + }, + "9ab388c3b879402a899fc953e650a117": { + "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_6c64e8c244134d07a92a76bd5903c519", + "max": 2, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_db11269c0c2143e79c8e1be2a3fe29a0", + "value": 2 + } + }, + "9b81c580bd7a4b24b9aeadc891f8bb41": { + "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_ac51732e189445098e1a60011e4aebd5", + "max": 2, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7650d6d7fd5f490d9901f0bf8b970eff", + "value": 2 + } + }, + "9d34c0676891432e8fbcb20a1dda07c0": { + "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": "" + } + }, + "9e4adea806be46d49b7f37e92748a338": { + "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_9f27bdce93994bc0bc5655c97879d637", + "IPY_MODEL_07c82a6818454130be13570faf77d1a7", + "IPY_MODEL_2df80d3d454b442388a2e3127e736e3e" + ], + "layout": "IPY_MODEL_7651d0f306884b53848bd64bc56df500" + } + }, + "9f27bdce93994bc0bc5655c97879d637": { + "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_17de6afe24e94ff2960760c0bbbb7146", + "placeholder": "​", + "style": "IPY_MODEL_70b33dfa18db4e768458fa6930d00a4a", + "value": "config.json: 100%" + } + }, + "a05250531071414585d29876f1f05319": { + "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_97cb7a52ca3543a1be62650e0bf026f1", + "placeholder": "​", + "style": "IPY_MODEL_d875bfc9ce5b4bc4a8e2329bf24987fb", + "value": " 18404/18404 [00:07<00:00, 1973.14 examples/s]" + } + }, + "a2d7c8e9d87d43389e8b70cfe59a1232": { + "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 + } + }, + "a37699cadc064618bcc850ba37b01145": { + "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 + } + }, + "a3e05d1e704f46f7bfdca2cefc04a610": { + "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 + } + }, + "a55ac6497b434d328caaccd03833459a": { + "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 + } + }, + "a7712b27e6c94e45aa2a060ab49f0e04": { + "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_8a0340af2ed54f47a3b7e585ea80cb43", + "placeholder": "​", + "style": "IPY_MODEL_c419f2587cc74ae6b0dde962caec6159", + "value": " 18404/18404 [00:16<00:00, 934.01 examples/s]" + } + }, + "a94f5ffc1e864be6b95a7372c471d9bf": { + "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": "" + } + }, + "aad494542dc1422abe803ecdb6c77e76": { + "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": "", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ea67d69c64fd4420bb8986c3887eb7e9", + "max": 18404, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c4292de9659d416c8b08c44faf1bb5cf", + "value": 18404 + } + }, + "ac51732e189445098e1a60011e4aebd5": { + "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 + } + }, + "adbc64a4b9f245ab86258cbffa805241": { + "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": "" + } + }, + "afaa2c18a1eb47dc955ae934c4968a01": { + "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_407f7d85e7964983a1ec685b6db14f1c", + "placeholder": "​", + "style": "IPY_MODEL_c6ed5de47d194f56899a01f4795274ce", + "value": "model.safetensors.index.json: 100%" + } + }, + "b2f36e79b411454b9c648f07a7053bf7": { + "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 + } + }, + "b36b878e0b7347e59fe87bb0de806cfb": { + "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_46be584dddd84634b539117fcecdc4b7", + "max": 26788, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c71a37bd40a448d1aa9bd760fd8692ee", + "value": 26788 + } + }, + "b42bae80865e46478356dfe1658db451": { + "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 + } + }, + "b65badf0c84c4bfdb720944a7206df18": { + "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_9576b1746f414e0890747c5113880148", + "IPY_MODEL_14206e17bdf14c9f8a81ed30bea678cf", + "IPY_MODEL_cfe5eb2326654c4a92ef520bf059d7e1" + ], + "layout": "IPY_MODEL_a55ac6497b434d328caaccd03833459a" + } + }, + "b91fa9edc65a4093a13931160210d5e5": { + "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 + } + }, + "b994b8fcf9d64f46bce1ededbd2d0042": { + "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": "" + } + }, + "b9c70871f78b41aaa579b26621dd79a7": { + "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_7f7ef54bc5b14f709279b53311b48524", + "placeholder": "​", + "style": "IPY_MODEL_1fe6f1ef4e924bc9b08495077671c39d", + "value": "Loading checkpoint shards: 100%" + } + }, + "ba98a5af142a46ac979d43f45c7f1bc2": { + "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_3ade97e55b8247c2a2f440db4b56bced", + "placeholder": "​", + "style": "IPY_MODEL_e7296da44e6d4f1ab1708f5c1d344f44", + "value": "generation_config.json: 100%" + } + }, + "baafa594d8814e3a9584dc3f2c42bf45": { + "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_719ee4a0fe29440c8185eaec857cbc0d", + "IPY_MODEL_d045cc3593b74209b7bf149dbf9b2e61", + "IPY_MODEL_bdb4f2de960d4529810d1ad3eefea59c" + ], + "layout": "IPY_MODEL_18454784ad24444ca34b726f83ce8248" + } + }, + "bb1f598f9aea44f1a7fe4da9b3d869fb": { + "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": "hidden", + "width": null + } + }, + "bc482a1b71e846008d64347303e8da53": { + "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 + } + }, + "bdb4f2de960d4529810d1ad3eefea59c": { + "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_ff6e5ac3180c47d69aa7630246c71e6f", + "placeholder": "​", + "style": "IPY_MODEL_c2f438f50dee4f23904602a7c2c7f41b", + "value": " 18404/18404 [00:00<00:00, 18850.44 examples/s]" + } + }, + "c2473c5645dc47f585d63c11536b097a": { + "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_1af6d6ba6365401a96a6a4e6d2b39b87", + "max": 3500297344, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_6776efc6b05a43149515f8a9ab8c4102", + "value": 3500297344 + } + }, + "c2f438f50dee4f23904602a7c2c7f41b": { + "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": "" + } + }, + "c419f2587cc74ae6b0dde962caec6159": { + "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": "" + } + }, + "c4292de9659d416c8b08c44faf1bb5cf": { + "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": "" + } + }, + "c47945ffea92487ab3b5f0184fcd4aac": { + "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_ffa4f33221a64507bf53a25574e8a4e3", + "placeholder": "​", + "style": "IPY_MODEL_393f451ec81940b181e259c5fbb62e84", + "value": "model-00002-of-00002.safetensors: 100%" + } + }, + "c6ed5de47d194f56899a01f4795274ce": { + "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": "" + } + }, + "c71a37bd40a448d1aa9bd760fd8692ee": { + "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": "" + } + }, + "ca09604bb55249b7913c84e681c348dc": { + "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": "" + } + }, + "cd21e232645e41d4834badc1fb0a860d": { + "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": "" + } + }, + "ceb1be11f57d4c57893ad22ef99b6653": { + "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_1dac838ad78c4f89844d34309ff71013", + "max": 188, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7c1fc07ce3b64a23835ec167bd9e11a7", + "value": 188 + } + }, + "cf20581b6f3d498dbd25711e626d6f15": { + "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": "" + } + }, + "cf84406cd1be464ca9caf07b3ab7cecf": { + "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 + } + }, + "cfe5eb2326654c4a92ef520bf059d7e1": { + "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_a2d7c8e9d87d43389e8b70cfe59a1232", + "placeholder": "​", + "style": "IPY_MODEL_2acdb638a06d4764b2479c861605b266", + "value": " 1.84M/1.84M [00:01<00:00, 1.50MB/s]" + } + }, + "d0327ceb4e9a4e8f93624c522450f8f6": { + "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_6e6dfc7b5e7c4393b32440417c759a0f", + "placeholder": "​", + "style": "IPY_MODEL_48c4888d267e46a69fbd7648250b5a93", + "value": " 500k/500k [00:00<00:00, 40.6MB/s]" + } + }, + "d045cc3593b74209b7bf149dbf9b2e61": { + "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": "", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d5e7af0cff5c411d96b89ba43d6979fb", + "max": 18404, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_48d300a81ab544708d44ac7049a0bd3a", + "value": 18404 + } + }, + "d590bf4d7b6a4aea8db3b8a800ee343f": { + "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 + } + }, + "d5e7af0cff5c411d96b89ba43d6979fb": { + "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 + } + }, + "d63611b41599470a84357222964933e7": { + "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 + } + }, + "d875bfc9ce5b4bc4a8e2329bf24987fb": { + "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": "" + } + }, + "db11269c0c2143e79c8e1be2a3fe29a0": { + "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": "" + } + }, + "db589f37bf4c419284f21c6267d6f408": { + "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 + } + }, + "de87494d800e40cc9139807cedb5378b": { + "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 + } + }, + "deae19c5a56e4ec58e33701f22872455": { + "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_b9c70871f78b41aaa579b26621dd79a7", + "IPY_MODEL_9b81c580bd7a4b24b9aeadc891f8bb41", + "IPY_MODEL_edad5b919b974aa3bbb6af0ebf988bee" + ], + "layout": "IPY_MODEL_b42bae80865e46478356dfe1658db451" + } + }, + "e7091d8f4455432795782b522d5ee9b6": { + "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": "" + } + }, + "e7296da44e6d4f1ab1708f5c1d344f44": { + "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": "" + } + }, + "ea67d69c64fd4420bb8986c3887eb7e9": { + "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 + } + }, + "edad5b919b974aa3bbb6af0ebf988bee": { + "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_12fc2f4a906e4806b50fcd145f7726e1", + "placeholder": "​", + "style": "IPY_MODEL_9d34c0676891432e8fbcb20a1dda07c0", + "value": " 2/2 [00:04<00:00, 2.21s/it]" + } + }, + "f3b6da9b49f547c7ad92d1b86af2fa78": { + "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 + } + }, + "f642eeb766eb4c33b6e42e43d2108d5a": { + "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 + } + }, + "f8991a7f787d427ca9215135ce2c3c77": { + "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": "" + } + }, + "fcc9664580b6482dbe8ad7f4c2fabb09": { + "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 + } + }, + "fef86b2372094c71b7f75ac7dd0caabd": { + "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 + } + }, + "ff6e5ac3180c47d69aa7630246c71e6f": { + "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 + } + }, + "ffa4f33221a64507bf53a25574e8a4e3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} From 9060ada10f5f8bc38ca3c2c744b0e714981281a2 Mon Sep 17 00:00:00 2001 From: Xmuluneh Date: Sat, 3 Feb 2024 16:07:45 +0000 Subject: [PATCH 2/2] feat: add tokenizer --- scripts/tokenizer.py | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 scripts/tokenizer.py diff --git a/scripts/tokenizer.py b/scripts/tokenizer.py new file mode 100644 index 0000000..b242936 --- /dev/null +++ b/scripts/tokenizer.py @@ -0,0 +1,58 @@ +from tokenizers import Tokenizer, models, normalizers, pre_tokenizers, trainers, processors, decoders +from transformers import PreTrainedTokenizerFast + +class CustomTokenizer: + def __init__(self, vocab_size=20_000, min_frequency=2): + self.tokenizer = Tokenizer(models.WordPiece(unk_token='[UNK]')) + self.tokenizer.normalizer = normalizers.Sequence([normalizers.Lowercase(), normalizers.NFKD()]) + self.tokenizer.pre_tokenizer = pre_tokenizers.Whitespace() + self.trainer = trainers.WordPieceTrainer( + vocab_size=vocab_size, + special_tokens=['[UNK]', '[PAD]', '[CLS]', '[SEP]', '[MASK]'], + min_frequency=min_frequency, + continuing_subword_prefix='' + ) + self.processor = processors.TemplateProcessing( + single=f'[CLS]:0 $A:0 [SEP]:0', + pair=f'[CLS]:0 $A:0 [SEP]:0 $B:1 [SEP]:1', + special_tokens=[ + ('[CLS]', self.tokenizer.token_to_id('[CLS]')), + ('[SEP]', self.tokenizer.token_to_id('[SEP]')) + ] + ) + self.decoder = decoders.WordPiece(prefix='##') + self.transformers_tokenizer = None + + def train_tokenizer(self, input_files): + self.tokenizer.train(input_files, trainer=self.trainer) + + def train_tokenizer_iterable(self, iterable_data): + self.tokenizer.train_from_iterator(iterable_data, trainer=self.trainer) + + def setup_post_processing(self): + cls_id = self.tokenizer.token_to_id('[CLS]') + sep_id = self.tokenizer.token_to_id('[SEP]') + self.tokenizer.post_processor = processors.TemplateProcessing( + single=f'[CLS]:0 $A:0 [SEP]:0', + pair=f'[CLS]:0 $A:0 [SEP]:0 $B:1 [SEP]:1', + special_tokens=[ + ('[CLS]', cls_id), + ('[SEP]', sep_id) + ] + ) + + def setup_transformers_tokenizer(self): + self.transformers_tokenizer = PreTrainedTokenizerFast( + tokenizer_object=self.tokenizer, + unk_token='[UNK]', + pad_token='[PAD]', + cls_token='[CLS]', + sep_token='[SEP]', + mask_token='[MASK]' + ) + + def save_transformers_tokenizer(self, save_path): + if self.transformers_tokenizer: + self.transformers_tokenizer.save_pretrained(save_path) + else: + raise ValueError("Transformers tokenizer not set. Run setup_transformers_tokenizer first.")