2023-02-10 12:42:56 +01:00
{
2023-02-12 18:18:21 +01:00
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "ZXsOR6oJOJbd"
},
"source": [
"# Instalacja pakietów"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "8l0hzptKNiZS",
"outputId": "29622435-2f50-4c0a-d921-e0bee5470440"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting transformers\n",
" Downloading transformers-4.26.1-py3-none-any.whl (6.3 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.3/6.3 MB\u001b[0m \u001b[31m47.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting datasets\n",
" Downloading datasets-2.9.0-py3-none-any.whl (462 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m462.8/462.8 KB\u001b[0m \u001b[31m23.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: torch in /usr/local/lib/python3.8/dist-packages (1.13.1+cu116)\n",
"Collecting sentencepiece\n",
" Downloading sentencepiece-0.1.97-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m13.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (2022.6.2)\n",
"Collecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
" Downloading tokenizers-0.13.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m43.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.8/dist-packages (from transformers) (6.0)\n",
"Collecting huggingface-hub<1.0,>=0.11.0\n",
" Downloading huggingface_hub-0.12.0-py3-none-any.whl (190 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m190.3/190.3 KB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.8/dist-packages (from transformers) (4.64.1)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (from transformers) (2.25.1)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from transformers) (23.0)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from transformers) (3.9.0)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (1.21.6)\n",
"Collecting xxhash\n",
" Downloading xxhash-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m213.0/213.0 KB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.8/dist-packages (from datasets) (9.0.0)\n",
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.8/dist-packages (from datasets) (3.8.3)\n",
"Collecting responses<0.19\n",
" Downloading responses-0.18.0-py3-none-any.whl (38 kB)\n",
"Collecting multiprocess\n",
" Downloading multiprocess-0.70.14-py38-none-any.whl (132 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m132.0/132.0 KB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from datasets) (1.3.5)\n",
"Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.8/dist-packages (from datasets) (2023.1.0)\n",
"Requirement already satisfied: dill<0.3.7 in /usr/local/lib/python3.8/dist-packages (from datasets) (0.3.6)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from torch) (4.4.0)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (6.0.4)\n",
"Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (2.1.1)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (4.0.2)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.3.3)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.3.1)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.8.2)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (22.2.0)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (4.0.0)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (1.24.3)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (2.10)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (2022.12.7)\n",
"Collecting urllib3<1.27,>=1.21.1\n",
" Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m140.6/140.6 KB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas->datasets) (2.8.2)\n",
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->datasets) (2022.7.1)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.7.3->pandas->datasets) (1.15.0)\n",
"Installing collected packages: tokenizers, sentencepiece, xxhash, urllib3, multiprocess, responses, huggingface-hub, transformers, datasets\n",
" Attempting uninstall: urllib3\n",
" Found existing installation: urllib3 1.24.3\n",
" Uninstalling urllib3-1.24.3:\n",
" Successfully uninstalled urllib3-1.24.3\n",
"Successfully installed datasets-2.9.0 huggingface-hub-0.12.0 multiprocess-0.70.14 responses-0.18.0 sentencepiece-0.1.97 tokenizers-0.13.2 transformers-4.26.1 urllib3-1.26.14 xxhash-3.2.0\n"
]
}
],
"source": [
"!pip install transformers datasets torch sentencepiece"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"cell_type": "markdown",
"metadata": {
"id": "dhN0rmb5Oi3d"
},
"source": [
"# Załadowanie datasetu"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"id": "tnaDkwZ2Pbnn"
},
"outputs": [],
"source": [
"from datasets import load_dataset"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 231,
"referenced_widgets": [
"d481c2d945214c45b716d266d5d75184",
"b59689c435074e14a5ffab86f7358d79",
"8e53b6fe3c9b4ddb95c6bc13431f330e",
"a8e97add56944729a2ead40f46e0acd8",
"5e960877834348318c208650676ac592",
"df1e772af2fa43fd8d705e82aae29a28",
"5de4c85766684223a885de341a2375a9",
"951d4aa7857542599bfa653eb6e98dd8",
"57e82888c8764d67b04362742b177118",
"04c3671ec63e4e19a29df60b9e35b9f4",
"6d4ff2e0c30e4b4891e1882a246191a7",
"0a4967eb8656482988be61b4e884ab6b",
"70bf1a3b71c349678cead7c1e7f59408",
"692a335df661445cb4dfa84a60708884",
"b37e5ec6cb7c4a07a904c8924f6d3ac9",
"129641fbac844cda9261d89ba1b02a9c",
"286c12dec8c84e5fbebc9bfecdcaf362",
"c1ccf4622a57496684a1232730d12aae",
"fe4d858e5a12465bb3e1ed4f0964a592",
"d6d4fa7b46a24c90832fda7d030f729a",
"09f51cd5ae6140d7b7d93f0682954024",
"a35de7678ed04a0094d09162d6dc719b",
"36974fdfee5141b7850289e25b23df3c",
"5c5294c17e2a4c52912d9722210886cd",
"99279b2dc5004a4f878e6e4d08257fb6",
"ff6597d5d8cd457f9e8290339fcb42f5",
"434546b6ac0a404aa36700a170709688",
"973260a8e814424aac53d061ba9325bd",
"f983b467dc0c433995aa865e5055fe05",
"b5a31b3ad4224d009745b9604088476f",
"dda925b25f6d42c5aca2fb619f3625e5",
"f99fca76deeb408c8a953712adc4658c",
"0b2f4e8e08474341be8e46ee255d8451",
"4bbbc1eaabb0460cba315a082cd69783",
"ec970d97055b434cac97bca5b1d24069",
"6d28f8333ec2447cbf9f03d333d86e82",
"af29ca374d42465b93525a7cb54c7869",
"f6c0f046a62a489497e659d6a786324a",
"0d1267b2242d4a93ab5791a0f45aaa84",
"2af172c9becf4b24a12afa75f7c23bfa",
"9c9c5376fbed445dbea430c02cff9194",
"ca515e1f8f154ec398c8a823629a5622",
"c93b2a9a14134fccb9b815e3228ed56a",
"90d9bc90d3944b4297b13af2ba123f99",
"7f68486bff314b178c4fdb5b54cca92e",
"e11096eae0ef432dabb00cb49c5e96b8",
"84576cd6a7c64d6f809dc708b137134c",
"c096402cab6e4e4b911c4aa41b285e1b",
"556b1cb4381b473db666c64ca193585c",
"9213dd04267b42ffb51918b5a6e8bfe0",
"69b79fd9c03b4801bef03d27604ef51c",
"4e6240934876400db18bacae780b9839",
"616c196921514481aef009cde26fe0a8",
"6ac66769ad604b66aa658bf52b11914a",
"75db994dd2c24faaa36a2fdddcd11fb9",
"0cdcd5131b5148bf8ef7130e741e7f9b",
"296cc18ff4b5480e9cf22136589b23b2",
"1c465c9fe6314a75aefcf6293c79f800",
"03cc9c6818ff45c1b791557da43d5d77",
"19d794a37566410592951ac2f7d6f8d4",
"7a965267d797415a94c4b1d08eb11e63",
"1ea948fb5ea54ae3ae24fc124d64ac45",
"454abc04b69a46b5b28c10be09db3adf",
"41b58dbbb09c4b9497b0acb4a7484f45",
"7a0a7e8ab334489d8d363459b9e0bd37",
"7071959c1e2141d58bceb19e1e0759f3"
]
},
"id": "cCiAuRqrOkvV",
"outputId": "22cf5f97-411a-4e6c-b0bf-28b477607386"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading builder script: 0%| | 0.00/3.21k [00:00<?, ?B/s]"
2023-02-10 12:42:56 +01:00
],
2023-02-12 18:18:21 +01:00
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "d481c2d945214c45b716d266d5d75184"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading metadata: 0%| | 0.00/1.69k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "0a4967eb8656482988be61b4e884ab6b"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading readme: 0%| | 0.00/4.87k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "36974fdfee5141b7850289e25b23df3c"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading and preparing dataset sms_spam/plain_text to /root/.cache/huggingface/datasets/sms_spam/plain_text/1.0.0/53f051d3b5f62d99d61792c91acefe4f1577ad3e4c216fb0ad39e30b9f20019c...\n"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading data: 0%| | 0.00/203k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "4bbbc1eaabb0460cba315a082cd69783"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
"Generating train split: 0%| | 0/5574 [00:00<?, ? examples/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "7f68486bff314b178c4fdb5b54cca92e"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "stream",
"name": "stdout",
"text": [
"Dataset sms_spam downloaded and prepared to /root/.cache/huggingface/datasets/sms_spam/plain_text/1.0.0/53f051d3b5f62d99d61792c91acefe4f1577ad3e4c216fb0ad39e30b9f20019c. Subsequent calls will reuse this data.\n"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/1 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "0cdcd5131b5148bf8ef7130e741e7f9b"
}
},
"metadata": {}
}
],
"source": [
"dataset = load_dataset(\"sms_spam\")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "JKFHPko3OnAV",
"outputId": "2682981e-b242-4563-8e88-21f1b56f2d15"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'sms': 'Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\\n',\n",
" 'label': 0}"
]
},
"metadata": {},
"execution_count": 4
}
],
"source": [
"dataset['train'][0]"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "l140vJrgYxPr"
},
"source": [
"# Modyfikacja datasetu - klasyfikacja"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "1boUF-YiY3_y",
"outputId": "f031453d-54d7-4fba-abc4-26ff8e110d96"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'sms': 'binary classification: Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...',\n",
" 'label': '0'}"
]
},
"metadata": {},
"execution_count": 5
}
],
"source": [
"parsed_dataset = []\n",
"\n",
"for row in dataset['train']:\n",
" text = \"binary classification: \" + row['sms'].replace(\"\\n\", \"\")\n",
" new_row = {}\n",
" new_row['sms'] = text\n",
" if row['label'] == 0:\n",
" new_row['label'] = \"0\"\n",
" else:\n",
" new_row['label'] = \"1\"\n",
" parsed_dataset.append(new_row)\n",
"\n",
"parsed_dataset[0]"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "O-J-jBDxPJcn"
},
"source": [
"# Tokenizer T5"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"id": "P23AYPX1PZ6g"
},
"outputs": [],
"source": [
"from transformers import T5Tokenizer"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 203,
"referenced_widgets": [
"e9563b43a79542b3ac4607b3b32fef36",
"dd79782a047542c79cf638d50c4fb6b5",
"ecada9c5179b40cfa2aba932c5a9aedd",
"e64dfd8ce12043a48eb24ee8fafaaa5e",
"fb537b30046a4b699cd0ac5d21c0cb5e",
"e63a74cb438b488a9f1f5e340842e5e0",
"4c3f3eeffbc946428cd198bf16fbdac0",
"5f0ceff818cf43308975724aabc9d799",
"e1e65e6fe54c4d60a6c93573d3cd1fd0",
"b163c0caacc547199a2372e03bdabcce",
"faf1774fb05940b8908415eafe3a1070",
"bf509a7ff72a4e40bfea72feb958477c",
"1479e73733d548d4881d163983549014",
"1eff9f6872ca41feb2a67795d6b2af20",
"054b198ab5174073bfaa2a951410dc37",
"2f029974bf9643dab5e96eb15c6834b8",
"28036b83d1fc438e913f8f3f4cb19391",
"ef17ea825afa4cf8898f13c1cefa8475",
"b31a9cf7195b47faaa22deb09fe1f0d1",
"2c056fb1574a42eaaeb4d64c45b9e884",
"28f716fbfec540819b13602a705e69cd",
"5a0c5d19389e4ccbb552ed41111dfa2c"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "q5Jz0E_oPMBr",
"outputId": "2a01700a-67b3-4347-afda-a2763b30c714"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)ve/main/spiece.model: 0%| | 0.00/792k [00:00<?, ?B/s]"
2023-02-10 12:42:56 +01:00
],
2023-02-12 18:18:21 +01:00
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "e9563b43a79542b3ac4607b3b32fef36"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)lve/main/config.json: 0%| | 0.00/1.21k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "bf509a7ff72a4e40bfea72feb958477c"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "stream",
"name": "stderr",
"text": [
"/usr/local/lib/python3.8/dist-packages/transformers/models/t5/tokenization_t5.py:163: FutureWarning: This tokenizer was incorrectly instantiated with a model max length of 512 which will be corrected in Transformers v5.\n",
"For now, this behavior is kept to avoid breaking backwards compatibility when padding/encoding with `truncation is True`.\n",
"- Be aware that you SHOULD NOT rely on t5-base automatically truncating your input to 512 when padding/encoding.\n",
"- If you want to encode/pad to sequences longer than 512 you can either instantiate this tokenizer with `model_max_length` or pass `max_length` when encoding/padding.\n",
"- To avoid this warning, please instantiate this tokenizer with `model_max_length` set to your preferred value.\n",
" warnings.warn(\n"
]
}
],
"source": [
"tokenizer = T5Tokenizer.from_pretrained('t5-base')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "dfxJQpoePsvI",
"outputId": "305252ef-73f2-4677-d7c9-31efc4d249a6"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Original: binary classification: Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\n",
"Tokenized: ['▁binary', '▁classification', ':', '▁Go', '▁until', '▁jur', 'ong', '▁point', ',', '▁crazy', '.', '.', '▁Available', '▁only', '▁in', '▁bug', 'is', '▁', 'n', '▁great', '▁world', '▁la', '▁', 'e', '▁buffet', '...', '▁Cine', '▁there', '▁got', '▁', 'a', 'more', '▁wa', 't', '...']\n",
"Token IDs: [14865, 13774, 10, 1263, 552, 10081, 2444, 500, 6, 6139, 5, 5, 8144, 163, 16, 8143, 159, 3, 29, 248, 296, 50, 3, 15, 15385, 233, 17270, 132, 530, 3, 9, 3706, 8036, 17, 233]\n"
]
}
],
"source": [
"sms = parsed_dataset[0]['sms']\n",
"print('Original: ', sms)\n",
"print('Tokenized: ', tokenizer.tokenize(sms))\n",
"print('Token IDs: ', tokenizer.convert_tokens_to_ids(tokenizer.tokenize(sms)))"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "UpluhM8cU5Ir"
},
"source": [
"# Check maximum lenght of a sentence"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "7uNUkixPU85O",
"outputId": "6812abc8-d279-4ee8-9947-9c9a5932e47c"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Max sentence length: 341\n"
]
}
],
"source": [
"max_len = 0\n",
"\n",
"for sentence in parsed_dataset:\n",
" input_ids = tokenizer.encode(sentence['sms'], add_special_tokens=True)\n",
" max_len = max(max_len, len(input_ids))\n",
"\n",
"print('Max sentence length: ', max_len)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "lj0issBznZfK",
"outputId": "9dccb0f2-6452-460b-b955-83468285a635"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Max sentence length: 3\n"
]
}
],
"source": [
"max_label_len = 0\n",
"\n",
"for sentence in parsed_dataset:\n",
" input_ids = tokenizer.encode(sentence['label'], add_special_tokens=True)\n",
" max_label_len = max(max_label_len, len(input_ids))\n",
"\n",
"print('Max sentence length: ', max_label_len)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "nfw62HdgSERb"
},
"source": [
"# Pre train tokenization"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"id": "KTXYalS1VLqH"
},
"outputs": [],
"source": [
"import torch"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "Z28QYfLnSGxR",
"outputId": "bcb84fca-c7e0-4e4a-a8f6-ff3db86e143d"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Original: {'sms': 'binary classification: Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...', 'label': '0'}\n",
"Token IDs: tensor([14865, 13774, 10, 1263, 552, 10081, 2444, 500, 6, 6139,\n",
" 5, 5, 8144, 163, 16, 8143, 159, 3, 29, 248,\n",
" 296, 50, 3, 15, 15385, 233, 17270, 132, 530, 3,\n",
" 9, 3706, 8036, 17, 233, 1, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0])\n",
"Label token IDs: tensor([ 3, 632, 1])\n"
]
}
],
"source": [
"input_ids = []\n",
"target_ids = []\n",
"attention_masks = []\n",
"\n",
"for sentence in parsed_dataset:\n",
" encoded_dict = tokenizer.encode_plus(\n",
" sentence['sms'],\n",
" add_special_tokens = True,\n",
" max_length = 341,\n",
" padding = 'max_length',\n",
" truncation=True,\n",
" return_attention_mask = True,\n",
" return_tensors = 'pt',\n",
" )\n",
" \n",
" encoded_target_dict = tokenizer.encode_plus(\n",
" sentence['label'],\n",
" add_special_tokens = True,\n",
" max_length = 3,\n",
" padding = 'max_length',\n",
" truncation=True,\n",
" return_attention_mask = True,\n",
" return_tensors = 'pt',\n",
" )\n",
" \n",
" input_ids.append(encoded_dict['input_ids'])\n",
" target_ids.append(encoded_target_dict['input_ids'])\n",
" attention_masks.append(encoded_dict['attention_mask'])\n",
"\n",
"input_ids = torch.cat(input_ids, dim=0)\n",
"target_ids = torch.cat(target_ids, dim=0)\n",
"attention_masks = torch.cat(attention_masks, dim=0)\n",
"\n",
"print('Original: ', parsed_dataset[0])\n",
"print('Token IDs:', input_ids[0])\n",
"print('Label token IDs:', target_ids[0])"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "qD_t0y0KVVSy"
},
"source": [
"# Split dataset"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"id": "vN_SatRIVa4c"
},
"outputs": [],
"source": [
"from torch.utils.data import TensorDataset, random_split"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "Mm6vc6lLVW3l",
"outputId": "2ff9533f-7117-4492-dae2-5a8dada86e41"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"1,000 test samples\n",
"4,116 training samples\n",
" 458 validation samples\n"
]
}
],
"source": [
"dataset = TensorDataset(input_ids, attention_masks, target_ids)\n",
"\n",
"test_size = 1000\n",
"dataset_len = len(dataset)\n",
"train_size = int(0.9 * (dataset_len-test_size))\n",
"val_size = (dataset_len-test_size) - train_size\n",
"\n",
"test_dataset, train_dataset, val_dataset = random_split(dataset, [test_size, train_size, val_size])\n",
"\n",
"print('{:>5,} test samples'.format(test_size))\n",
"print('{:>5,} training samples'.format(train_size))\n",
"print('{:>5,} validation samples'.format(val_size))"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "bmgQOP4EVfA1"
},
"source": [
"# Create train and validation loaders"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"id": "CxnQ3cmIVlNh"
},
"outputs": [],
"source": [
"from torch.utils.data import DataLoader, RandomSampler, SequentialSampler"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"id": "0hcpO_onVjEC"
},
"outputs": [],
"source": [
"batch_size = 16\n",
"\n",
"train_dataloader = DataLoader(\n",
" train_dataset,\n",
" sampler = RandomSampler(train_dataset),\n",
" batch_size = batch_size\n",
" )\n",
"\n",
"validation_dataloader = DataLoader(\n",
" val_dataset,\n",
" sampler = SequentialSampler(val_dataset),\n",
" batch_size = batch_size\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "efwhqLyyVu9z"
},
"source": [
"# Device check"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "ANBCfNGnVwVk",
"outputId": "ff2ff959-f0e9-47f3-d504-9daa45f870c2"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"There are 1 GPU(s) available.\n",
"We will use the GPU: Tesla T4\n"
]
}
],
"source": [
"if torch.cuda.is_available(): \n",
" device = torch.device(\"cuda\")\n",
"\n",
" print('There are %d GPU(s) available.' % torch.cuda.device_count())\n",
" print('We will use the GPU:', torch.cuda.get_device_name(0))\n",
"\n",
"else:\n",
" print('No GPU available, using the CPU instead.')\n",
" device = torch.device(\"cpu\")"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "okTx_ynMV0rH"
},
"source": [
"# Load T5 model"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"id": "Eu-7Eed8WgN0"
},
"outputs": [],
"source": [
"from transformers import T5ForConditionalGeneration"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"68418b4f08654a2c8a19bdefa31ef7e2",
"f59f1fe74df84329baa0137729651d7e",
"4e6666f32de94c14973b2f5895c4f4ec",
"9a8b0e9cf614453789dceff586f47682",
"a4e1407e1a42416087a3138812851afa",
"1813bc00d8db4de5a7bb7cd276346312",
"ab6b0613a4934f34aad4d28cd855362d",
"7514dfc8c5c34f29ab9a246ba6b45dc2",
"017b00a3a26743d3a761a5b05f72fe73",
"1cfe23326f964bb0a2925456aea14ad5",
"384aac4ea3274eebbb43ea847036793a",
"17986d272156460f8e9bcee2559088d9",
"f1c7c8e7770848dabf155be27b342c6f",
"719b8ebc46884edd9b36829f49680c98",
"f28050af08f947678a41e1ea5611067f",
"2ff5d9e91bf64330a2747c9c518ba31c",
"85bd410d586b4ac98b8df72f980c0194",
"feb7905c359e4acd9c9f848fb63d5d55",
"b1d4154a8b054c8380a9ac70c311755b",
"2fee9e3e54ae41c8977beaae6802010f",
"42dc0f0578ed4105abeee4362667a98a",
"04bb3488deec4565a0864049b122437d"
]
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"id": "JKv9O8kfV2zZ",
"outputId": "ad88a39b-bdc7-4325-b588-ed5feb453c3e"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)\"pytorch_model.bin\";: 0%| | 0.00/892M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "68418b4f08654a2c8a19bdefa31ef7e2"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading (…)neration_config.json: 0%| | 0.00/147 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "17986d272156460f8e9bcee2559088d9"
}
},
"metadata": {}
2023-02-10 12:42:56 +01:00
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"T5ForConditionalGeneration(\n",
" (shared): Embedding(32128, 768)\n",
" (encoder): T5Stack(\n",
" (embed_tokens): Embedding(32128, 768)\n",
" (block): ModuleList(\n",
" (0): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" (relative_attention_bias): Embedding(32, 12)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (1): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (2): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (3): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (4): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (5): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (6): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (7): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (8): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (9): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (10): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (11): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (final_layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (decoder): T5Stack(\n",
" (embed_tokens): Embedding(32128, 768)\n",
" (block): ModuleList(\n",
" (0): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" (relative_attention_bias): Embedding(32, 12)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (1): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (2): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (3): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (4): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (5): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (6): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (7): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (8): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (9): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (10): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" (11): T5Block(\n",
" (layer): ModuleList(\n",
" (0): T5LayerSelfAttention(\n",
" (SelfAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (1): T5LayerCrossAttention(\n",
" (EncDecAttention): T5Attention(\n",
" (q): Linear(in_features=768, out_features=768, bias=False)\n",
" (k): Linear(in_features=768, out_features=768, bias=False)\n",
" (v): Linear(in_features=768, out_features=768, bias=False)\n",
" (o): Linear(in_features=768, out_features=768, bias=False)\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (2): T5LayerFF(\n",
" (DenseReluDense): T5DenseActDense(\n",
" (wi): Linear(in_features=768, out_features=3072, bias=False)\n",
" (wo): Linear(in_features=3072, out_features=768, bias=False)\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" (act): ReLU()\n",
" )\n",
" (layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (final_layer_norm): T5LayerNorm()\n",
" (dropout): Dropout(p=0.1, inplace=False)\n",
" )\n",
" (lm_head): Linear(in_features=768, out_features=32128, bias=False)\n",
")"
]
},
"metadata": {},
2023-02-12 18:18:21 +01:00
"execution_count": 19
}
],
"source": [
"model = T5ForConditionalGeneration.from_pretrained('t5-base')\n",
"\n",
"model.cuda()"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "F_SDAwxoawDy"
},
"source": [
"# Helper functions"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"id": "s-q6_F38bLVA"
},
"outputs": [],
"source": [
"import datetime\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"id": "FzUi8908ax61"
},
"outputs": [],
"source": [
"def calculate_accuracy(preds, target):\n",
" results_ok = 0.0\n",
" results_false = 0.0\n",
"\n",
" for idx, pred in enumerate(preds):\n",
" if pred == target[idx]:\n",
" results_ok += 1.0\n",
" else:\n",
" results_false += 1.0\n",
"\n",
" return results_ok / (results_ok + results_false)\n",
"\n",
"def format_time(elapsed):\n",
" '''\n",
" Takes a time in seconds and returns a string hh:mm:ss\n",
" '''\n",
" elapsed_rounded = int(round((elapsed)))\n",
" return str(datetime.timedelta(seconds=elapsed_rounded))"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "ucChBa-9bXJy"
},
"source": [
"# Init training"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"id": "A7XUF4PNbYy8"
},
"outputs": [],
"source": [
"optimizer = torch.optim.AdamW(model.parameters(),\n",
" lr = 3e-4,\n",
" eps = 1e-8\n",
" )\n",
"\n",
"epochs = 4\n",
"total_steps = len(train_dataloader) * epochs"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "DAzQWODja0A3"
},
"source": [
"# Training"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"id": "Hoa7NlU0bI7G"
},
"outputs": [],
"source": [
"import random\n",
"import time"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "xsHxfslka1u5",
"outputId": "e40d00a1-baf8-4554-e5ec-aeb87ee35f66"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\n",
"======== Epoch 1 / 4 ========\n",
"Training...\n",
" Batch 40 of 258. Elapsed: 0:01:12.\n",
" Batch 80 of 258. Elapsed: 0:02:20.\n",
" Batch 120 of 258. Elapsed: 0:03:28.\n",
" Batch 160 of 258. Elapsed: 0:04:36.\n",
" Batch 200 of 258. Elapsed: 0:05:45.\n",
" Batch 240 of 258. Elapsed: 0:06:53.\n",
"\n",
" Average training loss: 0.09\n",
" Average training acc: 0.81\n",
" Training epcoh took: 0:07:23\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.83\n",
" Validation took: 0:00:27\n",
" Validation Loss: 0.00\n",
"\n",
"======== Epoch 2 / 4 ========\n",
"Training...\n",
" Batch 40 of 258. Elapsed: 0:01:09.\n",
" Batch 80 of 258. Elapsed: 0:02:17.\n",
" Batch 120 of 258. Elapsed: 0:03:25.\n",
" Batch 160 of 258. Elapsed: 0:04:33.\n",
" Batch 200 of 258. Elapsed: 0:05:42.\n",
" Batch 240 of 258. Elapsed: 0:06:50.\n",
"\n",
" Average training loss: 0.00\n",
" Average training acc: 0.86\n",
" Training epcoh took: 0:07:19\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.83\n",
" Validation took: 0:00:26\n",
" Validation Loss: 0.00\n",
"\n",
"======== Epoch 3 / 4 ========\n",
"Training...\n",
" Batch 40 of 258. Elapsed: 0:01:08.\n",
" Batch 80 of 258. Elapsed: 0:02:16.\n",
" Batch 120 of 258. Elapsed: 0:03:24.\n",
" Batch 160 of 258. Elapsed: 0:04:32.\n",
" Batch 200 of 258. Elapsed: 0:05:41.\n",
" Batch 240 of 258. Elapsed: 0:06:49.\n",
"\n",
" Average training loss: 0.00\n",
" Average training acc: 0.85\n",
" Training epcoh took: 0:07:18\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.83\n",
" Validation took: 0:00:26\n",
" Validation Loss: 0.00\n",
"\n",
"======== Epoch 4 / 4 ========\n",
"Training...\n",
" Batch 40 of 258. Elapsed: 0:01:08.\n",
" Batch 80 of 258. Elapsed: 0:02:16.\n",
" Batch 120 of 258. Elapsed: 0:03:24.\n",
" Batch 160 of 258. Elapsed: 0:04:32.\n",
" Batch 200 of 258. Elapsed: 0:05:41.\n",
" Batch 240 of 258. Elapsed: 0:06:49.\n",
"\n",
" Average training loss: 0.00\n",
" Average training acc: 0.86\n",
" Training epcoh took: 0:07:18\n",
"\n",
"Running Validation...\n",
" Accuracy: 0.83\n",
" Validation took: 0:00:26\n",
" Validation Loss: 0.00\n",
"\n",
"Training complete!\n",
"Total training took 0:31:02 (h:mm:ss)\n"
]
}
],
"source": [
"# This training code is based on the `run_glue.py` script here:\n",
"# https://github.com/huggingface/transformers/blob/5bfcd0485ece086ebcbed2d008813037968a9e58/examples/run_glue.py#L128\n",
"\n",
"seed_val = 42\n",
"\n",
"random.seed(seed_val)\n",
"np.random.seed(seed_val)\n",
"torch.manual_seed(seed_val)\n",
"torch.cuda.manual_seed_all(seed_val)\n",
"\n",
"training_stats = []\n",
"total_t0 = time.time()\n",
"\n",
"for epoch_i in range(0, epochs):\n",
" \n",
" # ========================================\n",
" # Training\n",
" # ========================================\n",
"\n",
" print(\"\")\n",
" print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs))\n",
" print('Training...')\n",
"\n",
" t0 = time.time()\n",
" total_train_loss = 0\n",
" total_train_acc = 0\n",
"\n",
" model.train()\n",
"\n",
" for step, batch in enumerate(train_dataloader):\n",
" if step % 40 == 0 and not step == 0:\n",
" elapsed = format_time(time.time() - t0)\n",
" print(' Batch {:>5,} of {:>5,}. Elapsed: {:}.'.format(step, len(train_dataloader), elapsed))\n",
"\n",
" b_input_ids = batch[0].to(device)\n",
" b_input_mask = batch[1].to(device)\n",
"\n",
" y = batch[2].to(device)\n",
" y_ids = y[:, :-1].contiguous()\n",
" lm_labels = y[:, 1:].clone().detach()\n",
" lm_labels[y[:, 1:] == tokenizer.pad_token_id] = -100 \n",
"\n",
" outputs = model(\n",
" input_ids=b_input_ids,\n",
" attention_mask=b_input_mask,\n",
" decoder_input_ids=y_ids,\n",
" labels=lm_labels\n",
" )\n",
"\n",
" generated_ids = model.generate(\n",
" input_ids = b_input_ids,\n",
" attention_mask = b_input_mask, \n",
" max_length=3, \n",
" num_beams=2,\n",
" repetition_penalty=2.5, \n",
" length_penalty=1.0, \n",
" early_stopping=True\n",
" )\n",
"\n",
" preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]\n",
" target = [tokenizer.decode(t, skip_special_tokens=True, clean_up_tokenization_spaces=True) for t in y]\n",
" total_train_acc += calculate_accuracy(preds, target) \n",
"\n",
" loss = outputs[0]\n",
"\n",
" optimizer.zero_grad()\n",
" loss.backward()\n",
" optimizer.step()\n",
"\n",
" total_train_loss += loss.item()\n",
"\n",
" avg_train_loss = total_train_loss / len(train_dataloader) \n",
" avg_train_acc = total_train_acc / len(train_dataloader) \n",
" training_time = format_time(time.time() - t0)\n",
"\n",
" print(\"\")\n",
" print(\" Average training loss: {0:.2f}\".format(avg_train_loss))\n",
" print(\" Average training acc: {0:.2f}\".format(avg_train_acc))\n",
" print(\" Training epcoh took: {:}\".format(training_time))\n",
" \n",
" # ========================================\n",
" # Validation\n",
" # ========================================\n",
"\n",
" print(\"\")\n",
" print(\"Running Validation...\")\n",
"\n",
" t0 = time.time()\n",
" model.eval()\n",
"\n",
" total_eval_loss = 0\n",
" total_eval_accuracy = 0\n",
"\n",
" for batch in validation_dataloader:\n",
" b_input_ids = batch[0].to(device)\n",
" b_input_mask = batch[1].to(device)\n",
"\n",
" y = batch[2].to(device)\n",
" y_ids = y[:, :-1].contiguous()\n",
" lm_labels = y[:, 1:].clone().detach()\n",
" lm_labels[y[:, 1:] == tokenizer.pad_token_id] = -100\n",
" \n",
" with torch.no_grad(): \n",
"\n",
" outputs = model(\n",
" input_ids=b_input_ids,\n",
" attention_mask=b_input_mask,\n",
" decoder_input_ids=y_ids,\n",
" labels=lm_labels\n",
" )\n",
"\n",
" loss = outputs[0]\n",
" total_eval_loss += loss.item()\n",
"\n",
" generated_ids = model.generate(\n",
" input_ids = b_input_ids,\n",
" attention_mask = b_input_mask, \n",
" max_length=3, \n",
" num_beams=2,\n",
" repetition_penalty=2.5, \n",
" length_penalty=1.0, \n",
" early_stopping=True\n",
" )\n",
"\n",
" preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]\n",
" target = [tokenizer.decode(t, skip_special_tokens=True, clean_up_tokenization_spaces=True) for t in y]\n",
" total_eval_accuracy += calculate_accuracy(preds, target) \n",
"\n",
" avg_val_loss = total_eval_loss / len(validation_dataloader)\n",
"\n",
" avg_val_accuracy = total_eval_accuracy / len(validation_dataloader)\n",
" print(\" Accuracy: {0:.2f}\".format(avg_val_accuracy))\n",
" \n",
" validation_time = format_time(time.time() - t0)\n",
" print(\" Validation took: {:}\".format(validation_time))\n",
" print(\" Validation Loss: {0:.2f}\".format(avg_val_loss))\n",
"\n",
" training_stats.append(\n",
" {\n",
" 'epoch': epoch_i + 1,\n",
" 'Training Loss': avg_train_loss,\n",
" 'Training Accur.': avg_train_acc,\n",
" 'Valid. Loss': avg_val_loss,\n",
" 'Valid. Accur.': avg_val_accuracy,\n",
" 'Training Time': training_time,\n",
" 'Validation Time': validation_time\n",
" }\n",
" )\n",
"\n",
"print(\"\")\n",
"print(\"Training complete!\")\n",
"\n",
"print(\"Total training took {:} (h:mm:ss)\".format(format_time(time.time()-total_t0)))"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "xIpFPoRb91Or"
},
"source": [
"# Train summary"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"id": "GjYqBrrO93Oh",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 204
},
"outputId": "326edb05-56a5-4376-d793-424e5e122507"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Training Loss Training Accur. Valid. Loss Valid. Accur. \\\n",
"epoch \n",
"1 9.03e-02 0.81 9.89e-07 0.83 \n",
"2 1.30e-05 0.86 2.26e-08 0.83 \n",
"3 3.05e-06 0.85 0.00e+00 0.83 \n",
"4 5.13e-06 0.86 0.00e+00 0.83 \n",
"\n",
" Training Time Validation Time \n",
"epoch \n",
"1 0:07:23 0:00:27 \n",
"2 0:07:19 0:00:26 \n",
"3 0:07:18 0:00:26 \n",
"4 0:07:18 0:00:26 "
],
"text/html": [
"\n",
" <div id=\"df-970792fa-8287-4ad4-ac66-0d66603dad55\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Training Loss</th>\n",
" <th>Training Accur.</th>\n",
" <th>Valid. Loss</th>\n",
" <th>Valid. Accur.</th>\n",
" <th>Training Time</th>\n",
" <th>Validation Time</th>\n",
" </tr>\n",
" <tr>\n",
" <th>epoch</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>9.03e-02</td>\n",
" <td>0.81</td>\n",
" <td>9.89e-07</td>\n",
" <td>0.83</td>\n",
" <td>0:07:23</td>\n",
" <td>0:00:27</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1.30e-05</td>\n",
" <td>0.86</td>\n",
" <td>2.26e-08</td>\n",
" <td>0.83</td>\n",
" <td>0:07:19</td>\n",
" <td>0:00:26</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3.05e-06</td>\n",
" <td>0.85</td>\n",
" <td>0.00e+00</td>\n",
" <td>0.83</td>\n",
" <td>0:07:18</td>\n",
" <td>0:00:26</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5.13e-06</td>\n",
" <td>0.86</td>\n",
" <td>0.00e+00</td>\n",
" <td>0.83</td>\n",
" <td>0:07:18</td>\n",
" <td>0:00:26</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-970792fa-8287-4ad4-ac66-0d66603dad55')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-970792fa-8287-4ad4-ac66-0d66603dad55 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-970792fa-8287-4ad4-ac66-0d66603dad55');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 25
2023-02-10 12:42:56 +01:00
}
2023-02-12 18:18:21 +01:00
],
"source": [
"import pandas as pd\n",
"\n",
"pd.set_option('precision', 2)\n",
"df_stats = pd.DataFrame(data=training_stats)\n",
"\n",
"df_stats = df_stats.set_index('epoch')\n",
"df_stats"
2023-02-10 12:42:56 +01:00
]
},
{
2023-02-12 18:18:21 +01:00
"cell_type": "code",
"execution_count": 26,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "Xk3gzkeU96v3",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 427
},
"outputId": "0fab6cbe-dd1c-4bdd-a986-24ae72d30aec"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
],
"image/png": "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
},
"metadata": {}
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"import seaborn as sns\n",
"\n",
"sns.set(style='darkgrid')\n",
"\n",
"sns.set(font_scale=1.5)\n",
"plt.rcParams[\"figure.figsize\"] = (12,6)\n",
"\n",
"plt.plot(df_stats['Training Loss'], 'b-o', label=\"Training\")\n",
"plt.plot(df_stats['Valid. Loss'], 'g-o', label=\"Validation\")\n",
"\n",
"plt.title(\"Training & Validation Loss\")\n",
"plt.xlabel(\"Epoch\")\n",
"plt.ylabel(\"Loss\")\n",
"plt.legend()\n",
"plt.xticks([1, 2, 3, 4])\n",
"\n",
"plt.show()"
]
2023-02-10 12:42:56 +01:00
},
{
2023-02-12 18:18:21 +01:00
"cell_type": "markdown",
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "UJlKxl0r-W-m"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"source": [
"# Create test loader"
]
2023-02-10 12:42:56 +01:00
},
{
"cell_type": "code",
2023-02-12 18:18:21 +01:00
"execution_count": 27,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "eQGsEEDh-YxG"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"outputs": [],
"source": [
"prediction_dataloader = DataLoader(\n",
" test_dataset,\n",
" sampler = SequentialSampler(test_dataset),\n",
" batch_size = batch_size\n",
" )"
]
2023-02-10 12:42:56 +01:00
},
{
"cell_type": "markdown",
2023-02-12 18:18:21 +01:00
"metadata": {
"id": "gHSDNWvA-aq9"
},
2023-02-10 12:42:56 +01:00
"source": [
2023-02-12 18:18:21 +01:00
"# Evaluate on test dataset"
]
},
{
"cell_type": "code",
"execution_count": 28,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "OPcQkHnJ-c9A",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "d5f3a63f-f9f6-4e68-b9d8-39e826ac1a3d"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Predicting labels for 1,000 test sentences...\n",
" DONE.\n"
]
}
],
"source": [
"print('Predicting labels for {:,} test sentences...'.format(len(test_dataset)))\n",
"\n",
"model.eval()\n",
"predictions , true_labels = [], []\n",
"total_test_acc = 0\n",
"\n",
"for batch in prediction_dataloader:\n",
"\n",
" b_input_ids = batch[0].to(device)\n",
" b_input_mask = batch[1].to(device)\n",
" y = batch[2].to(device)\n",
" \n",
" with torch.no_grad(): \n",
"\n",
" generated_ids = model.generate(\n",
" input_ids = b_input_ids,\n",
" attention_mask = b_input_mask, \n",
" max_length=3, \n",
" num_beams=2,\n",
" repetition_penalty=2.5, \n",
" length_penalty=1.0, \n",
" early_stopping=True\n",
" )\n",
" \n",
" preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]\n",
" target = [tokenizer.decode(t, skip_special_tokens=True, clean_up_tokenization_spaces=True) for t in y]\n",
" total_test_acc += calculate_accuracy(preds, target) \n",
"\n",
" predictions.append(preds)\n",
" true_labels.append(target)\n",
"\n",
"print(' DONE.')"
]
2023-02-10 12:42:56 +01:00
},
{
"cell_type": "code",
2023-02-12 18:18:21 +01:00
"execution_count": 29,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "ifz56jYW-zBN",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "7f68ebc4-1205-4522-f5b5-74fb49d63565"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"0.873015873015873"
]
},
"metadata": {},
"execution_count": 29
}
],
"source": [
"avg_test_accuracy = total_test_acc / len(prediction_dataloader)\n",
"avg_test_accuracy"
]
2023-02-10 12:42:56 +01:00
},
{
"cell_type": "code",
2023-02-12 18:18:21 +01:00
"execution_count": 30,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "1LqVo4wW-2g-",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "9c4820aa-4d8d-41dd-d3c4-d751927fcac0"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Sample prediction: 0, expected: 0\n"
]
}
],
"source": [
"print(\"Sample prediction: {}, expected: {}\".format(predictions[2][10], true_labels[2][10]))"
]
2023-02-10 12:42:56 +01:00
},
{
"cell_type": "markdown",
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "dLYc9WXz_B1o"
},
"source": [
"# MCC Score"
]
2023-02-10 12:42:56 +01:00
},
{
"cell_type": "code",
2023-02-12 18:18:21 +01:00
"execution_count": 31,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "hPEPpXXX_DXR",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "5ce9215b-0d24-4126-f80e-4bfa831b48bb"
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Calculating Matthews Corr. Coef. for each batch...\n"
]
}
],
2023-02-10 12:42:56 +01:00
"source": [
2023-02-12 18:18:21 +01:00
"from sklearn.metrics import matthews_corrcoef\n",
2023-02-10 12:42:56 +01:00
"\n",
2023-02-12 18:18:21 +01:00
"matthews_set = []\n",
"print('Calculating Matthews Corr. Coef. for each batch...')\n",
2023-02-10 12:42:56 +01:00
"\n",
2023-02-12 18:18:21 +01:00
"for i in range(len(true_labels)):\n",
" matthews = matthews_corrcoef(true_labels[i], predictions[i]) \n",
" matthews_set.append(matthews)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"id": "qjtAYcme_EyM",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 427
},
"outputId": "4728121a-b291-4ff8-ff2e-2197d04810ce"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
],
"image/png": "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
},
"metadata": {}
}
],
"source": [
"ax = sns.barplot(x=list(range(len(matthews_set))), y=matthews_set, ci=None)\n",
2023-02-10 12:42:56 +01:00
"\n",
2023-02-12 18:18:21 +01:00
"plt.title('MCC Score per Batch')\n",
"plt.ylabel('MCC Score (-1 to +1)')\n",
"plt.xlabel('Batch #')\n",
2023-02-10 12:42:56 +01:00
"\n",
2023-02-12 18:18:21 +01:00
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"id": "rkonN244_HPz",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "0f08315b-7d90-4d6e-ad6f-559cf4573fa8"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Total MCC: 0.042\n"
]
}
2023-02-10 12:42:56 +01:00
],
2023-02-12 18:18:21 +01:00
"source": [
"flat_predictions = np.concatenate(predictions, axis=0)\n",
"flat_true_labels = np.concatenate(true_labels, axis=0)\n",
"\n",
"mcc = matthews_corrcoef(flat_true_labels, flat_predictions)\n",
"print('Total MCC: %.3f' % mcc)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "GPhCp068_Iwq"
},
"source": [
"# Save model"
]
},
{
"cell_type": "code",
"execution_count": 34,
2023-02-10 12:42:56 +01:00
"metadata": {
2023-02-12 18:18:21 +01:00
"id": "avafCMoS_KDF",
2023-02-10 12:42:56 +01:00
"colab": {
"base_uri": "https://localhost:8080/"
},
2023-02-12 18:18:21 +01:00
"outputId": "e7983c91-ecab-4b7c-de48-9c5db5737ca9"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/gdrive/\n",
"Saving model to /content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/T5_Model\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"('/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/T5_Model/tokenizer_config.json',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/T5_Model/special_tokens_map.json',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/T5_Model/spiece.model',\n",
" '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/T5_Model/added_tokens.json')"
]
},
"metadata": {},
"execution_count": 34
}
],
"source": [
"from google.colab import drive\n",
"\n",
"drive.mount('/content/gdrive/', force_remount=True)\n",
"\n",
"output_dir = '/content/gdrive/My Drive/UAM/Przetwarzanie-tekstu/T5_Model'\n",
"print(\"Saving model to %s\" % output_dir)\n",
"\n",
"model_to_save = model.module if hasattr(model, 'module') else model \n",
"model_to_save.save_pretrained(output_dir)\n",
"tokenizer.save_pretrained(output_dir)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "wHzm2_nDA6i-"
},
"source": [
"# Bibliografia\n",
"- https://github.com/Shivanandroy/T5-Finetuning-PyTorch/blob/main/notebook/T5_Fine_tuning_with_PyTorch.ipynb\n",
"- https://mccormickml.com/2019/07/22/BERT-fine-tuning/#a1-saving--loading-fine-tuned-model\n",
"- https://huggingface.co/docs/transformers/model_doc/t5#training"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": []
},
"gpuClass": "standard",
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"d481c2d945214c45b716d266d5d75184": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_b59689c435074e14a5ffab86f7358d79",
"IPY_MODEL_8e53b6fe3c9b4ddb95c6bc13431f330e",
"IPY_MODEL_a8e97add56944729a2ead40f46e0acd8"
],
"layout": "IPY_MODEL_5e960877834348318c208650676ac592"
}
},
"b59689c435074e14a5ffab86f7358d79": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_df1e772af2fa43fd8d705e82aae29a28",
"placeholder": " ",
"style": "IPY_MODEL_5de4c85766684223a885de341a2375a9",
"value": "Downloading builder script: 100%"
}
},
"8e53b6fe3c9b4ddb95c6bc13431f330e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_951d4aa7857542599bfa653eb6e98dd8",
"max": 3208,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_57e82888c8764d67b04362742b177118",
"value": 3208
}
},
"a8e97add56944729a2ead40f46e0acd8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_04c3671ec63e4e19a29df60b9e35b9f4",
"placeholder": " ",
"style": "IPY_MODEL_6d4ff2e0c30e4b4891e1882a246191a7",
"value": " 3.21k/3.21k [00:00<00:00, 209kB/s]"
}
},
"5e960877834348318c208650676ac592": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"df1e772af2fa43fd8d705e82aae29a28": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"5de4c85766684223a885de341a2375a9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"951d4aa7857542599bfa653eb6e98dd8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"57e82888c8764d67b04362742b177118": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"04c3671ec63e4e19a29df60b9e35b9f4": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"6d4ff2e0c30e4b4891e1882a246191a7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"0a4967eb8656482988be61b4e884ab6b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_70bf1a3b71c349678cead7c1e7f59408",
"IPY_MODEL_692a335df661445cb4dfa84a60708884",
"IPY_MODEL_b37e5ec6cb7c4a07a904c8924f6d3ac9"
],
"layout": "IPY_MODEL_129641fbac844cda9261d89ba1b02a9c"
}
},
"70bf1a3b71c349678cead7c1e7f59408": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_286c12dec8c84e5fbebc9bfecdcaf362",
"placeholder": " ",
"style": "IPY_MODEL_c1ccf4622a57496684a1232730d12aae",
"value": "Downloading metadata: 100%"
}
},
"692a335df661445cb4dfa84a60708884": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_fe4d858e5a12465bb3e1ed4f0964a592",
"max": 1687,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_d6d4fa7b46a24c90832fda7d030f729a",
"value": 1687
}
},
"b37e5ec6cb7c4a07a904c8924f6d3ac9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_09f51cd5ae6140d7b7d93f0682954024",
"placeholder": " ",
"style": "IPY_MODEL_a35de7678ed04a0094d09162d6dc719b",
"value": " 1.69k/1.69k [00:00<00:00, 98.3kB/s]"
}
},
"129641fbac844cda9261d89ba1b02a9c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"286c12dec8c84e5fbebc9bfecdcaf362": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c1ccf4622a57496684a1232730d12aae": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"fe4d858e5a12465bb3e1ed4f0964a592": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"d6d4fa7b46a24c90832fda7d030f729a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"09f51cd5ae6140d7b7d93f0682954024": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a35de7678ed04a0094d09162d6dc719b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"36974fdfee5141b7850289e25b23df3c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_5c5294c17e2a4c52912d9722210886cd",
"IPY_MODEL_99279b2dc5004a4f878e6e4d08257fb6",
"IPY_MODEL_ff6597d5d8cd457f9e8290339fcb42f5"
],
"layout": "IPY_MODEL_434546b6ac0a404aa36700a170709688"
}
},
"5c5294c17e2a4c52912d9722210886cd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_973260a8e814424aac53d061ba9325bd",
"placeholder": " ",
"style": "IPY_MODEL_f983b467dc0c433995aa865e5055fe05",
"value": "Downloading readme: 100%"
}
},
"99279b2dc5004a4f878e6e4d08257fb6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b5a31b3ad4224d009745b9604088476f",
"max": 4872,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_dda925b25f6d42c5aca2fb619f3625e5",
"value": 4872
}
},
"ff6597d5d8cd457f9e8290339fcb42f5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_f99fca76deeb408c8a953712adc4658c",
"placeholder": " ",
"style": "IPY_MODEL_0b2f4e8e08474341be8e46ee255d8451",
"value": " 4.87k/4.87k [00:00<00:00, 262kB/s]"
}
},
"434546b6ac0a404aa36700a170709688": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"973260a8e814424aac53d061ba9325bd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f983b467dc0c433995aa865e5055fe05": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b5a31b3ad4224d009745b9604088476f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"dda925b25f6d42c5aca2fb619f3625e5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"f99fca76deeb408c8a953712adc4658c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0b2f4e8e08474341be8e46ee255d8451": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"4bbbc1eaabb0460cba315a082cd69783": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_ec970d97055b434cac97bca5b1d24069",
"IPY_MODEL_6d28f8333ec2447cbf9f03d333d86e82",
"IPY_MODEL_af29ca374d42465b93525a7cb54c7869"
],
"layout": "IPY_MODEL_f6c0f046a62a489497e659d6a786324a"
}
},
"ec970d97055b434cac97bca5b1d24069": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_0d1267b2242d4a93ab5791a0f45aaa84",
"placeholder": " ",
"style": "IPY_MODEL_2af172c9becf4b24a12afa75f7c23bfa",
"value": "Downloading data: 100%"
}
},
"6d28f8333ec2447cbf9f03d333d86e82": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9c9c5376fbed445dbea430c02cff9194",
"max": 203415,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_ca515e1f8f154ec398c8a823629a5622",
"value": 203415
}
},
"af29ca374d42465b93525a7cb54c7869": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_c93b2a9a14134fccb9b815e3228ed56a",
"placeholder": " ",
"style": "IPY_MODEL_90d9bc90d3944b4297b13af2ba123f99",
"value": " 203k/203k [00:00<00:00, 327kB/s]"
}
},
"f6c0f046a62a489497e659d6a786324a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0d1267b2242d4a93ab5791a0f45aaa84": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"2af172c9becf4b24a12afa75f7c23bfa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"9c9c5376fbed445dbea430c02cff9194": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ca515e1f8f154ec398c8a823629a5622": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"c93b2a9a14134fccb9b815e3228ed56a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"90d9bc90d3944b4297b13af2ba123f99": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"7f68486bff314b178c4fdb5b54cca92e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_e11096eae0ef432dabb00cb49c5e96b8",
"IPY_MODEL_84576cd6a7c64d6f809dc708b137134c",
"IPY_MODEL_c096402cab6e4e4b911c4aa41b285e1b"
],
"layout": "IPY_MODEL_556b1cb4381b473db666c64ca193585c"
}
},
"e11096eae0ef432dabb00cb49c5e96b8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9213dd04267b42ffb51918b5a6e8bfe0",
"placeholder": " ",
"style": "IPY_MODEL_69b79fd9c03b4801bef03d27604ef51c",
"value": "Generating train split: 70%"
}
},
"84576cd6a7c64d6f809dc708b137134c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_4e6240934876400db18bacae780b9839",
"max": 5574,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_616c196921514481aef009cde26fe0a8",
"value": 5574
}
},
"c096402cab6e4e4b911c4aa41b285e1b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_6ac66769ad604b66aa658bf52b11914a",
"placeholder": " ",
"style": "IPY_MODEL_75db994dd2c24faaa36a2fdddcd11fb9",
"value": " 3905/5574 [00:00<00:00, 18912.38 examples/s]"
}
},
"556b1cb4381b473db666c64ca193585c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": "hidden",
"width": null
}
},
"9213dd04267b42ffb51918b5a6e8bfe0": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"69b79fd9c03b4801bef03d27604ef51c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"4e6240934876400db18bacae780b9839": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"616c196921514481aef009cde26fe0a8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"6ac66769ad604b66aa658bf52b11914a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"75db994dd2c24faaa36a2fdddcd11fb9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"0cdcd5131b5148bf8ef7130e741e7f9b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_296cc18ff4b5480e9cf22136589b23b2",
"IPY_MODEL_1c465c9fe6314a75aefcf6293c79f800",
"IPY_MODEL_03cc9c6818ff45c1b791557da43d5d77"
],
"layout": "IPY_MODEL_19d794a37566410592951ac2f7d6f8d4"
}
},
"296cc18ff4b5480e9cf22136589b23b2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7a965267d797415a94c4b1d08eb11e63",
"placeholder": " ",
"style": "IPY_MODEL_1ea948fb5ea54ae3ae24fc124d64ac45",
"value": "100%"
}
},
"1c465c9fe6314a75aefcf6293c79f800": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_454abc04b69a46b5b28c10be09db3adf",
"max": 1,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_41b58dbbb09c4b9497b0acb4a7484f45",
"value": 1
}
},
"03cc9c6818ff45c1b791557da43d5d77": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7a0a7e8ab334489d8d363459b9e0bd37",
"placeholder": " ",
"style": "IPY_MODEL_7071959c1e2141d58bceb19e1e0759f3",
"value": " 1/1 [00:00<00:00, 38.14it/s]"
}
},
"19d794a37566410592951ac2f7d6f8d4": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"7a965267d797415a94c4b1d08eb11e63": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"1ea948fb5ea54ae3ae24fc124d64ac45": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"454abc04b69a46b5b28c10be09db3adf": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"41b58dbbb09c4b9497b0acb4a7484f45": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"7a0a7e8ab334489d8d363459b9e0bd37": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"7071959c1e2141d58bceb19e1e0759f3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"e9563b43a79542b3ac4607b3b32fef36": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_dd79782a047542c79cf638d50c4fb6b5",
"IPY_MODEL_ecada9c5179b40cfa2aba932c5a9aedd",
"IPY_MODEL_e64dfd8ce12043a48eb24ee8fafaaa5e"
],
"layout": "IPY_MODEL_fb537b30046a4b699cd0ac5d21c0cb5e"
}
},
"dd79782a047542c79cf638d50c4fb6b5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_e63a74cb438b488a9f1f5e340842e5e0",
"placeholder": " ",
"style": "IPY_MODEL_4c3f3eeffbc946428cd198bf16fbdac0",
"value": "Downloading (…)ve/main/spiece.model: 100%"
}
},
"ecada9c5179b40cfa2aba932c5a9aedd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_5f0ceff818cf43308975724aabc9d799",
"max": 791656,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_e1e65e6fe54c4d60a6c93573d3cd1fd0",
"value": 791656
}
},
"e64dfd8ce12043a48eb24ee8fafaaa5e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b163c0caacc547199a2372e03bdabcce",
"placeholder": " ",
"style": "IPY_MODEL_faf1774fb05940b8908415eafe3a1070",
"value": " 792k/792k [00:01<00:00, 726kB/s]"
}
},
"fb537b30046a4b699cd0ac5d21c0cb5e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e63a74cb438b488a9f1f5e340842e5e0": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4c3f3eeffbc946428cd198bf16fbdac0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"5f0ceff818cf43308975724aabc9d799": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e1e65e6fe54c4d60a6c93573d3cd1fd0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"b163c0caacc547199a2372e03bdabcce": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"faf1774fb05940b8908415eafe3a1070": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"bf509a7ff72a4e40bfea72feb958477c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_1479e73733d548d4881d163983549014",
"IPY_MODEL_1eff9f6872ca41feb2a67795d6b2af20",
"IPY_MODEL_054b198ab5174073bfaa2a951410dc37"
],
"layout": "IPY_MODEL_2f029974bf9643dab5e96eb15c6834b8"
}
},
"1479e73733d548d4881d163983549014": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_28036b83d1fc438e913f8f3f4cb19391",
"placeholder": " ",
"style": "IPY_MODEL_ef17ea825afa4cf8898f13c1cefa8475",
"value": "Downloading (…)lve/main/config.json: 100%"
}
},
"1eff9f6872ca41feb2a67795d6b2af20": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b31a9cf7195b47faaa22deb09fe1f0d1",
"max": 1208,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_2c056fb1574a42eaaeb4d64c45b9e884",
"value": 1208
}
},
"054b198ab5174073bfaa2a951410dc37": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_28f716fbfec540819b13602a705e69cd",
"placeholder": " ",
"style": "IPY_MODEL_5a0c5d19389e4ccbb552ed41111dfa2c",
"value": " 1.21k/1.21k [00:00<00:00, 16.5kB/s]"
}
},
"2f029974bf9643dab5e96eb15c6834b8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"28036b83d1fc438e913f8f3f4cb19391": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ef17ea825afa4cf8898f13c1cefa8475": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b31a9cf7195b47faaa22deb09fe1f0d1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"2c056fb1574a42eaaeb4d64c45b9e884": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"28f716fbfec540819b13602a705e69cd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"5a0c5d19389e4ccbb552ed41111dfa2c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"68418b4f08654a2c8a19bdefa31ef7e2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_f59f1fe74df84329baa0137729651d7e",
"IPY_MODEL_4e6666f32de94c14973b2f5895c4f4ec",
"IPY_MODEL_9a8b0e9cf614453789dceff586f47682"
],
"layout": "IPY_MODEL_a4e1407e1a42416087a3138812851afa"
}
},
"f59f1fe74df84329baa0137729651d7e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1813bc00d8db4de5a7bb7cd276346312",
"placeholder": " ",
"style": "IPY_MODEL_ab6b0613a4934f34aad4d28cd855362d",
"value": "Downloading (…)"pytorch_model.bin";: 100%"
}
},
"4e6666f32de94c14973b2f5895c4f4ec": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7514dfc8c5c34f29ab9a246ba6b45dc2",
"max": 891691430,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_017b00a3a26743d3a761a5b05f72fe73",
"value": 891691430
}
},
"9a8b0e9cf614453789dceff586f47682": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1cfe23326f964bb0a2925456aea14ad5",
"placeholder": " ",
"style": "IPY_MODEL_384aac4ea3274eebbb43ea847036793a",
"value": " 892M/892M [00:12<00:00, 72.4MB/s]"
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"a4e1407e1a42416087a3138812851afa": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"1813bc00d8db4de5a7bb7cd276346312": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"ab6b0613a4934f34aad4d28cd855362d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"7514dfc8c5c34f29ab9a246ba6b45dc2": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"017b00a3a26743d3a761a5b05f72fe73": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"1cfe23326f964bb0a2925456aea14ad5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"384aac4ea3274eebbb43ea847036793a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"17986d272156460f8e9bcee2559088d9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_f1c7c8e7770848dabf155be27b342c6f",
"IPY_MODEL_719b8ebc46884edd9b36829f49680c98",
"IPY_MODEL_f28050af08f947678a41e1ea5611067f"
],
"layout": "IPY_MODEL_2ff5d9e91bf64330a2747c9c518ba31c"
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"f1c7c8e7770848dabf155be27b342c6f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_85bd410d586b4ac98b8df72f980c0194",
"placeholder": " ",
"style": "IPY_MODEL_feb7905c359e4acd9c9f848fb63d5d55",
"value": "Downloading (…)neration_config.json: 100%"
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"719b8ebc46884edd9b36829f49680c98": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b1d4154a8b054c8380a9ac70c311755b",
"max": 147,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_2fee9e3e54ae41c8977beaae6802010f",
"value": 147
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"f28050af08f947678a41e1ea5611067f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_42dc0f0578ed4105abeee4362667a98a",
"placeholder": " ",
"style": "IPY_MODEL_04bb3488deec4565a0864049b122437d",
"value": " 147/147 [00:00<00:00, 3.74kB/s]"
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"2ff5d9e91bf64330a2747c9c518ba31c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"85bd410d586b4ac98b8df72f980c0194": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"feb7905c359e4acd9c9f848fb63d5d55": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"b1d4154a8b054c8380a9ac70c311755b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"2fee9e3e54ae41c8977beaae6802010f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
2023-02-10 12:42:56 +01:00
},
2023-02-12 18:18:21 +01:00
"42dc0f0578ed4105abeee4362667a98a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"04bb3488deec4565a0864049b122437d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
2023-02-10 12:42:56 +01:00
}
}
}
2023-02-12 18:18:21 +01:00
},
"nbformat": 4,
"nbformat_minor": 0
2023-02-10 12:42:56 +01:00
}