├── README.md ├── LICENSE ├── .gitignore ├── training_a_small_language_model.py └── Training_a_Small_Language_Model.ipynb /README.md: -------------------------------------------------------------------------------- 1 | # Training-Small-Language-Model 2 | Training Small Language Model 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 AI Anytime 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | -------------------------------------------------------------------------------- /training_a_small_language_model.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Training a Small Language Model.ipynb 3 | 4 | Automatically generated by Colaboratory. 5 | 6 | Original file is located at 7 | https://colab.research.google.com/drive/176cjp0TmFiv8rT96OuI51psRKq0gERxh 8 | """ 9 | 10 | !pip install torch torchtext transformers sentencepiece pandas tqdm datasets 11 | 12 | from datasets import load_dataset, DatasetDict, Dataset 13 | import pandas as pd 14 | import ast 15 | import datasets 16 | from tqdm import tqdm 17 | import time 18 | 19 | # Load data set from huggingface 20 | data_sample = load_dataset("QuyenAnhDE/Diseases_Symptoms") 21 | 22 | data_sample 23 | 24 | # Convert to a pandas dataframe 25 | updated_data = [{'Name': item['Name'], 'Symptoms': item['Symptoms']} for item in data_sample['train']] 26 | df = pd.DataFrame(updated_data) 27 | 28 | df.head(5) 29 | 30 | # Just extract the Symptoms 31 | df['Symptoms'] = df['Symptoms'].apply(lambda x: ', '.join(x.split(', '))) 32 | display(df.head()) 33 | 34 | from transformers import GPT2Tokenizer, GPT2LMHeadModel 35 | import torch 36 | import torch.nn as nn 37 | import torch.optim as optim 38 | from torch.utils.data import Dataset, DataLoader, random_split 39 | 40 | # If you have an NVIDIA GPU attached, use 'cuda' 41 | if torch.cuda.is_available(): 42 | device = torch.device('cuda') 43 | else: 44 | # If Apple Silicon, set to 'mps' - otherwise 'cpu' (not advised) 45 | try: 46 | device = torch.device('mps') 47 | except Exception: 48 | device = torch.device('cpu') 49 | 50 | device 51 | 52 | # The tokenizer turns texts to numbers (and vice-versa) 53 | tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2') 54 | 55 | # The transformer 56 | model = GPT2LMHeadModel.from_pretrained('distilgpt2').to(device) 57 | 58 | model 59 | 60 | # Model params 61 | BATCH_SIZE = 8 62 | 63 | df.describe() 64 | 65 | # Dataset Prep 66 | class LanguageDataset(Dataset): 67 | """ 68 | An extension of the Dataset object to: 69 | - Make training loop cleaner 70 | - Make ingestion easier from pandas df's 71 | """ 72 | def __init__(self, df, tokenizer): 73 | self.labels = df.columns 74 | self.data = df.to_dict(orient='records') 75 | self.tokenizer = tokenizer 76 | x = self.fittest_max_length(df) # Fix here 77 | self.max_length = x 78 | 79 | def __len__(self): 80 | return len(self.data) 81 | 82 | def __getitem__(self, idx): 83 | x = self.data[idx][self.labels[0]] 84 | y = self.data[idx][self.labels[1]] 85 | text = f"{x} | {y}" 86 | tokens = self.tokenizer.encode_plus(text, return_tensors='pt', max_length=128, padding='max_length', truncation=True) 87 | return tokens 88 | 89 | def fittest_max_length(self, df): # Fix here 90 | """ 91 | Smallest power of two larger than the longest term in the data set. 92 | Important to set up max length to speed training time. 93 | """ 94 | max_length = max(len(max(df[self.labels[0]], key=len)), len(max(df[self.labels[1]], key=len))) 95 | x = 2 96 | while x < max_length: x = x * 2 97 | return x 98 | 99 | # Cast the Huggingface data set as a LanguageDataset we defined above 100 | data_sample = LanguageDataset(df, tokenizer) 101 | 102 | data_sample 103 | 104 | # Create train, valid 105 | train_size = int(0.8 * len(data_sample)) 106 | valid_size = len(data_sample) - train_size 107 | train_data, valid_data = random_split(data_sample, [train_size, valid_size]) 108 | 109 | # Make the iterators 110 | train_loader = DataLoader(train_data, batch_size=BATCH_SIZE, shuffle=True) 111 | valid_loader = DataLoader(valid_data, batch_size=BATCH_SIZE) 112 | 113 | # Set the number of epochs 114 | num_epochs = 10 115 | 116 | # Training parameters 117 | batch_size = BATCH_SIZE 118 | model_name = 'distilgpt2' 119 | gpu = 0 120 | 121 | # Set the learning rate and loss function 122 | ## CrossEntropyLoss measures how close answers to the truth. 123 | ## More punishing for high confidence wrong answers 124 | criterion = nn.CrossEntropyLoss(ignore_index = tokenizer.pad_token_id) 125 | optimizer = optim.Adam(model.parameters(), lr=5e-4) 126 | tokenizer.pad_token = tokenizer.eos_token 127 | 128 | # Init a results dataframe 129 | results = pd.DataFrame(columns=['epoch', 'transformer', 'batch_size', 'gpu', 130 | 'training_loss', 'validation_loss', 'epoch_duration_sec']) 131 | 132 | # The training loop 133 | for epoch in range(num_epochs): 134 | start_time = time.time() # Start the timer for the epoch 135 | 136 | # Training 137 | ## This line tells the model we're in 'learning mode' 138 | model.train() 139 | epoch_training_loss = 0 140 | train_iterator = tqdm(train_loader, desc=f"Training Epoch {epoch+1}/{num_epochs} Batch Size: {batch_size}, Transformer: {model_name}") 141 | for batch in train_iterator: 142 | optimizer.zero_grad() 143 | inputs = batch['input_ids'].squeeze(1).to(device) 144 | targets = inputs.clone() 145 | outputs = model(input_ids=inputs, labels=targets) 146 | loss = outputs.loss 147 | loss.backward() 148 | optimizer.step() 149 | train_iterator.set_postfix({'Training Loss': loss.item()}) 150 | epoch_training_loss += loss.item() 151 | avg_epoch_training_loss = epoch_training_loss / len(train_iterator) 152 | 153 | # Validation 154 | ## This line below tells the model to 'stop learning' 155 | model.eval() 156 | epoch_validation_loss = 0 157 | total_loss = 0 158 | valid_iterator = tqdm(valid_loader, desc=f"Validation Epoch {epoch+1}/{num_epochs}") 159 | with torch.no_grad(): 160 | for batch in valid_iterator: 161 | inputs = batch['input_ids'].squeeze(1).to(device) 162 | targets = inputs.clone() 163 | outputs = model(input_ids=inputs, labels=targets) 164 | loss = outputs.loss 165 | total_loss += loss 166 | valid_iterator.set_postfix({'Validation Loss': loss.item()}) 167 | epoch_validation_loss += loss.item() 168 | 169 | avg_epoch_validation_loss = epoch_validation_loss / len(valid_loader) 170 | 171 | end_time = time.time() # End the timer for the epoch 172 | epoch_duration_sec = end_time - start_time # Calculate the duration in seconds 173 | 174 | new_row = {'transformer': model_name, 175 | 'batch_size': batch_size, 176 | 'gpu': gpu, 177 | 'epoch': epoch+1, 178 | 'training_loss': avg_epoch_training_loss, 179 | 'validation_loss': avg_epoch_validation_loss, 180 | 'epoch_duration_sec': epoch_duration_sec} # Add epoch_duration to the dataframe 181 | 182 | results.loc[len(results)] = new_row 183 | print(f"Epoch: {epoch+1}, Validation Loss: {total_loss/len(valid_loader)}") 184 | 185 | input_str = "Kidney Failure" 186 | input_ids = tokenizer.encode(input_str, return_tensors='pt').to(device) 187 | 188 | output = model.generate( 189 | input_ids, 190 | max_length=20, 191 | num_return_sequences=1, 192 | do_sample=True, 193 | top_k=8, 194 | top_p=0.95, 195 | temperature=0.5, 196 | repetition_penalty=1.2 197 | ) 198 | 199 | decoded_output = tokenizer.decode(output[0], skip_special_tokens=True) 200 | print(decoded_output) 201 | 202 | torch.save(model, 'SmallMedLM.pt') 203 | 204 | torch.save(model, 'drive/My Drive/SmallMedLM.pt') 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /Training_a_Small_Language_Model.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "provenance": [], 7 | "machine_shape": "hm", 8 | "gpuType": "T4" 9 | }, 10 | "kernelspec": { 11 | "name": "python3", 12 | "display_name": "Python 3" 13 | }, 14 | "language_info": { 15 | "name": "python" 16 | }, 17 | "accelerator": "GPU", 18 | "widgets": { 19 | "application/vnd.jupyter.widget-state+json": { 20 | "909582d0b6014056b113ef9a0a1db740": { 21 | "model_module": "@jupyter-widgets/controls", 22 | "model_name": "HBoxModel", 23 | "model_module_version": "1.5.0", 24 | "state": { 25 | "_dom_classes": [], 26 | "_model_module": "@jupyter-widgets/controls", 27 | "_model_module_version": "1.5.0", 28 | "_model_name": "HBoxModel", 29 | "_view_count": null, 30 | "_view_module": "@jupyter-widgets/controls", 31 | "_view_module_version": "1.5.0", 32 | "_view_name": "HBoxView", 33 | "box_style": "", 34 | "children": [ 35 | "IPY_MODEL_6b08d4679ac6461cbe254fe3478091b6", 36 | "IPY_MODEL_9a2502aacbd6489da0f8b6fbadcf079b", 37 | "IPY_MODEL_f6ff0e6cd04047babe24708d21937576" 38 | ], 39 | "layout": "IPY_MODEL_36349f3e29664f0bbdda5c8f7651304e" 40 | } 41 | }, 42 | "6b08d4679ac6461cbe254fe3478091b6": { 43 | "model_module": "@jupyter-widgets/controls", 44 | "model_name": "HTMLModel", 45 | "model_module_version": "1.5.0", 46 | "state": { 47 | "_dom_classes": [], 48 | "_model_module": "@jupyter-widgets/controls", 49 | "_model_module_version": "1.5.0", 50 | "_model_name": "HTMLModel", 51 | "_view_count": null, 52 | "_view_module": "@jupyter-widgets/controls", 53 | "_view_module_version": "1.5.0", 54 | "_view_name": "HTMLView", 55 | "description": "", 56 | "description_tooltip": null, 57 | "layout": "IPY_MODEL_59945ccd1da44215b5eaa6226835968c", 58 | "placeholder": "​", 59 | "style": "IPY_MODEL_2aed084699344e14b687a38196f3a4dc", 60 | "value": "Downloading readme: 100%" 61 | } 62 | }, 63 | "9a2502aacbd6489da0f8b6fbadcf079b": { 64 | "model_module": "@jupyter-widgets/controls", 65 | "model_name": "FloatProgressModel", 66 | "model_module_version": "1.5.0", 67 | "state": { 68 | "_dom_classes": [], 69 | "_model_module": "@jupyter-widgets/controls", 70 | "_model_module_version": "1.5.0", 71 | "_model_name": "FloatProgressModel", 72 | "_view_count": null, 73 | "_view_module": "@jupyter-widgets/controls", 74 | "_view_module_version": "1.5.0", 75 | "_view_name": "ProgressView", 76 | "bar_style": "success", 77 | "description": "", 78 | "description_tooltip": null, 79 | "layout": "IPY_MODEL_97040354aa6047f4b2adfd7d0a255d0e", 80 | "max": 381, 81 | "min": 0, 82 | "orientation": "horizontal", 83 | "style": "IPY_MODEL_4167d18aa99240f09d20b78bb447f302", 84 | "value": 381 85 | } 86 | }, 87 | "f6ff0e6cd04047babe24708d21937576": { 88 | "model_module": "@jupyter-widgets/controls", 89 | "model_name": "HTMLModel", 90 | "model_module_version": "1.5.0", 91 | "state": { 92 | "_dom_classes": [], 93 | "_model_module": "@jupyter-widgets/controls", 94 | "_model_module_version": "1.5.0", 95 | "_model_name": "HTMLModel", 96 | "_view_count": null, 97 | "_view_module": "@jupyter-widgets/controls", 98 | "_view_module_version": "1.5.0", 99 | "_view_name": "HTMLView", 100 | "description": "", 101 | "description_tooltip": null, 102 | "layout": "IPY_MODEL_7b8c3ec2b0d7466c89881890686152f3", 103 | "placeholder": "​", 104 | "style": "IPY_MODEL_a86181d8ced94aa49b4664f692937ca8", 105 | "value": " 381/381 [00:00<00:00, 4.86kB/s]" 106 | } 107 | }, 108 | "36349f3e29664f0bbdda5c8f7651304e": { 109 | "model_module": "@jupyter-widgets/base", 110 | "model_name": "LayoutModel", 111 | "model_module_version": "1.2.0", 112 | "state": { 113 | "_model_module": "@jupyter-widgets/base", 114 | "_model_module_version": "1.2.0", 115 | "_model_name": "LayoutModel", 116 | "_view_count": null, 117 | "_view_module": "@jupyter-widgets/base", 118 | "_view_module_version": "1.2.0", 119 | "_view_name": "LayoutView", 120 | "align_content": null, 121 | "align_items": null, 122 | "align_self": null, 123 | "border": null, 124 | "bottom": null, 125 | "display": null, 126 | "flex": null, 127 | "flex_flow": null, 128 | "grid_area": null, 129 | "grid_auto_columns": null, 130 | "grid_auto_flow": null, 131 | "grid_auto_rows": null, 132 | "grid_column": null, 133 | "grid_gap": null, 134 | "grid_row": null, 135 | "grid_template_areas": null, 136 | "grid_template_columns": null, 137 | "grid_template_rows": null, 138 | "height": null, 139 | "justify_content": null, 140 | "justify_items": null, 141 | "left": null, 142 | "margin": null, 143 | "max_height": null, 144 | "max_width": null, 145 | "min_height": null, 146 | "min_width": null, 147 | "object_fit": null, 148 | "object_position": null, 149 | "order": null, 150 | "overflow": null, 151 | "overflow_x": null, 152 | "overflow_y": null, 153 | "padding": null, 154 | "right": null, 155 | "top": null, 156 | "visibility": null, 157 | "width": null 158 | } 159 | }, 160 | "59945ccd1da44215b5eaa6226835968c": { 161 | "model_module": "@jupyter-widgets/base", 162 | "model_name": "LayoutModel", 163 | "model_module_version": "1.2.0", 164 | "state": { 165 | "_model_module": "@jupyter-widgets/base", 166 | "_model_module_version": "1.2.0", 167 | "_model_name": "LayoutModel", 168 | "_view_count": null, 169 | "_view_module": "@jupyter-widgets/base", 170 | "_view_module_version": "1.2.0", 171 | "_view_name": "LayoutView", 172 | "align_content": null, 173 | "align_items": null, 174 | "align_self": null, 175 | "border": null, 176 | "bottom": null, 177 | "display": null, 178 | "flex": null, 179 | "flex_flow": null, 180 | "grid_area": null, 181 | "grid_auto_columns": null, 182 | "grid_auto_flow": null, 183 | "grid_auto_rows": null, 184 | "grid_column": null, 185 | "grid_gap": null, 186 | "grid_row": null, 187 | "grid_template_areas": null, 188 | "grid_template_columns": null, 189 | "grid_template_rows": null, 190 | "height": null, 191 | "justify_content": null, 192 | "justify_items": null, 193 | "left": null, 194 | "margin": null, 195 | "max_height": null, 196 | "max_width": null, 197 | "min_height": null, 198 | "min_width": null, 199 | "object_fit": null, 200 | "object_position": null, 201 | "order": null, 202 | "overflow": null, 203 | "overflow_x": null, 204 | "overflow_y": null, 205 | "padding": null, 206 | "right": null, 207 | "top": null, 208 | "visibility": null, 209 | "width": null 210 | } 211 | }, 212 | "2aed084699344e14b687a38196f3a4dc": { 213 | "model_module": "@jupyter-widgets/controls", 214 | "model_name": "DescriptionStyleModel", 215 | "model_module_version": "1.5.0", 216 | "state": { 217 | "_model_module": "@jupyter-widgets/controls", 218 | "_model_module_version": "1.5.0", 219 | "_model_name": "DescriptionStyleModel", 220 | "_view_count": null, 221 | "_view_module": "@jupyter-widgets/base", 222 | "_view_module_version": "1.2.0", 223 | "_view_name": "StyleView", 224 | "description_width": "" 225 | } 226 | }, 227 | "97040354aa6047f4b2adfd7d0a255d0e": { 228 | "model_module": "@jupyter-widgets/base", 229 | "model_name": "LayoutModel", 230 | "model_module_version": "1.2.0", 231 | "state": { 232 | "_model_module": "@jupyter-widgets/base", 233 | "_model_module_version": "1.2.0", 234 | "_model_name": "LayoutModel", 235 | "_view_count": null, 236 | "_view_module": "@jupyter-widgets/base", 237 | "_view_module_version": "1.2.0", 238 | "_view_name": "LayoutView", 239 | "align_content": null, 240 | "align_items": null, 241 | "align_self": null, 242 | "border": null, 243 | "bottom": null, 244 | "display": null, 245 | "flex": null, 246 | "flex_flow": null, 247 | "grid_area": null, 248 | "grid_auto_columns": null, 249 | "grid_auto_flow": null, 250 | "grid_auto_rows": null, 251 | "grid_column": null, 252 | "grid_gap": null, 253 | "grid_row": null, 254 | "grid_template_areas": null, 255 | "grid_template_columns": null, 256 | "grid_template_rows": null, 257 | "height": null, 258 | "justify_content": null, 259 | "justify_items": null, 260 | "left": null, 261 | "margin": null, 262 | "max_height": null, 263 | "max_width": null, 264 | "min_height": null, 265 | "min_width": null, 266 | "object_fit": null, 267 | "object_position": null, 268 | "order": null, 269 | "overflow": null, 270 | "overflow_x": null, 271 | "overflow_y": null, 272 | "padding": null, 273 | "right": null, 274 | "top": null, 275 | "visibility": null, 276 | "width": null 277 | } 278 | }, 279 | "4167d18aa99240f09d20b78bb447f302": { 280 | "model_module": "@jupyter-widgets/controls", 281 | "model_name": "ProgressStyleModel", 282 | "model_module_version": "1.5.0", 283 | "state": { 284 | "_model_module": "@jupyter-widgets/controls", 285 | "_model_module_version": "1.5.0", 286 | "_model_name": "ProgressStyleModel", 287 | "_view_count": null, 288 | "_view_module": "@jupyter-widgets/base", 289 | "_view_module_version": "1.2.0", 290 | "_view_name": "StyleView", 291 | "bar_color": null, 292 | "description_width": "" 293 | } 294 | }, 295 | "7b8c3ec2b0d7466c89881890686152f3": { 296 | "model_module": "@jupyter-widgets/base", 297 | "model_name": "LayoutModel", 298 | "model_module_version": "1.2.0", 299 | "state": { 300 | "_model_module": "@jupyter-widgets/base", 301 | "_model_module_version": "1.2.0", 302 | "_model_name": "LayoutModel", 303 | "_view_count": null, 304 | "_view_module": "@jupyter-widgets/base", 305 | "_view_module_version": "1.2.0", 306 | "_view_name": "LayoutView", 307 | "align_content": null, 308 | "align_items": null, 309 | "align_self": null, 310 | "border": null, 311 | "bottom": null, 312 | "display": null, 313 | "flex": null, 314 | "flex_flow": null, 315 | "grid_area": null, 316 | "grid_auto_columns": null, 317 | "grid_auto_flow": null, 318 | "grid_auto_rows": null, 319 | "grid_column": null, 320 | "grid_gap": null, 321 | "grid_row": null, 322 | "grid_template_areas": null, 323 | "grid_template_columns": null, 324 | "grid_template_rows": null, 325 | "height": null, 326 | "justify_content": null, 327 | "justify_items": null, 328 | "left": null, 329 | "margin": null, 330 | "max_height": null, 331 | "max_width": null, 332 | "min_height": null, 333 | "min_width": null, 334 | "object_fit": null, 335 | "object_position": null, 336 | "order": null, 337 | "overflow": null, 338 | "overflow_x": null, 339 | "overflow_y": null, 340 | "padding": null, 341 | "right": null, 342 | "top": null, 343 | "visibility": null, 344 | "width": null 345 | } 346 | }, 347 | "a86181d8ced94aa49b4664f692937ca8": { 348 | "model_module": "@jupyter-widgets/controls", 349 | "model_name": "DescriptionStyleModel", 350 | "model_module_version": "1.5.0", 351 | "state": { 352 | "_model_module": "@jupyter-widgets/controls", 353 | "_model_module_version": "1.5.0", 354 | "_model_name": "DescriptionStyleModel", 355 | "_view_count": null, 356 | "_view_module": "@jupyter-widgets/base", 357 | "_view_module_version": "1.2.0", 358 | "_view_name": "StyleView", 359 | "description_width": "" 360 | } 361 | }, 362 | "d11ae8b4126d42a8a72dd70b3d093185": { 363 | "model_module": "@jupyter-widgets/controls", 364 | "model_name": "HBoxModel", 365 | "model_module_version": "1.5.0", 366 | "state": { 367 | "_dom_classes": [], 368 | "_model_module": "@jupyter-widgets/controls", 369 | "_model_module_version": "1.5.0", 370 | "_model_name": "HBoxModel", 371 | "_view_count": null, 372 | "_view_module": "@jupyter-widgets/controls", 373 | "_view_module_version": "1.5.0", 374 | "_view_name": "HBoxView", 375 | "box_style": "", 376 | "children": [ 377 | "IPY_MODEL_6319e0859d1547f8a586c2409c263519", 378 | "IPY_MODEL_2ce9e1635d34488eb5deee6f1eab48fc", 379 | "IPY_MODEL_44af7e9762b647beae7100e10b0f188f" 380 | ], 381 | "layout": "IPY_MODEL_01062415cb564e54906fa8ad9ff4031b" 382 | } 383 | }, 384 | "6319e0859d1547f8a586c2409c263519": { 385 | "model_module": "@jupyter-widgets/controls", 386 | "model_name": "HTMLModel", 387 | "model_module_version": "1.5.0", 388 | "state": { 389 | "_dom_classes": [], 390 | "_model_module": "@jupyter-widgets/controls", 391 | "_model_module_version": "1.5.0", 392 | "_model_name": "HTMLModel", 393 | "_view_count": null, 394 | "_view_module": "@jupyter-widgets/controls", 395 | "_view_module_version": "1.5.0", 396 | "_view_name": "HTMLView", 397 | "description": "", 398 | "description_tooltip": null, 399 | "layout": "IPY_MODEL_3be9d4577dec410cad57443e239347ce", 400 | "placeholder": "​", 401 | "style": "IPY_MODEL_9f0b34c9152840ac8f1e853420964173", 402 | "value": "Downloading data: 100%" 403 | } 404 | }, 405 | "2ce9e1635d34488eb5deee6f1eab48fc": { 406 | "model_module": "@jupyter-widgets/controls", 407 | "model_name": "FloatProgressModel", 408 | "model_module_version": "1.5.0", 409 | "state": { 410 | "_dom_classes": [], 411 | "_model_module": "@jupyter-widgets/controls", 412 | "_model_module_version": "1.5.0", 413 | "_model_name": "FloatProgressModel", 414 | "_view_count": null, 415 | "_view_module": "@jupyter-widgets/controls", 416 | "_view_module_version": "1.5.0", 417 | "_view_name": "ProgressView", 418 | "bar_style": "success", 419 | "description": "", 420 | "description_tooltip": null, 421 | "layout": "IPY_MODEL_8894905d0d0f4e4a995e8be50b214f39", 422 | "max": 106553, 423 | "min": 0, 424 | "orientation": "horizontal", 425 | "style": "IPY_MODEL_c3b8c945c14e4adeb5031c68fe377ad6", 426 | "value": 106553 427 | } 428 | }, 429 | "44af7e9762b647beae7100e10b0f188f": { 430 | "model_module": "@jupyter-widgets/controls", 431 | "model_name": "HTMLModel", 432 | "model_module_version": "1.5.0", 433 | "state": { 434 | "_dom_classes": [], 435 | "_model_module": "@jupyter-widgets/controls", 436 | "_model_module_version": "1.5.0", 437 | "_model_name": "HTMLModel", 438 | "_view_count": null, 439 | "_view_module": "@jupyter-widgets/controls", 440 | "_view_module_version": "1.5.0", 441 | "_view_name": "HTMLView", 442 | "description": "", 443 | "description_tooltip": null, 444 | "layout": "IPY_MODEL_8782c620fea449fd92ea1f8f7ef3c6ed", 445 | "placeholder": "​", 446 | "style": "IPY_MODEL_c04efab8b28346ea92e64a1599f1ee17", 447 | "value": " 107k/107k [00:00<00:00, 379kB/s]" 448 | } 449 | }, 450 | "01062415cb564e54906fa8ad9ff4031b": { 451 | "model_module": "@jupyter-widgets/base", 452 | "model_name": "LayoutModel", 453 | "model_module_version": "1.2.0", 454 | "state": { 455 | "_model_module": "@jupyter-widgets/base", 456 | "_model_module_version": "1.2.0", 457 | "_model_name": "LayoutModel", 458 | "_view_count": null, 459 | "_view_module": "@jupyter-widgets/base", 460 | "_view_module_version": "1.2.0", 461 | "_view_name": "LayoutView", 462 | "align_content": null, 463 | "align_items": null, 464 | "align_self": null, 465 | "border": null, 466 | "bottom": null, 467 | "display": null, 468 | "flex": null, 469 | "flex_flow": null, 470 | "grid_area": null, 471 | "grid_auto_columns": null, 472 | "grid_auto_flow": null, 473 | "grid_auto_rows": null, 474 | "grid_column": null, 475 | "grid_gap": null, 476 | "grid_row": null, 477 | "grid_template_areas": null, 478 | "grid_template_columns": null, 479 | "grid_template_rows": null, 480 | "height": null, 481 | "justify_content": null, 482 | "justify_items": null, 483 | "left": null, 484 | "margin": null, 485 | "max_height": null, 486 | "max_width": null, 487 | "min_height": null, 488 | "min_width": null, 489 | "object_fit": null, 490 | "object_position": null, 491 | "order": null, 492 | "overflow": null, 493 | "overflow_x": null, 494 | "overflow_y": null, 495 | "padding": null, 496 | "right": null, 497 | "top": null, 498 | "visibility": null, 499 | "width": null 500 | } 501 | }, 502 | "3be9d4577dec410cad57443e239347ce": { 503 | "model_module": "@jupyter-widgets/base", 504 | "model_name": "LayoutModel", 505 | "model_module_version": "1.2.0", 506 | "state": { 507 | "_model_module": "@jupyter-widgets/base", 508 | "_model_module_version": "1.2.0", 509 | "_model_name": "LayoutModel", 510 | "_view_count": null, 511 | "_view_module": "@jupyter-widgets/base", 512 | "_view_module_version": "1.2.0", 513 | "_view_name": "LayoutView", 514 | "align_content": null, 515 | "align_items": null, 516 | "align_self": null, 517 | "border": null, 518 | "bottom": null, 519 | "display": null, 520 | "flex": null, 521 | "flex_flow": null, 522 | "grid_area": null, 523 | "grid_auto_columns": null, 524 | "grid_auto_flow": null, 525 | "grid_auto_rows": null, 526 | "grid_column": null, 527 | "grid_gap": null, 528 | "grid_row": null, 529 | "grid_template_areas": null, 530 | "grid_template_columns": null, 531 | "grid_template_rows": null, 532 | "height": null, 533 | "justify_content": null, 534 | "justify_items": null, 535 | "left": null, 536 | "margin": null, 537 | "max_height": null, 538 | "max_width": null, 539 | "min_height": null, 540 | "min_width": null, 541 | "object_fit": null, 542 | "object_position": null, 543 | "order": null, 544 | "overflow": null, 545 | "overflow_x": null, 546 | "overflow_y": null, 547 | "padding": null, 548 | "right": null, 549 | "top": null, 550 | "visibility": null, 551 | "width": null 552 | } 553 | }, 554 | "9f0b34c9152840ac8f1e853420964173": { 555 | "model_module": "@jupyter-widgets/controls", 556 | "model_name": "DescriptionStyleModel", 557 | "model_module_version": "1.5.0", 558 | "state": { 559 | "_model_module": "@jupyter-widgets/controls", 560 | "_model_module_version": "1.5.0", 561 | "_model_name": "DescriptionStyleModel", 562 | "_view_count": null, 563 | "_view_module": "@jupyter-widgets/base", 564 | "_view_module_version": "1.2.0", 565 | "_view_name": "StyleView", 566 | "description_width": "" 567 | } 568 | }, 569 | "8894905d0d0f4e4a995e8be50b214f39": { 570 | "model_module": "@jupyter-widgets/base", 571 | "model_name": "LayoutModel", 572 | "model_module_version": "1.2.0", 573 | "state": { 574 | "_model_module": "@jupyter-widgets/base", 575 | "_model_module_version": "1.2.0", 576 | "_model_name": "LayoutModel", 577 | "_view_count": null, 578 | "_view_module": "@jupyter-widgets/base", 579 | "_view_module_version": "1.2.0", 580 | "_view_name": "LayoutView", 581 | "align_content": null, 582 | "align_items": null, 583 | "align_self": null, 584 | "border": null, 585 | "bottom": null, 586 | "display": null, 587 | "flex": null, 588 | "flex_flow": null, 589 | "grid_area": null, 590 | "grid_auto_columns": null, 591 | "grid_auto_flow": null, 592 | "grid_auto_rows": null, 593 | "grid_column": null, 594 | "grid_gap": null, 595 | "grid_row": null, 596 | "grid_template_areas": null, 597 | "grid_template_columns": null, 598 | "grid_template_rows": null, 599 | "height": null, 600 | "justify_content": null, 601 | "justify_items": null, 602 | "left": null, 603 | "margin": null, 604 | "max_height": null, 605 | "max_width": null, 606 | "min_height": null, 607 | "min_width": null, 608 | "object_fit": null, 609 | "object_position": null, 610 | "order": null, 611 | "overflow": null, 612 | "overflow_x": null, 613 | "overflow_y": null, 614 | "padding": null, 615 | "right": null, 616 | "top": null, 617 | "visibility": null, 618 | "width": null 619 | } 620 | }, 621 | "c3b8c945c14e4adeb5031c68fe377ad6": { 622 | "model_module": "@jupyter-widgets/controls", 623 | "model_name": "ProgressStyleModel", 624 | "model_module_version": "1.5.0", 625 | "state": { 626 | "_model_module": "@jupyter-widgets/controls", 627 | "_model_module_version": "1.5.0", 628 | "_model_name": "ProgressStyleModel", 629 | "_view_count": null, 630 | "_view_module": "@jupyter-widgets/base", 631 | "_view_module_version": "1.2.0", 632 | "_view_name": "StyleView", 633 | "bar_color": null, 634 | "description_width": "" 635 | } 636 | }, 637 | "8782c620fea449fd92ea1f8f7ef3c6ed": { 638 | "model_module": "@jupyter-widgets/base", 639 | "model_name": "LayoutModel", 640 | "model_module_version": "1.2.0", 641 | "state": { 642 | "_model_module": "@jupyter-widgets/base", 643 | "_model_module_version": "1.2.0", 644 | "_model_name": "LayoutModel", 645 | "_view_count": null, 646 | "_view_module": "@jupyter-widgets/base", 647 | "_view_module_version": "1.2.0", 648 | "_view_name": "LayoutView", 649 | "align_content": null, 650 | "align_items": null, 651 | "align_self": null, 652 | "border": null, 653 | "bottom": null, 654 | "display": null, 655 | "flex": null, 656 | "flex_flow": null, 657 | "grid_area": null, 658 | "grid_auto_columns": null, 659 | "grid_auto_flow": null, 660 | "grid_auto_rows": null, 661 | "grid_column": null, 662 | "grid_gap": null, 663 | "grid_row": null, 664 | "grid_template_areas": null, 665 | "grid_template_columns": null, 666 | "grid_template_rows": null, 667 | "height": null, 668 | "justify_content": null, 669 | "justify_items": null, 670 | "left": null, 671 | "margin": null, 672 | "max_height": null, 673 | "max_width": null, 674 | "min_height": null, 675 | "min_width": null, 676 | "object_fit": null, 677 | "object_position": null, 678 | "order": null, 679 | "overflow": null, 680 | "overflow_x": null, 681 | "overflow_y": null, 682 | "padding": null, 683 | "right": null, 684 | "top": null, 685 | "visibility": null, 686 | "width": null 687 | } 688 | }, 689 | "c04efab8b28346ea92e64a1599f1ee17": { 690 | "model_module": "@jupyter-widgets/controls", 691 | "model_name": "DescriptionStyleModel", 692 | "model_module_version": "1.5.0", 693 | "state": { 694 | "_model_module": "@jupyter-widgets/controls", 695 | "_model_module_version": "1.5.0", 696 | "_model_name": "DescriptionStyleModel", 697 | "_view_count": null, 698 | "_view_module": "@jupyter-widgets/base", 699 | "_view_module_version": "1.2.0", 700 | "_view_name": "StyleView", 701 | "description_width": "" 702 | } 703 | }, 704 | "bd60373a16d647d9834a62c2624c9fc2": { 705 | "model_module": "@jupyter-widgets/controls", 706 | "model_name": "HBoxModel", 707 | "model_module_version": "1.5.0", 708 | "state": { 709 | "_dom_classes": [], 710 | "_model_module": "@jupyter-widgets/controls", 711 | "_model_module_version": "1.5.0", 712 | "_model_name": "HBoxModel", 713 | "_view_count": null, 714 | "_view_module": "@jupyter-widgets/controls", 715 | "_view_module_version": "1.5.0", 716 | "_view_name": "HBoxView", 717 | "box_style": "", 718 | "children": [ 719 | "IPY_MODEL_8e3fb5977e1c4ccab1181cf41959c132", 720 | "IPY_MODEL_d35466c751474dd688fe7073aec0a71f", 721 | "IPY_MODEL_82e084627ec14d57bf502decdc393b38" 722 | ], 723 | "layout": "IPY_MODEL_df0d6cc9ad9b4597802c6e98614a7f95" 724 | } 725 | }, 726 | "8e3fb5977e1c4ccab1181cf41959c132": { 727 | "model_module": "@jupyter-widgets/controls", 728 | "model_name": "HTMLModel", 729 | "model_module_version": "1.5.0", 730 | "state": { 731 | "_dom_classes": [], 732 | "_model_module": "@jupyter-widgets/controls", 733 | "_model_module_version": "1.5.0", 734 | "_model_name": "HTMLModel", 735 | "_view_count": null, 736 | "_view_module": "@jupyter-widgets/controls", 737 | "_view_module_version": "1.5.0", 738 | "_view_name": "HTMLView", 739 | "description": "", 740 | "description_tooltip": null, 741 | "layout": "IPY_MODEL_ef7a60fd80fe4ba8a8224b79f9659644", 742 | "placeholder": "​", 743 | "style": "IPY_MODEL_7e912d3befc4448ea114e1fa3aa93119", 744 | "value": "Generating train split: " 745 | } 746 | }, 747 | "d35466c751474dd688fe7073aec0a71f": { 748 | "model_module": "@jupyter-widgets/controls", 749 | "model_name": "FloatProgressModel", 750 | "model_module_version": "1.5.0", 751 | "state": { 752 | "_dom_classes": [], 753 | "_model_module": "@jupyter-widgets/controls", 754 | "_model_module_version": "1.5.0", 755 | "_model_name": "FloatProgressModel", 756 | "_view_count": null, 757 | "_view_module": "@jupyter-widgets/controls", 758 | "_view_module_version": "1.5.0", 759 | "_view_name": "ProgressView", 760 | "bar_style": "success", 761 | "description": "", 762 | "description_tooltip": null, 763 | "layout": "IPY_MODEL_ba7aaec1107b40248eb6b76fb09f1fc9", 764 | "max": 1, 765 | "min": 0, 766 | "orientation": "horizontal", 767 | "style": "IPY_MODEL_393fcf7561da4434b07ac6022ee95eeb", 768 | "value": 1 769 | } 770 | }, 771 | "82e084627ec14d57bf502decdc393b38": { 772 | "model_module": "@jupyter-widgets/controls", 773 | "model_name": "HTMLModel", 774 | "model_module_version": "1.5.0", 775 | "state": { 776 | "_dom_classes": [], 777 | "_model_module": "@jupyter-widgets/controls", 778 | "_model_module_version": "1.5.0", 779 | "_model_name": "HTMLModel", 780 | "_view_count": null, 781 | "_view_module": "@jupyter-widgets/controls", 782 | "_view_module_version": "1.5.0", 783 | "_view_name": "HTMLView", 784 | "description": "", 785 | "description_tooltip": null, 786 | "layout": "IPY_MODEL_8cc2390d790f46ce880f81da99c3b243", 787 | "placeholder": "​", 788 | "style": "IPY_MODEL_cb65ea1de35d439dbb0664329db64b25", 789 | "value": " 400/0 [00:00<00:00, 7601.75 examples/s]" 790 | } 791 | }, 792 | "df0d6cc9ad9b4597802c6e98614a7f95": { 793 | "model_module": "@jupyter-widgets/base", 794 | "model_name": "LayoutModel", 795 | "model_module_version": "1.2.0", 796 | "state": { 797 | "_model_module": "@jupyter-widgets/base", 798 | "_model_module_version": "1.2.0", 799 | "_model_name": "LayoutModel", 800 | "_view_count": null, 801 | "_view_module": "@jupyter-widgets/base", 802 | "_view_module_version": "1.2.0", 803 | "_view_name": "LayoutView", 804 | "align_content": null, 805 | "align_items": null, 806 | "align_self": null, 807 | "border": null, 808 | "bottom": null, 809 | "display": null, 810 | "flex": null, 811 | "flex_flow": null, 812 | "grid_area": null, 813 | "grid_auto_columns": null, 814 | "grid_auto_flow": null, 815 | "grid_auto_rows": null, 816 | "grid_column": null, 817 | "grid_gap": null, 818 | "grid_row": null, 819 | "grid_template_areas": null, 820 | "grid_template_columns": null, 821 | "grid_template_rows": null, 822 | "height": null, 823 | "justify_content": null, 824 | "justify_items": null, 825 | "left": null, 826 | "margin": null, 827 | "max_height": null, 828 | "max_width": null, 829 | "min_height": null, 830 | "min_width": null, 831 | "object_fit": null, 832 | "object_position": null, 833 | "order": null, 834 | "overflow": null, 835 | "overflow_x": null, 836 | "overflow_y": null, 837 | "padding": null, 838 | "right": null, 839 | "top": null, 840 | "visibility": null, 841 | "width": null 842 | } 843 | }, 844 | "ef7a60fd80fe4ba8a8224b79f9659644": { 845 | "model_module": "@jupyter-widgets/base", 846 | "model_name": "LayoutModel", 847 | "model_module_version": "1.2.0", 848 | "state": { 849 | "_model_module": "@jupyter-widgets/base", 850 | "_model_module_version": "1.2.0", 851 | "_model_name": "LayoutModel", 852 | "_view_count": null, 853 | "_view_module": "@jupyter-widgets/base", 854 | "_view_module_version": "1.2.0", 855 | "_view_name": "LayoutView", 856 | "align_content": null, 857 | "align_items": null, 858 | "align_self": null, 859 | "border": null, 860 | "bottom": null, 861 | "display": null, 862 | "flex": null, 863 | "flex_flow": null, 864 | "grid_area": null, 865 | "grid_auto_columns": null, 866 | "grid_auto_flow": null, 867 | "grid_auto_rows": null, 868 | "grid_column": null, 869 | "grid_gap": null, 870 | "grid_row": null, 871 | "grid_template_areas": null, 872 | "grid_template_columns": null, 873 | "grid_template_rows": null, 874 | "height": null, 875 | "justify_content": null, 876 | "justify_items": null, 877 | "left": null, 878 | "margin": null, 879 | "max_height": null, 880 | "max_width": null, 881 | "min_height": null, 882 | "min_width": null, 883 | "object_fit": null, 884 | "object_position": null, 885 | "order": null, 886 | "overflow": null, 887 | "overflow_x": null, 888 | "overflow_y": null, 889 | "padding": null, 890 | "right": null, 891 | "top": null, 892 | "visibility": null, 893 | "width": null 894 | } 895 | }, 896 | "7e912d3befc4448ea114e1fa3aa93119": { 897 | "model_module": "@jupyter-widgets/controls", 898 | "model_name": "DescriptionStyleModel", 899 | "model_module_version": "1.5.0", 900 | "state": { 901 | "_model_module": "@jupyter-widgets/controls", 902 | "_model_module_version": "1.5.0", 903 | "_model_name": "DescriptionStyleModel", 904 | "_view_count": null, 905 | "_view_module": "@jupyter-widgets/base", 906 | "_view_module_version": "1.2.0", 907 | "_view_name": "StyleView", 908 | "description_width": "" 909 | } 910 | }, 911 | "ba7aaec1107b40248eb6b76fb09f1fc9": { 912 | "model_module": "@jupyter-widgets/base", 913 | "model_name": "LayoutModel", 914 | "model_module_version": "1.2.0", 915 | "state": { 916 | "_model_module": "@jupyter-widgets/base", 917 | "_model_module_version": "1.2.0", 918 | "_model_name": "LayoutModel", 919 | "_view_count": null, 920 | "_view_module": "@jupyter-widgets/base", 921 | "_view_module_version": "1.2.0", 922 | "_view_name": "LayoutView", 923 | "align_content": null, 924 | "align_items": null, 925 | "align_self": null, 926 | "border": null, 927 | "bottom": null, 928 | "display": null, 929 | "flex": null, 930 | "flex_flow": null, 931 | "grid_area": null, 932 | "grid_auto_columns": null, 933 | "grid_auto_flow": null, 934 | "grid_auto_rows": null, 935 | "grid_column": null, 936 | "grid_gap": null, 937 | "grid_row": null, 938 | "grid_template_areas": null, 939 | "grid_template_columns": null, 940 | "grid_template_rows": null, 941 | "height": null, 942 | "justify_content": null, 943 | "justify_items": null, 944 | "left": null, 945 | "margin": null, 946 | "max_height": null, 947 | "max_width": null, 948 | "min_height": null, 949 | "min_width": null, 950 | "object_fit": null, 951 | "object_position": null, 952 | "order": null, 953 | "overflow": null, 954 | "overflow_x": null, 955 | "overflow_y": null, 956 | "padding": null, 957 | "right": null, 958 | "top": null, 959 | "visibility": null, 960 | "width": "20px" 961 | } 962 | }, 963 | "393fcf7561da4434b07ac6022ee95eeb": { 964 | "model_module": "@jupyter-widgets/controls", 965 | "model_name": "ProgressStyleModel", 966 | "model_module_version": "1.5.0", 967 | "state": { 968 | "_model_module": "@jupyter-widgets/controls", 969 | "_model_module_version": "1.5.0", 970 | "_model_name": "ProgressStyleModel", 971 | "_view_count": null, 972 | "_view_module": "@jupyter-widgets/base", 973 | "_view_module_version": "1.2.0", 974 | "_view_name": "StyleView", 975 | "bar_color": null, 976 | "description_width": "" 977 | } 978 | }, 979 | "8cc2390d790f46ce880f81da99c3b243": { 980 | "model_module": "@jupyter-widgets/base", 981 | "model_name": "LayoutModel", 982 | "model_module_version": "1.2.0", 983 | "state": { 984 | "_model_module": "@jupyter-widgets/base", 985 | "_model_module_version": "1.2.0", 986 | "_model_name": "LayoutModel", 987 | "_view_count": null, 988 | "_view_module": "@jupyter-widgets/base", 989 | "_view_module_version": "1.2.0", 990 | "_view_name": "LayoutView", 991 | "align_content": null, 992 | "align_items": null, 993 | "align_self": null, 994 | "border": null, 995 | "bottom": null, 996 | "display": null, 997 | "flex": null, 998 | "flex_flow": null, 999 | "grid_area": null, 1000 | "grid_auto_columns": null, 1001 | "grid_auto_flow": null, 1002 | "grid_auto_rows": null, 1003 | "grid_column": null, 1004 | "grid_gap": null, 1005 | "grid_row": null, 1006 | "grid_template_areas": null, 1007 | "grid_template_columns": null, 1008 | "grid_template_rows": null, 1009 | "height": null, 1010 | "justify_content": null, 1011 | "justify_items": null, 1012 | "left": null, 1013 | "margin": null, 1014 | "max_height": null, 1015 | "max_width": null, 1016 | "min_height": null, 1017 | "min_width": null, 1018 | "object_fit": null, 1019 | "object_position": null, 1020 | "order": null, 1021 | "overflow": null, 1022 | "overflow_x": null, 1023 | "overflow_y": null, 1024 | "padding": null, 1025 | "right": null, 1026 | "top": null, 1027 | "visibility": null, 1028 | "width": null 1029 | } 1030 | }, 1031 | "cb65ea1de35d439dbb0664329db64b25": { 1032 | "model_module": "@jupyter-widgets/controls", 1033 | "model_name": "DescriptionStyleModel", 1034 | "model_module_version": "1.5.0", 1035 | "state": { 1036 | "_model_module": "@jupyter-widgets/controls", 1037 | "_model_module_version": "1.5.0", 1038 | "_model_name": "DescriptionStyleModel", 1039 | "_view_count": null, 1040 | "_view_module": "@jupyter-widgets/base", 1041 | "_view_module_version": "1.2.0", 1042 | "_view_name": "StyleView", 1043 | "description_width": "" 1044 | } 1045 | }, 1046 | "ec7fe86bf8f24f6387d541a2801dd4a7": { 1047 | "model_module": "@jupyter-widgets/controls", 1048 | "model_name": "HBoxModel", 1049 | "model_module_version": "1.5.0", 1050 | "state": { 1051 | "_dom_classes": [], 1052 | "_model_module": "@jupyter-widgets/controls", 1053 | "_model_module_version": "1.5.0", 1054 | "_model_name": "HBoxModel", 1055 | "_view_count": null, 1056 | "_view_module": "@jupyter-widgets/controls", 1057 | "_view_module_version": "1.5.0", 1058 | "_view_name": "HBoxView", 1059 | "box_style": "", 1060 | "children": [ 1061 | "IPY_MODEL_89e5de0b0b0345b8b1d80adecc11e686", 1062 | "IPY_MODEL_d2ebf5c51f4e4be7b6397f36ea7ea816", 1063 | "IPY_MODEL_76641188f873496a84f24433e930c0c7" 1064 | ], 1065 | "layout": "IPY_MODEL_dc3b7059ab6d44619490a453498994dc" 1066 | } 1067 | }, 1068 | "89e5de0b0b0345b8b1d80adecc11e686": { 1069 | "model_module": "@jupyter-widgets/controls", 1070 | "model_name": "HTMLModel", 1071 | "model_module_version": "1.5.0", 1072 | "state": { 1073 | "_dom_classes": [], 1074 | "_model_module": "@jupyter-widgets/controls", 1075 | "_model_module_version": "1.5.0", 1076 | "_model_name": "HTMLModel", 1077 | "_view_count": null, 1078 | "_view_module": "@jupyter-widgets/controls", 1079 | "_view_module_version": "1.5.0", 1080 | "_view_name": "HTMLView", 1081 | "description": "", 1082 | "description_tooltip": null, 1083 | "layout": "IPY_MODEL_e0ab81310bc047fab2b01fd064a7fa45", 1084 | "placeholder": "​", 1085 | "style": "IPY_MODEL_2df7b934f04446c69243ad852b1bb66e", 1086 | "value": "vocab.json: 100%" 1087 | } 1088 | }, 1089 | "d2ebf5c51f4e4be7b6397f36ea7ea816": { 1090 | "model_module": "@jupyter-widgets/controls", 1091 | "model_name": "FloatProgressModel", 1092 | "model_module_version": "1.5.0", 1093 | "state": { 1094 | "_dom_classes": [], 1095 | "_model_module": "@jupyter-widgets/controls", 1096 | "_model_module_version": "1.5.0", 1097 | "_model_name": "FloatProgressModel", 1098 | "_view_count": null, 1099 | "_view_module": "@jupyter-widgets/controls", 1100 | "_view_module_version": "1.5.0", 1101 | "_view_name": "ProgressView", 1102 | "bar_style": "success", 1103 | "description": "", 1104 | "description_tooltip": null, 1105 | "layout": "IPY_MODEL_ad2e4b0915974802963f70f0e0ef0b4e", 1106 | "max": 1042301, 1107 | "min": 0, 1108 | "orientation": "horizontal", 1109 | "style": "IPY_MODEL_a516e4ccd9844714b9e8738fac138f08", 1110 | "value": 1042301 1111 | } 1112 | }, 1113 | "76641188f873496a84f24433e930c0c7": { 1114 | "model_module": "@jupyter-widgets/controls", 1115 | "model_name": "HTMLModel", 1116 | "model_module_version": "1.5.0", 1117 | "state": { 1118 | "_dom_classes": [], 1119 | "_model_module": "@jupyter-widgets/controls", 1120 | "_model_module_version": "1.5.0", 1121 | "_model_name": "HTMLModel", 1122 | "_view_count": null, 1123 | "_view_module": "@jupyter-widgets/controls", 1124 | "_view_module_version": "1.5.0", 1125 | "_view_name": "HTMLView", 1126 | "description": "", 1127 | "description_tooltip": null, 1128 | "layout": "IPY_MODEL_d06613abbcea4ee0b06b2938494b89bc", 1129 | "placeholder": "​", 1130 | "style": "IPY_MODEL_69ffd05ad18c4c958dd3da00ecb03861", 1131 | "value": " 1.04M/1.04M [00:00<00:00, 1.06MB/s]" 1132 | } 1133 | }, 1134 | "dc3b7059ab6d44619490a453498994dc": { 1135 | "model_module": "@jupyter-widgets/base", 1136 | "model_name": "LayoutModel", 1137 | "model_module_version": "1.2.0", 1138 | "state": { 1139 | "_model_module": "@jupyter-widgets/base", 1140 | "_model_module_version": "1.2.0", 1141 | "_model_name": "LayoutModel", 1142 | "_view_count": null, 1143 | "_view_module": "@jupyter-widgets/base", 1144 | "_view_module_version": "1.2.0", 1145 | "_view_name": "LayoutView", 1146 | "align_content": null, 1147 | "align_items": null, 1148 | "align_self": null, 1149 | "border": null, 1150 | "bottom": null, 1151 | "display": null, 1152 | "flex": null, 1153 | "flex_flow": null, 1154 | "grid_area": null, 1155 | "grid_auto_columns": null, 1156 | "grid_auto_flow": null, 1157 | "grid_auto_rows": null, 1158 | "grid_column": null, 1159 | "grid_gap": null, 1160 | "grid_row": null, 1161 | "grid_template_areas": null, 1162 | "grid_template_columns": null, 1163 | "grid_template_rows": null, 1164 | "height": null, 1165 | "justify_content": null, 1166 | "justify_items": null, 1167 | "left": null, 1168 | "margin": null, 1169 | "max_height": null, 1170 | "max_width": null, 1171 | "min_height": null, 1172 | "min_width": null, 1173 | "object_fit": null, 1174 | "object_position": null, 1175 | "order": null, 1176 | "overflow": null, 1177 | "overflow_x": null, 1178 | "overflow_y": null, 1179 | "padding": null, 1180 | "right": null, 1181 | "top": null, 1182 | "visibility": null, 1183 | "width": null 1184 | } 1185 | }, 1186 | "e0ab81310bc047fab2b01fd064a7fa45": { 1187 | "model_module": "@jupyter-widgets/base", 1188 | "model_name": "LayoutModel", 1189 | "model_module_version": "1.2.0", 1190 | "state": { 1191 | "_model_module": "@jupyter-widgets/base", 1192 | "_model_module_version": "1.2.0", 1193 | "_model_name": "LayoutModel", 1194 | "_view_count": null, 1195 | "_view_module": "@jupyter-widgets/base", 1196 | "_view_module_version": "1.2.0", 1197 | "_view_name": "LayoutView", 1198 | "align_content": null, 1199 | "align_items": null, 1200 | "align_self": null, 1201 | "border": null, 1202 | "bottom": null, 1203 | "display": null, 1204 | "flex": null, 1205 | "flex_flow": null, 1206 | "grid_area": null, 1207 | "grid_auto_columns": null, 1208 | "grid_auto_flow": null, 1209 | "grid_auto_rows": null, 1210 | "grid_column": null, 1211 | "grid_gap": null, 1212 | "grid_row": null, 1213 | "grid_template_areas": null, 1214 | "grid_template_columns": null, 1215 | "grid_template_rows": null, 1216 | "height": null, 1217 | "justify_content": null, 1218 | "justify_items": null, 1219 | "left": null, 1220 | "margin": null, 1221 | "max_height": null, 1222 | "max_width": null, 1223 | "min_height": null, 1224 | "min_width": null, 1225 | "object_fit": null, 1226 | "object_position": null, 1227 | "order": null, 1228 | "overflow": null, 1229 | "overflow_x": null, 1230 | "overflow_y": null, 1231 | "padding": null, 1232 | "right": null, 1233 | "top": null, 1234 | "visibility": null, 1235 | "width": null 1236 | } 1237 | }, 1238 | "2df7b934f04446c69243ad852b1bb66e": { 1239 | "model_module": "@jupyter-widgets/controls", 1240 | "model_name": "DescriptionStyleModel", 1241 | "model_module_version": "1.5.0", 1242 | "state": { 1243 | "_model_module": "@jupyter-widgets/controls", 1244 | "_model_module_version": "1.5.0", 1245 | "_model_name": "DescriptionStyleModel", 1246 | "_view_count": null, 1247 | "_view_module": "@jupyter-widgets/base", 1248 | "_view_module_version": "1.2.0", 1249 | "_view_name": "StyleView", 1250 | "description_width": "" 1251 | } 1252 | }, 1253 | "ad2e4b0915974802963f70f0e0ef0b4e": { 1254 | "model_module": "@jupyter-widgets/base", 1255 | "model_name": "LayoutModel", 1256 | "model_module_version": "1.2.0", 1257 | "state": { 1258 | "_model_module": "@jupyter-widgets/base", 1259 | "_model_module_version": "1.2.0", 1260 | "_model_name": "LayoutModel", 1261 | "_view_count": null, 1262 | "_view_module": "@jupyter-widgets/base", 1263 | "_view_module_version": "1.2.0", 1264 | "_view_name": "LayoutView", 1265 | "align_content": null, 1266 | "align_items": null, 1267 | "align_self": null, 1268 | "border": null, 1269 | "bottom": null, 1270 | "display": null, 1271 | "flex": null, 1272 | "flex_flow": null, 1273 | "grid_area": null, 1274 | "grid_auto_columns": null, 1275 | "grid_auto_flow": null, 1276 | "grid_auto_rows": null, 1277 | "grid_column": null, 1278 | "grid_gap": null, 1279 | "grid_row": null, 1280 | "grid_template_areas": null, 1281 | "grid_template_columns": null, 1282 | "grid_template_rows": null, 1283 | "height": null, 1284 | "justify_content": null, 1285 | "justify_items": null, 1286 | "left": null, 1287 | "margin": null, 1288 | "max_height": null, 1289 | "max_width": null, 1290 | "min_height": null, 1291 | "min_width": null, 1292 | "object_fit": null, 1293 | "object_position": null, 1294 | "order": null, 1295 | "overflow": null, 1296 | "overflow_x": null, 1297 | "overflow_y": null, 1298 | "padding": null, 1299 | "right": null, 1300 | "top": null, 1301 | "visibility": null, 1302 | "width": null 1303 | } 1304 | }, 1305 | "a516e4ccd9844714b9e8738fac138f08": { 1306 | "model_module": "@jupyter-widgets/controls", 1307 | "model_name": "ProgressStyleModel", 1308 | "model_module_version": "1.5.0", 1309 | "state": { 1310 | "_model_module": "@jupyter-widgets/controls", 1311 | "_model_module_version": "1.5.0", 1312 | "_model_name": "ProgressStyleModel", 1313 | "_view_count": null, 1314 | "_view_module": "@jupyter-widgets/base", 1315 | "_view_module_version": "1.2.0", 1316 | "_view_name": "StyleView", 1317 | "bar_color": null, 1318 | "description_width": "" 1319 | } 1320 | }, 1321 | "d06613abbcea4ee0b06b2938494b89bc": { 1322 | "model_module": "@jupyter-widgets/base", 1323 | "model_name": "LayoutModel", 1324 | "model_module_version": "1.2.0", 1325 | "state": { 1326 | "_model_module": "@jupyter-widgets/base", 1327 | "_model_module_version": "1.2.0", 1328 | "_model_name": "LayoutModel", 1329 | "_view_count": null, 1330 | "_view_module": "@jupyter-widgets/base", 1331 | "_view_module_version": "1.2.0", 1332 | "_view_name": "LayoutView", 1333 | "align_content": null, 1334 | "align_items": null, 1335 | "align_self": null, 1336 | "border": null, 1337 | "bottom": null, 1338 | "display": null, 1339 | "flex": null, 1340 | "flex_flow": null, 1341 | "grid_area": null, 1342 | "grid_auto_columns": null, 1343 | "grid_auto_flow": null, 1344 | "grid_auto_rows": null, 1345 | "grid_column": null, 1346 | "grid_gap": null, 1347 | "grid_row": null, 1348 | "grid_template_areas": null, 1349 | "grid_template_columns": null, 1350 | "grid_template_rows": null, 1351 | "height": null, 1352 | "justify_content": null, 1353 | "justify_items": null, 1354 | "left": null, 1355 | "margin": null, 1356 | "max_height": null, 1357 | "max_width": null, 1358 | "min_height": null, 1359 | "min_width": null, 1360 | "object_fit": null, 1361 | "object_position": null, 1362 | "order": null, 1363 | "overflow": null, 1364 | "overflow_x": null, 1365 | "overflow_y": null, 1366 | "padding": null, 1367 | "right": null, 1368 | "top": null, 1369 | "visibility": null, 1370 | "width": null 1371 | } 1372 | }, 1373 | "69ffd05ad18c4c958dd3da00ecb03861": { 1374 | "model_module": "@jupyter-widgets/controls", 1375 | "model_name": "DescriptionStyleModel", 1376 | "model_module_version": "1.5.0", 1377 | "state": { 1378 | "_model_module": "@jupyter-widgets/controls", 1379 | "_model_module_version": "1.5.0", 1380 | "_model_name": "DescriptionStyleModel", 1381 | "_view_count": null, 1382 | "_view_module": "@jupyter-widgets/base", 1383 | "_view_module_version": "1.2.0", 1384 | "_view_name": "StyleView", 1385 | "description_width": "" 1386 | } 1387 | }, 1388 | "4ff4e721bc684d3588fc0bf9eef01dc1": { 1389 | "model_module": "@jupyter-widgets/controls", 1390 | "model_name": "HBoxModel", 1391 | "model_module_version": "1.5.0", 1392 | "state": { 1393 | "_dom_classes": [], 1394 | "_model_module": "@jupyter-widgets/controls", 1395 | "_model_module_version": "1.5.0", 1396 | "_model_name": "HBoxModel", 1397 | "_view_count": null, 1398 | "_view_module": "@jupyter-widgets/controls", 1399 | "_view_module_version": "1.5.0", 1400 | "_view_name": "HBoxView", 1401 | "box_style": "", 1402 | "children": [ 1403 | "IPY_MODEL_a51c774046d840eba964ae05d44bc121", 1404 | "IPY_MODEL_92c278e987384f9a8211800c54d7d2db", 1405 | "IPY_MODEL_ce8b2c1e2af7468483b0248914da3be9" 1406 | ], 1407 | "layout": "IPY_MODEL_4ed5bcc239e145518de1fef008bb9b26" 1408 | } 1409 | }, 1410 | "a51c774046d840eba964ae05d44bc121": { 1411 | "model_module": "@jupyter-widgets/controls", 1412 | "model_name": "HTMLModel", 1413 | "model_module_version": "1.5.0", 1414 | "state": { 1415 | "_dom_classes": [], 1416 | "_model_module": "@jupyter-widgets/controls", 1417 | "_model_module_version": "1.5.0", 1418 | "_model_name": "HTMLModel", 1419 | "_view_count": null, 1420 | "_view_module": "@jupyter-widgets/controls", 1421 | "_view_module_version": "1.5.0", 1422 | "_view_name": "HTMLView", 1423 | "description": "", 1424 | "description_tooltip": null, 1425 | "layout": "IPY_MODEL_479dd0a62eec484a928f39a21b13a5ce", 1426 | "placeholder": "​", 1427 | "style": "IPY_MODEL_91efbd33184f4499825677459dc0bdfd", 1428 | "value": "merges.txt: 100%" 1429 | } 1430 | }, 1431 | "92c278e987384f9a8211800c54d7d2db": { 1432 | "model_module": "@jupyter-widgets/controls", 1433 | "model_name": "FloatProgressModel", 1434 | "model_module_version": "1.5.0", 1435 | "state": { 1436 | "_dom_classes": [], 1437 | "_model_module": "@jupyter-widgets/controls", 1438 | "_model_module_version": "1.5.0", 1439 | "_model_name": "FloatProgressModel", 1440 | "_view_count": null, 1441 | "_view_module": "@jupyter-widgets/controls", 1442 | "_view_module_version": "1.5.0", 1443 | "_view_name": "ProgressView", 1444 | "bar_style": "success", 1445 | "description": "", 1446 | "description_tooltip": null, 1447 | "layout": "IPY_MODEL_af8dff1656144b30aa37d8e80316f024", 1448 | "max": 456318, 1449 | "min": 0, 1450 | "orientation": "horizontal", 1451 | "style": "IPY_MODEL_b88bdbeefe9444cd8b430e75b6943162", 1452 | "value": 456318 1453 | } 1454 | }, 1455 | "ce8b2c1e2af7468483b0248914da3be9": { 1456 | "model_module": "@jupyter-widgets/controls", 1457 | "model_name": "HTMLModel", 1458 | "model_module_version": "1.5.0", 1459 | "state": { 1460 | "_dom_classes": [], 1461 | "_model_module": "@jupyter-widgets/controls", 1462 | "_model_module_version": "1.5.0", 1463 | "_model_name": "HTMLModel", 1464 | "_view_count": null, 1465 | "_view_module": "@jupyter-widgets/controls", 1466 | "_view_module_version": "1.5.0", 1467 | "_view_name": "HTMLView", 1468 | "description": "", 1469 | "description_tooltip": null, 1470 | "layout": "IPY_MODEL_ff2cde47d25749459db552ce4a7d76e8", 1471 | "placeholder": "​", 1472 | "style": "IPY_MODEL_fe1f13c138e64a12818be45e287624e1", 1473 | "value": " 456k/456k [00:00<00:00, 938kB/s]" 1474 | } 1475 | }, 1476 | "4ed5bcc239e145518de1fef008bb9b26": { 1477 | "model_module": "@jupyter-widgets/base", 1478 | "model_name": "LayoutModel", 1479 | "model_module_version": "1.2.0", 1480 | "state": { 1481 | "_model_module": "@jupyter-widgets/base", 1482 | "_model_module_version": "1.2.0", 1483 | "_model_name": "LayoutModel", 1484 | "_view_count": null, 1485 | "_view_module": "@jupyter-widgets/base", 1486 | "_view_module_version": "1.2.0", 1487 | "_view_name": "LayoutView", 1488 | "align_content": null, 1489 | "align_items": null, 1490 | "align_self": null, 1491 | "border": null, 1492 | "bottom": null, 1493 | "display": null, 1494 | "flex": null, 1495 | "flex_flow": null, 1496 | "grid_area": null, 1497 | "grid_auto_columns": null, 1498 | "grid_auto_flow": null, 1499 | "grid_auto_rows": null, 1500 | "grid_column": null, 1501 | "grid_gap": null, 1502 | "grid_row": null, 1503 | "grid_template_areas": null, 1504 | "grid_template_columns": null, 1505 | "grid_template_rows": null, 1506 | "height": null, 1507 | "justify_content": null, 1508 | "justify_items": null, 1509 | "left": null, 1510 | "margin": null, 1511 | "max_height": null, 1512 | "max_width": null, 1513 | "min_height": null, 1514 | "min_width": null, 1515 | "object_fit": null, 1516 | "object_position": null, 1517 | "order": null, 1518 | "overflow": null, 1519 | "overflow_x": null, 1520 | "overflow_y": null, 1521 | "padding": null, 1522 | "right": null, 1523 | "top": null, 1524 | "visibility": null, 1525 | "width": null 1526 | } 1527 | }, 1528 | "479dd0a62eec484a928f39a21b13a5ce": { 1529 | "model_module": "@jupyter-widgets/base", 1530 | "model_name": "LayoutModel", 1531 | "model_module_version": "1.2.0", 1532 | "state": { 1533 | "_model_module": "@jupyter-widgets/base", 1534 | "_model_module_version": "1.2.0", 1535 | "_model_name": "LayoutModel", 1536 | "_view_count": null, 1537 | "_view_module": "@jupyter-widgets/base", 1538 | "_view_module_version": "1.2.0", 1539 | "_view_name": "LayoutView", 1540 | "align_content": null, 1541 | "align_items": null, 1542 | "align_self": null, 1543 | "border": null, 1544 | "bottom": null, 1545 | "display": null, 1546 | "flex": null, 1547 | "flex_flow": null, 1548 | "grid_area": null, 1549 | "grid_auto_columns": null, 1550 | "grid_auto_flow": null, 1551 | "grid_auto_rows": null, 1552 | "grid_column": null, 1553 | "grid_gap": null, 1554 | "grid_row": null, 1555 | "grid_template_areas": null, 1556 | "grid_template_columns": null, 1557 | "grid_template_rows": null, 1558 | "height": null, 1559 | "justify_content": null, 1560 | "justify_items": null, 1561 | "left": null, 1562 | "margin": null, 1563 | "max_height": null, 1564 | "max_width": null, 1565 | "min_height": null, 1566 | "min_width": null, 1567 | "object_fit": null, 1568 | "object_position": null, 1569 | "order": null, 1570 | "overflow": null, 1571 | "overflow_x": null, 1572 | "overflow_y": null, 1573 | "padding": null, 1574 | "right": null, 1575 | "top": null, 1576 | "visibility": null, 1577 | "width": null 1578 | } 1579 | }, 1580 | "91efbd33184f4499825677459dc0bdfd": { 1581 | "model_module": "@jupyter-widgets/controls", 1582 | "model_name": "DescriptionStyleModel", 1583 | "model_module_version": "1.5.0", 1584 | "state": { 1585 | "_model_module": "@jupyter-widgets/controls", 1586 | "_model_module_version": "1.5.0", 1587 | "_model_name": "DescriptionStyleModel", 1588 | "_view_count": null, 1589 | "_view_module": "@jupyter-widgets/base", 1590 | "_view_module_version": "1.2.0", 1591 | "_view_name": "StyleView", 1592 | "description_width": "" 1593 | } 1594 | }, 1595 | "af8dff1656144b30aa37d8e80316f024": { 1596 | "model_module": "@jupyter-widgets/base", 1597 | "model_name": "LayoutModel", 1598 | "model_module_version": "1.2.0", 1599 | "state": { 1600 | "_model_module": "@jupyter-widgets/base", 1601 | "_model_module_version": "1.2.0", 1602 | "_model_name": "LayoutModel", 1603 | "_view_count": null, 1604 | "_view_module": "@jupyter-widgets/base", 1605 | "_view_module_version": "1.2.0", 1606 | "_view_name": "LayoutView", 1607 | "align_content": null, 1608 | "align_items": null, 1609 | "align_self": null, 1610 | "border": null, 1611 | "bottom": null, 1612 | "display": null, 1613 | "flex": null, 1614 | "flex_flow": null, 1615 | "grid_area": null, 1616 | "grid_auto_columns": null, 1617 | "grid_auto_flow": null, 1618 | "grid_auto_rows": null, 1619 | "grid_column": null, 1620 | "grid_gap": null, 1621 | "grid_row": null, 1622 | "grid_template_areas": null, 1623 | "grid_template_columns": null, 1624 | "grid_template_rows": null, 1625 | "height": null, 1626 | "justify_content": null, 1627 | "justify_items": null, 1628 | "left": null, 1629 | "margin": null, 1630 | "max_height": null, 1631 | "max_width": null, 1632 | "min_height": null, 1633 | "min_width": null, 1634 | "object_fit": null, 1635 | "object_position": null, 1636 | "order": null, 1637 | "overflow": null, 1638 | "overflow_x": null, 1639 | "overflow_y": null, 1640 | "padding": null, 1641 | "right": null, 1642 | "top": null, 1643 | "visibility": null, 1644 | "width": null 1645 | } 1646 | }, 1647 | "b88bdbeefe9444cd8b430e75b6943162": { 1648 | "model_module": "@jupyter-widgets/controls", 1649 | "model_name": "ProgressStyleModel", 1650 | "model_module_version": "1.5.0", 1651 | "state": { 1652 | "_model_module": "@jupyter-widgets/controls", 1653 | "_model_module_version": "1.5.0", 1654 | "_model_name": "ProgressStyleModel", 1655 | "_view_count": null, 1656 | "_view_module": "@jupyter-widgets/base", 1657 | "_view_module_version": "1.2.0", 1658 | "_view_name": "StyleView", 1659 | "bar_color": null, 1660 | "description_width": "" 1661 | } 1662 | }, 1663 | "ff2cde47d25749459db552ce4a7d76e8": { 1664 | "model_module": "@jupyter-widgets/base", 1665 | "model_name": "LayoutModel", 1666 | "model_module_version": "1.2.0", 1667 | "state": { 1668 | "_model_module": "@jupyter-widgets/base", 1669 | "_model_module_version": "1.2.0", 1670 | "_model_name": "LayoutModel", 1671 | "_view_count": null, 1672 | "_view_module": "@jupyter-widgets/base", 1673 | "_view_module_version": "1.2.0", 1674 | "_view_name": "LayoutView", 1675 | "align_content": null, 1676 | "align_items": null, 1677 | "align_self": null, 1678 | "border": null, 1679 | "bottom": null, 1680 | "display": null, 1681 | "flex": null, 1682 | "flex_flow": null, 1683 | "grid_area": null, 1684 | "grid_auto_columns": null, 1685 | "grid_auto_flow": null, 1686 | "grid_auto_rows": null, 1687 | "grid_column": null, 1688 | "grid_gap": null, 1689 | "grid_row": null, 1690 | "grid_template_areas": null, 1691 | "grid_template_columns": null, 1692 | "grid_template_rows": null, 1693 | "height": null, 1694 | "justify_content": null, 1695 | "justify_items": null, 1696 | "left": null, 1697 | "margin": null, 1698 | "max_height": null, 1699 | "max_width": null, 1700 | "min_height": null, 1701 | "min_width": null, 1702 | "object_fit": null, 1703 | "object_position": null, 1704 | "order": null, 1705 | "overflow": null, 1706 | "overflow_x": null, 1707 | "overflow_y": null, 1708 | "padding": null, 1709 | "right": null, 1710 | "top": null, 1711 | "visibility": null, 1712 | "width": null 1713 | } 1714 | }, 1715 | "fe1f13c138e64a12818be45e287624e1": { 1716 | "model_module": "@jupyter-widgets/controls", 1717 | "model_name": "DescriptionStyleModel", 1718 | "model_module_version": "1.5.0", 1719 | "state": { 1720 | "_model_module": "@jupyter-widgets/controls", 1721 | "_model_module_version": "1.5.0", 1722 | "_model_name": "DescriptionStyleModel", 1723 | "_view_count": null, 1724 | "_view_module": "@jupyter-widgets/base", 1725 | "_view_module_version": "1.2.0", 1726 | "_view_name": "StyleView", 1727 | "description_width": "" 1728 | } 1729 | }, 1730 | "4ab5fa5d0362442fb891d153a2221269": { 1731 | "model_module": "@jupyter-widgets/controls", 1732 | "model_name": "HBoxModel", 1733 | "model_module_version": "1.5.0", 1734 | "state": { 1735 | "_dom_classes": [], 1736 | "_model_module": "@jupyter-widgets/controls", 1737 | "_model_module_version": "1.5.0", 1738 | "_model_name": "HBoxModel", 1739 | "_view_count": null, 1740 | "_view_module": "@jupyter-widgets/controls", 1741 | "_view_module_version": "1.5.0", 1742 | "_view_name": "HBoxView", 1743 | "box_style": "", 1744 | "children": [ 1745 | "IPY_MODEL_3dfce640dbd648049f86bb6f960fba84", 1746 | "IPY_MODEL_047c1c3081184ef8bbd1e55906d6034c", 1747 | "IPY_MODEL_0ddc3a071ee74db4a701fa5c71bde4ab" 1748 | ], 1749 | "layout": "IPY_MODEL_4860d8f28fd4452ea3d78f5d360c8920" 1750 | } 1751 | }, 1752 | "3dfce640dbd648049f86bb6f960fba84": { 1753 | "model_module": "@jupyter-widgets/controls", 1754 | "model_name": "HTMLModel", 1755 | "model_module_version": "1.5.0", 1756 | "state": { 1757 | "_dom_classes": [], 1758 | "_model_module": "@jupyter-widgets/controls", 1759 | "_model_module_version": "1.5.0", 1760 | "_model_name": "HTMLModel", 1761 | "_view_count": null, 1762 | "_view_module": "@jupyter-widgets/controls", 1763 | "_view_module_version": "1.5.0", 1764 | "_view_name": "HTMLView", 1765 | "description": "", 1766 | "description_tooltip": null, 1767 | "layout": "IPY_MODEL_a8c102ccd45a4bb9a0366fed028c9c89", 1768 | "placeholder": "​", 1769 | "style": "IPY_MODEL_53be2c46b0634ace8157f69dddf502ed", 1770 | "value": "tokenizer.json: 100%" 1771 | } 1772 | }, 1773 | "047c1c3081184ef8bbd1e55906d6034c": { 1774 | "model_module": "@jupyter-widgets/controls", 1775 | "model_name": "FloatProgressModel", 1776 | "model_module_version": "1.5.0", 1777 | "state": { 1778 | "_dom_classes": [], 1779 | "_model_module": "@jupyter-widgets/controls", 1780 | "_model_module_version": "1.5.0", 1781 | "_model_name": "FloatProgressModel", 1782 | "_view_count": null, 1783 | "_view_module": "@jupyter-widgets/controls", 1784 | "_view_module_version": "1.5.0", 1785 | "_view_name": "ProgressView", 1786 | "bar_style": "success", 1787 | "description": "", 1788 | "description_tooltip": null, 1789 | "layout": "IPY_MODEL_8aa38554efa847d6b23659bbe3a22fd5", 1790 | "max": 1355256, 1791 | "min": 0, 1792 | "orientation": "horizontal", 1793 | "style": "IPY_MODEL_79ea0ca6be994c05a139b4b3b1d44e41", 1794 | "value": 1355256 1795 | } 1796 | }, 1797 | "0ddc3a071ee74db4a701fa5c71bde4ab": { 1798 | "model_module": "@jupyter-widgets/controls", 1799 | "model_name": "HTMLModel", 1800 | "model_module_version": "1.5.0", 1801 | "state": { 1802 | "_dom_classes": [], 1803 | "_model_module": "@jupyter-widgets/controls", 1804 | "_model_module_version": "1.5.0", 1805 | "_model_name": "HTMLModel", 1806 | "_view_count": null, 1807 | "_view_module": "@jupyter-widgets/controls", 1808 | "_view_module_version": "1.5.0", 1809 | "_view_name": "HTMLView", 1810 | "description": "", 1811 | "description_tooltip": null, 1812 | "layout": "IPY_MODEL_a23c7e7a5ac44f1c9fae6db6fb9a380c", 1813 | "placeholder": "​", 1814 | "style": "IPY_MODEL_be5a493006c247c6b94a76bfa8cd7717", 1815 | "value": " 1.36M/1.36M [00:00<00:00, 1.39MB/s]" 1816 | } 1817 | }, 1818 | "4860d8f28fd4452ea3d78f5d360c8920": { 1819 | "model_module": "@jupyter-widgets/base", 1820 | "model_name": "LayoutModel", 1821 | "model_module_version": "1.2.0", 1822 | "state": { 1823 | "_model_module": "@jupyter-widgets/base", 1824 | "_model_module_version": "1.2.0", 1825 | "_model_name": "LayoutModel", 1826 | "_view_count": null, 1827 | "_view_module": "@jupyter-widgets/base", 1828 | "_view_module_version": "1.2.0", 1829 | "_view_name": "LayoutView", 1830 | "align_content": null, 1831 | "align_items": null, 1832 | "align_self": null, 1833 | "border": null, 1834 | "bottom": null, 1835 | "display": null, 1836 | "flex": null, 1837 | "flex_flow": null, 1838 | "grid_area": null, 1839 | "grid_auto_columns": null, 1840 | "grid_auto_flow": null, 1841 | "grid_auto_rows": null, 1842 | "grid_column": null, 1843 | "grid_gap": null, 1844 | "grid_row": null, 1845 | "grid_template_areas": null, 1846 | "grid_template_columns": null, 1847 | "grid_template_rows": null, 1848 | "height": null, 1849 | "justify_content": null, 1850 | "justify_items": null, 1851 | "left": null, 1852 | "margin": null, 1853 | "max_height": null, 1854 | "max_width": null, 1855 | "min_height": null, 1856 | "min_width": null, 1857 | "object_fit": null, 1858 | "object_position": null, 1859 | "order": null, 1860 | "overflow": null, 1861 | "overflow_x": null, 1862 | "overflow_y": null, 1863 | "padding": null, 1864 | "right": null, 1865 | "top": null, 1866 | "visibility": null, 1867 | "width": null 1868 | } 1869 | }, 1870 | "a8c102ccd45a4bb9a0366fed028c9c89": { 1871 | "model_module": "@jupyter-widgets/base", 1872 | "model_name": "LayoutModel", 1873 | "model_module_version": "1.2.0", 1874 | "state": { 1875 | "_model_module": "@jupyter-widgets/base", 1876 | "_model_module_version": "1.2.0", 1877 | "_model_name": "LayoutModel", 1878 | "_view_count": null, 1879 | "_view_module": "@jupyter-widgets/base", 1880 | "_view_module_version": "1.2.0", 1881 | "_view_name": "LayoutView", 1882 | "align_content": null, 1883 | "align_items": null, 1884 | "align_self": null, 1885 | "border": null, 1886 | "bottom": null, 1887 | "display": null, 1888 | "flex": null, 1889 | "flex_flow": null, 1890 | "grid_area": null, 1891 | "grid_auto_columns": null, 1892 | "grid_auto_flow": null, 1893 | "grid_auto_rows": null, 1894 | "grid_column": null, 1895 | "grid_gap": null, 1896 | "grid_row": null, 1897 | "grid_template_areas": null, 1898 | "grid_template_columns": null, 1899 | "grid_template_rows": null, 1900 | "height": null, 1901 | "justify_content": null, 1902 | "justify_items": null, 1903 | "left": null, 1904 | "margin": null, 1905 | "max_height": null, 1906 | "max_width": null, 1907 | "min_height": null, 1908 | "min_width": null, 1909 | "object_fit": null, 1910 | "object_position": null, 1911 | "order": null, 1912 | "overflow": null, 1913 | "overflow_x": null, 1914 | "overflow_y": null, 1915 | "padding": null, 1916 | "right": null, 1917 | "top": null, 1918 | "visibility": null, 1919 | "width": null 1920 | } 1921 | }, 1922 | "53be2c46b0634ace8157f69dddf502ed": { 1923 | "model_module": "@jupyter-widgets/controls", 1924 | "model_name": "DescriptionStyleModel", 1925 | "model_module_version": "1.5.0", 1926 | "state": { 1927 | "_model_module": "@jupyter-widgets/controls", 1928 | "_model_module_version": "1.5.0", 1929 | "_model_name": "DescriptionStyleModel", 1930 | "_view_count": null, 1931 | "_view_module": "@jupyter-widgets/base", 1932 | "_view_module_version": "1.2.0", 1933 | "_view_name": "StyleView", 1934 | "description_width": "" 1935 | } 1936 | }, 1937 | "8aa38554efa847d6b23659bbe3a22fd5": { 1938 | "model_module": "@jupyter-widgets/base", 1939 | "model_name": "LayoutModel", 1940 | "model_module_version": "1.2.0", 1941 | "state": { 1942 | "_model_module": "@jupyter-widgets/base", 1943 | "_model_module_version": "1.2.0", 1944 | "_model_name": "LayoutModel", 1945 | "_view_count": null, 1946 | "_view_module": "@jupyter-widgets/base", 1947 | "_view_module_version": "1.2.0", 1948 | "_view_name": "LayoutView", 1949 | "align_content": null, 1950 | "align_items": null, 1951 | "align_self": null, 1952 | "border": null, 1953 | "bottom": null, 1954 | "display": null, 1955 | "flex": null, 1956 | "flex_flow": null, 1957 | "grid_area": null, 1958 | "grid_auto_columns": null, 1959 | "grid_auto_flow": null, 1960 | "grid_auto_rows": null, 1961 | "grid_column": null, 1962 | "grid_gap": null, 1963 | "grid_row": null, 1964 | "grid_template_areas": null, 1965 | "grid_template_columns": null, 1966 | "grid_template_rows": null, 1967 | "height": null, 1968 | "justify_content": null, 1969 | "justify_items": null, 1970 | "left": null, 1971 | "margin": null, 1972 | "max_height": null, 1973 | "max_width": null, 1974 | "min_height": null, 1975 | "min_width": null, 1976 | "object_fit": null, 1977 | "object_position": null, 1978 | "order": null, 1979 | "overflow": null, 1980 | "overflow_x": null, 1981 | "overflow_y": null, 1982 | "padding": null, 1983 | "right": null, 1984 | "top": null, 1985 | "visibility": null, 1986 | "width": null 1987 | } 1988 | }, 1989 | "79ea0ca6be994c05a139b4b3b1d44e41": { 1990 | "model_module": "@jupyter-widgets/controls", 1991 | "model_name": "ProgressStyleModel", 1992 | "model_module_version": "1.5.0", 1993 | "state": { 1994 | "_model_module": "@jupyter-widgets/controls", 1995 | "_model_module_version": "1.5.0", 1996 | "_model_name": "ProgressStyleModel", 1997 | "_view_count": null, 1998 | "_view_module": "@jupyter-widgets/base", 1999 | "_view_module_version": "1.2.0", 2000 | "_view_name": "StyleView", 2001 | "bar_color": null, 2002 | "description_width": "" 2003 | } 2004 | }, 2005 | "a23c7e7a5ac44f1c9fae6db6fb9a380c": { 2006 | "model_module": "@jupyter-widgets/base", 2007 | "model_name": "LayoutModel", 2008 | "model_module_version": "1.2.0", 2009 | "state": { 2010 | "_model_module": "@jupyter-widgets/base", 2011 | "_model_module_version": "1.2.0", 2012 | "_model_name": "LayoutModel", 2013 | "_view_count": null, 2014 | "_view_module": "@jupyter-widgets/base", 2015 | "_view_module_version": "1.2.0", 2016 | "_view_name": "LayoutView", 2017 | "align_content": null, 2018 | "align_items": null, 2019 | "align_self": null, 2020 | "border": null, 2021 | "bottom": null, 2022 | "display": null, 2023 | "flex": null, 2024 | "flex_flow": null, 2025 | "grid_area": null, 2026 | "grid_auto_columns": null, 2027 | "grid_auto_flow": null, 2028 | "grid_auto_rows": null, 2029 | "grid_column": null, 2030 | "grid_gap": null, 2031 | "grid_row": null, 2032 | "grid_template_areas": null, 2033 | "grid_template_columns": null, 2034 | "grid_template_rows": null, 2035 | "height": null, 2036 | "justify_content": null, 2037 | "justify_items": null, 2038 | "left": null, 2039 | "margin": null, 2040 | "max_height": null, 2041 | "max_width": null, 2042 | "min_height": null, 2043 | "min_width": null, 2044 | "object_fit": null, 2045 | "object_position": null, 2046 | "order": null, 2047 | "overflow": null, 2048 | "overflow_x": null, 2049 | "overflow_y": null, 2050 | "padding": null, 2051 | "right": null, 2052 | "top": null, 2053 | "visibility": null, 2054 | "width": null 2055 | } 2056 | }, 2057 | "be5a493006c247c6b94a76bfa8cd7717": { 2058 | "model_module": "@jupyter-widgets/controls", 2059 | "model_name": "DescriptionStyleModel", 2060 | "model_module_version": "1.5.0", 2061 | "state": { 2062 | "_model_module": "@jupyter-widgets/controls", 2063 | "_model_module_version": "1.5.0", 2064 | "_model_name": "DescriptionStyleModel", 2065 | "_view_count": null, 2066 | "_view_module": "@jupyter-widgets/base", 2067 | "_view_module_version": "1.2.0", 2068 | "_view_name": "StyleView", 2069 | "description_width": "" 2070 | } 2071 | }, 2072 | "8aa16db0c6804e789acc16ecda32fe5e": { 2073 | "model_module": "@jupyter-widgets/controls", 2074 | "model_name": "HBoxModel", 2075 | "model_module_version": "1.5.0", 2076 | "state": { 2077 | "_dom_classes": [], 2078 | "_model_module": "@jupyter-widgets/controls", 2079 | "_model_module_version": "1.5.0", 2080 | "_model_name": "HBoxModel", 2081 | "_view_count": null, 2082 | "_view_module": "@jupyter-widgets/controls", 2083 | "_view_module_version": "1.5.0", 2084 | "_view_name": "HBoxView", 2085 | "box_style": "", 2086 | "children": [ 2087 | "IPY_MODEL_a898f936e23a4c8785e9de322f72c248", 2088 | "IPY_MODEL_5fc6d2a6dde041e0a128e8eb550d9b10", 2089 | "IPY_MODEL_5784196f1f3046b0b47370f2603c6f77" 2090 | ], 2091 | "layout": "IPY_MODEL_bdbd732073334dc0bde296c4fb3673c5" 2092 | } 2093 | }, 2094 | "a898f936e23a4c8785e9de322f72c248": { 2095 | "model_module": "@jupyter-widgets/controls", 2096 | "model_name": "HTMLModel", 2097 | "model_module_version": "1.5.0", 2098 | "state": { 2099 | "_dom_classes": [], 2100 | "_model_module": "@jupyter-widgets/controls", 2101 | "_model_module_version": "1.5.0", 2102 | "_model_name": "HTMLModel", 2103 | "_view_count": null, 2104 | "_view_module": "@jupyter-widgets/controls", 2105 | "_view_module_version": "1.5.0", 2106 | "_view_name": "HTMLView", 2107 | "description": "", 2108 | "description_tooltip": null, 2109 | "layout": "IPY_MODEL_7c498217462d4c20bc892641e1437d4d", 2110 | "placeholder": "​", 2111 | "style": "IPY_MODEL_735689422d2648d8941ca86b240f8fec", 2112 | "value": "config.json: 100%" 2113 | } 2114 | }, 2115 | "5fc6d2a6dde041e0a128e8eb550d9b10": { 2116 | "model_module": "@jupyter-widgets/controls", 2117 | "model_name": "FloatProgressModel", 2118 | "model_module_version": "1.5.0", 2119 | "state": { 2120 | "_dom_classes": [], 2121 | "_model_module": "@jupyter-widgets/controls", 2122 | "_model_module_version": "1.5.0", 2123 | "_model_name": "FloatProgressModel", 2124 | "_view_count": null, 2125 | "_view_module": "@jupyter-widgets/controls", 2126 | "_view_module_version": "1.5.0", 2127 | "_view_name": "ProgressView", 2128 | "bar_style": "success", 2129 | "description": "", 2130 | "description_tooltip": null, 2131 | "layout": "IPY_MODEL_250afadc3f5b4effad629a23e08a18d7", 2132 | "max": 762, 2133 | "min": 0, 2134 | "orientation": "horizontal", 2135 | "style": "IPY_MODEL_d9bd3ade496c480697a94ff869e27be6", 2136 | "value": 762 2137 | } 2138 | }, 2139 | "5784196f1f3046b0b47370f2603c6f77": { 2140 | "model_module": "@jupyter-widgets/controls", 2141 | "model_name": "HTMLModel", 2142 | "model_module_version": "1.5.0", 2143 | "state": { 2144 | "_dom_classes": [], 2145 | "_model_module": "@jupyter-widgets/controls", 2146 | "_model_module_version": "1.5.0", 2147 | "_model_name": "HTMLModel", 2148 | "_view_count": null, 2149 | "_view_module": "@jupyter-widgets/controls", 2150 | "_view_module_version": "1.5.0", 2151 | "_view_name": "HTMLView", 2152 | "description": "", 2153 | "description_tooltip": null, 2154 | "layout": "IPY_MODEL_1338c901f2d049c88a98d2ea31b3fe46", 2155 | "placeholder": "​", 2156 | "style": "IPY_MODEL_4ef7ad4d6dde4af9876bb5fe43efa56a", 2157 | "value": " 762/762 [00:00<00:00, 63.3kB/s]" 2158 | } 2159 | }, 2160 | "bdbd732073334dc0bde296c4fb3673c5": { 2161 | "model_module": "@jupyter-widgets/base", 2162 | "model_name": "LayoutModel", 2163 | "model_module_version": "1.2.0", 2164 | "state": { 2165 | "_model_module": "@jupyter-widgets/base", 2166 | "_model_module_version": "1.2.0", 2167 | "_model_name": "LayoutModel", 2168 | "_view_count": null, 2169 | "_view_module": "@jupyter-widgets/base", 2170 | "_view_module_version": "1.2.0", 2171 | "_view_name": "LayoutView", 2172 | "align_content": null, 2173 | "align_items": null, 2174 | "align_self": null, 2175 | "border": null, 2176 | "bottom": null, 2177 | "display": null, 2178 | "flex": null, 2179 | "flex_flow": null, 2180 | "grid_area": null, 2181 | "grid_auto_columns": null, 2182 | "grid_auto_flow": null, 2183 | "grid_auto_rows": null, 2184 | "grid_column": null, 2185 | "grid_gap": null, 2186 | "grid_row": null, 2187 | "grid_template_areas": null, 2188 | "grid_template_columns": null, 2189 | "grid_template_rows": null, 2190 | "height": null, 2191 | "justify_content": null, 2192 | "justify_items": null, 2193 | "left": null, 2194 | "margin": null, 2195 | "max_height": null, 2196 | "max_width": null, 2197 | "min_height": null, 2198 | "min_width": null, 2199 | "object_fit": null, 2200 | "object_position": null, 2201 | "order": null, 2202 | "overflow": null, 2203 | "overflow_x": null, 2204 | "overflow_y": null, 2205 | "padding": null, 2206 | "right": null, 2207 | "top": null, 2208 | "visibility": null, 2209 | "width": null 2210 | } 2211 | }, 2212 | "7c498217462d4c20bc892641e1437d4d": { 2213 | "model_module": "@jupyter-widgets/base", 2214 | "model_name": "LayoutModel", 2215 | "model_module_version": "1.2.0", 2216 | "state": { 2217 | "_model_module": "@jupyter-widgets/base", 2218 | "_model_module_version": "1.2.0", 2219 | "_model_name": "LayoutModel", 2220 | "_view_count": null, 2221 | "_view_module": "@jupyter-widgets/base", 2222 | "_view_module_version": "1.2.0", 2223 | "_view_name": "LayoutView", 2224 | "align_content": null, 2225 | "align_items": null, 2226 | "align_self": null, 2227 | "border": null, 2228 | "bottom": null, 2229 | "display": null, 2230 | "flex": null, 2231 | "flex_flow": null, 2232 | "grid_area": null, 2233 | "grid_auto_columns": null, 2234 | "grid_auto_flow": null, 2235 | "grid_auto_rows": null, 2236 | "grid_column": null, 2237 | "grid_gap": null, 2238 | "grid_row": null, 2239 | "grid_template_areas": null, 2240 | "grid_template_columns": null, 2241 | "grid_template_rows": null, 2242 | "height": null, 2243 | "justify_content": null, 2244 | "justify_items": null, 2245 | "left": null, 2246 | "margin": null, 2247 | "max_height": null, 2248 | "max_width": null, 2249 | "min_height": null, 2250 | "min_width": null, 2251 | "object_fit": null, 2252 | "object_position": null, 2253 | "order": null, 2254 | "overflow": null, 2255 | "overflow_x": null, 2256 | "overflow_y": null, 2257 | "padding": null, 2258 | "right": null, 2259 | "top": null, 2260 | "visibility": null, 2261 | "width": null 2262 | } 2263 | }, 2264 | "735689422d2648d8941ca86b240f8fec": { 2265 | "model_module": "@jupyter-widgets/controls", 2266 | "model_name": "DescriptionStyleModel", 2267 | "model_module_version": "1.5.0", 2268 | "state": { 2269 | "_model_module": "@jupyter-widgets/controls", 2270 | "_model_module_version": "1.5.0", 2271 | "_model_name": "DescriptionStyleModel", 2272 | "_view_count": null, 2273 | "_view_module": "@jupyter-widgets/base", 2274 | "_view_module_version": "1.2.0", 2275 | "_view_name": "StyleView", 2276 | "description_width": "" 2277 | } 2278 | }, 2279 | "250afadc3f5b4effad629a23e08a18d7": { 2280 | "model_module": "@jupyter-widgets/base", 2281 | "model_name": "LayoutModel", 2282 | "model_module_version": "1.2.0", 2283 | "state": { 2284 | "_model_module": "@jupyter-widgets/base", 2285 | "_model_module_version": "1.2.0", 2286 | "_model_name": "LayoutModel", 2287 | "_view_count": null, 2288 | "_view_module": "@jupyter-widgets/base", 2289 | "_view_module_version": "1.2.0", 2290 | "_view_name": "LayoutView", 2291 | "align_content": null, 2292 | "align_items": null, 2293 | "align_self": null, 2294 | "border": null, 2295 | "bottom": null, 2296 | "display": null, 2297 | "flex": null, 2298 | "flex_flow": null, 2299 | "grid_area": null, 2300 | "grid_auto_columns": null, 2301 | "grid_auto_flow": null, 2302 | "grid_auto_rows": null, 2303 | "grid_column": null, 2304 | "grid_gap": null, 2305 | "grid_row": null, 2306 | "grid_template_areas": null, 2307 | "grid_template_columns": null, 2308 | "grid_template_rows": null, 2309 | "height": null, 2310 | "justify_content": null, 2311 | "justify_items": null, 2312 | "left": null, 2313 | "margin": null, 2314 | "max_height": null, 2315 | "max_width": null, 2316 | "min_height": null, 2317 | "min_width": null, 2318 | "object_fit": null, 2319 | "object_position": null, 2320 | "order": null, 2321 | "overflow": null, 2322 | "overflow_x": null, 2323 | "overflow_y": null, 2324 | "padding": null, 2325 | "right": null, 2326 | "top": null, 2327 | "visibility": null, 2328 | "width": null 2329 | } 2330 | }, 2331 | "d9bd3ade496c480697a94ff869e27be6": { 2332 | "model_module": "@jupyter-widgets/controls", 2333 | "model_name": "ProgressStyleModel", 2334 | "model_module_version": "1.5.0", 2335 | "state": { 2336 | "_model_module": "@jupyter-widgets/controls", 2337 | "_model_module_version": "1.5.0", 2338 | "_model_name": "ProgressStyleModel", 2339 | "_view_count": null, 2340 | "_view_module": "@jupyter-widgets/base", 2341 | "_view_module_version": "1.2.0", 2342 | "_view_name": "StyleView", 2343 | "bar_color": null, 2344 | "description_width": "" 2345 | } 2346 | }, 2347 | "1338c901f2d049c88a98d2ea31b3fe46": { 2348 | "model_module": "@jupyter-widgets/base", 2349 | "model_name": "LayoutModel", 2350 | "model_module_version": "1.2.0", 2351 | "state": { 2352 | "_model_module": "@jupyter-widgets/base", 2353 | "_model_module_version": "1.2.0", 2354 | "_model_name": "LayoutModel", 2355 | "_view_count": null, 2356 | "_view_module": "@jupyter-widgets/base", 2357 | "_view_module_version": "1.2.0", 2358 | "_view_name": "LayoutView", 2359 | "align_content": null, 2360 | "align_items": null, 2361 | "align_self": null, 2362 | "border": null, 2363 | "bottom": null, 2364 | "display": null, 2365 | "flex": null, 2366 | "flex_flow": null, 2367 | "grid_area": null, 2368 | "grid_auto_columns": null, 2369 | "grid_auto_flow": null, 2370 | "grid_auto_rows": null, 2371 | "grid_column": null, 2372 | "grid_gap": null, 2373 | "grid_row": null, 2374 | "grid_template_areas": null, 2375 | "grid_template_columns": null, 2376 | "grid_template_rows": null, 2377 | "height": null, 2378 | "justify_content": null, 2379 | "justify_items": null, 2380 | "left": null, 2381 | "margin": null, 2382 | "max_height": null, 2383 | "max_width": null, 2384 | "min_height": null, 2385 | "min_width": null, 2386 | "object_fit": null, 2387 | "object_position": null, 2388 | "order": null, 2389 | "overflow": null, 2390 | "overflow_x": null, 2391 | "overflow_y": null, 2392 | "padding": null, 2393 | "right": null, 2394 | "top": null, 2395 | "visibility": null, 2396 | "width": null 2397 | } 2398 | }, 2399 | "4ef7ad4d6dde4af9876bb5fe43efa56a": { 2400 | "model_module": "@jupyter-widgets/controls", 2401 | "model_name": "DescriptionStyleModel", 2402 | "model_module_version": "1.5.0", 2403 | "state": { 2404 | "_model_module": "@jupyter-widgets/controls", 2405 | "_model_module_version": "1.5.0", 2406 | "_model_name": "DescriptionStyleModel", 2407 | "_view_count": null, 2408 | "_view_module": "@jupyter-widgets/base", 2409 | "_view_module_version": "1.2.0", 2410 | "_view_name": "StyleView", 2411 | "description_width": "" 2412 | } 2413 | }, 2414 | "53e702e5171c40b7b257df00043bd869": { 2415 | "model_module": "@jupyter-widgets/controls", 2416 | "model_name": "HBoxModel", 2417 | "model_module_version": "1.5.0", 2418 | "state": { 2419 | "_dom_classes": [], 2420 | "_model_module": "@jupyter-widgets/controls", 2421 | "_model_module_version": "1.5.0", 2422 | "_model_name": "HBoxModel", 2423 | "_view_count": null, 2424 | "_view_module": "@jupyter-widgets/controls", 2425 | "_view_module_version": "1.5.0", 2426 | "_view_name": "HBoxView", 2427 | "box_style": "", 2428 | "children": [ 2429 | "IPY_MODEL_e0e15cb7f0b94a4ab4553b398fa345bd", 2430 | "IPY_MODEL_8972d3a55d1f43ddbad6d4a2543598f6", 2431 | "IPY_MODEL_1434fedfd0c349f5925292e4d7df1b03" 2432 | ], 2433 | "layout": "IPY_MODEL_447946a3f9ca45c6874540d292ed27c3" 2434 | } 2435 | }, 2436 | "e0e15cb7f0b94a4ab4553b398fa345bd": { 2437 | "model_module": "@jupyter-widgets/controls", 2438 | "model_name": "HTMLModel", 2439 | "model_module_version": "1.5.0", 2440 | "state": { 2441 | "_dom_classes": [], 2442 | "_model_module": "@jupyter-widgets/controls", 2443 | "_model_module_version": "1.5.0", 2444 | "_model_name": "HTMLModel", 2445 | "_view_count": null, 2446 | "_view_module": "@jupyter-widgets/controls", 2447 | "_view_module_version": "1.5.0", 2448 | "_view_name": "HTMLView", 2449 | "description": "", 2450 | "description_tooltip": null, 2451 | "layout": "IPY_MODEL_46945285c25749079dcb3945fef79f23", 2452 | "placeholder": "​", 2453 | "style": "IPY_MODEL_07b35023dc9f46168345187a02aabf46", 2454 | "value": "model.safetensors: 100%" 2455 | } 2456 | }, 2457 | "8972d3a55d1f43ddbad6d4a2543598f6": { 2458 | "model_module": "@jupyter-widgets/controls", 2459 | "model_name": "FloatProgressModel", 2460 | "model_module_version": "1.5.0", 2461 | "state": { 2462 | "_dom_classes": [], 2463 | "_model_module": "@jupyter-widgets/controls", 2464 | "_model_module_version": "1.5.0", 2465 | "_model_name": "FloatProgressModel", 2466 | "_view_count": null, 2467 | "_view_module": "@jupyter-widgets/controls", 2468 | "_view_module_version": "1.5.0", 2469 | "_view_name": "ProgressView", 2470 | "bar_style": "success", 2471 | "description": "", 2472 | "description_tooltip": null, 2473 | "layout": "IPY_MODEL_97fabf4a49954879bd24d482a8b7088b", 2474 | "max": 352824413, 2475 | "min": 0, 2476 | "orientation": "horizontal", 2477 | "style": "IPY_MODEL_5c08a4c88c7a4873bbcd1e2bfc53ec83", 2478 | "value": 352824413 2479 | } 2480 | }, 2481 | "1434fedfd0c349f5925292e4d7df1b03": { 2482 | "model_module": "@jupyter-widgets/controls", 2483 | "model_name": "HTMLModel", 2484 | "model_module_version": "1.5.0", 2485 | "state": { 2486 | "_dom_classes": [], 2487 | "_model_module": "@jupyter-widgets/controls", 2488 | "_model_module_version": "1.5.0", 2489 | "_model_name": "HTMLModel", 2490 | "_view_count": null, 2491 | "_view_module": "@jupyter-widgets/controls", 2492 | "_view_module_version": "1.5.0", 2493 | "_view_name": "HTMLView", 2494 | "description": "", 2495 | "description_tooltip": null, 2496 | "layout": "IPY_MODEL_f7e099183e73426ea945ddee509106ce", 2497 | "placeholder": "​", 2498 | "style": "IPY_MODEL_24c1fecb5f244f3ea91cc67a8942e9e7", 2499 | "value": " 353M/353M [00:01<00:00, 236MB/s]" 2500 | } 2501 | }, 2502 | "447946a3f9ca45c6874540d292ed27c3": { 2503 | "model_module": "@jupyter-widgets/base", 2504 | "model_name": "LayoutModel", 2505 | "model_module_version": "1.2.0", 2506 | "state": { 2507 | "_model_module": "@jupyter-widgets/base", 2508 | "_model_module_version": "1.2.0", 2509 | "_model_name": "LayoutModel", 2510 | "_view_count": null, 2511 | "_view_module": "@jupyter-widgets/base", 2512 | "_view_module_version": "1.2.0", 2513 | "_view_name": "LayoutView", 2514 | "align_content": null, 2515 | "align_items": null, 2516 | "align_self": null, 2517 | "border": null, 2518 | "bottom": null, 2519 | "display": null, 2520 | "flex": null, 2521 | "flex_flow": null, 2522 | "grid_area": null, 2523 | "grid_auto_columns": null, 2524 | "grid_auto_flow": null, 2525 | "grid_auto_rows": null, 2526 | "grid_column": null, 2527 | "grid_gap": null, 2528 | "grid_row": null, 2529 | "grid_template_areas": null, 2530 | "grid_template_columns": null, 2531 | "grid_template_rows": null, 2532 | "height": null, 2533 | "justify_content": null, 2534 | "justify_items": null, 2535 | "left": null, 2536 | "margin": null, 2537 | "max_height": null, 2538 | "max_width": null, 2539 | "min_height": null, 2540 | "min_width": null, 2541 | "object_fit": null, 2542 | "object_position": null, 2543 | "order": null, 2544 | "overflow": null, 2545 | "overflow_x": null, 2546 | "overflow_y": null, 2547 | "padding": null, 2548 | "right": null, 2549 | "top": null, 2550 | "visibility": null, 2551 | "width": null 2552 | } 2553 | }, 2554 | "46945285c25749079dcb3945fef79f23": { 2555 | "model_module": "@jupyter-widgets/base", 2556 | "model_name": "LayoutModel", 2557 | "model_module_version": "1.2.0", 2558 | "state": { 2559 | "_model_module": "@jupyter-widgets/base", 2560 | "_model_module_version": "1.2.0", 2561 | "_model_name": "LayoutModel", 2562 | "_view_count": null, 2563 | "_view_module": "@jupyter-widgets/base", 2564 | "_view_module_version": "1.2.0", 2565 | "_view_name": "LayoutView", 2566 | "align_content": null, 2567 | "align_items": null, 2568 | "align_self": null, 2569 | "border": null, 2570 | "bottom": null, 2571 | "display": null, 2572 | "flex": null, 2573 | "flex_flow": null, 2574 | "grid_area": null, 2575 | "grid_auto_columns": null, 2576 | "grid_auto_flow": null, 2577 | "grid_auto_rows": null, 2578 | "grid_column": null, 2579 | "grid_gap": null, 2580 | "grid_row": null, 2581 | "grid_template_areas": null, 2582 | "grid_template_columns": null, 2583 | "grid_template_rows": null, 2584 | "height": null, 2585 | "justify_content": null, 2586 | "justify_items": null, 2587 | "left": null, 2588 | "margin": null, 2589 | "max_height": null, 2590 | "max_width": null, 2591 | "min_height": null, 2592 | "min_width": null, 2593 | "object_fit": null, 2594 | "object_position": null, 2595 | "order": null, 2596 | "overflow": null, 2597 | "overflow_x": null, 2598 | "overflow_y": null, 2599 | "padding": null, 2600 | "right": null, 2601 | "top": null, 2602 | "visibility": null, 2603 | "width": null 2604 | } 2605 | }, 2606 | "07b35023dc9f46168345187a02aabf46": { 2607 | "model_module": "@jupyter-widgets/controls", 2608 | "model_name": "DescriptionStyleModel", 2609 | "model_module_version": "1.5.0", 2610 | "state": { 2611 | "_model_module": "@jupyter-widgets/controls", 2612 | "_model_module_version": "1.5.0", 2613 | "_model_name": "DescriptionStyleModel", 2614 | "_view_count": null, 2615 | "_view_module": "@jupyter-widgets/base", 2616 | "_view_module_version": "1.2.0", 2617 | "_view_name": "StyleView", 2618 | "description_width": "" 2619 | } 2620 | }, 2621 | "97fabf4a49954879bd24d482a8b7088b": { 2622 | "model_module": "@jupyter-widgets/base", 2623 | "model_name": "LayoutModel", 2624 | "model_module_version": "1.2.0", 2625 | "state": { 2626 | "_model_module": "@jupyter-widgets/base", 2627 | "_model_module_version": "1.2.0", 2628 | "_model_name": "LayoutModel", 2629 | "_view_count": null, 2630 | "_view_module": "@jupyter-widgets/base", 2631 | "_view_module_version": "1.2.0", 2632 | "_view_name": "LayoutView", 2633 | "align_content": null, 2634 | "align_items": null, 2635 | "align_self": null, 2636 | "border": null, 2637 | "bottom": null, 2638 | "display": null, 2639 | "flex": null, 2640 | "flex_flow": null, 2641 | "grid_area": null, 2642 | "grid_auto_columns": null, 2643 | "grid_auto_flow": null, 2644 | "grid_auto_rows": null, 2645 | "grid_column": null, 2646 | "grid_gap": null, 2647 | "grid_row": null, 2648 | "grid_template_areas": null, 2649 | "grid_template_columns": null, 2650 | "grid_template_rows": null, 2651 | "height": null, 2652 | "justify_content": null, 2653 | "justify_items": null, 2654 | "left": null, 2655 | "margin": null, 2656 | "max_height": null, 2657 | "max_width": null, 2658 | "min_height": null, 2659 | "min_width": null, 2660 | "object_fit": null, 2661 | "object_position": null, 2662 | "order": null, 2663 | "overflow": null, 2664 | "overflow_x": null, 2665 | "overflow_y": null, 2666 | "padding": null, 2667 | "right": null, 2668 | "top": null, 2669 | "visibility": null, 2670 | "width": null 2671 | } 2672 | }, 2673 | "5c08a4c88c7a4873bbcd1e2bfc53ec83": { 2674 | "model_module": "@jupyter-widgets/controls", 2675 | "model_name": "ProgressStyleModel", 2676 | "model_module_version": "1.5.0", 2677 | "state": { 2678 | "_model_module": "@jupyter-widgets/controls", 2679 | "_model_module_version": "1.5.0", 2680 | "_model_name": "ProgressStyleModel", 2681 | "_view_count": null, 2682 | "_view_module": "@jupyter-widgets/base", 2683 | "_view_module_version": "1.2.0", 2684 | "_view_name": "StyleView", 2685 | "bar_color": null, 2686 | "description_width": "" 2687 | } 2688 | }, 2689 | "f7e099183e73426ea945ddee509106ce": { 2690 | "model_module": "@jupyter-widgets/base", 2691 | "model_name": "LayoutModel", 2692 | "model_module_version": "1.2.0", 2693 | "state": { 2694 | "_model_module": "@jupyter-widgets/base", 2695 | "_model_module_version": "1.2.0", 2696 | "_model_name": "LayoutModel", 2697 | "_view_count": null, 2698 | "_view_module": "@jupyter-widgets/base", 2699 | "_view_module_version": "1.2.0", 2700 | "_view_name": "LayoutView", 2701 | "align_content": null, 2702 | "align_items": null, 2703 | "align_self": null, 2704 | "border": null, 2705 | "bottom": null, 2706 | "display": null, 2707 | "flex": null, 2708 | "flex_flow": null, 2709 | "grid_area": null, 2710 | "grid_auto_columns": null, 2711 | "grid_auto_flow": null, 2712 | "grid_auto_rows": null, 2713 | "grid_column": null, 2714 | "grid_gap": null, 2715 | "grid_row": null, 2716 | "grid_template_areas": null, 2717 | "grid_template_columns": null, 2718 | "grid_template_rows": null, 2719 | "height": null, 2720 | "justify_content": null, 2721 | "justify_items": null, 2722 | "left": null, 2723 | "margin": null, 2724 | "max_height": null, 2725 | "max_width": null, 2726 | "min_height": null, 2727 | "min_width": null, 2728 | "object_fit": null, 2729 | "object_position": null, 2730 | "order": null, 2731 | "overflow": null, 2732 | "overflow_x": null, 2733 | "overflow_y": null, 2734 | "padding": null, 2735 | "right": null, 2736 | "top": null, 2737 | "visibility": null, 2738 | "width": null 2739 | } 2740 | }, 2741 | "24c1fecb5f244f3ea91cc67a8942e9e7": { 2742 | "model_module": "@jupyter-widgets/controls", 2743 | "model_name": "DescriptionStyleModel", 2744 | "model_module_version": "1.5.0", 2745 | "state": { 2746 | "_model_module": "@jupyter-widgets/controls", 2747 | "_model_module_version": "1.5.0", 2748 | "_model_name": "DescriptionStyleModel", 2749 | "_view_count": null, 2750 | "_view_module": "@jupyter-widgets/base", 2751 | "_view_module_version": "1.2.0", 2752 | "_view_name": "StyleView", 2753 | "description_width": "" 2754 | } 2755 | }, 2756 | "9ed7a6cf110c4d559166c1174e635aef": { 2757 | "model_module": "@jupyter-widgets/controls", 2758 | "model_name": "HBoxModel", 2759 | "model_module_version": "1.5.0", 2760 | "state": { 2761 | "_dom_classes": [], 2762 | "_model_module": "@jupyter-widgets/controls", 2763 | "_model_module_version": "1.5.0", 2764 | "_model_name": "HBoxModel", 2765 | "_view_count": null, 2766 | "_view_module": "@jupyter-widgets/controls", 2767 | "_view_module_version": "1.5.0", 2768 | "_view_name": "HBoxView", 2769 | "box_style": "", 2770 | "children": [ 2771 | "IPY_MODEL_74b378012a2e46268df9de6eee525a39", 2772 | "IPY_MODEL_379423052eed4c03a9f73f6f93a5563a", 2773 | "IPY_MODEL_a84ffe146af54101b04048a700012ac5" 2774 | ], 2775 | "layout": "IPY_MODEL_b5ed1581833f4cd18df6b618ee6dcb6d" 2776 | } 2777 | }, 2778 | "74b378012a2e46268df9de6eee525a39": { 2779 | "model_module": "@jupyter-widgets/controls", 2780 | "model_name": "HTMLModel", 2781 | "model_module_version": "1.5.0", 2782 | "state": { 2783 | "_dom_classes": [], 2784 | "_model_module": "@jupyter-widgets/controls", 2785 | "_model_module_version": "1.5.0", 2786 | "_model_name": "HTMLModel", 2787 | "_view_count": null, 2788 | "_view_module": "@jupyter-widgets/controls", 2789 | "_view_module_version": "1.5.0", 2790 | "_view_name": "HTMLView", 2791 | "description": "", 2792 | "description_tooltip": null, 2793 | "layout": "IPY_MODEL_57dd8a572c6b4098a932d09d3f6887a1", 2794 | "placeholder": "​", 2795 | "style": "IPY_MODEL_8777bc937048458f9f2c5bcdc229be0d", 2796 | "value": "generation_config.json: 100%" 2797 | } 2798 | }, 2799 | "379423052eed4c03a9f73f6f93a5563a": { 2800 | "model_module": "@jupyter-widgets/controls", 2801 | "model_name": "FloatProgressModel", 2802 | "model_module_version": "1.5.0", 2803 | "state": { 2804 | "_dom_classes": [], 2805 | "_model_module": "@jupyter-widgets/controls", 2806 | "_model_module_version": "1.5.0", 2807 | "_model_name": "FloatProgressModel", 2808 | "_view_count": null, 2809 | "_view_module": "@jupyter-widgets/controls", 2810 | "_view_module_version": "1.5.0", 2811 | "_view_name": "ProgressView", 2812 | "bar_style": "success", 2813 | "description": "", 2814 | "description_tooltip": null, 2815 | "layout": "IPY_MODEL_64bb5ff3353d439b8ad3044832f8ad0e", 2816 | "max": 124, 2817 | "min": 0, 2818 | "orientation": "horizontal", 2819 | "style": "IPY_MODEL_fedf4812a5a2401080ca6ac779172cee", 2820 | "value": 124 2821 | } 2822 | }, 2823 | "a84ffe146af54101b04048a700012ac5": { 2824 | "model_module": "@jupyter-widgets/controls", 2825 | "model_name": "HTMLModel", 2826 | "model_module_version": "1.5.0", 2827 | "state": { 2828 | "_dom_classes": [], 2829 | "_model_module": "@jupyter-widgets/controls", 2830 | "_model_module_version": "1.5.0", 2831 | "_model_name": "HTMLModel", 2832 | "_view_count": null, 2833 | "_view_module": "@jupyter-widgets/controls", 2834 | "_view_module_version": "1.5.0", 2835 | "_view_name": "HTMLView", 2836 | "description": "", 2837 | "description_tooltip": null, 2838 | "layout": "IPY_MODEL_229b7b51aa904bd895a95b212b6a610e", 2839 | "placeholder": "​", 2840 | "style": "IPY_MODEL_66168d105bd340f7af008e996f5e24ae", 2841 | "value": " 124/124 [00:00<00:00, 7.34kB/s]" 2842 | } 2843 | }, 2844 | "b5ed1581833f4cd18df6b618ee6dcb6d": { 2845 | "model_module": "@jupyter-widgets/base", 2846 | "model_name": "LayoutModel", 2847 | "model_module_version": "1.2.0", 2848 | "state": { 2849 | "_model_module": "@jupyter-widgets/base", 2850 | "_model_module_version": "1.2.0", 2851 | "_model_name": "LayoutModel", 2852 | "_view_count": null, 2853 | "_view_module": "@jupyter-widgets/base", 2854 | "_view_module_version": "1.2.0", 2855 | "_view_name": "LayoutView", 2856 | "align_content": null, 2857 | "align_items": null, 2858 | "align_self": null, 2859 | "border": null, 2860 | "bottom": null, 2861 | "display": null, 2862 | "flex": null, 2863 | "flex_flow": null, 2864 | "grid_area": null, 2865 | "grid_auto_columns": null, 2866 | "grid_auto_flow": null, 2867 | "grid_auto_rows": null, 2868 | "grid_column": null, 2869 | "grid_gap": null, 2870 | "grid_row": null, 2871 | "grid_template_areas": null, 2872 | "grid_template_columns": null, 2873 | "grid_template_rows": null, 2874 | "height": null, 2875 | "justify_content": null, 2876 | "justify_items": null, 2877 | "left": null, 2878 | "margin": null, 2879 | "max_height": null, 2880 | "max_width": null, 2881 | "min_height": null, 2882 | "min_width": null, 2883 | "object_fit": null, 2884 | "object_position": null, 2885 | "order": null, 2886 | "overflow": null, 2887 | "overflow_x": null, 2888 | "overflow_y": null, 2889 | "padding": null, 2890 | "right": null, 2891 | "top": null, 2892 | "visibility": null, 2893 | "width": null 2894 | } 2895 | }, 2896 | "57dd8a572c6b4098a932d09d3f6887a1": { 2897 | "model_module": "@jupyter-widgets/base", 2898 | "model_name": "LayoutModel", 2899 | "model_module_version": "1.2.0", 2900 | "state": { 2901 | "_model_module": "@jupyter-widgets/base", 2902 | "_model_module_version": "1.2.0", 2903 | "_model_name": "LayoutModel", 2904 | "_view_count": null, 2905 | "_view_module": "@jupyter-widgets/base", 2906 | "_view_module_version": "1.2.0", 2907 | "_view_name": "LayoutView", 2908 | "align_content": null, 2909 | "align_items": null, 2910 | "align_self": null, 2911 | "border": null, 2912 | "bottom": null, 2913 | "display": null, 2914 | "flex": null, 2915 | "flex_flow": null, 2916 | "grid_area": null, 2917 | "grid_auto_columns": null, 2918 | "grid_auto_flow": null, 2919 | "grid_auto_rows": null, 2920 | "grid_column": null, 2921 | "grid_gap": null, 2922 | "grid_row": null, 2923 | "grid_template_areas": null, 2924 | "grid_template_columns": null, 2925 | "grid_template_rows": null, 2926 | "height": null, 2927 | "justify_content": null, 2928 | "justify_items": null, 2929 | "left": null, 2930 | "margin": null, 2931 | "max_height": null, 2932 | "max_width": null, 2933 | "min_height": null, 2934 | "min_width": null, 2935 | "object_fit": null, 2936 | "object_position": null, 2937 | "order": null, 2938 | "overflow": null, 2939 | "overflow_x": null, 2940 | "overflow_y": null, 2941 | "padding": null, 2942 | "right": null, 2943 | "top": null, 2944 | "visibility": null, 2945 | "width": null 2946 | } 2947 | }, 2948 | "8777bc937048458f9f2c5bcdc229be0d": { 2949 | "model_module": "@jupyter-widgets/controls", 2950 | "model_name": "DescriptionStyleModel", 2951 | "model_module_version": "1.5.0", 2952 | "state": { 2953 | "_model_module": "@jupyter-widgets/controls", 2954 | "_model_module_version": "1.5.0", 2955 | "_model_name": "DescriptionStyleModel", 2956 | "_view_count": null, 2957 | "_view_module": "@jupyter-widgets/base", 2958 | "_view_module_version": "1.2.0", 2959 | "_view_name": "StyleView", 2960 | "description_width": "" 2961 | } 2962 | }, 2963 | "64bb5ff3353d439b8ad3044832f8ad0e": { 2964 | "model_module": "@jupyter-widgets/base", 2965 | "model_name": "LayoutModel", 2966 | "model_module_version": "1.2.0", 2967 | "state": { 2968 | "_model_module": "@jupyter-widgets/base", 2969 | "_model_module_version": "1.2.0", 2970 | "_model_name": "LayoutModel", 2971 | "_view_count": null, 2972 | "_view_module": "@jupyter-widgets/base", 2973 | "_view_module_version": "1.2.0", 2974 | "_view_name": "LayoutView", 2975 | "align_content": null, 2976 | "align_items": null, 2977 | "align_self": null, 2978 | "border": null, 2979 | "bottom": null, 2980 | "display": null, 2981 | "flex": null, 2982 | "flex_flow": null, 2983 | "grid_area": null, 2984 | "grid_auto_columns": null, 2985 | "grid_auto_flow": null, 2986 | "grid_auto_rows": null, 2987 | "grid_column": null, 2988 | "grid_gap": null, 2989 | "grid_row": null, 2990 | "grid_template_areas": null, 2991 | "grid_template_columns": null, 2992 | "grid_template_rows": null, 2993 | "height": null, 2994 | "justify_content": null, 2995 | "justify_items": null, 2996 | "left": null, 2997 | "margin": null, 2998 | "max_height": null, 2999 | "max_width": null, 3000 | "min_height": null, 3001 | "min_width": null, 3002 | "object_fit": null, 3003 | "object_position": null, 3004 | "order": null, 3005 | "overflow": null, 3006 | "overflow_x": null, 3007 | "overflow_y": null, 3008 | "padding": null, 3009 | "right": null, 3010 | "top": null, 3011 | "visibility": null, 3012 | "width": null 3013 | } 3014 | }, 3015 | "fedf4812a5a2401080ca6ac779172cee": { 3016 | "model_module": "@jupyter-widgets/controls", 3017 | "model_name": "ProgressStyleModel", 3018 | "model_module_version": "1.5.0", 3019 | "state": { 3020 | "_model_module": "@jupyter-widgets/controls", 3021 | "_model_module_version": "1.5.0", 3022 | "_model_name": "ProgressStyleModel", 3023 | "_view_count": null, 3024 | "_view_module": "@jupyter-widgets/base", 3025 | "_view_module_version": "1.2.0", 3026 | "_view_name": "StyleView", 3027 | "bar_color": null, 3028 | "description_width": "" 3029 | } 3030 | }, 3031 | "229b7b51aa904bd895a95b212b6a610e": { 3032 | "model_module": "@jupyter-widgets/base", 3033 | "model_name": "LayoutModel", 3034 | "model_module_version": "1.2.0", 3035 | "state": { 3036 | "_model_module": "@jupyter-widgets/base", 3037 | "_model_module_version": "1.2.0", 3038 | "_model_name": "LayoutModel", 3039 | "_view_count": null, 3040 | "_view_module": "@jupyter-widgets/base", 3041 | "_view_module_version": "1.2.0", 3042 | "_view_name": "LayoutView", 3043 | "align_content": null, 3044 | "align_items": null, 3045 | "align_self": null, 3046 | "border": null, 3047 | "bottom": null, 3048 | "display": null, 3049 | "flex": null, 3050 | "flex_flow": null, 3051 | "grid_area": null, 3052 | "grid_auto_columns": null, 3053 | "grid_auto_flow": null, 3054 | "grid_auto_rows": null, 3055 | "grid_column": null, 3056 | "grid_gap": null, 3057 | "grid_row": null, 3058 | "grid_template_areas": null, 3059 | "grid_template_columns": null, 3060 | "grid_template_rows": null, 3061 | "height": null, 3062 | "justify_content": null, 3063 | "justify_items": null, 3064 | "left": null, 3065 | "margin": null, 3066 | "max_height": null, 3067 | "max_width": null, 3068 | "min_height": null, 3069 | "min_width": null, 3070 | "object_fit": null, 3071 | "object_position": null, 3072 | "order": null, 3073 | "overflow": null, 3074 | "overflow_x": null, 3075 | "overflow_y": null, 3076 | "padding": null, 3077 | "right": null, 3078 | "top": null, 3079 | "visibility": null, 3080 | "width": null 3081 | } 3082 | }, 3083 | "66168d105bd340f7af008e996f5e24ae": { 3084 | "model_module": "@jupyter-widgets/controls", 3085 | "model_name": "DescriptionStyleModel", 3086 | "model_module_version": "1.5.0", 3087 | "state": { 3088 | "_model_module": "@jupyter-widgets/controls", 3089 | "_model_module_version": "1.5.0", 3090 | "_model_name": "DescriptionStyleModel", 3091 | "_view_count": null, 3092 | "_view_module": "@jupyter-widgets/base", 3093 | "_view_module_version": "1.2.0", 3094 | "_view_name": "StyleView", 3095 | "description_width": "" 3096 | } 3097 | } 3098 | } 3099 | } 3100 | }, 3101 | "cells": [ 3102 | { 3103 | "cell_type": "code", 3104 | "execution_count": null, 3105 | "metadata": { 3106 | "colab": { 3107 | "base_uri": "https://localhost:8080/" 3108 | }, 3109 | "id": "Jrl-l6buT6bT", 3110 | "outputId": "272f22ad-bff3-43b9-da32-4f9302ba2c56" 3111 | }, 3112 | "outputs": [ 3113 | { 3114 | "output_type": "stream", 3115 | "name": "stdout", 3116 | "text": [ 3117 | "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (2.1.0+cu121)\n", 3118 | "Requirement already satisfied: torchtext in /usr/local/lib/python3.10/dist-packages (0.16.0)\n", 3119 | "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.35.2)\n", 3120 | "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (0.1.99)\n", 3121 | "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (1.5.3)\n", 3122 | "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (4.66.1)\n", 3123 | "Collecting datasets\n", 3124 | " Downloading datasets-2.16.0-py3-none-any.whl (507 kB)\n", 3125 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m507.1/507.1 kB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 3126 | "\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch) (3.13.1)\n", 3127 | "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch) (4.5.0)\n", 3128 | "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch) (1.12)\n", 3129 | "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch) (3.2.1)\n", 3130 | "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch) (3.1.2)\n", 3131 | "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch) (2023.6.0)\n", 3132 | "Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch) (2.1.0)\n", 3133 | "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from torchtext) (2.31.0)\n", 3134 | "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchtext) (1.23.5)\n", 3135 | "Requirement already satisfied: torchdata==0.7.0 in /usr/local/lib/python3.10/dist-packages (from torchtext) (0.7.0)\n", 3136 | "Requirement already satisfied: urllib3>=1.25 in /usr/local/lib/python3.10/dist-packages (from torchdata==0.7.0->torchtext) (2.0.7)\n", 3137 | "Requirement already satisfied: huggingface-hub<1.0,>=0.16.4 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.19.4)\n", 3138 | "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.2)\n", 3139 | "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0.1)\n", 3140 | "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2023.6.3)\n", 3141 | "Requirement already satisfied: tokenizers<0.19,>=0.14 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.15.0)\n", 3142 | "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.4.1)\n", 3143 | "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas) (2.8.2)\n", 3144 | "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas) (2023.3.post1)\n", 3145 | "Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (10.0.1)\n", 3146 | "Collecting pyarrow-hotfix (from datasets)\n", 3147 | " Downloading pyarrow_hotfix-0.6-py3-none-any.whl (7.9 kB)\n", 3148 | "Collecting dill<0.3.8,>=0.3.0 (from datasets)\n", 3149 | " Downloading dill-0.3.7-py3-none-any.whl (115 kB)\n", 3150 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m115.3/115.3 kB\u001b[0m \u001b[31m15.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 3151 | "\u001b[?25hRequirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets) (3.4.1)\n", 3152 | "Collecting multiprocess (from datasets)\n", 3153 | " Downloading multiprocess-0.70.15-py310-none-any.whl (134 kB)\n", 3154 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m17.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 3155 | "\u001b[?25hRequirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.9.1)\n", 3156 | "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.1.0)\n", 3157 | "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.4)\n", 3158 | "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.4)\n", 3159 | "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n", 3160 | "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n", 3161 | "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n", 3162 | "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)\n", 3163 | "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->torchtext) (3.3.2)\n", 3164 | "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->torchtext) (3.6)\n", 3165 | "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->torchtext) (2023.11.17)\n", 3166 | "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch) (2.1.3)\n", 3167 | "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch) (1.3.0)\n", 3168 | "Installing collected packages: pyarrow-hotfix, dill, multiprocess, datasets\n", 3169 | "Successfully installed datasets-2.16.0 dill-0.3.7 multiprocess-0.70.15 pyarrow-hotfix-0.6\n" 3170 | ] 3171 | } 3172 | ], 3173 | "source": [ 3174 | "!pip install torch torchtext transformers sentencepiece pandas tqdm datasets" 3175 | ] 3176 | }, 3177 | { 3178 | "cell_type": "code", 3179 | "source": [ 3180 | "from datasets import load_dataset, DatasetDict, Dataset\n", 3181 | "import pandas as pd\n", 3182 | "import ast\n", 3183 | "import datasets\n", 3184 | "from tqdm import tqdm\n", 3185 | "import time" 3186 | ], 3187 | "metadata": { 3188 | "id": "veBWZ4_6ZzNF" 3189 | }, 3190 | "execution_count": null, 3191 | "outputs": [] 3192 | }, 3193 | { 3194 | "cell_type": "code", 3195 | "source": [ 3196 | "# Load data set from huggingface\n", 3197 | "data_sample = load_dataset(\"QuyenAnhDE/Diseases_Symptoms\")" 3198 | ], 3199 | "metadata": { 3200 | "colab": { 3201 | "base_uri": "https://localhost:8080/", 3202 | "height": 168, 3203 | "referenced_widgets": [ 3204 | "909582d0b6014056b113ef9a0a1db740", 3205 | "6b08d4679ac6461cbe254fe3478091b6", 3206 | "9a2502aacbd6489da0f8b6fbadcf079b", 3207 | "f6ff0e6cd04047babe24708d21937576", 3208 | "36349f3e29664f0bbdda5c8f7651304e", 3209 | "59945ccd1da44215b5eaa6226835968c", 3210 | "2aed084699344e14b687a38196f3a4dc", 3211 | "97040354aa6047f4b2adfd7d0a255d0e", 3212 | "4167d18aa99240f09d20b78bb447f302", 3213 | "7b8c3ec2b0d7466c89881890686152f3", 3214 | "a86181d8ced94aa49b4664f692937ca8", 3215 | "d11ae8b4126d42a8a72dd70b3d093185", 3216 | "6319e0859d1547f8a586c2409c263519", 3217 | "2ce9e1635d34488eb5deee6f1eab48fc", 3218 | "44af7e9762b647beae7100e10b0f188f", 3219 | "01062415cb564e54906fa8ad9ff4031b", 3220 | "3be9d4577dec410cad57443e239347ce", 3221 | "9f0b34c9152840ac8f1e853420964173", 3222 | "8894905d0d0f4e4a995e8be50b214f39", 3223 | "c3b8c945c14e4adeb5031c68fe377ad6", 3224 | "8782c620fea449fd92ea1f8f7ef3c6ed", 3225 | "c04efab8b28346ea92e64a1599f1ee17", 3226 | "bd60373a16d647d9834a62c2624c9fc2", 3227 | "8e3fb5977e1c4ccab1181cf41959c132", 3228 | "d35466c751474dd688fe7073aec0a71f", 3229 | "82e084627ec14d57bf502decdc393b38", 3230 | "df0d6cc9ad9b4597802c6e98614a7f95", 3231 | "ef7a60fd80fe4ba8a8224b79f9659644", 3232 | "7e912d3befc4448ea114e1fa3aa93119", 3233 | "ba7aaec1107b40248eb6b76fb09f1fc9", 3234 | "393fcf7561da4434b07ac6022ee95eeb", 3235 | "8cc2390d790f46ce880f81da99c3b243", 3236 | "cb65ea1de35d439dbb0664329db64b25" 3237 | ] 3238 | }, 3239 | "id": "vup_3Q1jZ60E", 3240 | "outputId": "d6611e5c-1fdf-43ba-b8c9-e9af9211b932" 3241 | }, 3242 | "execution_count": null, 3243 | "outputs": [ 3244 | { 3245 | "output_type": "display_data", 3246 | "data": { 3247 | "text/plain": [ 3248 | "Downloading readme: 0%| | 0.00/381 [00:00\n", 3376 | "
\n", 3377 | "\n", 3390 | "\n", 3391 | " \n", 3392 | " \n", 3393 | " \n", 3394 | " \n", 3395 | " \n", 3396 | " \n", 3397 | " \n", 3398 | " \n", 3399 | " \n", 3400 | " \n", 3401 | " \n", 3402 | " \n", 3403 | " \n", 3404 | " \n", 3405 | " \n", 3406 | " \n", 3407 | " \n", 3408 | " \n", 3409 | " \n", 3410 | " \n", 3411 | " \n", 3412 | " \n", 3413 | " \n", 3414 | " \n", 3415 | " \n", 3416 | " \n", 3417 | " \n", 3418 | " \n", 3419 | " \n", 3420 | " \n", 3421 | " \n", 3422 | " \n", 3423 | " \n", 3424 | " \n", 3425 | "
NameSymptoms
0Panic disorderPalpitations, Sweating, Trembling, Shortness o...
1Vocal cord polypHoarseness, Vocal Changes, Vocal Fatigue
2Turner syndromeShort stature, Gonadal dysgenesis, Webbed neck...
3CryptorchidismAbsence or undescended testicle(s), empty scro...
4Ethylene glycol poisoning-1Nausea, vomiting, abdominal pain, General mala...
\n", 3426 | "
\n", 3427 | "
\n", 3428 | "\n", 3429 | "
\n", 3430 | " \n", 3438 | "\n", 3439 | " \n", 3479 | "\n", 3480 | " \n", 3504 | "
\n", 3505 | "\n", 3506 | "\n", 3507 | "
\n", 3508 | " \n", 3519 | "\n", 3520 | "\n", 3609 | "\n", 3610 | " \n", 3632 | "
\n", 3633 | "\n", 3634 | "
\n", 3635 | " \n" 3636 | ] 3637 | }, 3638 | "metadata": {}, 3639 | "execution_count": 15 3640 | } 3641 | ] 3642 | }, 3643 | { 3644 | "cell_type": "code", 3645 | "source": [ 3646 | "# Just extract the Symptoms\n", 3647 | "df['Symptoms'] = df['Symptoms'].apply(lambda x: ', '.join(x.split(', ')))\n", 3648 | "display(df.head())" 3649 | ], 3650 | "metadata": { 3651 | "colab": { 3652 | "base_uri": "https://localhost:8080/", 3653 | "height": 206 3654 | }, 3655 | "id": "LmMrE9qdZ66o", 3656 | "outputId": "cbb7cdef-b6e8-4aad-d577-df954fde34ef" 3657 | }, 3658 | "execution_count": null, 3659 | "outputs": [ 3660 | { 3661 | "output_type": "display_data", 3662 | "data": { 3663 | "text/plain": [ 3664 | " Name \\\n", 3665 | "0 Panic disorder \n", 3666 | "1 Vocal cord polyp \n", 3667 | "2 Turner syndrome \n", 3668 | "3 Cryptorchidism \n", 3669 | "4 Ethylene glycol poisoning-1 \n", 3670 | "\n", 3671 | " Symptoms \n", 3672 | "0 Palpitations, Sweating, Trembling, Shortness o... \n", 3673 | "1 Hoarseness, Vocal Changes, Vocal Fatigue \n", 3674 | "2 Short stature, Gonadal dysgenesis, Webbed neck... \n", 3675 | "3 Absence or undescended testicle(s), empty scro... \n", 3676 | "4 Nausea, vomiting, abdominal pain, General mala... " 3677 | ], 3678 | "text/html": [ 3679 | "\n", 3680 | "
\n", 3681 | "
\n", 3682 | "\n", 3695 | "\n", 3696 | " \n", 3697 | " \n", 3698 | " \n", 3699 | " \n", 3700 | " \n", 3701 | " \n", 3702 | " \n", 3703 | " \n", 3704 | " \n", 3705 | " \n", 3706 | " \n", 3707 | " \n", 3708 | " \n", 3709 | " \n", 3710 | " \n", 3711 | " \n", 3712 | " \n", 3713 | " \n", 3714 | " \n", 3715 | " \n", 3716 | " \n", 3717 | " \n", 3718 | " \n", 3719 | " \n", 3720 | " \n", 3721 | " \n", 3722 | " \n", 3723 | " \n", 3724 | " \n", 3725 | " \n", 3726 | " \n", 3727 | " \n", 3728 | " \n", 3729 | " \n", 3730 | "
NameSymptoms
0Panic disorderPalpitations, Sweating, Trembling, Shortness o...
1Vocal cord polypHoarseness, Vocal Changes, Vocal Fatigue
2Turner syndromeShort stature, Gonadal dysgenesis, Webbed neck...
3CryptorchidismAbsence or undescended testicle(s), empty scro...
4Ethylene glycol poisoning-1Nausea, vomiting, abdominal pain, General mala...
\n", 3731 | "
\n", 3732 | "
\n", 3733 | "\n", 3734 | "
\n", 3735 | " \n", 3743 | "\n", 3744 | " \n", 3784 | "\n", 3785 | " \n", 3809 | "
\n", 3810 | "\n", 3811 | "\n", 3812 | "
\n", 3813 | " \n", 3824 | "\n", 3825 | "\n", 3914 | "\n", 3915 | " \n", 3937 | "
\n", 3938 | "\n", 3939 | "
\n", 3940 | "
\n" 3941 | ] 3942 | }, 3943 | "metadata": {} 3944 | } 3945 | ] 3946 | }, 3947 | { 3948 | "cell_type": "code", 3949 | "source": [ 3950 | "from transformers import GPT2Tokenizer, GPT2LMHeadModel\n", 3951 | "import torch\n", 3952 | "import torch.nn as nn\n", 3953 | "import torch.optim as optim\n", 3954 | "from torch.utils.data import Dataset, DataLoader, random_split" 3955 | ], 3956 | "metadata": { 3957 | "id": "tp47z0HkZ68-" 3958 | }, 3959 | "execution_count": null, 3960 | "outputs": [] 3961 | }, 3962 | { 3963 | "cell_type": "code", 3964 | "source": [ 3965 | "# If you have an NVIDIA GPU attached, use 'cuda'\n", 3966 | "if torch.cuda.is_available():\n", 3967 | " device = torch.device('cuda')\n", 3968 | "else:\n", 3969 | " # If Apple Silicon, set to 'mps' - otherwise 'cpu' (not advised)\n", 3970 | " try:\n", 3971 | " device = torch.device('mps')\n", 3972 | " except Exception:\n", 3973 | " device = torch.device('cpu')" 3974 | ], 3975 | "metadata": { 3976 | "id": "UudM36y5Z6_G" 3977 | }, 3978 | "execution_count": null, 3979 | "outputs": [] 3980 | }, 3981 | { 3982 | "cell_type": "code", 3983 | "source": [ 3984 | "device" 3985 | ], 3986 | "metadata": { 3987 | "colab": { 3988 | "base_uri": "https://localhost:8080/" 3989 | }, 3990 | "id": "qKDArW3SZ7BW", 3991 | "outputId": "f9ae22d0-f893-480f-9f9e-65d09ef783f1" 3992 | }, 3993 | "execution_count": null, 3994 | "outputs": [ 3995 | { 3996 | "output_type": "execute_result", 3997 | "data": { 3998 | "text/plain": [ 3999 | "device(type='cuda')" 4000 | ] 4001 | }, 4002 | "metadata": {}, 4003 | "execution_count": 20 4004 | } 4005 | ] 4006 | }, 4007 | { 4008 | "cell_type": "code", 4009 | "source": [ 4010 | "# The tokenizer turns texts to numbers (and vice-versa)\n", 4011 | "tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')\n", 4012 | "\n", 4013 | "# The transformer\n", 4014 | "model = GPT2LMHeadModel.from_pretrained('distilgpt2').to(device)" 4015 | ], 4016 | "metadata": { 4017 | "colab": { 4018 | "base_uri": "https://localhost:8080/", 4019 | "height": 209, 4020 | "referenced_widgets": [ 4021 | "ec7fe86bf8f24f6387d541a2801dd4a7", 4022 | "89e5de0b0b0345b8b1d80adecc11e686", 4023 | "d2ebf5c51f4e4be7b6397f36ea7ea816", 4024 | "76641188f873496a84f24433e930c0c7", 4025 | "dc3b7059ab6d44619490a453498994dc", 4026 | "e0ab81310bc047fab2b01fd064a7fa45", 4027 | "2df7b934f04446c69243ad852b1bb66e", 4028 | "ad2e4b0915974802963f70f0e0ef0b4e", 4029 | "a516e4ccd9844714b9e8738fac138f08", 4030 | "d06613abbcea4ee0b06b2938494b89bc", 4031 | "69ffd05ad18c4c958dd3da00ecb03861", 4032 | "4ff4e721bc684d3588fc0bf9eef01dc1", 4033 | "a51c774046d840eba964ae05d44bc121", 4034 | "92c278e987384f9a8211800c54d7d2db", 4035 | "ce8b2c1e2af7468483b0248914da3be9", 4036 | "4ed5bcc239e145518de1fef008bb9b26", 4037 | "479dd0a62eec484a928f39a21b13a5ce", 4038 | "91efbd33184f4499825677459dc0bdfd", 4039 | "af8dff1656144b30aa37d8e80316f024", 4040 | "b88bdbeefe9444cd8b430e75b6943162", 4041 | "ff2cde47d25749459db552ce4a7d76e8", 4042 | "fe1f13c138e64a12818be45e287624e1", 4043 | "4ab5fa5d0362442fb891d153a2221269", 4044 | "3dfce640dbd648049f86bb6f960fba84", 4045 | "047c1c3081184ef8bbd1e55906d6034c", 4046 | "0ddc3a071ee74db4a701fa5c71bde4ab", 4047 | "4860d8f28fd4452ea3d78f5d360c8920", 4048 | "a8c102ccd45a4bb9a0366fed028c9c89", 4049 | "53be2c46b0634ace8157f69dddf502ed", 4050 | "8aa38554efa847d6b23659bbe3a22fd5", 4051 | "79ea0ca6be994c05a139b4b3b1d44e41", 4052 | "a23c7e7a5ac44f1c9fae6db6fb9a380c", 4053 | "be5a493006c247c6b94a76bfa8cd7717", 4054 | "8aa16db0c6804e789acc16ecda32fe5e", 4055 | "a898f936e23a4c8785e9de322f72c248", 4056 | "5fc6d2a6dde041e0a128e8eb550d9b10", 4057 | "5784196f1f3046b0b47370f2603c6f77", 4058 | "bdbd732073334dc0bde296c4fb3673c5", 4059 | "7c498217462d4c20bc892641e1437d4d", 4060 | "735689422d2648d8941ca86b240f8fec", 4061 | "250afadc3f5b4effad629a23e08a18d7", 4062 | "d9bd3ade496c480697a94ff869e27be6", 4063 | "1338c901f2d049c88a98d2ea31b3fe46", 4064 | "4ef7ad4d6dde4af9876bb5fe43efa56a", 4065 | "53e702e5171c40b7b257df00043bd869", 4066 | "e0e15cb7f0b94a4ab4553b398fa345bd", 4067 | "8972d3a55d1f43ddbad6d4a2543598f6", 4068 | "1434fedfd0c349f5925292e4d7df1b03", 4069 | "447946a3f9ca45c6874540d292ed27c3", 4070 | "46945285c25749079dcb3945fef79f23", 4071 | "07b35023dc9f46168345187a02aabf46", 4072 | "97fabf4a49954879bd24d482a8b7088b", 4073 | "5c08a4c88c7a4873bbcd1e2bfc53ec83", 4074 | "f7e099183e73426ea945ddee509106ce", 4075 | "24c1fecb5f244f3ea91cc67a8942e9e7", 4076 | "9ed7a6cf110c4d559166c1174e635aef", 4077 | "74b378012a2e46268df9de6eee525a39", 4078 | "379423052eed4c03a9f73f6f93a5563a", 4079 | "a84ffe146af54101b04048a700012ac5", 4080 | "b5ed1581833f4cd18df6b618ee6dcb6d", 4081 | "57dd8a572c6b4098a932d09d3f6887a1", 4082 | "8777bc937048458f9f2c5bcdc229be0d", 4083 | "64bb5ff3353d439b8ad3044832f8ad0e", 4084 | "fedf4812a5a2401080ca6ac779172cee", 4085 | "229b7b51aa904bd895a95b212b6a610e", 4086 | "66168d105bd340f7af008e996f5e24ae" 4087 | ] 4088 | }, 4089 | "id": "0I1Wz-EuZ7Do", 4090 | "outputId": "97133506-e964-4c24-973a-58d49c152b65" 4091 | }, 4092 | "execution_count": null, 4093 | "outputs": [ 4094 | { 4095 | "output_type": "display_data", 4096 | "data": { 4097 | "text/plain": [ 4098 | "vocab.json: 0%| | 0.00/1.04M [00:00\n", 4272 | "
\n", 4273 | "\n", 4286 | "\n", 4287 | " \n", 4288 | " \n", 4289 | " \n", 4290 | " \n", 4291 | " \n", 4292 | " \n", 4293 | " \n", 4294 | " \n", 4295 | " \n", 4296 | " \n", 4297 | " \n", 4298 | " \n", 4299 | " \n", 4300 | " \n", 4301 | " \n", 4302 | " \n", 4303 | " \n", 4304 | " \n", 4305 | " \n", 4306 | " \n", 4307 | " \n", 4308 | " \n", 4309 | " \n", 4310 | " \n", 4311 | " \n", 4312 | " \n", 4313 | " \n", 4314 | " \n", 4315 | " \n", 4316 | "
NameSymptoms
count400400
unique392395
topSciaticaSwelling, pain, dry mouth, bad taste
freq33
\n", 4317 | "
\n", 4318 | "
\n", 4319 | "\n", 4320 | "
\n", 4321 | " \n", 4329 | "\n", 4330 | " \n", 4370 | "\n", 4371 | " \n", 4395 | "
\n", 4396 | "\n", 4397 | "\n", 4398 | "
\n", 4399 | " \n", 4410 | "\n", 4411 | "\n", 4500 | "\n", 4501 | " \n", 4523 | "
\n", 4524 | "\n", 4525 | "
\n", 4526 | " \n" 4527 | ] 4528 | }, 4529 | "metadata": {}, 4530 | "execution_count": 24 4531 | } 4532 | ] 4533 | }, 4534 | { 4535 | "cell_type": "code", 4536 | "source": [ 4537 | "# Dataset Prep\n", 4538 | "class LanguageDataset(Dataset):\n", 4539 | " \"\"\"\n", 4540 | " An extension of the Dataset object to:\n", 4541 | " - Make training loop cleaner\n", 4542 | " - Make ingestion easier from pandas df's\n", 4543 | " \"\"\"\n", 4544 | " def __init__(self, df, tokenizer):\n", 4545 | " self.labels = df.columns\n", 4546 | " self.data = df.to_dict(orient='records')\n", 4547 | " self.tokenizer = tokenizer\n", 4548 | " x = self.fittest_max_length(df) # Fix here\n", 4549 | " self.max_length = x\n", 4550 | "\n", 4551 | " def __len__(self):\n", 4552 | " return len(self.data)\n", 4553 | "\n", 4554 | " def __getitem__(self, idx):\n", 4555 | " x = self.data[idx][self.labels[0]]\n", 4556 | " y = self.data[idx][self.labels[1]]\n", 4557 | " text = f\"{x} | {y}\"\n", 4558 | " tokens = self.tokenizer.encode_plus(text, return_tensors='pt', max_length=128, padding='max_length', truncation=True)\n", 4559 | " return tokens\n", 4560 | "\n", 4561 | " def fittest_max_length(self, df): # Fix here\n", 4562 | " \"\"\"\n", 4563 | " Smallest power of two larger than the longest term in the data set.\n", 4564 | " Important to set up max length to speed training time.\n", 4565 | " \"\"\"\n", 4566 | " max_length = max(len(max(df[self.labels[0]], key=len)), len(max(df[self.labels[1]], key=len)))\n", 4567 | " x = 2\n", 4568 | " while x < max_length: x = x * 2\n", 4569 | " return x\n", 4570 | "\n", 4571 | "# Cast the Huggingface data set as a LanguageDataset we defined above\n", 4572 | "data_sample = LanguageDataset(df, tokenizer)\n" 4573 | ], 4574 | "metadata": { 4575 | "id": "lw70elXsc9ZL" 4576 | }, 4577 | "execution_count": null, 4578 | "outputs": [] 4579 | }, 4580 | { 4581 | "cell_type": "code", 4582 | "source": [ 4583 | "data_sample" 4584 | ], 4585 | "metadata": { 4586 | "colab": { 4587 | "base_uri": "https://localhost:8080/" 4588 | }, 4589 | "id": "H3Mu1wmRc9b5", 4590 | "outputId": "eae0559d-7bfd-47b6-dc14-f41b3ed01891" 4591 | }, 4592 | "execution_count": null, 4593 | "outputs": [ 4594 | { 4595 | "output_type": "execute_result", 4596 | "data": { 4597 | "text/plain": [ 4598 | "<__main__.LanguageDataset at 0x7c9e40196230>" 4599 | ] 4600 | }, 4601 | "metadata": {}, 4602 | "execution_count": 29 4603 | } 4604 | ] 4605 | }, 4606 | { 4607 | "cell_type": "code", 4608 | "source": [ 4609 | "# Create train, valid\n", 4610 | "train_size = int(0.8 * len(data_sample))\n", 4611 | "valid_size = len(data_sample) - train_size\n", 4612 | "train_data, valid_data = random_split(data_sample, [train_size, valid_size])" 4613 | ], 4614 | "metadata": { 4615 | "id": "fWs2iOdAc9dv" 4616 | }, 4617 | "execution_count": null, 4618 | "outputs": [] 4619 | }, 4620 | { 4621 | "cell_type": "code", 4622 | "source": [ 4623 | "# Make the iterators\n", 4624 | "train_loader = DataLoader(train_data, batch_size=BATCH_SIZE, shuffle=True)\n", 4625 | "valid_loader = DataLoader(valid_data, batch_size=BATCH_SIZE)" 4626 | ], 4627 | "metadata": { 4628 | "id": "4ECz4JD1c9gh" 4629 | }, 4630 | "execution_count": null, 4631 | "outputs": [] 4632 | }, 4633 | { 4634 | "cell_type": "code", 4635 | "source": [ 4636 | "# Set the number of epochs\n", 4637 | "num_epochs = 10" 4638 | ], 4639 | "metadata": { 4640 | "id": "U0NxSiIuc9j3" 4641 | }, 4642 | "execution_count": null, 4643 | "outputs": [] 4644 | }, 4645 | { 4646 | "cell_type": "code", 4647 | "source": [ 4648 | "# Training parameters\n", 4649 | "batch_size = BATCH_SIZE\n", 4650 | "model_name = 'distilgpt2'\n", 4651 | "gpu = 0" 4652 | ], 4653 | "metadata": { 4654 | "id": "AOfoBQALe5iI" 4655 | }, 4656 | "execution_count": null, 4657 | "outputs": [] 4658 | }, 4659 | { 4660 | "cell_type": "code", 4661 | "source": [ 4662 | "# Set the learning rate and loss function\n", 4663 | "## CrossEntropyLoss measures how close answers to the truth.\n", 4664 | "## More punishing for high confidence wrong answers\n", 4665 | "criterion = nn.CrossEntropyLoss(ignore_index = tokenizer.pad_token_id)\n", 4666 | "optimizer = optim.Adam(model.parameters(), lr=5e-4)\n", 4667 | "tokenizer.pad_token = tokenizer.eos_token" 4668 | ], 4669 | "metadata": { 4670 | "id": "jgv7BrEse5kv" 4671 | }, 4672 | "execution_count": null, 4673 | "outputs": [] 4674 | }, 4675 | { 4676 | "cell_type": "code", 4677 | "source": [ 4678 | "# Init a results dataframe\n", 4679 | "results = pd.DataFrame(columns=['epoch', 'transformer', 'batch_size', 'gpu',\n", 4680 | " 'training_loss', 'validation_loss', 'epoch_duration_sec'])" 4681 | ], 4682 | "metadata": { 4683 | "id": "hsrgomD-e5nL" 4684 | }, 4685 | "execution_count": null, 4686 | "outputs": [] 4687 | }, 4688 | { 4689 | "cell_type": "code", 4690 | "source": [ 4691 | "# The training loop\n", 4692 | "for epoch in range(num_epochs):\n", 4693 | " start_time = time.time() # Start the timer for the epoch\n", 4694 | "\n", 4695 | " # Training\n", 4696 | " ## This line tells the model we're in 'learning mode'\n", 4697 | " model.train()\n", 4698 | " epoch_training_loss = 0\n", 4699 | " train_iterator = tqdm(train_loader, desc=f\"Training Epoch {epoch+1}/{num_epochs} Batch Size: {batch_size}, Transformer: {model_name}\")\n", 4700 | " for batch in train_iterator:\n", 4701 | " optimizer.zero_grad()\n", 4702 | " inputs = batch['input_ids'].squeeze(1).to(device)\n", 4703 | " targets = inputs.clone()\n", 4704 | " outputs = model(input_ids=inputs, labels=targets)\n", 4705 | " loss = outputs.loss\n", 4706 | " loss.backward()\n", 4707 | " optimizer.step()\n", 4708 | " train_iterator.set_postfix({'Training Loss': loss.item()})\n", 4709 | " epoch_training_loss += loss.item()\n", 4710 | " avg_epoch_training_loss = epoch_training_loss / len(train_iterator)\n", 4711 | "\n", 4712 | " # Validation\n", 4713 | " ## This line below tells the model to 'stop learning'\n", 4714 | " model.eval()\n", 4715 | " epoch_validation_loss = 0\n", 4716 | " total_loss = 0\n", 4717 | " valid_iterator = tqdm(valid_loader, desc=f\"Validation Epoch {epoch+1}/{num_epochs}\")\n", 4718 | " with torch.no_grad():\n", 4719 | " for batch in valid_iterator:\n", 4720 | " inputs = batch['input_ids'].squeeze(1).to(device)\n", 4721 | " targets = inputs.clone()\n", 4722 | " outputs = model(input_ids=inputs, labels=targets)\n", 4723 | " loss = outputs.loss\n", 4724 | " total_loss += loss\n", 4725 | " valid_iterator.set_postfix({'Validation Loss': loss.item()})\n", 4726 | " epoch_validation_loss += loss.item()\n", 4727 | "\n", 4728 | " avg_epoch_validation_loss = epoch_validation_loss / len(valid_loader)\n", 4729 | "\n", 4730 | " end_time = time.time() # End the timer for the epoch\n", 4731 | " epoch_duration_sec = end_time - start_time # Calculate the duration in seconds\n", 4732 | "\n", 4733 | " new_row = {'transformer': model_name,\n", 4734 | " 'batch_size': batch_size,\n", 4735 | " 'gpu': gpu,\n", 4736 | " 'epoch': epoch+1,\n", 4737 | " 'training_loss': avg_epoch_training_loss,\n", 4738 | " 'validation_loss': avg_epoch_validation_loss,\n", 4739 | " 'epoch_duration_sec': epoch_duration_sec} # Add epoch_duration to the dataframe\n", 4740 | "\n", 4741 | " results.loc[len(results)] = new_row\n", 4742 | " print(f\"Epoch: {epoch+1}, Validation Loss: {total_loss/len(valid_loader)}\")" 4743 | ], 4744 | "metadata": { 4745 | "colab": { 4746 | "base_uri": "https://localhost:8080/" 4747 | }, 4748 | "id": "v1lSK_1Re5qi", 4749 | "outputId": "c63455fa-0212-4186-dbcd-474c296b2585" 4750 | }, 4751 | "execution_count": null, 4752 | "outputs": [ 4753 | { 4754 | "output_type": "stream", 4755 | "name": "stderr", 4756 | "text": [ 4757 | "Training Epoch 1/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.17it/s, Training Loss=0.365]\n", 4758 | "Validation Epoch 1/10: 100%|██████████| 10/10 [00:00<00:00, 17.85it/s, Validation Loss=0.619]\n" 4759 | ] 4760 | }, 4761 | { 4762 | "output_type": "stream", 4763 | "name": "stdout", 4764 | "text": [ 4765 | "Epoch: 1, Validation Loss: 0.6991834044456482\n" 4766 | ] 4767 | }, 4768 | { 4769 | "output_type": "stream", 4770 | "name": "stderr", 4771 | "text": [ 4772 | "Training Epoch 2/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.07it/s, Training Loss=0.319]\n", 4773 | "Validation Epoch 2/10: 100%|██████████| 10/10 [00:00<00:00, 17.46it/s, Validation Loss=0.683]\n" 4774 | ] 4775 | }, 4776 | { 4777 | "output_type": "stream", 4778 | "name": "stdout", 4779 | "text": [ 4780 | "Epoch: 2, Validation Loss: 0.7609376907348633\n" 4781 | ] 4782 | }, 4783 | { 4784 | "output_type": "stream", 4785 | "name": "stderr", 4786 | "text": [ 4787 | "Training Epoch 3/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:08<00:00, 4.98it/s, Training Loss=0.259]\n", 4788 | "Validation Epoch 3/10: 100%|██████████| 10/10 [00:00<00:00, 17.42it/s, Validation Loss=0.713]\n" 4789 | ] 4790 | }, 4791 | { 4792 | "output_type": "stream", 4793 | "name": "stdout", 4794 | "text": [ 4795 | "Epoch: 3, Validation Loss: 0.8256472945213318\n" 4796 | ] 4797 | }, 4798 | { 4799 | "output_type": "stream", 4800 | "name": "stderr", 4801 | "text": [ 4802 | "Training Epoch 4/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.02it/s, Training Loss=0.258]\n", 4803 | "Validation Epoch 4/10: 100%|██████████| 10/10 [00:00<00:00, 17.60it/s, Validation Loss=0.77]\n" 4804 | ] 4805 | }, 4806 | { 4807 | "output_type": "stream", 4808 | "name": "stdout", 4809 | "text": [ 4810 | "Epoch: 4, Validation Loss: 0.8827103972434998\n" 4811 | ] 4812 | }, 4813 | { 4814 | "output_type": "stream", 4815 | "name": "stderr", 4816 | "text": [ 4817 | "Training Epoch 5/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.13it/s, Training Loss=0.167]\n", 4818 | "Validation Epoch 5/10: 100%|██████████| 10/10 [00:00<00:00, 17.80it/s, Validation Loss=0.799]\n" 4819 | ] 4820 | }, 4821 | { 4822 | "output_type": "stream", 4823 | "name": "stdout", 4824 | "text": [ 4825 | "Epoch: 5, Validation Loss: 0.9266298413276672\n" 4826 | ] 4827 | }, 4828 | { 4829 | "output_type": "stream", 4830 | "name": "stderr", 4831 | "text": [ 4832 | "Training Epoch 6/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.18it/s, Training Loss=0.196]\n", 4833 | "Validation Epoch 6/10: 100%|██████████| 10/10 [00:00<00:00, 17.98it/s, Validation Loss=0.798]\n" 4834 | ] 4835 | }, 4836 | { 4837 | "output_type": "stream", 4838 | "name": "stdout", 4839 | "text": [ 4840 | "Epoch: 6, Validation Loss: 0.9501779675483704\n" 4841 | ] 4842 | }, 4843 | { 4844 | "output_type": "stream", 4845 | "name": "stderr", 4846 | "text": [ 4847 | "Training Epoch 7/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.22it/s, Training Loss=0.0849]\n", 4848 | "Validation Epoch 7/10: 100%|██████████| 10/10 [00:00<00:00, 17.94it/s, Validation Loss=0.925]\n" 4849 | ] 4850 | }, 4851 | { 4852 | "output_type": "stream", 4853 | "name": "stdout", 4854 | "text": [ 4855 | "Epoch: 7, Validation Loss: 1.0285433530807495\n" 4856 | ] 4857 | }, 4858 | { 4859 | "output_type": "stream", 4860 | "name": "stderr", 4861 | "text": [ 4862 | "Training Epoch 8/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.24it/s, Training Loss=0.0743]\n", 4863 | "Validation Epoch 8/10: 100%|██████████| 10/10 [00:00<00:00, 17.94it/s, Validation Loss=0.841]\n" 4864 | ] 4865 | }, 4866 | { 4867 | "output_type": "stream", 4868 | "name": "stdout", 4869 | "text": [ 4870 | "Epoch: 8, Validation Loss: 1.005602240562439\n" 4871 | ] 4872 | }, 4873 | { 4874 | "output_type": "stream", 4875 | "name": "stderr", 4876 | "text": [ 4877 | "Training Epoch 9/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.22it/s, Training Loss=0.074]\n", 4878 | "Validation Epoch 9/10: 100%|██████████| 10/10 [00:00<00:00, 17.78it/s, Validation Loss=0.865]\n" 4879 | ] 4880 | }, 4881 | { 4882 | "output_type": "stream", 4883 | "name": "stdout", 4884 | "text": [ 4885 | "Epoch: 9, Validation Loss: 1.039918065071106\n" 4886 | ] 4887 | }, 4888 | { 4889 | "output_type": "stream", 4890 | "name": "stderr", 4891 | "text": [ 4892 | "Training Epoch 10/10 Batch Size: 8, Transformer: distilgpt2: 100%|██████████| 40/40 [00:07<00:00, 5.20it/s, Training Loss=0.0684]\n", 4893 | "Validation Epoch 10/10: 100%|██████████| 10/10 [00:00<00:00, 18.05it/s, Validation Loss=0.906]" 4894 | ] 4895 | }, 4896 | { 4897 | "output_type": "stream", 4898 | "name": "stdout", 4899 | "text": [ 4900 | "Epoch: 10, Validation Loss: 1.0768476724624634\n" 4901 | ] 4902 | }, 4903 | { 4904 | "output_type": "stream", 4905 | "name": "stderr", 4906 | "text": [ 4907 | "\n" 4908 | ] 4909 | } 4910 | ] 4911 | }, 4912 | { 4913 | "cell_type": "code", 4914 | "source": [ 4915 | "input_str = \"Kidney Failure\"\n", 4916 | "input_ids = tokenizer.encode(input_str, return_tensors='pt').to(device)\n", 4917 | "\n", 4918 | "output = model.generate(\n", 4919 | " input_ids,\n", 4920 | " max_length=20,\n", 4921 | " num_return_sequences=1,\n", 4922 | " do_sample=True,\n", 4923 | " top_k=8,\n", 4924 | " top_p=0.95,\n", 4925 | " temperature=0.5,\n", 4926 | " repetition_penalty=1.2\n", 4927 | ")\n", 4928 | "\n", 4929 | "decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)\n", 4930 | "print(decoded_output)" 4931 | ], 4932 | "metadata": { 4933 | "colab": { 4934 | "base_uri": "https://localhost:8080/" 4935 | }, 4936 | "id": "kdFB-15HfByw", 4937 | "outputId": "4172d404-506a-4310-d646-38041fcf42e7" 4938 | }, 4939 | "execution_count": null, 4940 | "outputs": [ 4941 | { 4942 | "output_type": "stream", 4943 | "name": "stderr", 4944 | "text": [ 4945 | "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", 4946 | "Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.\n" 4947 | ] 4948 | }, 4949 | { 4950 | "output_type": "stream", 4951 | "name": "stdout", 4952 | "text": [ 4953 | "Kidney Failure | Decreased urine output, fluid retention, fatigue, shortness of breath, nausea\n" 4954 | ] 4955 | } 4956 | ] 4957 | }, 4958 | { 4959 | "cell_type": "code", 4960 | "source": [ 4961 | "torch.save(model, 'SmallMedLM.pt')" 4962 | ], 4963 | "metadata": { 4964 | "id": "wYx0GjubfB06" 4965 | }, 4966 | "execution_count": null, 4967 | "outputs": [] 4968 | }, 4969 | { 4970 | "cell_type": "code", 4971 | "source": [ 4972 | "torch.save(model, 'drive/My Drive/SmallMedLM.pt')" 4973 | ], 4974 | "metadata": { 4975 | "id": "hUHvYtrqfB3f" 4976 | }, 4977 | "execution_count": null, 4978 | "outputs": [] 4979 | }, 4980 | { 4981 | "cell_type": "code", 4982 | "source": [], 4983 | "metadata": { 4984 | "id": "NbMjEZcMfB51" 4985 | }, 4986 | "execution_count": null, 4987 | "outputs": [] 4988 | }, 4989 | { 4990 | "cell_type": "code", 4991 | "source": [], 4992 | "metadata": { 4993 | "id": "A8AZHT6KfB9V" 4994 | }, 4995 | "execution_count": null, 4996 | "outputs": [] 4997 | } 4998 | ] 4999 | } --------------------------------------------------------------------------------