{"cells":[{"cell_type":"markdown","source":["# 이거 kor nli로 바꿔야댐"],"metadata":{"id":"DnWp_5WrB28c"},"id":"DnWp_5WrB28c"},{"cell_type":"markdown","id":"_kbUSCb_Egcu","metadata":{"id":"_kbUSCb_Egcu"},"source":["# HuggingFace Transformers를 활용한 문장 분류 모델 학습"]},{"cell_type":"markdown","id":"of2izij8Eqe0","metadata":{"id":"of2izij8Eqe0"},"source":["본 노트북에서는 `klue/roberta-base` 모델을 **KLUE** 내 **NLI** 데이터셋을 활용하여 모델을 훈련하는 예제를 다루게 됩니다.\n","\n","학습을 통해 얻어질 `klue-roberta-base-nli` 모델은 입력된 두 문장의 추론 관계를 예측하는데 사용할 수 있게 됩니다.\n","\n","학습 과정 이후에는 간단한 예제 코드를 통해 모델이 어떻게 활용되는지도 함께 알아보도록 할 것입니다.\n","\n","모든 소스 코드는 [`huggingface-notebooks`](https://github.com/huggingface/notebooks)를 참고하였습니다.\n","\n","먼저, 노트북을 실행하는데 필요한 라이브러리를 설치합니다. 모델 훈련을 위해서는 `transformers`가, 학습 데이터셋 로드를 위해서는 `datasets` 라이브러리의 설치가 필요합니다. 그 외 모델 성능 검증을 위해 `scipy`, `scikit-learn`을 추가로 설치해주도록 합니다."]},{"cell_type":"code","execution_count":1,"id":"8e59dc52","metadata":{"id":"8e59dc52","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1687392473960,"user_tz":-540,"elapsed":20526,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"fda59d04-ce30-48e2-b15f-2d271ca3db0f"},"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.30.2-py3-none-any.whl (7.2 MB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.2/7.2 MB\u001b[0m \u001b[31m106.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting datasets\n"," Downloading datasets-2.13.0-py3-none-any.whl (485 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m485.6/485.6 kB\u001b[0m \u001b[31m52.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (1.10.1)\n","Collecting accelerate\n"," Downloading accelerate-0.20.3-py3-none-any.whl (227 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m227.6/227.6 kB\u001b[0m \u001b[31m27.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.12.0)\n","Collecting huggingface-hub<1.0,>=0.14.1 (from transformers)\n"," Downloading huggingface_hub-0.15.1-py3-none-any.whl (236 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m236.8/236.8 kB\u001b[0m \u001b[31m33.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.22.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2022.10.31)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.27.1)\n","Collecting tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers)\n"," Downloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m106.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting safetensors>=0.3.1 (from transformers)\n"," Downloading safetensors-0.3.1-cp310-cp310-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[31m87.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers) (4.65.0)\n","Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (9.0.0)\n","Collecting dill<0.3.7,>=0.3.0 (from datasets)\n"," Downloading dill-0.3.6-py3-none-any.whl (110 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.5/110.5 kB\u001b[0m \u001b[31m17.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (1.5.3)\n","Collecting xxhash (from datasets)\n"," Downloading xxhash-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m212.5/212.5 kB\u001b[0m \u001b[31m31.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting multiprocess (from datasets)\n"," Downloading multiprocess-0.70.14-py310-none-any.whl (134 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m22.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.4.0)\n","Collecting aiohttp (from datasets)\n"," Downloading aiohttp-3.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m86.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n","Requirement already satisfied: torch>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.0.1+cu118)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.1.0)\n","Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.0.12)\n","Collecting multidict<7.0,>=4.5 (from aiohttp->datasets)\n"," Downloading multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m114.5/114.5 kB\u001b[0m \u001b[31m14.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting async-timeout<5.0,>=4.0.0a3 (from aiohttp->datasets)\n"," Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)\n","Collecting yarl<2.0,>=1.0 (from aiohttp->datasets)\n"," Downloading yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (268 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m39.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting frozenlist>=1.1.1 (from aiohttp->datasets)\n"," Downloading frozenlist-1.3.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (149 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m149.6/149.6 kB\u001b[0m \u001b[31m21.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting aiosignal>=1.1.2 (from aiohttp->datasets)\n"," Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (4.5.0)\n","Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (1.26.15)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2022.12.7)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (1.11.1)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.1)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.1.2)\n","Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (2.0.0)\n","Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (3.25.2)\n","Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (16.0.5)\n","Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2022.7.1)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->datasets) (1.16.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.6.0->accelerate) (2.1.2)\n","Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.6.0->accelerate) (1.3.0)\n","Installing collected packages: tokenizers, safetensors, xxhash, multidict, frozenlist, dill, async-timeout, yarl, multiprocess, huggingface-hub, aiosignal, transformers, aiohttp, datasets, accelerate\n","Successfully installed accelerate-0.20.3 aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 datasets-2.13.0 dill-0.3.6 frozenlist-1.3.3 huggingface-hub-0.15.1 multidict-6.0.4 multiprocess-0.70.14 safetensors-0.3.1 tokenizers-0.13.3 transformers-4.30.2 xxhash-3.2.0 yarl-1.9.2\n"]}],"source":[" !pip install -U transformers datasets scipy accelerate # 재시작 하기"]},{"cell_type":"markdown","id":"8wSLfX-jaIqV","metadata":{"id":"8wSLfX-jaIqV"},"source":["## 문장 분류 모델 학습"]},{"cell_type":"markdown","id":"92e868b7-3cf7-4977-a6e7-ebbb99ba298e","metadata":{"id":"92e868b7-3cf7-4977-a6e7-ebbb99ba298e"},"source":["노트북을 실행하는데 필요한 라이브러리들을 모두 임포트합니다."]},{"cell_type":"code","execution_count":1,"id":"243b461f","metadata":{"id":"243b461f","executionInfo":{"status":"ok","timestamp":1687392696445,"user_tz":-540,"elapsed":5491,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["import random\n","import logging\n","from IPython.display import display, HTML\n","\n","import numpy as np\n","import pandas as pd\n","import datasets\n","from datasets import load_dataset, load_metric, ClassLabel, Sequence, concatenate_datasets\n","from transformers import AutoTokenizer, AutoModelForSequenceClassification, TrainingArguments, Trainer"]},{"cell_type":"markdown","id":"59b1e5ae-471f-461f-850f-4241a6037471","metadata":{"id":"59b1e5ae-471f-461f-850f-4241a6037471"},"source":["학습에 필요한 정보를 변수로 기록합니다.\n","\n","본 노트북에서는 `klue-roberta-base` 모델을 활용하지만, https://huggingface.co/klue 페이지에서 더 다양한 사전학습 언어 모델을 확인하실 수 있습니다.\n","\n","학습 태스크로는 `nli`를, 배치 사이즈로는 32를 지정하겠습니다."]},{"cell_type":"code","execution_count":2,"id":"6ecaacbe","metadata":{"id":"6ecaacbe","executionInfo":{"status":"ok","timestamp":1687392696446,"user_tz":-540,"elapsed":4,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["model_checkpoint = \"klue/roberta-base\"\n","batch_size = 32"]},{"cell_type":"markdown","id":"816b5893-d03e-4c6e-8536-e246b1def987","metadata":{"id":"816b5893-d03e-4c6e-8536-e246b1def987"},"source":["이제 HuggingFace `datasets` 라이브러리에 등록된 KLUE 데이터셋 중, NLI 데이터를 내려받습니다."]},{"cell_type":"code","source":["datasets1 = load_dataset(\"kor_nli\",'multi_nli')\n","datasets2 = load_dataset(\"kor_nli\",'snli')\n","datasets3 = load_dataset(\"kor_nli\",'xnli')"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":188,"referenced_widgets":["466f255a18e44009b0ae885bf446fd53","d50d6c6cad264ba1bed5bf10ac3a16af","e0495edd56ce4cbdb0bd5734db875658","d90a70724ee4484ca95f4cd31e4f7ed6","f285f14c66824bd9b11ce0bf197ec429","610bef5c566c48a5ac59006486fa6c70","53c5632b1d4041c98c7d810c57e57397","0342e3f4a098470b8fbd0ed9856c411d","78e94cd7906744d6aefd03f22286107c","9bff1ea26cd144ffb64b9982cc0797a5","0ebc1e2ce2cc408d997a603a863e0234","f4ecbbcdfed74b03b6cd744858ef79a6","dbd3b9a00f504f40b5caad6d94620a6a","747f15a8b4ae45238bc14a2c050020f0","7effa5c9e4864e9a8476de204fd343cd","f455226fa15044ae89f61b5a2d5d459d","5a1036e4be2b4a14851e242f52ce505d","bb7995eda272473fb0fc3c4321be38ba","6782d749764d4f36bad3ad75d5d0e213","125b2a24665242309babb4e529c19c1f","c280153ea7464a9493de90fce672cbcf","42b937af8f1e4e62b8928acdc429bfd8","07a7715f1d274ee7bf941c9931d1e05f","a003451748ab4b95b8309bc6d8904d07","c8e69b089ff64d0a9fc0f5d79badfa14","8a89a9faa4db4bb88a1f5f36a0b6580c","a1e33c3128134a76a5ecfe07e468d2fa","02e0266a0b7b4f5b80a495dd8a4e71ad","5c379b3f55444b4abef930a3f71c686e","ef44168afa25491599adc6aed2960ad7","a7c66e93824a4768a0540b39ca118b57","160202d9302c4f0aa36c78b870e49fb6","0a92564fb1484de6a54b8375a71c3661"]},"id":"18DoQr8KD-1J","executionInfo":{"status":"ok","timestamp":1687392702905,"user_tz":-540,"elapsed":6462,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"e1a2feb3-c459-41e9-8529-02b57318995b"},"id":"18DoQr8KD-1J","execution_count":3,"outputs":[{"output_type":"stream","name":"stderr","text":["WARNING:datasets.builder:Found cached dataset kor_nli (/root/.cache/huggingface/datasets/kor_nli/multi_nli/1.0.0/06d9b61bd1372a618df02294965857ff10886d48696f33a32cbea656b71dfcf0)\n"]},{"output_type":"display_data","data":{"text/plain":[" 0%| | 0/1 [00:00"],"text/html":["\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
premisehypothesislabel
0문학은 예이츠, 쇼, 베켓의 노벨상 수상자 3명을 배출한 유일한 도시인 더블린에서 항상 번창해 왔다.노벨 문학상 수상자인 예이츠는 더블린을 방문한 적이 없다.contradiction
1좋아요, 좋은 저녁 되세요나가는 길에 비가 왔으면 좋겠다.contradiction
2존 캐번디쉬는 플랫폼에서 기다리고 있었고, 나를 차로 안내했다.우리는 함께 비즈니스 미팅으로 향하려고 했다.neutral
3그리고 말레이시아는 일년 내내 행사와 축제의 축제를 선보인다.말레이시아는 많은 행사로 인해 인기 있는 관광지입니다.neutral
4사암의 색은 자이푸르에게 분홍색 도시라는 이름을 얻었지만, 로즈핑크에서 가장 따뜻한 호박, 밝은 오렌지, 그리고 둔한 오크레에 이르기까지 하루의 계절과 시간에 따라 색이 변한다는 것을 알게 될 것이다.사암의 색은 녹색이다.contradiction
539 - 연방 직원은 사회 보장 40 및 메디 케어와 같은 사회 보험 프로그램에 의해 적용 대상 인구의 나머지 부분과 동일한 조건으로 적용될 수 있습니다.작년에 10만 명의 연방 직원들이 사회 서비스를 이용했다.neutral
6그리고 굿윈과 같은 몇몇 사람들은 전체주의와의 전쟁이 경제 발전을 가능하게 했다고 주장하지만, 센과 같은 다른 사람들은 그렇다.굿윈은 전쟁과 경제 발전 사이의 연관성을 본다.entailment
7난 루이스빌에 있어나는 다음 주에 루이스빌에 있을 것이다.contradiction
8그리고 그들이 그 장면에 사용한 버팔로가 닐 영의 버팔로라는 것을 촬영하려고 할 때, 나는 그들이 그의 이름이 무엇이라고 말했는지 기억할 수 없지만 그는 오레오 쿠키에 대한 페티쉬를 가지고 있다.그는 오레오 쿠키 먹는 것을 좋아한다entailment
9어떤 종류의 풀을 가지고 있나요?손에 들고 있는 풀의 종류는 무엇인가?entailment
"]},"metadata":{}}],"source":["show_random_elements(datasets[\"train\"])"]},{"cell_type":"markdown","id":"zakMS4Y61sLm","metadata":{"id":"zakMS4Y61sLm"},"source":["훈련 과정 중 모델의 성능을 파악하기 위한 메트릭을 설정합니다.\n","\n","`datasets` 라이브러리에는 이미 구현된 메트릭을 사용할 수 있는 `load_metric` 함수가 있습니다.\n","\n","그 중 **GLUE** 데이터셋에 이미 다양한 메트릭이 구현되어 있으므로, **GLUE** 그 중에서도 **KLUE NLI**와 동일한 `accuracy` 메트릭을 사용하는 `qnli` 태스크의 메트릭을 사용합니다."]},{"cell_type":"code","execution_count":8,"id":"5c214cfb-efa2-4e31-9268-9d1038626095","metadata":{"id":"5c214cfb-efa2-4e31-9268-9d1038626095","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1687392774983,"user_tz":-540,"elapsed":536,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"07fed33a-fd48-408d-e0be-aaf050cd69af"},"outputs":[{"output_type":"stream","name":"stderr","text":[":1: FutureWarning: load_metric is deprecated and will be removed in the next major version of datasets. Use 'evaluate.load' instead, from the new library 🤗 Evaluate: https://huggingface.co/docs/evaluate\n"," metric = load_metric(\"glue\", \"qnli\")\n"]}],"source":["metric = load_metric(\"glue\", \"qnli\")"]},{"cell_type":"markdown","id":"I07wSysL2fRs","metadata":{"id":"I07wSysL2fRs"},"source":["`accuracy` 메트릭이 정상적으로 작동하는지 확인하기 위해, 랜덤한 예측 값과 라벨 값을 생성합니다."]},{"cell_type":"code","execution_count":9,"id":"e988c49f","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"e988c49f","outputId":"da777fd3-8ee6-4cef-ad0a-5985021ff662","executionInfo":{"status":"ok","timestamp":1687392774984,"user_tz":-540,"elapsed":11,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"execute_result","data":{"text/plain":["(array([0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0,\n"," 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0,\n"," 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0]),\n"," array([0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,\n"," 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0,\n"," 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]))"]},"metadata":{},"execution_count":9}],"source":["fake_preds = np.random.randint(0, 2, size=(64,))\n","fake_labels = np.random.randint(0, 2, size=(64,))\n","fake_preds, fake_labels"]},{"cell_type":"markdown","id":"ryxIEDZR2oR-","metadata":{"id":"ryxIEDZR2oR-"},"source":["앞서 생성한 랜덤 예측, 랜덤 라벨 값을 `compute()` 함수에 입력해 잘 동작하는지 확인해봅시다."]},{"cell_type":"code","execution_count":10,"id":"e2dcf392-5c0a-4bbb-b9f6-cc42be6a382a","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"e2dcf392-5c0a-4bbb-b9f6-cc42be6a382a","outputId":"7aeb5077-3883-49fd-9891-6231ce41e870","executionInfo":{"status":"ok","timestamp":1687392774984,"user_tz":-540,"elapsed":10,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"execute_result","data":{"text/plain":["{'accuracy': 0.53125}"]},"metadata":{},"execution_count":10}],"source":["metric.compute(predictions=fake_preds, references=fake_labels)"]},{"cell_type":"markdown","id":"rPvvy_wC24i_","metadata":{"id":"rPvvy_wC24i_"},"source":["이제 학습에 활용할 토크나이저를 로드해오도록 합니다."]},{"cell_type":"code","execution_count":11,"id":"b64e70af","metadata":{"id":"b64e70af","executionInfo":{"status":"ok","timestamp":1687392774984,"user_tz":-540,"elapsed":7,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_fast=True)"]},{"cell_type":"markdown","id":"YIVjwvm428Q_","metadata":{"id":"YIVjwvm428Q_"},"source":["로드된 토크나이저가 두 개 문장을 토큰화하는 방식을 파악하기 위해 두 문장을 입력 값으로 넣어줘보도록 합시다."]},{"cell_type":"code","execution_count":12,"id":"0520aba3","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"0520aba3","outputId":"f7180410-b147-4baa-c336-80a2098610fa","executionInfo":{"status":"ok","timestamp":1687392774984,"user_tz":-540,"elapsed":7,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"execute_result","data":{"text/plain":["{'input_ids': [0, 3997, 2116, 11451, 7777, 2138, 4543, 4402, 2200, 7590, 2088, 1513, 2062, 18, 2, 3997, 2259, 1120, 6233, 5756, 11314, 2], 'token_type_ids': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}"]},"metadata":{},"execution_count":12}],"source":["tokenizer(\"남자가 공구 상자를 인도 아래로 옮기고 있다.\", \"남자는 밖으로 걸어 나간다\")"]},{"cell_type":"markdown","id":"FDAaxujL7l1X","metadata":{"id":"FDAaxujL7l1X"},"source":["`input_ids`를 보시면 `cls_token`에 해당하는 2번 토큰이 가장 좌측에 붙게 되며, `sep_token`의 3번 토큰이 각각 중간과 가장 우측에 더해진 것을 확인할 수 있습니다.\n","\n","이제 앞서 로드한 데이터셋에서 각 문장에 해당하는 *value* 를 뽑아주기 위한 *key* 를 정의합니다.\n","\n","앞서 **KLUE NLI** 데이터셋의 두 문장은 각각 `premise`와 `hypothesis`라는 이름으로 정의된 것을 확인하였으니, 두 문장의 *key* 는 마찬가지로 각각 `premise`, `hypothesis`가 되게 됩니다."]},{"cell_type":"code","execution_count":13,"id":"95127c8c","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"95127c8c","outputId":"26c23d84-5ead-41ba-eed9-a8d1a4e40210","executionInfo":{"status":"ok","timestamp":1687392775649,"user_tz":-540,"elapsed":2,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"stream","name":"stdout","text":["Sentence 1: 스페인에서 가장 인기 있는 종교 예술가인 바르톨로모 무릴로(1617 1682년)는 존경받는 성서적 성격을 편안하게 묘사했다.\n","Sentence 2: 바르톨로모 무릴로는 성서적 성격을 묘사하지 않는 것을 선호했다.\n"]}],"source":["sentence1_key, sentence2_key = (\"premise\", \"hypothesis\")\n","print(f\"Sentence 1: {datasets['train'][0][sentence1_key]}\")\n","print(f\"Sentence 2: {datasets['train'][0][sentence2_key]}\")"]},{"cell_type":"markdown","id":"fMDIRs1M4-5a","metadata":{"id":"fMDIRs1M4-5a"},"source":["이제 *key* 도 확인이 되었으니, 데이터셋에서 각 예제들을 뽑아와 토큰화 할 수 있는 함수를 아래와 같이 정의해줍니다.\n","\n","해당 함수는 모델을 훈련하기 앞서 데이터셋을 미리 토큰화 시켜놓는 작업을 위한 콜백 함수로 사용되게 됩니다.\n","\n","인자로 넣어주는 `truncation`는 모델이 입력 받을 수 있는 최대 길이 이상의 토큰 시퀀스가 들어오게 될 경우, 최대 길이 기준으로 시퀀스를 자르라는 의미를 지닙니다.\n","\n","( \\* `return_token_type_ids`는 토크나이저가 `token_type_ids`를 반환하도록 할 것인지를 결정하는 인자입니다. `transformers==4.7.0` 기준으로 `token_type_ids`가 기본적으로 반환되므로 `token_type_ids` 자체를 사용하지 않는 `RoBERTa` 모델을 활용하기 위해 해당 인자를 `False`로 설정해주도록 합니다.)"]},{"cell_type":"code","execution_count":14,"id":"2f8f8cc0","metadata":{"id":"2f8f8cc0","executionInfo":{"status":"ok","timestamp":1687392776885,"user_tz":-540,"elapsed":3,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["def preprocess_function(examples):\n"," return tokenizer(\n"," examples[sentence1_key],\n"," examples[sentence2_key],\n"," truncation=True,\n"," return_token_type_ids=False,\n"," )"]},{"cell_type":"markdown","id":"F-qK5fgl4_6t","metadata":{"id":"F-qK5fgl4_6t"},"source":["앞서 정의한 `process_function`은 여러 개의 예제 데이터를 받을 수도 있습니다."]},{"cell_type":"code","execution_count":15,"id":"x8KrAGLpyxNO","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"x8KrAGLpyxNO","outputId":"e5c82ca0-0f1c-4d05-fbe0-03db3fde1089","executionInfo":{"status":"ok","timestamp":1687392777741,"user_tz":-540,"elapsed":4,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"execute_result","data":{"text/plain":["{'input_ids': [[0, 6385, 27135, 3676, 4316, 1513, 2259, 4786, 8560, 2179, 5957, 2777, 2200, 2391, 1088, 2388, 2200, 12, 16956, 2254, 16713, 2302, 2440, 13, 793, 7534, 2757, 2259, 8344, 2125, 4768, 2069, 5984, 2205, 2318, 6885, 2371, 2062, 18, 2, 5957, 2777, 2200, 2391, 1088, 2388, 2200, 2259, 8344, 2125, 4768, 2069, 6885, 2205, 2118, 1380, 2259, 575, 2069, 5877, 2371, 2062, 18, 2], [0, 831, 29584, 2088, 8331, 2170, 2259, 19786, 2052, 1513, 2359, 2062, 18, 2, 831, 29584, 2088, 8331, 2170, 2259, 19786, 2052, 1513, 2359, 2062, 18, 2], [0, 7032, 25657, 2155, 2079, 4132, 4471, 2252, 2052, 2359, 2414, 3752, 12489, 2179, 4075, 2259, 1750, 2318, 1567, 2359, 2062, 18, 2, 25657, 2155, 2170, 2259, 636, 3875, 904, 2178, 2062, 2119, 1039, 2073, 10290, 2116, 1513, 2062, 18, 2], [0, 1439, 2138, 3685, 16, 3698, 2073, 4426, 3759, 4076, 2069, 9962, 4897, 2200, 1238, 2886, 2088, 3659, 2079, 17600, 2170, 3618, 14544, 2502, 4192, 2069, 1410, 2015, 3694, 4071, 2138, 5651, 2371, 2062, 18, 2, 3698, 2073, 3659, 2079, 4426, 6033, 2170, 3618, 14544, 2502, 4192, 2069, 1410, 2259, 575, 2069, 4071, 2200, 1238, 2886, 2062, 18, 2], [0, 16550, 2079, 3785, 9519, 2170, 2259, 3665, 2079, 13282, 2218, 2125, 14459, 9867, 1570, 3657, 2116, 1513, 2062, 18, 2, 3665, 27135, 3676, 1751, 25353, 4605, 1570, 3657, 2259, 16550, 9519, 27135, 4257, 3598, 3606, 18, 2]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}"]},"metadata":{},"execution_count":15}],"source":["preprocess_function(datasets[\"train\"][:5])"]},{"cell_type":"markdown","id":"a_usMC7U5AyW","metadata":{"id":"a_usMC7U5AyW"},"source":["이제 정의된 전처리 함수를 활용해 데이터셋을 미리 토큰화시키는 작업을 수행합니다.\n","\n","`datasets` 라이브러리를 통해 얻어진 `DatasetDict` 객체는 `map()` 함수를 지원하므로, 정의된 전처리 함수를 데이터셋 토큰화를 위한 콜백 함수로 `map()` 함수 인자로 넘겨주면 됩니다.\n","\n","보다 자세한 내용은 [문서](https://huggingface.co/docs/datasets/processing.html#processing-data-with-map)를 참조해주시면 됩니다."]},{"cell_type":"code","execution_count":16,"id":"f7c72286","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":17,"referenced_widgets":["962f83b5ac064e33b15231f0b2eca229","ac8f897302ba4dad9540c00c3e740566","63fefb6361164e4d80f175a5e1a4b836","5b429d358fb4420a942752ae8adb6612","4e2e73f22d2e4499903afa6e5911c1c1","dd6030bb06564da79bb6476f848bd17f","d5a3d1b38fa0403894fc9b42959061c8","a250f80e767346ecae22d4f4ff8829de","baf1738fddef4b41bbe440e9f5d8e677","39b9b50d76444dacb5ac70fa115bb606","692358fb47bf411bbeb462db8e7c1444","a2d6a2d9c9734a2a83dbcee315f05c20","4773ffb01b7845b3a9d79efd5e6f4f34","74c49cab4e174f08abd7b724ab3fcea9","e85f9c5c5a3d45b1af9efc36eed4fbf2","34149c1ec2a24fae8b22c9159ca3ca0d","f79f28c8412a4bd08eb0a924ccf6df28","8a4b4d7f57dc4faabb70b560becf541c","b95dc2414cfc447c80f9927d05bf8654","b5375adb1ec74c6b93df4d928ea96f9f","bee10b79a22d4eb081f988abf50329ac","0ce8cb88604b4be085279959fd89a3a1"]},"id":"f7c72286","outputId":"5daae89f-b045-4ba2-acd4-8316b30802f6","executionInfo":{"status":"ok","timestamp":1687392807000,"user_tz":-540,"elapsed":28436,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"display_data","data":{"text/plain":["Map: 0%| | 0/360181 [00:00= 0:\n"," print('Not connected to a GPU')\n","else:\n"," print(gpu_info)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"HLXwFtbJbrKa","executionInfo":{"status":"ok","timestamp":1687392807001,"user_tz":-540,"elapsed":12,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"f8e8684a-4893-420e-c9d3-4f8b00950e23"},"id":"HLXwFtbJbrKa","execution_count":17,"outputs":[{"output_type":"stream","name":"stdout","text":["Thu Jun 22 00:13:26 2023 \n","+-----------------------------------------------------------------------------+\n","| NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 |\n","|-------------------------------+----------------------+----------------------+\n","| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n","| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n","| | | MIG M. |\n","|===============================+======================+======================|\n","| 0 NVIDIA A100-SXM... Off | 00000000:00:04.0 Off | 0 |\n","| N/A 30C P0 42W / 400W | 0MiB / 40960MiB | 0% Default |\n","| | | Disabled |\n","+-------------------------------+----------------------+----------------------+\n"," \n","+-----------------------------------------------------------------------------+\n","| Processes: |\n","| GPU GI CI PID Type Process name GPU Memory |\n","| ID ID Usage |\n","|=============================================================================|\n","| No running processes found |\n","+-----------------------------------------------------------------------------+\n"]}]},{"cell_type":"code","execution_count":18,"id":"7ae93dd8","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"7ae93dd8","outputId":"a657c98e-5b9e-4400-abd8-284caaa244f1","executionInfo":{"status":"ok","timestamp":1687392808357,"user_tz":-540,"elapsed":1360,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"stream","name":"stderr","text":["Some weights of the model checkpoint at klue/roberta-base were not used when initializing RobertaForSequenceClassification: ['lm_head.layer_norm.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.weight', 'lm_head.bias', 'lm_head.dense.weight']\n","- This IS expected if you are initializing RobertaForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n","- This IS NOT expected if you are initializing RobertaForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n","Some weights of RobertaForSequenceClassification were not initialized from the model checkpoint at klue/roberta-base and are newly initialized: ['classifier.out_proj.weight', 'classifier.dense.weight', 'classifier.dense.bias', 'classifier.out_proj.bias']\n","You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"]}],"source":["num_labels = 3\n","model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=num_labels)"]},{"cell_type":"markdown","id":"ZSc4c6K5oR_R","metadata":{"id":"ZSc4c6K5oR_R"},"source":["모델을 로드할 때 발생하는 경고 문구는 두 가지 의미를 지닙니다.\n","\n","1. *Masked Language Modeling* 을 위해 존재했던 `lm_head`가 현재는 사용되지 않고 있음을 의미합니다.\n","2. 문장 분류를 위한 `classifier` 레이어를 백본 모델 뒤에 이어 붙였으나 아직 훈련이 되지 않았으므로, 학습을 수행해야 함을 의미합니다."]},{"cell_type":"markdown","id":"x6bvKcsv5CPo","metadata":{"id":"x6bvKcsv5CPo"},"source":["마지막으로 앞서 정의한 메트릭을 모델 예측 결과에 적용하기 위한 함수를 정의합니다.\n","\n","입력으로 들어오는 `eval_pred`는 [*EvalPrediction*](https://huggingface.co/transformers/internal/trainer_utils.html#transformers.EvalPrediction) 객체이며, 모델의 클래스 별 예측 값과 정답 값을 지닙니다.\n","\n","클래스 별 예측 중 가장 높은 라벨을 `argmax()`를 통해 뽑아낸 후, 정답 라벨과 비교를 하게 됩니다."]},{"cell_type":"code","execution_count":19,"id":"cbfb67d3","metadata":{"id":"cbfb67d3","executionInfo":{"status":"ok","timestamp":1687392808357,"user_tz":-540,"elapsed":3,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["def compute_metrics(eval_pred):\n"," predictions, labels = eval_pred\n"," predictions = np.argmax(predictions, axis=1)\n"," return metric.compute(predictions=predictions, references=labels)"]},{"cell_type":"markdown","id":"aU_dmMAVE_FA","metadata":{"id":"aU_dmMAVE_FA"},"source":["이제 앞서 정의한 정보들을 바탕으로 `transformers`에서 제공하는 *Trainer* 객체를 활용하기 위한 인자 관리 클래스를 초기화합니다.\n","\n","`metric_name`은 앞서 얻어진 메트릭 함수를 활용했을 때, 아래와 같이 `dict` 형식으로 결과 값이 반환되는데 여기서 우리가 사용할 *key* 를 정의해준다고 생각하시면 됩니다.\n","\n","```python\n",">>> metric.compute(predictions=fake_preds, references=fake_labels)\n","{'accuracy': 0.515625}\n","```\n","\n","각 인자에 대한 자세한 설명은 [문서](https://huggingface.co/transformers/main_classes/trainer.html#trainingarguments)에서 참조해주시면 됩니다."]},{"cell_type":"code","execution_count":20,"id":"864b6408","metadata":{"id":"864b6408","executionInfo":{"status":"ok","timestamp":1687392808358,"user_tz":-540,"elapsed":3,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["metric_name = \"accuracy\"\n","\n","args = TrainingArguments(\n"," \"test-nli\",\n"," evaluation_strategy=\"epoch\",\n"," learning_rate=2e-5,\n"," per_device_train_batch_size=batch_size,\n"," per_device_eval_batch_size=batch_size,\n"," num_train_epochs=5,\n"," weight_decay=0.01,\n"," load_best_model_at_end=False,\n"," save_strategy=\"epoch\",\n"," save_total_limit = 10,\n"," metric_for_best_model=metric_name,\n",")"]},{"cell_type":"markdown","id":"PcvI6ZHe3Ty6","metadata":{"id":"PcvI6ZHe3Ty6"},"source":["이제 로드한 모델, 인자 관리 클래스, 데이터셋 등을 *Trainer* 클래스를 초기화에 넘겨주도록 합니다.\n","\n","(TIP: Q: 이미 `encoded_datasets`을 만드는 과정에 토큰화가 이루어졌는데 토크나이저를 굳이 넘겨주는 이유가 무엇인가요?,
A: 토큰화는 이루어졌지만 학습 과정 시, 데이터를 배치 단위로 넘겨주는 과정에서 배치에 포함된 가장 긴 시퀀스 기준으로 `truncation`을 수행하고 최대 길이 시퀀스 보다 짧은 시퀀스들은 그 길이만큼 `padding`을 수행해주기 위함입니다.)"]},{"cell_type":"code","execution_count":21,"id":"c91650f2","metadata":{"id":"c91650f2","executionInfo":{"status":"ok","timestamp":1687392810200,"user_tz":-540,"elapsed":1845,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[],"source":["trainer = Trainer(\n"," model,\n"," args,\n"," train_dataset=encoded_datasets[\"train\"],\n"," eval_dataset=encoded_datasets[\"test\"],\n"," tokenizer=tokenizer,\n"," compute_metrics=compute_metrics,\n",")"]},{"cell_type":"markdown","id":"KImxQi1ZFAO4","metadata":{"id":"KImxQi1ZFAO4"},"source":["이제 정의된 *Trainer* 객체를 다음과 같이 훈련시킬 수 있습니다.\n","\n","에폭이 지남에 따라 *Loss* 는 떨어지고, 앞서 선정한 메트릭인 *Accuracy* 는 증가하는 것을 확인할 수 있습니다."]},{"cell_type":"code","execution_count":22,"id":"73261f8e","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":345},"id":"73261f8e","outputId":"4a1c1ccf-61b5-41df-f28d-b8b979ec5673","executionInfo":{"status":"ok","timestamp":1687401441835,"user_tz":-540,"elapsed":8631638,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/transformers/optimization.py:411: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n"," warnings.warn(\n","You're using a BertTokenizerFast tokenizer. Please note that with a fast tokenizer, using the `__call__` method is faster than using a method to encode the text followed by a call to the `pad` method to get a padded encoding.\n"]},{"output_type":"display_data","data":{"text/plain":[""],"text/html":["\n","
\n"," \n"," \n"," [56280/56280 2:23:50, Epoch 5/5]\n","
\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
EpochTraining LossValidation LossAccuracy
10.5227000.5167030.799305
20.4273000.5038210.810275
30.3255000.5382720.811599
40.2262000.6216560.810924
50.1672000.7363670.811424

"]},"metadata":{}},{"output_type":"execute_result","data":{"text/plain":["TrainOutput(global_step=56280, training_loss=0.3434749272501714, metrics={'train_runtime': 8631.4556, 'train_samples_per_second': 208.644, 'train_steps_per_second': 6.52, 'total_flos': 9.673161506543254e+16, 'train_loss': 0.3434749272501714, 'epoch': 5.0})"]},"metadata":{},"execution_count":22}],"source":["trainer.train()"]},{"cell_type":"markdown","id":"avS6mBu8779g","metadata":{"id":"avS6mBu8779g"},"source":["*Trainer* 는 학습을 마치게 되면, `load_best_model_at_end=True` 인자에 따라 메트릭 기준 가장 좋은 성능을 보였던 체크포인트를 로드하게 됩니다.\n","\n","본 노트북에서는 마지막 에폭 때 가장 좋은 성능을 얻었기에 `evaluate`를 수행해도 같은 결과가 나오겠습니다."]},{"cell_type":"code","execution_count":23,"id":"58239e17","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":149},"id":"58239e17","outputId":"a8a7458a-339e-4bd8-8843-87e59c5005ac","executionInfo":{"status":"ok","timestamp":1687401508734,"user_tz":-540,"elapsed":59019,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"outputs":[{"output_type":"display_data","data":{"text/plain":[""],"text/html":["\n","

\n"," \n"," \n"," [1251/1251 00:56]\n","
\n"," "]},"metadata":{}},{"output_type":"execute_result","data":{"text/plain":["{'eval_loss': 0.7363672256469727,\n"," 'eval_accuracy': 0.8114240023987407,\n"," 'eval_runtime': 57.0187,\n"," 'eval_samples_per_second': 701.892,\n"," 'eval_steps_per_second': 21.94,\n"," 'epoch': 5.0}"]},"metadata":{},"execution_count":23}],"source":["trainer.evaluate()"]},{"cell_type":"code","source":["!pip install huggingface_hub"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"hSqW3lYj8-40","executionInfo":{"status":"ok","timestamp":1687401526405,"user_tz":-540,"elapsed":4701,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"3b31f9fa-d9b1-4a3a-8f63-2ed8e3edeba0"},"id":"hSqW3lYj8-40","execution_count":25,"outputs":[{"output_type":"stream","name":"stdout","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.15.1)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.12.0)\n","Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2023.4.0)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.27.1)\n","Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.65.0)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.5.0)\n","Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (23.1)\n","Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (1.26.15)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2022.12.7)\n","Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.0.12)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.4)\n"]}]},{"cell_type":"code","source":["from huggingface_hub import notebook_login\n","\n","notebook_login()"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":145,"referenced_widgets":["67ed315f5d8b4442bb245274d15fdc34","3f4ad6f61c9a4aea935de88a01be95d4","58dad53747844d389b2c65c3b8e63131","b8d3cc3e90ca4432966d6ff9a3a185ab","47001cb3f6c84f35863d5158aed9c9e5","e3602b86556447d1ad282b6282e67630","5e05a392f5ce42e69173a6e664f42ace","78fe6afc5cf24fe3b6ccc6c2a13e8adb","9e7ecb5fc0ca4d5b8d3d88387ce8c651","4db43a8501e346ffbdf62631e48626a4","c075b208c4a04e4f8cff425a8822f387","18b790ba561748a6b36b7b372acec93f","6cafd93e2ea74e60bbe6ce0c9574774b","d4a3e2d58efb465e8cdfc1b476c5e824","4f824faf60a0424490e864369c92929f","9e40f85cbab5434b8f149570d6ad744e","d73fcbffa65747548d0ef1bef71f8f0c","f2f3e7452e324e25b81a208f28e85470","4a3588ce965540109fcf92d2f45891ce","d71fbe414a5146f29edb5c6d190d8d1b","2771d4fd0398428896c474790aed6728","1cdba0dc698447fc98545136b1550070","f455098f355d4b4293dbdee5d096d3b5","4745ece55eb54be39839908434a9defc","dee705891e5e46a7bd5842aee8df417e","bc951afd648146cbb3a6ab8d840c2afb","3dcc5114b3d142cba5b2a75fce44fb54","322c06ca624642788ba494603da29a69","17f384f492734e848d1fd1afc541f534","5aeb1186a45e48b697251f4eb696a018","8765adbd4f584fe1829bc2d33df511f3","576bcb0f43e24e668437061fe1d02eec"]},"id":"k3Kj2tswc73K","executionInfo":{"status":"ok","timestamp":1687401529173,"user_tz":-540,"elapsed":12,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"2f00af12-489c-41e1-f5e5-833c0e624b4a"},"id":"k3Kj2tswc73K","execution_count":26,"outputs":[{"output_type":"display_data","data":{"text/plain":["VBox(children=(HTML(value='
\u001b[0m:\u001b[94m1\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2;33m/usr/local/lib/python3.10/dist-packages/transformers/\u001b[0m\u001b[1;33mtrainer.py\u001b[0m:\u001b[94m3716\u001b[0m in \u001b[92mpush_to_hub\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3713 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[2m# If a user calls manually `push_to_hub` with `self.args.push_to_hub = False`, w\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3714 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[2m# it might fail.\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3715 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mif\u001b[0m \u001b[95mnot\u001b[0m \u001b[96mhasattr\u001b[0m(\u001b[96mself\u001b[0m, \u001b[33m\"\u001b[0m\u001b[33mrepo\u001b[0m\u001b[33m\"\u001b[0m): \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m❱ \u001b[0m3716 \u001b[2m│ │ │ \u001b[0m\u001b[96mself\u001b[0m.init_git_repo() \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3717 \u001b[0m\u001b[2m│ │ \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3718 \u001b[0m\u001b[2m│ │ \u001b[0mmodel_name = kwargs.pop(\u001b[33m\"\u001b[0m\u001b[33mmodel_name\u001b[0m\u001b[33m\"\u001b[0m, \u001b[94mNone\u001b[0m) \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3719 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mif\u001b[0m model_name \u001b[95mis\u001b[0m \u001b[94mNone\u001b[0m \u001b[95mand\u001b[0m \u001b[96mself\u001b[0m.args.should_save: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2;33m/usr/local/lib/python3.10/dist-packages/transformers/\u001b[0m\u001b[1;33mtrainer.py\u001b[0m:\u001b[94m3571\u001b[0m in \u001b[92minit_git_repo\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3568 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[2m# Make sure the repo exists.\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3569 \u001b[0m\u001b[2m│ │ \u001b[0mcreate_repo(repo_name, token=\u001b[96mself\u001b[0m.args.hub_token, private=\u001b[96mself\u001b[0m.args.hub_private_ \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3570 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mtry\u001b[0m: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m❱ \u001b[0m3571 \u001b[2m│ │ │ \u001b[0m\u001b[96mself\u001b[0m.repo = Repository(\u001b[96mself\u001b[0m.args.output_dir, clone_from=repo_name, token=\u001b[96msel\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3572 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mexcept\u001b[0m \u001b[96mEnvironmentError\u001b[0m: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3573 \u001b[0m\u001b[2m│ │ │ \u001b[0m\u001b[94mif\u001b[0m \u001b[96mself\u001b[0m.args.overwrite_output_dir \u001b[95mand\u001b[0m at_init: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m3574 \u001b[0m\u001b[2m│ │ │ │ \u001b[0m\u001b[2m# Try again after wiping output_dir\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2;33m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/\u001b[0m\u001b[1;33m_validators.py\u001b[0m:\u001b[94m118\u001b[0m in \u001b[92m_inner_fn\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m115 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mif\u001b[0m check_use_auth_token: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m116 \u001b[0m\u001b[2m│ │ │ \u001b[0mkwargs = smoothly_deprecate_use_auth_token(fn_name=fn.\u001b[91m__name__\u001b[0m, has_token=ha \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m117 \u001b[0m\u001b[2m│ │ \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m❱ \u001b[0m118 \u001b[2m│ │ \u001b[0m\u001b[94mreturn\u001b[0m fn(*args, **kwargs) \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m119 \u001b[0m\u001b[2m│ \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m120 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mreturn\u001b[0m _inner_fn \u001b[2m# type: ignore\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m121 \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2;33m/usr/local/lib/python3.10/dist-packages/huggingface_hub/\u001b[0m\u001b[1;33mrepository.py\u001b[0m:\u001b[94m516\u001b[0m in \u001b[92m__init__\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 513 \u001b[0m\u001b[2m│ │ │ \u001b[0m\u001b[96mself\u001b[0m.huggingface_token = HfFolder.get_token() \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 514 \u001b[0m\u001b[2m│ │ \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 515 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mif\u001b[0m clone_from \u001b[95mis\u001b[0m \u001b[95mnot\u001b[0m \u001b[94mNone\u001b[0m: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m❱ \u001b[0m 516 \u001b[2m│ │ │ \u001b[0m\u001b[96mself\u001b[0m.clone_from(repo_url=clone_from) \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 517 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94melse\u001b[0m: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 518 \u001b[0m\u001b[2m│ │ │ \u001b[0m\u001b[94mif\u001b[0m is_git_repo(\u001b[96mself\u001b[0m.local_dir): \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 519 \u001b[0m\u001b[2m│ │ │ │ \u001b[0mlogger.debug(\u001b[33m\"\u001b[0m\u001b[33m[Repository] is a valid git repo\u001b[0m\u001b[33m\"\u001b[0m) \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2;33m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/\u001b[0m\u001b[1;33m_validators.py\u001b[0m:\u001b[94m118\u001b[0m in \u001b[92m_inner_fn\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m115 \u001b[0m\u001b[2m│ │ \u001b[0m\u001b[94mif\u001b[0m check_use_auth_token: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m116 \u001b[0m\u001b[2m│ │ │ \u001b[0mkwargs = smoothly_deprecate_use_auth_token(fn_name=fn.\u001b[91m__name__\u001b[0m, has_token=ha \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m117 \u001b[0m\u001b[2m│ │ \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m❱ \u001b[0m118 \u001b[2m│ │ \u001b[0m\u001b[94mreturn\u001b[0m fn(*args, **kwargs) \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m119 \u001b[0m\u001b[2m│ \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m120 \u001b[0m\u001b[2m│ \u001b[0m\u001b[94mreturn\u001b[0m _inner_fn \u001b[2m# type: ignore\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m121 \u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2;33m/usr/local/lib/python3.10/dist-packages/huggingface_hub/\u001b[0m\u001b[1;33mrepository.py\u001b[0m:\u001b[94m680\u001b[0m in \u001b[92mclone_from\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 677 \u001b[0m\u001b[2m│ │ │ \u001b[0m\u001b[94melse\u001b[0m: \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 678 \u001b[0m\u001b[2m│ │ │ │ \u001b[0m\u001b[2m# Check if the folder is the root of a git repository\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 679 \u001b[0m\u001b[2m│ │ │ │ \u001b[0m\u001b[94mif\u001b[0m \u001b[95mnot\u001b[0m is_git_repo(\u001b[96mself\u001b[0m.local_dir): \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[31m❱ \u001b[0m 680 \u001b[2m│ │ │ │ │ \u001b[0m\u001b[94mraise\u001b[0m \u001b[96mEnvironmentError\u001b[0m( \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 681 \u001b[0m\u001b[2m│ │ │ │ │ │ \u001b[0m\u001b[33m\"\u001b[0m\u001b[33mTried to clone a repository in a non-empty folder that isn\u001b[0m\u001b[33m'\u001b[0m\u001b[33mt\u001b[0m\u001b[33m\"\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 682 \u001b[0m\u001b[2m│ │ │ │ │ │ \u001b[0m\u001b[33mf\u001b[0m\u001b[33m\"\u001b[0m\u001b[33m a git repository (\u001b[0m\u001b[33m'\u001b[0m\u001b[33m{\u001b[0m\u001b[96mself\u001b[0m.local_dir\u001b[33m}\u001b[0m\u001b[33m'\u001b[0m\u001b[33m). If you really want to\u001b[0m\u001b[33m\"\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m│\u001b[0m \u001b[2m 683 \u001b[0m\u001b[2m│ │ │ │ │ │ \u001b[0m\u001b[33mf\u001b[0m\u001b[33m\"\u001b[0m\u001b[33m do this, do it manually:\u001b[0m\u001b[33m\\n\u001b[0m\u001b[33m cd \u001b[0m\u001b[33m{\u001b[0m\u001b[96mself\u001b[0m.local_dir\u001b[33m}\u001b[0m\u001b[33m && git init\u001b[0m\u001b[33m\"\u001b[0m \u001b[31m│\u001b[0m\n","\u001b[31m╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n","\u001b[1;91mOSError: \u001b[0mTried to clone a repository in a non-empty folder that isn't a git repository \u001b[1m(\u001b[0m\u001b[32m'/content/test-nli'\u001b[0m\u001b[1m)\u001b[0m. If \n","you really want to do this, do it manually:\n"," cd \u001b[35m/content/\u001b[0m\u001b[95mtest-nli\u001b[0m && git init && git remote add origin && git pull origin main\n"," or clone repo to a new folder and move your existing files there afterwards.\n"],"text/html":["
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮\n"," in <cell line: 1>:1                                                                              \n","                                                                                                  \n"," /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:3716 in push_to_hub              \n","                                                                                                  \n","   3713 │   │   # If a user calls manually `push_to_hub` with `self.args.push_to_hub = False`, w  \n","   3714 │   │   # it might fail.                                                                  \n","   3715 │   │   if not hasattr(self, \"repo\"):                                                     \n"," 3716 │   │   │   self.init_git_repo()                                                          \n","   3717 │   │                                                                                     \n","   3718 │   │   model_name = kwargs.pop(\"model_name\", None)                                       \n","   3719 │   │   if model_name is None and self.args.should_save:                                  \n","                                                                                                  \n"," /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:3571 in init_git_repo            \n","                                                                                                  \n","   3568 │   │   # Make sure the repo exists.                                                      \n","   3569 │   │   create_repo(repo_name, token=self.args.hub_token, private=self.args.hub_private_  \n","   3570 │   │   try:                                                                              \n"," 3571 │   │   │   self.repo = Repository(self.args.output_dir, clone_from=repo_name, token=sel  \n","   3572 │   │   except EnvironmentError:                                                          \n","   3573 │   │   │   if self.args.overwrite_output_dir and at_init:                                \n","   3574 │   │   │   │   # Try again after wiping output_dir                                       \n","                                                                                                  \n"," /usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py:118 in _inner_fn    \n","                                                                                                  \n","   115 │   │   if check_use_auth_token:                                                           \n","   116 │   │   │   kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=ha   \n","   117 │   │                                                                                      \n"," 118 │   │   return fn(*args, **kwargs)                                                         \n","   119 │                                                                                          \n","   120 │   return _inner_fn  # type: ignore                                                       \n","   121                                                                                            \n","                                                                                                  \n"," /usr/local/lib/python3.10/dist-packages/huggingface_hub/repository.py:516 in __init__            \n","                                                                                                  \n","    513 │   │   │   self.huggingface_token = HfFolder.get_token()                                 \n","    514 │   │                                                                                     \n","    515 │   │   if clone_from is not None:                                                        \n","  516 │   │   │   self.clone_from(repo_url=clone_from)                                          \n","    517 │   │   else:                                                                             \n","    518 │   │   │   if is_git_repo(self.local_dir):                                               \n","    519 │   │   │   │   logger.debug(\"[Repository] is a valid git repo\")                          \n","                                                                                                  \n"," /usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py:118 in _inner_fn    \n","                                                                                                  \n","   115 │   │   if check_use_auth_token:                                                           \n","   116 │   │   │   kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=ha   \n","   117 │   │                                                                                      \n"," 118 │   │   return fn(*args, **kwargs)                                                         \n","   119 │                                                                                          \n","   120 │   return _inner_fn  # type: ignore                                                       \n","   121                                                                                            \n","                                                                                                  \n"," /usr/local/lib/python3.10/dist-packages/huggingface_hub/repository.py:680 in clone_from          \n","                                                                                                  \n","    677 │   │   │   else:                                                                         \n","    678 │   │   │   │   # Check if the folder is the root of a git repository                     \n","    679 │   │   │   │   if not is_git_repo(self.local_dir):                                       \n","  680 │   │   │   │   │   raise EnvironmentError(                                               \n","    681 │   │   │   │   │   │   \"Tried to clone a repository in a non-empty folder that isn't\"    \n","    682 │   │   │   │   │   │   f\" a git repository ('{self.local_dir}'). If you really want to\"  \n","    683 │   │   │   │   │   │   f\" do this, do it manually:\\n cd {self.local_dir} && git init\"    \n","╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n","OSError: Tried to clone a repository in a non-empty folder that isn't a git repository ('/content/test-nli'). If \n","you really want to do this, do it manually:\n"," cd /content/test-nli && git init && git remote add origin && git pull origin main\n"," or clone repo to a new folder and move your existing files there afterwards.\n","
\n"]},"metadata":{}}]},{"cell_type":"code","source":["from google.colab import drive\n","drive.mount('/content/drive')"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"6cMuYwkPdQG9","executionInfo":{"status":"ok","timestamp":1687401591361,"user_tz":-540,"elapsed":26936,"user":{"displayName":"김평진","userId":"11705489940506901507"}},"outputId":"1b638418-bd6c-4e76-84d3-9a39993987f0"},"id":"6cMuYwkPdQG9","execution_count":29,"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}]},{"cell_type":"code","source":["# push to hub는 에러가 뜨기에 직접 코랩 로컬에 저장 후 다운로드\n","trainer.save_model(\"/content/drive/MyDrive/국민은행과제\")"],"metadata":{"id":"3zks-x8Fc7sZ","executionInfo":{"status":"ok","timestamp":1687401620121,"user_tz":-540,"elapsed":1250,"user":{"displayName":"김평진","userId":"11705489940506901507"}}},"id":"3zks-x8Fc7sZ","execution_count":30,"outputs":[]},{"cell_type":"markdown","id":"stk6rOUyFJuM","metadata":{"id":"stk6rOUyFJuM"},"source":["지금까지 `transformers`를 라이브러리 내 문장 분류 모델을 학습하는 과정을 KLUE NLI 데이터셋을 통해 알아보았습니다.\n","\n","본 노트북을 통해 습득한 지식이 여러분의 업무와 학습에 도움이 되었으면 좋겠습니다.\n","\n","```\n","허 훈 (huffonism@gmail.com)\n","```"]},{"cell_type":"markdown","id":"SkNpAqSJ78oM","metadata":{"id":"SkNpAqSJ78oM"},"source":["APPENDIX: 앞서 학습된 모델을 HuggingFace 모델 허브에 업로드하였으니, 아래 예제와 같이 `pipeline` 함수를 통해 사용이 가능합니다.\n","\n","먼저 `text-classification` 태스크로 파이프라인 객체를 초기화합니다.\n","\n","( \\* `return_all_scores`는 모델이 입력 문장에 대해 측정한 각 라벨에 대한 확률 값을 모두 보여줄 것인지를 결정하는 인자입니다.)"]},{"cell_type":"code","execution_count":null,"id":"htUZ0ws19Ksk","metadata":{"id":"htUZ0ws19Ksk"},"outputs":[],"source":["from transformers import pipeline\n","\n","classifier = pipeline(\n"," \"text-classification\",\n"," model=\"Huffon/klue-roberta-base-nli\",\n"," return_all_scores=True,\n",")"]},{"cell_type":"markdown","id":"2uW7UQgBFBPw","metadata":{"id":"2uW7UQgBFBPw"},"source":["NLI는 두 문장의 페어를 입력 값으로 주어야 하기 때문에 구분자 스페셜 토큰을 두 문장 사이에 넣어주기 위해 토크나이저 객체를 로드합니다.\n","\n","`[SEP]` 문자열을 하드코딩하여 넣어줄 수도 있겠지만, 스페셜 토큰은 토크나이저 마다 다르게 정의되므로 다른 모델을 활용할 때 보다 코드를 재사용할 수 있도록 토크나이저의 `sep_token` 프로퍼티에 접근하는 방식으로 코드를 작성합니다."]},{"cell_type":"code","execution_count":null,"id":"UoXTmep0Dcwg","metadata":{"id":"UoXTmep0Dcwg"},"outputs":[],"source":["tokenizer = AutoTokenizer.from_pretrained(\"Huffon/klue-roberta-base-nli\")"]},{"cell_type":"code","execution_count":null,"id":"MuOQhiVPDiMq","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":35},"id":"MuOQhiVPDiMq","outputId":"6c7f4d51-ceb9-4650-e5d6-19d4f6b604ac"},"outputs":[{"data":{"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"},"text/plain":["'[SEP]'"]},"execution_count":87,"metadata":{"tags":[]},"output_type":"execute_result"}],"source":["tokenizer.sep_token"]},{"cell_type":"markdown","id":"iCP9OgWHFDLG","metadata":{"id":"iCP9OgWHFDLG"},"source":["`sep_token`으로 두 문장을 이어 하나의 입력 값으로 파이프라인에 넘겨줍니다.\n","\n","입력된 문장에 대해 모델이 각 라벨에 대해 어떤 확률을 가지고 예측했는지를 확인할 수 있습니다."]},{"cell_type":"code","execution_count":null,"id":"tVCGIVQDChcQ","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"tVCGIVQDChcQ","outputId":"f2703b6f-90c0-4107-cd6b-9f2e265713cc"},"outputs":[{"data":{"text/plain":["[[{'label': 'ENTAILMENT', 'score': 0.9865273833274841},\n"," {'label': 'NEUTRAL', 'score': 0.013215206563472748},\n"," {'label': 'CONTRADICTION', 'score': 0.0002573762903921306}]]"]},"execution_count":105,"metadata":{"tags":[]},"output_type":"execute_result"}],"source":["classifier(f\"흡연하려면 발코니 있는 방을 선택하면 됩니다. {tokenizer.sep_token} 흡연자분들은 발코니가 있는 방이면 발코니에서 흡연이 가능합니다.\")"]},{"cell_type":"code","execution_count":null,"id":"Ud2kuxlNCmGI","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"Ud2kuxlNCmGI","outputId":"7d53c878-9fb1-4e05-da40-ab06df811a1f"},"outputs":[{"data":{"text/plain":["[[{'label': 'ENTAILMENT', 'score': 0.0002685467479750514},\n"," {'label': 'NEUTRAL', 'score': 0.0006742384284734726},\n"," {'label': 'CONTRADICTION', 'score': 0.9990572333335876}]]"]},"execution_count":106,"metadata":{"tags":[]},"output_type":"execute_result"}],"source":["classifier(f\"호스트분은 영어밖에 못하십니다. {tokenizer.sep_token} 호스트분도 엄청 친절하시고 영어도 잘하십니다.\")"]},{"cell_type":"markdown","id":"Uvx8PPTsrPyC","metadata":{"id":"Uvx8PPTsrPyC"},"source":["검증 데이터에 존재하는 임의의 문장 페어를 입력해보니, 우리가 원하던 결과를 얻을 수 있었습니다.\n","\n","*(cf. NLI 데이터에 대해 학습된 모델을 활용해 Zero-shot Classification을 수행하는 예제가 궁금하신 분들은 해당 [노트북](https://colab.research.google.com/github/Huffon/klue-transformers-tutorial/blob/master/zero_shot_classification.ipynb)을 참조해주세요.)*"]}],"metadata":{"colab":{"provenance":[],"machine_shape":"hm","gpuType":"A100"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.7.9"},"widgets":{"application/vnd.jupyter.widget-state+json":{"466f255a18e44009b0ae885bf446fd53":{"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_d50d6c6cad264ba1bed5bf10ac3a16af","IPY_MODEL_e0495edd56ce4cbdb0bd5734db875658","IPY_MODEL_d90a70724ee4484ca95f4cd31e4f7ed6"],"layout":"IPY_MODEL_f285f14c66824bd9b11ce0bf197ec429"}},"d50d6c6cad264ba1bed5bf10ac3a16af":{"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_610bef5c566c48a5ac59006486fa6c70","placeholder":"​","style":"IPY_MODEL_53c5632b1d4041c98c7d810c57e57397","value":"100%"}},"e0495edd56ce4cbdb0bd5734db875658":{"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_0342e3f4a098470b8fbd0ed9856c411d","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_78e94cd7906744d6aefd03f22286107c","value":1}},"d90a70724ee4484ca95f4cd31e4f7ed6":{"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_9bff1ea26cd144ffb64b9982cc0797a5","placeholder":"​","style":"IPY_MODEL_0ebc1e2ce2cc408d997a603a863e0234","value":" 1/1 [00:00<00:00, 47.63it/s]"}},"f285f14c66824bd9b11ce0bf197ec429":{"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}},"610bef5c566c48a5ac59006486fa6c70":{"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}},"53c5632b1d4041c98c7d810c57e57397":{"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":""}},"0342e3f4a098470b8fbd0ed9856c411d":{"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}},"78e94cd7906744d6aefd03f22286107c":{"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":""}},"9bff1ea26cd144ffb64b9982cc0797a5":{"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}},"0ebc1e2ce2cc408d997a603a863e0234":{"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":""}},"f4ecbbcdfed74b03b6cd744858ef79a6":{"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_dbd3b9a00f504f40b5caad6d94620a6a","IPY_MODEL_747f15a8b4ae45238bc14a2c050020f0","IPY_MODEL_7effa5c9e4864e9a8476de204fd343cd"],"layout":"IPY_MODEL_f455226fa15044ae89f61b5a2d5d459d"}},"dbd3b9a00f504f40b5caad6d94620a6a":{"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_5a1036e4be2b4a14851e242f52ce505d","placeholder":"​","style":"IPY_MODEL_bb7995eda272473fb0fc3c4321be38ba","value":"100%"}},"747f15a8b4ae45238bc14a2c050020f0":{"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_6782d749764d4f36bad3ad75d5d0e213","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_125b2a24665242309babb4e529c19c1f","value":1}},"7effa5c9e4864e9a8476de204fd343cd":{"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_c280153ea7464a9493de90fce672cbcf","placeholder":"​","style":"IPY_MODEL_42b937af8f1e4e62b8928acdc429bfd8","value":" 1/1 [00:00<00:00, 44.47it/s]"}},"f455226fa15044ae89f61b5a2d5d459d":{"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}},"5a1036e4be2b4a14851e242f52ce505d":{"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}},"bb7995eda272473fb0fc3c4321be38ba":{"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":""}},"6782d749764d4f36bad3ad75d5d0e213":{"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}},"125b2a24665242309babb4e529c19c1f":{"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":""}},"c280153ea7464a9493de90fce672cbcf":{"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}},"42b937af8f1e4e62b8928acdc429bfd8":{"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":""}},"07a7715f1d274ee7bf941c9931d1e05f":{"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_a003451748ab4b95b8309bc6d8904d07","IPY_MODEL_c8e69b089ff64d0a9fc0f5d79badfa14","IPY_MODEL_8a89a9faa4db4bb88a1f5f36a0b6580c"],"layout":"IPY_MODEL_a1e33c3128134a76a5ecfe07e468d2fa"}},"a003451748ab4b95b8309bc6d8904d07":{"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_02e0266a0b7b4f5b80a495dd8a4e71ad","placeholder":"​","style":"IPY_MODEL_5c379b3f55444b4abef930a3f71c686e","value":"100%"}},"c8e69b089ff64d0a9fc0f5d79badfa14":{"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_ef44168afa25491599adc6aed2960ad7","max":2,"min":0,"orientation":"horizontal","style":"IPY_MODEL_a7c66e93824a4768a0540b39ca118b57","value":2}},"8a89a9faa4db4bb88a1f5f36a0b6580c":{"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_160202d9302c4f0aa36c78b870e49fb6","placeholder":"​","style":"IPY_MODEL_0a92564fb1484de6a54b8375a71c3661","value":" 2/2 [00:00<00:00, 135.62it/s]"}},"a1e33c3128134a76a5ecfe07e468d2fa":{"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}},"02e0266a0b7b4f5b80a495dd8a4e71ad":{"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}},"5c379b3f55444b4abef930a3f71c686e":{"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":""}},"ef44168afa25491599adc6aed2960ad7":{"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}},"a7c66e93824a4768a0540b39ca118b57":{"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":""}},"160202d9302c4f0aa36c78b870e49fb6":{"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}},"0a92564fb1484de6a54b8375a71c3661":{"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":""}},"962f83b5ac064e33b15231f0b2eca229":{"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_ac8f897302ba4dad9540c00c3e740566","IPY_MODEL_63fefb6361164e4d80f175a5e1a4b836","IPY_MODEL_5b429d358fb4420a942752ae8adb6612"],"layout":"IPY_MODEL_4e2e73f22d2e4499903afa6e5911c1c1"}},"ac8f897302ba4dad9540c00c3e740566":{"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_dd6030bb06564da79bb6476f848bd17f","placeholder":"​","style":"IPY_MODEL_d5a3d1b38fa0403894fc9b42959061c8","value":"Map: 100%"}},"63fefb6361164e4d80f175a5e1a4b836":{"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_a250f80e767346ecae22d4f4ff8829de","max":360181,"min":0,"orientation":"horizontal","style":"IPY_MODEL_baf1738fddef4b41bbe440e9f5d8e677","value":360181}},"5b429d358fb4420a942752ae8adb6612":{"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_39b9b50d76444dacb5ac70fa115bb606","placeholder":"​","style":"IPY_MODEL_692358fb47bf411bbeb462db8e7c1444","value":" 360000/360181 [00:25<00:00, 13800.08 examples/s]"}},"4e2e73f22d2e4499903afa6e5911c1c1":{"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}},"dd6030bb06564da79bb6476f848bd17f":{"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}},"d5a3d1b38fa0403894fc9b42959061c8":{"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":""}},"a250f80e767346ecae22d4f4ff8829de":{"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}},"baf1738fddef4b41bbe440e9f5d8e677":{"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":""}},"39b9b50d76444dacb5ac70fa115bb606":{"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}},"692358fb47bf411bbeb462db8e7c1444":{"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":""}},"a2d6a2d9c9734a2a83dbcee315f05c20":{"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_4773ffb01b7845b3a9d79efd5e6f4f34","IPY_MODEL_74c49cab4e174f08abd7b724ab3fcea9","IPY_MODEL_e85f9c5c5a3d45b1af9efc36eed4fbf2"],"layout":"IPY_MODEL_34149c1ec2a24fae8b22c9159ca3ca0d"}},"4773ffb01b7845b3a9d79efd5e6f4f34":{"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_f79f28c8412a4bd08eb0a924ccf6df28","placeholder":"​","style":"IPY_MODEL_8a4b4d7f57dc4faabb70b560becf541c","value":"Map: 100%"}},"74c49cab4e174f08abd7b724ab3fcea9":{"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_b95dc2414cfc447c80f9927d05bf8654","max":40021,"min":0,"orientation":"horizontal","style":"IPY_MODEL_b5375adb1ec74c6b93df4d928ea96f9f","value":40021}},"e85f9c5c5a3d45b1af9efc36eed4fbf2":{"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_bee10b79a22d4eb081f988abf50329ac","placeholder":"​","style":"IPY_MODEL_0ce8cb88604b4be085279959fd89a3a1","value":" 40000/40021 [00:02<00:00, 15512.69 examples/s]"}},"34149c1ec2a24fae8b22c9159ca3ca0d":{"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}},"f79f28c8412a4bd08eb0a924ccf6df28":{"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}},"8a4b4d7f57dc4faabb70b560becf541c":{"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":""}},"b95dc2414cfc447c80f9927d05bf8654":{"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}},"b5375adb1ec74c6b93df4d928ea96f9f":{"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":""}},"bee10b79a22d4eb081f988abf50329ac":{"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}},"0ce8cb88604b4be085279959fd89a3a1":{"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":""}},"67ed315f5d8b4442bb245274d15fdc34":{"model_module":"@jupyter-widgets/controls","model_name":"VBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"VBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"VBoxView","box_style":"","children":["IPY_MODEL_2771d4fd0398428896c474790aed6728","IPY_MODEL_1cdba0dc698447fc98545136b1550070","IPY_MODEL_f455098f355d4b4293dbdee5d096d3b5","IPY_MODEL_4745ece55eb54be39839908434a9defc"],"layout":"IPY_MODEL_5e05a392f5ce42e69173a6e664f42ace"}},"3f4ad6f61c9a4aea935de88a01be95d4":{"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_78fe6afc5cf24fe3b6ccc6c2a13e8adb","placeholder":"​","style":"IPY_MODEL_9e7ecb5fc0ca4d5b8d3d88387ce8c651","value":"

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
"}},"58dad53747844d389b2c65c3b8e63131":{"model_module":"@jupyter-widgets/controls","model_name":"PasswordModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"PasswordModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"PasswordView","continuous_update":true,"description":"Token:","description_tooltip":null,"disabled":false,"layout":"IPY_MODEL_4db43a8501e346ffbdf62631e48626a4","placeholder":"​","style":"IPY_MODEL_c075b208c4a04e4f8cff425a8822f387","value":""}},"b8d3cc3e90ca4432966d6ff9a3a185ab":{"model_module":"@jupyter-widgets/controls","model_name":"CheckboxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"CheckboxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"CheckboxView","description":"Add token as git credential?","description_tooltip":null,"disabled":false,"indent":true,"layout":"IPY_MODEL_18b790ba561748a6b36b7b372acec93f","style":"IPY_MODEL_6cafd93e2ea74e60bbe6ce0c9574774b","value":true}},"47001cb3f6c84f35863d5158aed9c9e5":{"model_module":"@jupyter-widgets/controls","model_name":"ButtonModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ButtonModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ButtonView","button_style":"","description":"Login","disabled":false,"icon":"","layout":"IPY_MODEL_d4a3e2d58efb465e8cdfc1b476c5e824","style":"IPY_MODEL_4f824faf60a0424490e864369c92929f","tooltip":""}},"e3602b86556447d1ad282b6282e67630":{"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_9e40f85cbab5434b8f149570d6ad744e","placeholder":"​","style":"IPY_MODEL_d73fcbffa65747548d0ef1bef71f8f0c","value":"\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks.
"}},"5e05a392f5ce42e69173a6e664f42ace":{"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":"center","align_self":null,"border":null,"bottom":null,"display":"flex","flex":null,"flex_flow":"column","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":"50%"}},"78fe6afc5cf24fe3b6ccc6c2a13e8adb":{"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}},"9e7ecb5fc0ca4d5b8d3d88387ce8c651":{"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":""}},"4db43a8501e346ffbdf62631e48626a4":{"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}},"c075b208c4a04e4f8cff425a8822f387":{"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":""}},"18b790ba561748a6b36b7b372acec93f":{"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}},"6cafd93e2ea74e60bbe6ce0c9574774b":{"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":""}},"d4a3e2d58efb465e8cdfc1b476c5e824":{"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}},"4f824faf60a0424490e864369c92929f":{"model_module":"@jupyter-widgets/controls","model_name":"ButtonStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ButtonStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","button_color":null,"font_weight":""}},"9e40f85cbab5434b8f149570d6ad744e":{"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}},"d73fcbffa65747548d0ef1bef71f8f0c":{"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":""}},"f2f3e7452e324e25b81a208f28e85470":{"model_module":"@jupyter-widgets/controls","model_name":"LabelModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"LabelModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"LabelView","description":"","description_tooltip":null,"layout":"IPY_MODEL_4a3588ce965540109fcf92d2f45891ce","placeholder":"​","style":"IPY_MODEL_d71fbe414a5146f29edb5c6d190d8d1b","value":"Connecting..."}},"4a3588ce965540109fcf92d2f45891ce":{"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}},"d71fbe414a5146f29edb5c6d190d8d1b":{"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":""}},"2771d4fd0398428896c474790aed6728":{"model_module":"@jupyter-widgets/controls","model_name":"LabelModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"LabelModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"LabelView","description":"","description_tooltip":null,"layout":"IPY_MODEL_dee705891e5e46a7bd5842aee8df417e","placeholder":"​","style":"IPY_MODEL_bc951afd648146cbb3a6ab8d840c2afb","value":"Token is valid (permission: write)."}},"1cdba0dc698447fc98545136b1550070":{"model_module":"@jupyter-widgets/controls","model_name":"LabelModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"LabelModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"LabelView","description":"","description_tooltip":null,"layout":"IPY_MODEL_3dcc5114b3d142cba5b2a75fce44fb54","placeholder":"​","style":"IPY_MODEL_322c06ca624642788ba494603da29a69","value":"Your token has been saved in your configured git credential helpers (store)."}},"f455098f355d4b4293dbdee5d096d3b5":{"model_module":"@jupyter-widgets/controls","model_name":"LabelModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"LabelModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"LabelView","description":"","description_tooltip":null,"layout":"IPY_MODEL_17f384f492734e848d1fd1afc541f534","placeholder":"​","style":"IPY_MODEL_5aeb1186a45e48b697251f4eb696a018","value":"Your token has been saved to /root/.cache/huggingface/token"}},"4745ece55eb54be39839908434a9defc":{"model_module":"@jupyter-widgets/controls","model_name":"LabelModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"LabelModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"LabelView","description":"","description_tooltip":null,"layout":"IPY_MODEL_8765adbd4f584fe1829bc2d33df511f3","placeholder":"​","style":"IPY_MODEL_576bcb0f43e24e668437061fe1d02eec","value":"Login successful"}},"dee705891e5e46a7bd5842aee8df417e":{"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}},"bc951afd648146cbb3a6ab8d840c2afb":{"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":""}},"3dcc5114b3d142cba5b2a75fce44fb54":{"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}},"322c06ca624642788ba494603da29a69":{"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":""}},"17f384f492734e848d1fd1afc541f534":{"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}},"5aeb1186a45e48b697251f4eb696a018":{"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":""}},"8765adbd4f584fe1829bc2d33df511f3":{"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}},"576bcb0f43e24e668437061fe1d02eec":{"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":""}}}},"accelerator":"GPU"},"nbformat":4,"nbformat_minor":5}