├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── main.yml ├── .gitignore ├── 01_02 TF2_0_NLP_tasks_with_Transformers.ipynb ├── 01_04 TF2_0_Challenge_NLP_model_size.ipynb ├── 01_05 TF2_0_Solution_NLP_model_size.ipynb ├── 02_01 TF2_0_bias.ipynb ├── 03_03 TF2_0_tokenizers.ipynb ├── 03_06 TF2_0_BERT_fine_tuning.ipynb ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE └── README.md /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Codeowners for these exercise files: 2 | # * (asterisk) deotes "all files and folders" 3 | # Example: * @producer @instructor 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | ## Issue Overview 9 | 10 | 11 | ## Describe your environment 12 | 13 | 14 | ## Steps to Reproduce 15 | 16 | 1. 17 | 2. 18 | 3. 19 | 4. 20 | 21 | ## Expected Behavior 22 | 23 | 24 | ## Current Behavior 25 | 26 | 27 | ## Possible Solution 28 | 29 | 30 | ## Screenshots / Video 31 | 32 | 33 | ## Related Issues 34 | 35 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Copy To Branches 2 | on: 3 | workflow_dispatch: 4 | jobs: 5 | copy-to-branches: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v2 9 | with: 10 | fetch-depth: 0 11 | - name: Copy To Branches Action 12 | uses: planetoftheweb/copy-to-branches@v1 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | .tmp 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /01_02 TF2_0_NLP_tasks_with_Transformers.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "TF2.0 NLP tasks with Transformers.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [] 9 | }, 10 | "kernelspec": { 11 | "name": "python3", 12 | "display_name": "Python 3" 13 | }, 14 | "language_info": { 15 | "name": "python" 16 | } 17 | }, 18 | "cells": [ 19 | { 20 | "cell_type": "markdown", 21 | "metadata": { 22 | "id": "6SXrKAeEundU" 23 | }, 24 | "source": [ 25 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1fBiTjumxoFCRQf1zOtZUokC9mJZTw9Y6?usp=sharing)" 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "metadata": { 31 | "id": "tmx-6YifWLLQ" 32 | }, 33 | "source": [ 34 | "**NLP use cases**\n", 35 | "- Classifying whole sentences\n", 36 | "- Classifying each word in a sentence\n", 37 | "- Answering a question\n", 38 | "- Text summarization\n", 39 | "- Fill in the blanks\n", 40 | "- Translating from one language to another" 41 | ] 42 | }, 43 | { 44 | "cell_type": "code", 45 | "metadata": { 46 | "id": "cd-h9TkLuc_6" 47 | }, 48 | "source": [ 49 | "%%capture\n", 50 | "!pip install transformers" 51 | ], 52 | "execution_count": null, 53 | "outputs": [] 54 | }, 55 | { 56 | "cell_type": "code", 57 | "metadata": { 58 | "id": "39XhY1Y-uzMK" 59 | }, 60 | "source": [ 61 | "from transformers import pipeline\n", 62 | "import textwrap\n", 63 | "wrapper = textwrap.TextWrapper(width=80, break_long_words=False, break_on_hyphens=False)" 64 | ], 65 | "execution_count": null, 66 | "outputs": [] 67 | }, 68 | { 69 | "cell_type": "markdown", 70 | "metadata": { 71 | "id": "93QbwOgisBCK" 72 | }, 73 | "source": [ 74 | "##Classifying whole sentences" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "metadata": { 80 | "colab": { 81 | "base_uri": "https://localhost:8080/" 82 | }, 83 | "id": "KcWBiNRru7ta", 84 | "outputId": "55e61978-919b-4540-9dee-2576f024fe31" 85 | }, 86 | "source": [ 87 | "sentence = 'The flights were on time both in Sydney and the connecting flight in Singapore. The organisation to cope with the COVID 19 restrictions while in transit was well planned and directions easy to follow, the plane was comfortable with a reasonable selection of in flight entertainment. Crew were pleasant and helpful.'\n", 88 | "classifier = pipeline('text-classification', model='distilbert-base-uncased-finetuned-sst-2-english')\n", 89 | "c = classifier(sentence)\n", 90 | "print('\\nSentence:')\n", 91 | "print(wrapper.fill(sentence))\n", 92 | "print(f\"\\nThis sentence is classified with a {c[0]['label']} sentiment\")" 93 | ], 94 | "execution_count": null, 95 | "outputs": [ 96 | { 97 | "output_type": "stream", 98 | "name": "stdout", 99 | "text": [ 100 | "\n", 101 | "Sentence:\n", 102 | "The flights were on time both in Sydney and the connecting flight in Singapore.\n", 103 | "The organisation to cope with the COVID 19 restrictions while in transit was\n", 104 | "well planned and directions easy to follow, the plane was comfortable with a\n", 105 | "reasonable selection of in flight entertainment. Crew were pleasant and helpful.\n", 106 | "\n", 107 | "This sentence is classified with a POSITIVE sentiment\n" 108 | ] 109 | } 110 | ] 111 | }, 112 | { 113 | "cell_type": "markdown", 114 | "metadata": { 115 | "id": "yvvab0H3sfgh" 116 | }, 117 | "source": [ 118 | "##Classifying each word in a sentence" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "metadata": { 124 | "colab": { 125 | "base_uri": "https://localhost:8080/" 126 | }, 127 | "id": "uF6vLguV6lkz", 128 | "outputId": "5156b21b-3901-4ec8-8c8e-06f92a1d0bf7" 129 | }, 130 | "source": [ 131 | "sentence = \"Singapore Airlines was the first airline to fly the A380. Chew Choon Seng was Singapore Airline's CEO at the time. Singapore Airlines flies to New York daily.\"\n", 132 | "ner = pipeline('token-classification', model='dbmdz/bert-large-cased-finetuned-conll03-english', grouped_entities=True)\n", 133 | "ners = ner(sentence)\n", 134 | "print('\\nSentence:')\n", 135 | "print(wrapper.fill(sentence))\n", 136 | "print('\\n')\n", 137 | "for n in ners:\n", 138 | " print(f\"{n['word']} -> {n['entity_group']}\")" 139 | ], 140 | "execution_count": null, 141 | "outputs": [ 142 | { 143 | "output_type": "stream", 144 | "name": "stderr", 145 | "text": [ 146 | "/usr/local/lib/python3.7/dist-packages/transformers/pipelines/token_classification.py:129: UserWarning: `grouped_entities` is deprecated and will be removed in version v5.0.0, defaulted to `aggregation_strategy=\"AggregationStrategy.SIMPLE\"` instead.\n", 147 | " f'`grouped_entities` is deprecated and will be removed in version v5.0.0, defaulted to `aggregation_strategy=\"{aggregation_strategy}\"` instead.'\n" 148 | ] 149 | }, 150 | { 151 | "output_type": "stream", 152 | "name": "stdout", 153 | "text": [ 154 | "\n", 155 | "Sentence:\n", 156 | "Singapore Airlines was the first airline to fly the A380. Chew Choon Seng was\n", 157 | "Singapore Airline's CEO at the time. Singapore Airlines flies to New York daily.\n", 158 | "\n", 159 | "\n", 160 | "Singapore Airlines -> ORG\n", 161 | "A380 -> MISC\n", 162 | "Chew Choon Seng -> PER\n", 163 | "Singapore Airline -> ORG\n", 164 | "Singapore Airlines -> ORG\n", 165 | "New York -> LOC\n" 166 | ] 167 | } 168 | ] 169 | }, 170 | { 171 | "cell_type": "markdown", 172 | "metadata": { 173 | "id": "XGGSYtXLtF_S" 174 | }, 175 | "source": [ 176 | "##Answering a question" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "metadata": { 182 | "colab": { 183 | "base_uri": "https://localhost:8080/" 184 | }, 185 | "id": "QrEtUj8BtF_S", 186 | "outputId": "6bd13fdc-68b7-47bb-cd96-06f834a723b9" 187 | }, 188 | "source": [ 189 | "context = '''\n", 190 | "Singapore Airlines was founded in 1947 and was originally known as Malayan Airways. It is the national airline of Singapore and is based at Singapore Changi Airport. \n", 191 | "From this hub, the airline flies to more than 60 destinations, with flights to Seoul, Tokyo and Melbourne among the most popular of its routes. \n", 192 | "It is particularly strong in Southeast Asian and Australian destinations (the so-called Kangaroo Route), but also flies to 6 different continents, covering 35 countries.\n", 193 | "There are more than 100 planes in the Singapore Airlines fleet, most of which are Airbus aircraft plus a smaller amount Boeings.\n", 194 | "The company is known for frequently updating the aircraft in its fleet.'''\n", 195 | "\n", 196 | "\n", 197 | "question = 'How many aircrafts does Singapore Airlines have?'\n", 198 | "\n", 199 | "print('Text:')\n", 200 | "print(wrapper.fill(context))\n", 201 | "print('\\nQuestion:')\n", 202 | "print(question)" 203 | ], 204 | "execution_count": null, 205 | "outputs": [ 206 | { 207 | "output_type": "stream", 208 | "name": "stdout", 209 | "text": [ 210 | "Text:\n", 211 | " Singapore Airlines was founded in 1947 and was originally known as Malayan\n", 212 | "Airways. It is the national airline of Singapore and is based at Singapore\n", 213 | "Changi Airport. From this hub, the airline flies to more than 60 destinations,\n", 214 | "with flights to Seoul, Tokyo and Melbourne among the most popular of its routes.\n", 215 | "It is particularly strong in Southeast Asian and Australian destinations (the\n", 216 | "so-called Kangaroo Route), but also flies to 6 different continents, covering 35\n", 217 | "countries. There are more than 100 planes in the Singapore Airlines fleet, most\n", 218 | "of which are Airbus aircraft plus a smaller amount Boeings. The company is known\n", 219 | "for frequently updating the aircraft in its fleet.\n", 220 | "\n", 221 | "Question:\n", 222 | "How many aircrafts does Singapore Airlines have?\n" 223 | ] 224 | } 225 | ] 226 | }, 227 | { 228 | "cell_type": "code", 229 | "metadata": { 230 | "id": "DPUX75hiDdlU", 231 | "colab": { 232 | "base_uri": "https://localhost:8080/", 233 | "height": 121 234 | }, 235 | "outputId": "024db06f-8618-44dc-a9ea-66ede64948af" 236 | }, 237 | "source": [ 238 | "from transformers import pipeline\n", 239 | "\n", 240 | "qa = pipeline('question-answering', model='distilbert-base-cased-distilled-squad')\n", 241 | "\n", 242 | "print('\\nQuestion:')\n", 243 | "print(question + '\\n')\n", 244 | "print('Answer:')\n", 245 | "a = qa(context=context, question=question)\n", 246 | "a['answer']" 247 | ], 248 | "execution_count": null, 249 | "outputs": [ 250 | { 251 | "output_type": "stream", 252 | "name": "stdout", 253 | "text": [ 254 | "\n", 255 | "Question:\n", 256 | "How many aircrafts does Singapore Airlines have?\n", 257 | "\n", 258 | "Answer:\n" 259 | ] 260 | }, 261 | { 262 | "output_type": "execute_result", 263 | "data": { 264 | "application/vnd.google.colaboratory.intrinsic+json": { 265 | "type": "string" 266 | }, 267 | "text/plain": [ 268 | "'more than 100'" 269 | ] 270 | }, 271 | "metadata": {}, 272 | "execution_count": 6 273 | } 274 | ] 275 | }, 276 | { 277 | "cell_type": "markdown", 278 | "metadata": { 279 | "id": "os4TWQ9XAQgk" 280 | }, 281 | "source": [ 282 | "##Text summarization" 283 | ] 284 | }, 285 | { 286 | "cell_type": "code", 287 | "metadata": { 288 | "colab": { 289 | "base_uri": "https://localhost:8080/" 290 | }, 291 | "id": "aVbliCgwtF_T", 292 | "outputId": "029942bf-c4c7-4081-c702-dcbcaede1158" 293 | }, 294 | "source": [ 295 | "review = '''\n", 296 | "Extremely unusual time to fly as we needed an exemption to fly out of Australia from the government. We obtained one as working in Tokyo for the year as teachers.\n", 297 | "The check in procedure does take a lot longer as more paperwork and phone calls are needed to check if you are allowed to travel. The staff were excellent in explaining the procedure as they are working with very few numbers.\n", 298 | "The flight had 40 people only, so lots of room and yes we had 3 seats each. The service of meals and beverages was done very quickly and efficiently.\n", 299 | "Changi airport was like a ghost town with most shops closed and all passengers are walked/transported to a transit zone until your next flight is ready. You are then walked in single file or transported to your next flight, so very strange as at times their seemed be more workers in PPE gear than passengers.\n", 300 | "The steps we went through at Narita were extensive, downloading apps, fill in paperwork and giving a saliva sample to test for covid 19. \n", 301 | "It took about 2 hours to get through the steps and we only sat down for maybe 10 minutes at the last stop to get back your covid results. \n", 302 | "The people involved were fantastic and we were lucky that we were numbers two and three in the initial first line up, but still over 2 hours it took so be aware. We knew we were quick as the people picking us up told us we were first out.'''\n", 303 | "\n", 304 | "print('\\nOriginal text:\\n')\n", 305 | "print(wrapper.fill(review))\n", 306 | "summarize = pipeline('summarization', model='sshleifer/distilbart-cnn-12-6')\n", 307 | "summarized_text = summarize(review)[0]['summary_text']\n", 308 | "print('\\nSummarized text:')\n", 309 | "print(wrapper.fill(summarized_text))" 310 | ], 311 | "execution_count": null, 312 | "outputs": [ 313 | { 314 | "output_type": "stream", 315 | "name": "stdout", 316 | "text": [ 317 | "\n", 318 | "Original text:\n", 319 | "\n", 320 | " Extremely unusual time to fly as we needed an exemption to fly out of Australia\n", 321 | "from the government. We obtained one as working in Tokyo for the year as\n", 322 | "teachers. The check in procedure does take a lot longer as more paperwork and\n", 323 | "phone calls are needed to check if you are allowed to travel. The staff were\n", 324 | "excellent in explaining the procedure as they are working with very few numbers.\n", 325 | "The flight had 40 people only, so lots of room and yes we had 3 seats each. The\n", 326 | "service of meals and beverages was done very quickly and efficiently. Changi\n", 327 | "airport was like a ghost town with most shops closed and all passengers are\n", 328 | "walked/transported to a transit zone until your next flight is ready. You are\n", 329 | "then walked in single file or transported to your next flight, so very strange\n", 330 | "as at times their seemed be more workers in PPE gear than passengers. The steps\n", 331 | "we went through at Narita were extensive, downloading apps, fill in paperwork\n", 332 | "and giving a saliva sample to test for covid 19. It took about 2 hours to get\n", 333 | "through the steps and we only sat down for maybe 10 minutes at the last stop to\n", 334 | "get back your covid results. The people involved were fantastic and we were\n", 335 | "lucky that we were numbers two and three in the initial first line up, but still\n", 336 | "over 2 hours it took so be aware. We knew we were quick as the people picking us\n", 337 | "up told us we were first out.\n", 338 | "\n", 339 | "Summarized text:\n", 340 | " The flight had 40 people only, so lots of room and yes we had 3 seats each .\n", 341 | "The check in procedure does take a lot longer as more paperwork and phone calls\n", 342 | "are needed to check if you are allowed to travel . The staff were excellent in\n", 343 | "explaining the procedure as they are working with very few numbers .\n" 344 | ] 345 | } 346 | ] 347 | }, 348 | { 349 | "cell_type": "markdown", 350 | "metadata": { 351 | "id": "g6WQFMF0v1Ts" 352 | }, 353 | "source": [ 354 | "##Fill in the blanks" 355 | ] 356 | }, 357 | { 358 | "cell_type": "code", 359 | "metadata": { 360 | "colab": { 361 | "base_uri": "https://localhost:8080/" 362 | }, 363 | "id": "7YgMzrVGxrGq", 364 | "outputId": "9f3490d3-7c5d-4f6e-d413-0ad6a6130c09" 365 | }, 366 | "source": [ 367 | "sentence = 'It is the national of Singapore'\n", 368 | "mask = pipeline('fill-mask', model='distilroberta-base')\n", 369 | "masks = mask(sentence)\n", 370 | "for m in masks:\n", 371 | " print(m['sequence'])" 372 | ], 373 | "execution_count": null, 374 | "outputs": [ 375 | { 376 | "output_type": "stream", 377 | "name": "stdout", 378 | "text": [ 379 | "It is the national anthem of Singapore\n", 380 | "It is the national capital of Singapore\n", 381 | "It is the national pride of Singapore\n", 382 | "It is the national treasure of Singapore\n", 383 | "It is the national motto of Singapore\n" 384 | ] 385 | } 386 | ] 387 | }, 388 | { 389 | "cell_type": "code", 390 | "metadata": { 391 | "colab": { 392 | "base_uri": "https://localhost:8080/" 393 | }, 394 | "id": "rj63RtEuNl0Z", 395 | "outputId": "423c1585-a7ee-440a-d82a-e380187741fa" 396 | }, 397 | "source": [ 398 | "sentence = 'Singapore Airlines is the national of Singapore'\n", 399 | "mask = pipeline('fill-mask', model='distilroberta-base')\n", 400 | "masks = mask(sentence)\n", 401 | "for m in masks:\n", 402 | " print(m['sequence'])" 403 | ], 404 | "execution_count": null, 405 | "outputs": [ 406 | { 407 | "output_type": "stream", 408 | "name": "stdout", 409 | "text": [ 410 | "Singapore Airlines is the national airline of Singapore\n", 411 | "Singapore Airlines is the national carrier of Singapore\n", 412 | "Singapore Airlines is the national airport of Singapore\n", 413 | "Singapore Airlines is the national airlines of Singapore\n", 414 | "Singapore Airlines is the national capital of Singapore\n" 415 | ] 416 | } 417 | ] 418 | }, 419 | { 420 | "cell_type": "markdown", 421 | "metadata": { 422 | "id": "-7xGy6XkBUSt" 423 | }, 424 | "source": [ 425 | "##Translation (English to German)" 426 | ] 427 | }, 428 | { 429 | "cell_type": "code", 430 | "metadata": { 431 | "id": "KuylAnUBCQX7", 432 | "colab": { 433 | "base_uri": "https://localhost:8080/" 434 | }, 435 | "outputId": "40c7f21a-5316-411c-de9b-6b4c06c27e94" 436 | }, 437 | "source": [ 438 | "english = '''It took about 2 hours to get through the steps and we only sat down for maybe 10 minutes at the last stop to get back your covid results. '''\n", 439 | "\n", 440 | "translator = pipeline('translation_en_to_de', model='t5-base')\n", 441 | "german = translator(english)\n", 442 | "print('\\nEnglish:')\n", 443 | "print(english)\n", 444 | "print('\\nGerman:')\n", 445 | "print(german[0]['translation_text'])" 446 | ], 447 | "execution_count": null, 448 | "outputs": [ 449 | { 450 | "output_type": "stream", 451 | "name": "stdout", 452 | "text": [ 453 | "\n", 454 | "English:\n", 455 | "It took about 2 hours to get through the steps and we only sat down for maybe 10 minutes at the last stop to get back your covid results. \n", 456 | "\n", 457 | "German:\n", 458 | "Es dauerte ca. 2 Stunden, die Schritte zu durchlaufen und wir saßen nur für etwa 10 Minuten an der letzten Haltestelle, um Ihre Ergebnisse zurückzuholen.\n" 459 | ] 460 | } 461 | ] 462 | } 463 | ] 464 | } -------------------------------------------------------------------------------- /01_04 TF2_0_Challenge_NLP_model_size.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "TF2.0 Challenge - NLP model size.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [] 9 | }, 10 | "kernelspec": { 11 | "name": "python3", 12 | "display_name": "Python 3" 13 | }, 14 | "language_info": { 15 | "name": "python" 16 | } 17 | }, 18 | "cells": [ 19 | { 20 | "cell_type": "markdown", 21 | "metadata": { 22 | "id": "z7ZZ2c26XgJk" 23 | }, 24 | "source": [ 25 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1BHVSQUdSdHxr-G-rlKk3JS7FupALufyn?usp=sharing)" 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "metadata": { 31 | "id": "lXkCf9hKXkIl" 32 | }, 33 | "source": [ 34 | "# Challenge: NLP model size\n", 35 | "1. How many parameters does the BERT base uncased model have? Use the *get_model_size function* below to help you.\n", 36 | "2. If you know the number of parameters for a model, how might you be able to determine how much memory is required when running a model inference?\n", 37 | "3. If you wanted to run a GPT-3 175 billion inference. How much RAM would your infrastructure require.\n", 38 | "\n", 39 | "This should take you between 5-10 minutes\n" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "metadata": { 45 | "id": "sIea7CKmuTYB" 46 | }, 47 | "source": [ 48 | "!pip install transformers" 49 | ], 50 | "execution_count": null, 51 | "outputs": [] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "metadata": { 56 | "id": "AaHc9qEnyUT-" 57 | }, 58 | "source": [ 59 | "from transformers import TFAutoModel, AutoTokenizer\n", 60 | "\n", 61 | "def get_model_size(checkpoint='bert-base-cased'):\n", 62 | " '''For use with NLP models only\n", 63 | " Usage: \n", 64 | " checkpoint - the NLP model\n", 65 | " returns the size of the NLP model you want to determine\n", 66 | " Run this on colab.research.google.com as this downloads the model \n", 67 | " before calculating the number of parameters. \n", 68 | " '''\n", 69 | " \n", 70 | " model = TFAutoModel.from_pretrained(checkpoint)\n", 71 | " tokenizer = AutoTokenizer.from_pretrained(checkpoint)\n", 72 | " model.summary()\n", 73 | "\n", 74 | "get_model_size('bert-base-uncased')" 75 | ], 76 | "execution_count": null, 77 | "outputs": [] 78 | } 79 | ] 80 | } -------------------------------------------------------------------------------- /01_05 TF2_0_Solution_NLP_model_size.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "TF2.0 Solution - NLP model size.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [] 9 | }, 10 | "kernelspec": { 11 | "name": "python3", 12 | "display_name": "Python 3" 13 | }, 14 | "language_info": { 15 | "name": "python" 16 | }, 17 | "widgets": { 18 | "application/vnd.jupyter.widget-state+json": { 19 | "3ef37badd8cb4529995b4758d2a3d1c3": { 20 | "model_module": "@jupyter-widgets/controls", 21 | "model_name": "HBoxModel", 22 | "model_module_version": "1.5.0", 23 | "state": { 24 | "_view_name": "HBoxView", 25 | "_dom_classes": [], 26 | "_model_name": "HBoxModel", 27 | "_view_module": "@jupyter-widgets/controls", 28 | "_model_module_version": "1.5.0", 29 | "_view_count": null, 30 | "_view_module_version": "1.5.0", 31 | "box_style": "", 32 | "layout": "IPY_MODEL_29de041bbc274adbb5b98cc01fab9437", 33 | "_model_module": "@jupyter-widgets/controls", 34 | "children": [ 35 | "IPY_MODEL_1357e43497b940a1b2e45e23e52de81b", 36 | "IPY_MODEL_9fbcc8734f514b14a563f361710213a2", 37 | "IPY_MODEL_3316e86ede42420d9350599408f608a8" 38 | ] 39 | } 40 | }, 41 | "29de041bbc274adbb5b98cc01fab9437": { 42 | "model_module": "@jupyter-widgets/base", 43 | "model_name": "LayoutModel", 44 | "model_module_version": "1.2.0", 45 | "state": { 46 | "_view_name": "LayoutView", 47 | "grid_template_rows": null, 48 | "right": null, 49 | "justify_content": null, 50 | "_view_module": "@jupyter-widgets/base", 51 | "overflow": null, 52 | "_model_module_version": "1.2.0", 53 | "_view_count": null, 54 | "flex_flow": null, 55 | "width": null, 56 | "min_width": null, 57 | "border": null, 58 | "align_items": null, 59 | "bottom": null, 60 | "_model_module": "@jupyter-widgets/base", 61 | "top": null, 62 | "grid_column": null, 63 | "overflow_y": null, 64 | "overflow_x": null, 65 | "grid_auto_flow": null, 66 | "grid_area": null, 67 | "grid_template_columns": null, 68 | "flex": null, 69 | "_model_name": "LayoutModel", 70 | "justify_items": null, 71 | "grid_row": null, 72 | "max_height": null, 73 | "align_content": null, 74 | "visibility": null, 75 | "align_self": null, 76 | "height": null, 77 | "min_height": null, 78 | "padding": null, 79 | "grid_auto_rows": null, 80 | "grid_gap": null, 81 | "max_width": null, 82 | "order": null, 83 | "_view_module_version": "1.2.0", 84 | "grid_template_areas": null, 85 | "object_position": null, 86 | "object_fit": null, 87 | "grid_auto_columns": null, 88 | "margin": null, 89 | "display": null, 90 | "left": null 91 | } 92 | }, 93 | "1357e43497b940a1b2e45e23e52de81b": { 94 | "model_module": "@jupyter-widgets/controls", 95 | "model_name": "HTMLModel", 96 | "model_module_version": "1.5.0", 97 | "state": { 98 | "_view_name": "HTMLView", 99 | "style": "IPY_MODEL_d0b28ddbf6e244fda1f462f3db60a42f", 100 | "_dom_classes": [], 101 | "description": "", 102 | "_model_name": "HTMLModel", 103 | "placeholder": "​", 104 | "_view_module": "@jupyter-widgets/controls", 105 | "_model_module_version": "1.5.0", 106 | "value": "Downloading: 100%", 107 | "_view_count": null, 108 | "_view_module_version": "1.5.0", 109 | "description_tooltip": null, 110 | "_model_module": "@jupyter-widgets/controls", 111 | "layout": "IPY_MODEL_48cf3be44c074ded860efcc2fcf91b6a" 112 | } 113 | }, 114 | "9fbcc8734f514b14a563f361710213a2": { 115 | "model_module": "@jupyter-widgets/controls", 116 | "model_name": "FloatProgressModel", 117 | "model_module_version": "1.5.0", 118 | "state": { 119 | "_view_name": "ProgressView", 120 | "style": "IPY_MODEL_d82784df214c4172a0c05be479be6b79", 121 | "_dom_classes": [], 122 | "description": "", 123 | "_model_name": "FloatProgressModel", 124 | "bar_style": "success", 125 | "max": 570, 126 | "_view_module": "@jupyter-widgets/controls", 127 | "_model_module_version": "1.5.0", 128 | "value": 570, 129 | "_view_count": null, 130 | "_view_module_version": "1.5.0", 131 | "orientation": "horizontal", 132 | "min": 0, 133 | "description_tooltip": null, 134 | "_model_module": "@jupyter-widgets/controls", 135 | "layout": "IPY_MODEL_c5df5d7a1c1640fe9dbc11662e91cc14" 136 | } 137 | }, 138 | "3316e86ede42420d9350599408f608a8": { 139 | "model_module": "@jupyter-widgets/controls", 140 | "model_name": "HTMLModel", 141 | "model_module_version": "1.5.0", 142 | "state": { 143 | "_view_name": "HTMLView", 144 | "style": "IPY_MODEL_4e90b11813274f4083af7acb4a4e72bb", 145 | "_dom_classes": [], 146 | "description": "", 147 | "_model_name": "HTMLModel", 148 | "placeholder": "​", 149 | "_view_module": "@jupyter-widgets/controls", 150 | "_model_module_version": "1.5.0", 151 | "value": " 570/570 [00:00<00:00, 7.94kB/s]", 152 | "_view_count": null, 153 | "_view_module_version": "1.5.0", 154 | "description_tooltip": null, 155 | "_model_module": "@jupyter-widgets/controls", 156 | "layout": "IPY_MODEL_eb21d21a5f5941f9bd51329b2208eef8" 157 | } 158 | }, 159 | "d0b28ddbf6e244fda1f462f3db60a42f": { 160 | "model_module": "@jupyter-widgets/controls", 161 | "model_name": "DescriptionStyleModel", 162 | "model_module_version": "1.5.0", 163 | "state": { 164 | "_view_name": "StyleView", 165 | "_model_name": "DescriptionStyleModel", 166 | "description_width": "", 167 | "_view_module": "@jupyter-widgets/base", 168 | "_model_module_version": "1.5.0", 169 | "_view_count": null, 170 | "_view_module_version": "1.2.0", 171 | "_model_module": "@jupyter-widgets/controls" 172 | } 173 | }, 174 | "48cf3be44c074ded860efcc2fcf91b6a": { 175 | "model_module": "@jupyter-widgets/base", 176 | "model_name": "LayoutModel", 177 | "model_module_version": "1.2.0", 178 | "state": { 179 | "_view_name": "LayoutView", 180 | "grid_template_rows": null, 181 | "right": null, 182 | "justify_content": null, 183 | "_view_module": "@jupyter-widgets/base", 184 | "overflow": null, 185 | "_model_module_version": "1.2.0", 186 | "_view_count": null, 187 | "flex_flow": null, 188 | "width": null, 189 | "min_width": null, 190 | "border": null, 191 | "align_items": null, 192 | "bottom": null, 193 | "_model_module": "@jupyter-widgets/base", 194 | "top": null, 195 | "grid_column": null, 196 | "overflow_y": null, 197 | "overflow_x": null, 198 | "grid_auto_flow": null, 199 | "grid_area": null, 200 | "grid_template_columns": null, 201 | "flex": null, 202 | "_model_name": "LayoutModel", 203 | "justify_items": null, 204 | "grid_row": null, 205 | "max_height": null, 206 | "align_content": null, 207 | "visibility": null, 208 | "align_self": null, 209 | "height": null, 210 | "min_height": null, 211 | "padding": null, 212 | "grid_auto_rows": null, 213 | "grid_gap": null, 214 | "max_width": null, 215 | "order": null, 216 | "_view_module_version": "1.2.0", 217 | "grid_template_areas": null, 218 | "object_position": null, 219 | "object_fit": null, 220 | "grid_auto_columns": null, 221 | "margin": null, 222 | "display": null, 223 | "left": null 224 | } 225 | }, 226 | "d82784df214c4172a0c05be479be6b79": { 227 | "model_module": "@jupyter-widgets/controls", 228 | "model_name": "ProgressStyleModel", 229 | "model_module_version": "1.5.0", 230 | "state": { 231 | "_view_name": "StyleView", 232 | "_model_name": "ProgressStyleModel", 233 | "description_width": "", 234 | "_view_module": "@jupyter-widgets/base", 235 | "_model_module_version": "1.5.0", 236 | "_view_count": null, 237 | "_view_module_version": "1.2.0", 238 | "bar_color": null, 239 | "_model_module": "@jupyter-widgets/controls" 240 | } 241 | }, 242 | "c5df5d7a1c1640fe9dbc11662e91cc14": { 243 | "model_module": "@jupyter-widgets/base", 244 | "model_name": "LayoutModel", 245 | "model_module_version": "1.2.0", 246 | "state": { 247 | "_view_name": "LayoutView", 248 | "grid_template_rows": null, 249 | "right": null, 250 | "justify_content": null, 251 | "_view_module": "@jupyter-widgets/base", 252 | "overflow": null, 253 | "_model_module_version": "1.2.0", 254 | "_view_count": null, 255 | "flex_flow": null, 256 | "width": null, 257 | "min_width": null, 258 | "border": null, 259 | "align_items": null, 260 | "bottom": null, 261 | "_model_module": "@jupyter-widgets/base", 262 | "top": null, 263 | "grid_column": null, 264 | "overflow_y": null, 265 | "overflow_x": null, 266 | "grid_auto_flow": null, 267 | "grid_area": null, 268 | "grid_template_columns": null, 269 | "flex": null, 270 | "_model_name": "LayoutModel", 271 | "justify_items": null, 272 | "grid_row": null, 273 | "max_height": null, 274 | "align_content": null, 275 | "visibility": null, 276 | "align_self": null, 277 | "height": null, 278 | "min_height": null, 279 | "padding": null, 280 | "grid_auto_rows": null, 281 | "grid_gap": null, 282 | "max_width": null, 283 | "order": null, 284 | "_view_module_version": "1.2.0", 285 | "grid_template_areas": null, 286 | "object_position": null, 287 | "object_fit": null, 288 | "grid_auto_columns": null, 289 | "margin": null, 290 | "display": null, 291 | "left": null 292 | } 293 | }, 294 | "4e90b11813274f4083af7acb4a4e72bb": { 295 | "model_module": "@jupyter-widgets/controls", 296 | "model_name": "DescriptionStyleModel", 297 | "model_module_version": "1.5.0", 298 | "state": { 299 | "_view_name": "StyleView", 300 | "_model_name": "DescriptionStyleModel", 301 | "description_width": "", 302 | "_view_module": "@jupyter-widgets/base", 303 | "_model_module_version": "1.5.0", 304 | "_view_count": null, 305 | "_view_module_version": "1.2.0", 306 | "_model_module": "@jupyter-widgets/controls" 307 | } 308 | }, 309 | "eb21d21a5f5941f9bd51329b2208eef8": { 310 | "model_module": "@jupyter-widgets/base", 311 | "model_name": "LayoutModel", 312 | "model_module_version": "1.2.0", 313 | "state": { 314 | "_view_name": "LayoutView", 315 | "grid_template_rows": null, 316 | "right": null, 317 | "justify_content": null, 318 | "_view_module": "@jupyter-widgets/base", 319 | "overflow": null, 320 | "_model_module_version": "1.2.0", 321 | "_view_count": null, 322 | "flex_flow": null, 323 | "width": null, 324 | "min_width": null, 325 | "border": null, 326 | "align_items": null, 327 | "bottom": null, 328 | "_model_module": "@jupyter-widgets/base", 329 | "top": null, 330 | "grid_column": null, 331 | "overflow_y": null, 332 | "overflow_x": null, 333 | "grid_auto_flow": null, 334 | "grid_area": null, 335 | "grid_template_columns": null, 336 | "flex": null, 337 | "_model_name": "LayoutModel", 338 | "justify_items": null, 339 | "grid_row": null, 340 | "max_height": null, 341 | "align_content": null, 342 | "visibility": null, 343 | "align_self": null, 344 | "height": null, 345 | "min_height": null, 346 | "padding": null, 347 | "grid_auto_rows": null, 348 | "grid_gap": null, 349 | "max_width": null, 350 | "order": null, 351 | "_view_module_version": "1.2.0", 352 | "grid_template_areas": null, 353 | "object_position": null, 354 | "object_fit": null, 355 | "grid_auto_columns": null, 356 | "margin": null, 357 | "display": null, 358 | "left": null 359 | } 360 | }, 361 | "57a35a889e1e40339d86ea0dc46467ca": { 362 | "model_module": "@jupyter-widgets/controls", 363 | "model_name": "HBoxModel", 364 | "model_module_version": "1.5.0", 365 | "state": { 366 | "_view_name": "HBoxView", 367 | "_dom_classes": [], 368 | "_model_name": "HBoxModel", 369 | "_view_module": "@jupyter-widgets/controls", 370 | "_model_module_version": "1.5.0", 371 | "_view_count": null, 372 | "_view_module_version": "1.5.0", 373 | "box_style": "", 374 | "layout": "IPY_MODEL_5724290b42a94c99a630774fb1244222", 375 | "_model_module": "@jupyter-widgets/controls", 376 | "children": [ 377 | "IPY_MODEL_2f8c2906cb5d43499603e472651b8f65", 378 | "IPY_MODEL_650b66ce5ac3492ab3c372a518613500", 379 | "IPY_MODEL_fe136c9729764b1db2a5f0d838237ebd" 380 | ] 381 | } 382 | }, 383 | "5724290b42a94c99a630774fb1244222": { 384 | "model_module": "@jupyter-widgets/base", 385 | "model_name": "LayoutModel", 386 | "model_module_version": "1.2.0", 387 | "state": { 388 | "_view_name": "LayoutView", 389 | "grid_template_rows": null, 390 | "right": null, 391 | "justify_content": null, 392 | "_view_module": "@jupyter-widgets/base", 393 | "overflow": null, 394 | "_model_module_version": "1.2.0", 395 | "_view_count": null, 396 | "flex_flow": null, 397 | "width": null, 398 | "min_width": null, 399 | "border": null, 400 | "align_items": null, 401 | "bottom": null, 402 | "_model_module": "@jupyter-widgets/base", 403 | "top": null, 404 | "grid_column": null, 405 | "overflow_y": null, 406 | "overflow_x": null, 407 | "grid_auto_flow": null, 408 | "grid_area": null, 409 | "grid_template_columns": null, 410 | "flex": null, 411 | "_model_name": "LayoutModel", 412 | "justify_items": null, 413 | "grid_row": null, 414 | "max_height": null, 415 | "align_content": null, 416 | "visibility": null, 417 | "align_self": null, 418 | "height": null, 419 | "min_height": null, 420 | "padding": null, 421 | "grid_auto_rows": null, 422 | "grid_gap": null, 423 | "max_width": null, 424 | "order": null, 425 | "_view_module_version": "1.2.0", 426 | "grid_template_areas": null, 427 | "object_position": null, 428 | "object_fit": null, 429 | "grid_auto_columns": null, 430 | "margin": null, 431 | "display": null, 432 | "left": null 433 | } 434 | }, 435 | "2f8c2906cb5d43499603e472651b8f65": { 436 | "model_module": "@jupyter-widgets/controls", 437 | "model_name": "HTMLModel", 438 | "model_module_version": "1.5.0", 439 | "state": { 440 | "_view_name": "HTMLView", 441 | "style": "IPY_MODEL_c52567187b86487195011d95833c1319", 442 | "_dom_classes": [], 443 | "description": "", 444 | "_model_name": "HTMLModel", 445 | "placeholder": "​", 446 | "_view_module": "@jupyter-widgets/controls", 447 | "_model_module_version": "1.5.0", 448 | "value": "Downloading: 100%", 449 | "_view_count": null, 450 | "_view_module_version": "1.5.0", 451 | "description_tooltip": null, 452 | "_model_module": "@jupyter-widgets/controls", 453 | "layout": "IPY_MODEL_fe498bb1f2114b4f8fe74f577ebbdcbe" 454 | } 455 | }, 456 | "650b66ce5ac3492ab3c372a518613500": { 457 | "model_module": "@jupyter-widgets/controls", 458 | "model_name": "FloatProgressModel", 459 | "model_module_version": "1.5.0", 460 | "state": { 461 | "_view_name": "ProgressView", 462 | "style": "IPY_MODEL_5cdfda4ae8f146dbaa463ae459c2748a", 463 | "_dom_classes": [], 464 | "description": "", 465 | "_model_name": "FloatProgressModel", 466 | "bar_style": "success", 467 | "max": 536063208, 468 | "_view_module": "@jupyter-widgets/controls", 469 | "_model_module_version": "1.5.0", 470 | "value": 536063208, 471 | "_view_count": null, 472 | "_view_module_version": "1.5.0", 473 | "orientation": "horizontal", 474 | "min": 0, 475 | "description_tooltip": null, 476 | "_model_module": "@jupyter-widgets/controls", 477 | "layout": "IPY_MODEL_0666be92149d490e9712d11883fec4ba" 478 | } 479 | }, 480 | "fe136c9729764b1db2a5f0d838237ebd": { 481 | "model_module": "@jupyter-widgets/controls", 482 | "model_name": "HTMLModel", 483 | "model_module_version": "1.5.0", 484 | "state": { 485 | "_view_name": "HTMLView", 486 | "style": "IPY_MODEL_ee71b7ff49e348159fe1afc11a2671ff", 487 | "_dom_classes": [], 488 | "description": "", 489 | "_model_name": "HTMLModel", 490 | "placeholder": "​", 491 | "_view_module": "@jupyter-widgets/controls", 492 | "_model_module_version": "1.5.0", 493 | "value": " 511M/511M [00:13<00:00, 34.1MB/s]", 494 | "_view_count": null, 495 | "_view_module_version": "1.5.0", 496 | "description_tooltip": null, 497 | "_model_module": "@jupyter-widgets/controls", 498 | "layout": "IPY_MODEL_1c72237cc55d4e6083f936eda2785dce" 499 | } 500 | }, 501 | "c52567187b86487195011d95833c1319": { 502 | "model_module": "@jupyter-widgets/controls", 503 | "model_name": "DescriptionStyleModel", 504 | "model_module_version": "1.5.0", 505 | "state": { 506 | "_view_name": "StyleView", 507 | "_model_name": "DescriptionStyleModel", 508 | "description_width": "", 509 | "_view_module": "@jupyter-widgets/base", 510 | "_model_module_version": "1.5.0", 511 | "_view_count": null, 512 | "_view_module_version": "1.2.0", 513 | "_model_module": "@jupyter-widgets/controls" 514 | } 515 | }, 516 | "fe498bb1f2114b4f8fe74f577ebbdcbe": { 517 | "model_module": "@jupyter-widgets/base", 518 | "model_name": "LayoutModel", 519 | "model_module_version": "1.2.0", 520 | "state": { 521 | "_view_name": "LayoutView", 522 | "grid_template_rows": null, 523 | "right": null, 524 | "justify_content": null, 525 | "_view_module": "@jupyter-widgets/base", 526 | "overflow": null, 527 | "_model_module_version": "1.2.0", 528 | "_view_count": null, 529 | "flex_flow": null, 530 | "width": null, 531 | "min_width": null, 532 | "border": null, 533 | "align_items": null, 534 | "bottom": null, 535 | "_model_module": "@jupyter-widgets/base", 536 | "top": null, 537 | "grid_column": null, 538 | "overflow_y": null, 539 | "overflow_x": null, 540 | "grid_auto_flow": null, 541 | "grid_area": null, 542 | "grid_template_columns": null, 543 | "flex": null, 544 | "_model_name": "LayoutModel", 545 | "justify_items": null, 546 | "grid_row": null, 547 | "max_height": null, 548 | "align_content": null, 549 | "visibility": null, 550 | "align_self": null, 551 | "height": null, 552 | "min_height": null, 553 | "padding": null, 554 | "grid_auto_rows": null, 555 | "grid_gap": null, 556 | "max_width": null, 557 | "order": null, 558 | "_view_module_version": "1.2.0", 559 | "grid_template_areas": null, 560 | "object_position": null, 561 | "object_fit": null, 562 | "grid_auto_columns": null, 563 | "margin": null, 564 | "display": null, 565 | "left": null 566 | } 567 | }, 568 | "5cdfda4ae8f146dbaa463ae459c2748a": { 569 | "model_module": "@jupyter-widgets/controls", 570 | "model_name": "ProgressStyleModel", 571 | "model_module_version": "1.5.0", 572 | "state": { 573 | "_view_name": "StyleView", 574 | "_model_name": "ProgressStyleModel", 575 | "description_width": "", 576 | "_view_module": "@jupyter-widgets/base", 577 | "_model_module_version": "1.5.0", 578 | "_view_count": null, 579 | "_view_module_version": "1.2.0", 580 | "bar_color": null, 581 | "_model_module": "@jupyter-widgets/controls" 582 | } 583 | }, 584 | "0666be92149d490e9712d11883fec4ba": { 585 | "model_module": "@jupyter-widgets/base", 586 | "model_name": "LayoutModel", 587 | "model_module_version": "1.2.0", 588 | "state": { 589 | "_view_name": "LayoutView", 590 | "grid_template_rows": null, 591 | "right": null, 592 | "justify_content": null, 593 | "_view_module": "@jupyter-widgets/base", 594 | "overflow": null, 595 | "_model_module_version": "1.2.0", 596 | "_view_count": null, 597 | "flex_flow": null, 598 | "width": null, 599 | "min_width": null, 600 | "border": null, 601 | "align_items": null, 602 | "bottom": null, 603 | "_model_module": "@jupyter-widgets/base", 604 | "top": null, 605 | "grid_column": null, 606 | "overflow_y": null, 607 | "overflow_x": null, 608 | "grid_auto_flow": null, 609 | "grid_area": null, 610 | "grid_template_columns": null, 611 | "flex": null, 612 | "_model_name": "LayoutModel", 613 | "justify_items": null, 614 | "grid_row": null, 615 | "max_height": null, 616 | "align_content": null, 617 | "visibility": null, 618 | "align_self": null, 619 | "height": null, 620 | "min_height": null, 621 | "padding": null, 622 | "grid_auto_rows": null, 623 | "grid_gap": null, 624 | "max_width": null, 625 | "order": null, 626 | "_view_module_version": "1.2.0", 627 | "grid_template_areas": null, 628 | "object_position": null, 629 | "object_fit": null, 630 | "grid_auto_columns": null, 631 | "margin": null, 632 | "display": null, 633 | "left": null 634 | } 635 | }, 636 | "ee71b7ff49e348159fe1afc11a2671ff": { 637 | "model_module": "@jupyter-widgets/controls", 638 | "model_name": "DescriptionStyleModel", 639 | "model_module_version": "1.5.0", 640 | "state": { 641 | "_view_name": "StyleView", 642 | "_model_name": "DescriptionStyleModel", 643 | "description_width": "", 644 | "_view_module": "@jupyter-widgets/base", 645 | "_model_module_version": "1.5.0", 646 | "_view_count": null, 647 | "_view_module_version": "1.2.0", 648 | "_model_module": "@jupyter-widgets/controls" 649 | } 650 | }, 651 | "1c72237cc55d4e6083f936eda2785dce": { 652 | "model_module": "@jupyter-widgets/base", 653 | "model_name": "LayoutModel", 654 | "model_module_version": "1.2.0", 655 | "state": { 656 | "_view_name": "LayoutView", 657 | "grid_template_rows": null, 658 | "right": null, 659 | "justify_content": null, 660 | "_view_module": "@jupyter-widgets/base", 661 | "overflow": null, 662 | "_model_module_version": "1.2.0", 663 | "_view_count": null, 664 | "flex_flow": null, 665 | "width": null, 666 | "min_width": null, 667 | "border": null, 668 | "align_items": null, 669 | "bottom": null, 670 | "_model_module": "@jupyter-widgets/base", 671 | "top": null, 672 | "grid_column": null, 673 | "overflow_y": null, 674 | "overflow_x": null, 675 | "grid_auto_flow": null, 676 | "grid_area": null, 677 | "grid_template_columns": null, 678 | "flex": null, 679 | "_model_name": "LayoutModel", 680 | "justify_items": null, 681 | "grid_row": null, 682 | "max_height": null, 683 | "align_content": null, 684 | "visibility": null, 685 | "align_self": null, 686 | "height": null, 687 | "min_height": null, 688 | "padding": null, 689 | "grid_auto_rows": null, 690 | "grid_gap": null, 691 | "max_width": null, 692 | "order": null, 693 | "_view_module_version": "1.2.0", 694 | "grid_template_areas": null, 695 | "object_position": null, 696 | "object_fit": null, 697 | "grid_auto_columns": null, 698 | "margin": null, 699 | "display": null, 700 | "left": null 701 | } 702 | }, 703 | "8e80511799724dc4a02a2185fe84cbdd": { 704 | "model_module": "@jupyter-widgets/controls", 705 | "model_name": "HBoxModel", 706 | "model_module_version": "1.5.0", 707 | "state": { 708 | "_view_name": "HBoxView", 709 | "_dom_classes": [], 710 | "_model_name": "HBoxModel", 711 | "_view_module": "@jupyter-widgets/controls", 712 | "_model_module_version": "1.5.0", 713 | "_view_count": null, 714 | "_view_module_version": "1.5.0", 715 | "box_style": "", 716 | "layout": "IPY_MODEL_4e52fc9af45843c79466cc0f588544c6", 717 | "_model_module": "@jupyter-widgets/controls", 718 | "children": [ 719 | "IPY_MODEL_5e5a7e6011034b2dbb6da1583c437b52", 720 | "IPY_MODEL_b4a35767c87a4829aa1bcb94ac1897ff", 721 | "IPY_MODEL_c4f75fefc8344fff95de5f144acbe407" 722 | ] 723 | } 724 | }, 725 | "4e52fc9af45843c79466cc0f588544c6": { 726 | "model_module": "@jupyter-widgets/base", 727 | "model_name": "LayoutModel", 728 | "model_module_version": "1.2.0", 729 | "state": { 730 | "_view_name": "LayoutView", 731 | "grid_template_rows": null, 732 | "right": null, 733 | "justify_content": null, 734 | "_view_module": "@jupyter-widgets/base", 735 | "overflow": null, 736 | "_model_module_version": "1.2.0", 737 | "_view_count": null, 738 | "flex_flow": null, 739 | "width": null, 740 | "min_width": null, 741 | "border": null, 742 | "align_items": null, 743 | "bottom": null, 744 | "_model_module": "@jupyter-widgets/base", 745 | "top": null, 746 | "grid_column": null, 747 | "overflow_y": null, 748 | "overflow_x": null, 749 | "grid_auto_flow": null, 750 | "grid_area": null, 751 | "grid_template_columns": null, 752 | "flex": null, 753 | "_model_name": "LayoutModel", 754 | "justify_items": null, 755 | "grid_row": null, 756 | "max_height": null, 757 | "align_content": null, 758 | "visibility": null, 759 | "align_self": null, 760 | "height": null, 761 | "min_height": null, 762 | "padding": null, 763 | "grid_auto_rows": null, 764 | "grid_gap": null, 765 | "max_width": null, 766 | "order": null, 767 | "_view_module_version": "1.2.0", 768 | "grid_template_areas": null, 769 | "object_position": null, 770 | "object_fit": null, 771 | "grid_auto_columns": null, 772 | "margin": null, 773 | "display": null, 774 | "left": null 775 | } 776 | }, 777 | "5e5a7e6011034b2dbb6da1583c437b52": { 778 | "model_module": "@jupyter-widgets/controls", 779 | "model_name": "HTMLModel", 780 | "model_module_version": "1.5.0", 781 | "state": { 782 | "_view_name": "HTMLView", 783 | "style": "IPY_MODEL_ac4dfe86953b45af8091af1e84bdea17", 784 | "_dom_classes": [], 785 | "description": "", 786 | "_model_name": "HTMLModel", 787 | "placeholder": "​", 788 | "_view_module": "@jupyter-widgets/controls", 789 | "_model_module_version": "1.5.0", 790 | "value": "Downloading: 100%", 791 | "_view_count": null, 792 | "_view_module_version": "1.5.0", 793 | "description_tooltip": null, 794 | "_model_module": "@jupyter-widgets/controls", 795 | "layout": "IPY_MODEL_904549a5df8b4d73a4a2135ae2a8b250" 796 | } 797 | }, 798 | "b4a35767c87a4829aa1bcb94ac1897ff": { 799 | "model_module": "@jupyter-widgets/controls", 800 | "model_name": "FloatProgressModel", 801 | "model_module_version": "1.5.0", 802 | "state": { 803 | "_view_name": "ProgressView", 804 | "style": "IPY_MODEL_48335ff0b3e644528e3c7fd4d23578e2", 805 | "_dom_classes": [], 806 | "description": "", 807 | "_model_name": "FloatProgressModel", 808 | "bar_style": "success", 809 | "max": 28, 810 | "_view_module": "@jupyter-widgets/controls", 811 | "_model_module_version": "1.5.0", 812 | "value": 28, 813 | "_view_count": null, 814 | "_view_module_version": "1.5.0", 815 | "orientation": "horizontal", 816 | "min": 0, 817 | "description_tooltip": null, 818 | "_model_module": "@jupyter-widgets/controls", 819 | "layout": "IPY_MODEL_5a34488f2af448d68a7fc731d461125d" 820 | } 821 | }, 822 | "c4f75fefc8344fff95de5f144acbe407": { 823 | "model_module": "@jupyter-widgets/controls", 824 | "model_name": "HTMLModel", 825 | "model_module_version": "1.5.0", 826 | "state": { 827 | "_view_name": "HTMLView", 828 | "style": "IPY_MODEL_24ebe7c09b1440509e3aeb1356a6e09e", 829 | "_dom_classes": [], 830 | "description": "", 831 | "_model_name": "HTMLModel", 832 | "placeholder": "​", 833 | "_view_module": "@jupyter-widgets/controls", 834 | "_model_module_version": "1.5.0", 835 | "value": " 28.0/28.0 [00:00<00:00, 454B/s]", 836 | "_view_count": null, 837 | "_view_module_version": "1.5.0", 838 | "description_tooltip": null, 839 | "_model_module": "@jupyter-widgets/controls", 840 | "layout": "IPY_MODEL_5b423960a7ec4c7ebd7e1e4bef2b11b5" 841 | } 842 | }, 843 | "ac4dfe86953b45af8091af1e84bdea17": { 844 | "model_module": "@jupyter-widgets/controls", 845 | "model_name": "DescriptionStyleModel", 846 | "model_module_version": "1.5.0", 847 | "state": { 848 | "_view_name": "StyleView", 849 | "_model_name": "DescriptionStyleModel", 850 | "description_width": "", 851 | "_view_module": "@jupyter-widgets/base", 852 | "_model_module_version": "1.5.0", 853 | "_view_count": null, 854 | "_view_module_version": "1.2.0", 855 | "_model_module": "@jupyter-widgets/controls" 856 | } 857 | }, 858 | "904549a5df8b4d73a4a2135ae2a8b250": { 859 | "model_module": "@jupyter-widgets/base", 860 | "model_name": "LayoutModel", 861 | "model_module_version": "1.2.0", 862 | "state": { 863 | "_view_name": "LayoutView", 864 | "grid_template_rows": null, 865 | "right": null, 866 | "justify_content": null, 867 | "_view_module": "@jupyter-widgets/base", 868 | "overflow": null, 869 | "_model_module_version": "1.2.0", 870 | "_view_count": null, 871 | "flex_flow": null, 872 | "width": null, 873 | "min_width": null, 874 | "border": null, 875 | "align_items": null, 876 | "bottom": null, 877 | "_model_module": "@jupyter-widgets/base", 878 | "top": null, 879 | "grid_column": null, 880 | "overflow_y": null, 881 | "overflow_x": null, 882 | "grid_auto_flow": null, 883 | "grid_area": null, 884 | "grid_template_columns": null, 885 | "flex": null, 886 | "_model_name": "LayoutModel", 887 | "justify_items": null, 888 | "grid_row": null, 889 | "max_height": null, 890 | "align_content": null, 891 | "visibility": null, 892 | "align_self": null, 893 | "height": null, 894 | "min_height": null, 895 | "padding": null, 896 | "grid_auto_rows": null, 897 | "grid_gap": null, 898 | "max_width": null, 899 | "order": null, 900 | "_view_module_version": "1.2.0", 901 | "grid_template_areas": null, 902 | "object_position": null, 903 | "object_fit": null, 904 | "grid_auto_columns": null, 905 | "margin": null, 906 | "display": null, 907 | "left": null 908 | } 909 | }, 910 | "48335ff0b3e644528e3c7fd4d23578e2": { 911 | "model_module": "@jupyter-widgets/controls", 912 | "model_name": "ProgressStyleModel", 913 | "model_module_version": "1.5.0", 914 | "state": { 915 | "_view_name": "StyleView", 916 | "_model_name": "ProgressStyleModel", 917 | "description_width": "", 918 | "_view_module": "@jupyter-widgets/base", 919 | "_model_module_version": "1.5.0", 920 | "_view_count": null, 921 | "_view_module_version": "1.2.0", 922 | "bar_color": null, 923 | "_model_module": "@jupyter-widgets/controls" 924 | } 925 | }, 926 | "5a34488f2af448d68a7fc731d461125d": { 927 | "model_module": "@jupyter-widgets/base", 928 | "model_name": "LayoutModel", 929 | "model_module_version": "1.2.0", 930 | "state": { 931 | "_view_name": "LayoutView", 932 | "grid_template_rows": null, 933 | "right": null, 934 | "justify_content": null, 935 | "_view_module": "@jupyter-widgets/base", 936 | "overflow": null, 937 | "_model_module_version": "1.2.0", 938 | "_view_count": null, 939 | "flex_flow": null, 940 | "width": null, 941 | "min_width": null, 942 | "border": null, 943 | "align_items": null, 944 | "bottom": null, 945 | "_model_module": "@jupyter-widgets/base", 946 | "top": null, 947 | "grid_column": null, 948 | "overflow_y": null, 949 | "overflow_x": null, 950 | "grid_auto_flow": null, 951 | "grid_area": null, 952 | "grid_template_columns": null, 953 | "flex": null, 954 | "_model_name": "LayoutModel", 955 | "justify_items": null, 956 | "grid_row": null, 957 | "max_height": null, 958 | "align_content": null, 959 | "visibility": null, 960 | "align_self": null, 961 | "height": null, 962 | "min_height": null, 963 | "padding": null, 964 | "grid_auto_rows": null, 965 | "grid_gap": null, 966 | "max_width": null, 967 | "order": null, 968 | "_view_module_version": "1.2.0", 969 | "grid_template_areas": null, 970 | "object_position": null, 971 | "object_fit": null, 972 | "grid_auto_columns": null, 973 | "margin": null, 974 | "display": null, 975 | "left": null 976 | } 977 | }, 978 | "24ebe7c09b1440509e3aeb1356a6e09e": { 979 | "model_module": "@jupyter-widgets/controls", 980 | "model_name": "DescriptionStyleModel", 981 | "model_module_version": "1.5.0", 982 | "state": { 983 | "_view_name": "StyleView", 984 | "_model_name": "DescriptionStyleModel", 985 | "description_width": "", 986 | "_view_module": "@jupyter-widgets/base", 987 | "_model_module_version": "1.5.0", 988 | "_view_count": null, 989 | "_view_module_version": "1.2.0", 990 | "_model_module": "@jupyter-widgets/controls" 991 | } 992 | }, 993 | "5b423960a7ec4c7ebd7e1e4bef2b11b5": { 994 | "model_module": "@jupyter-widgets/base", 995 | "model_name": "LayoutModel", 996 | "model_module_version": "1.2.0", 997 | "state": { 998 | "_view_name": "LayoutView", 999 | "grid_template_rows": null, 1000 | "right": null, 1001 | "justify_content": null, 1002 | "_view_module": "@jupyter-widgets/base", 1003 | "overflow": null, 1004 | "_model_module_version": "1.2.0", 1005 | "_view_count": null, 1006 | "flex_flow": null, 1007 | "width": null, 1008 | "min_width": null, 1009 | "border": null, 1010 | "align_items": null, 1011 | "bottom": null, 1012 | "_model_module": "@jupyter-widgets/base", 1013 | "top": null, 1014 | "grid_column": null, 1015 | "overflow_y": null, 1016 | "overflow_x": null, 1017 | "grid_auto_flow": null, 1018 | "grid_area": null, 1019 | "grid_template_columns": null, 1020 | "flex": null, 1021 | "_model_name": "LayoutModel", 1022 | "justify_items": null, 1023 | "grid_row": null, 1024 | "max_height": null, 1025 | "align_content": null, 1026 | "visibility": null, 1027 | "align_self": null, 1028 | "height": null, 1029 | "min_height": null, 1030 | "padding": null, 1031 | "grid_auto_rows": null, 1032 | "grid_gap": null, 1033 | "max_width": null, 1034 | "order": null, 1035 | "_view_module_version": "1.2.0", 1036 | "grid_template_areas": null, 1037 | "object_position": null, 1038 | "object_fit": null, 1039 | "grid_auto_columns": null, 1040 | "margin": null, 1041 | "display": null, 1042 | "left": null 1043 | } 1044 | }, 1045 | "3f2dfb3bf63c438b90cd1b0c77db8816": { 1046 | "model_module": "@jupyter-widgets/controls", 1047 | "model_name": "HBoxModel", 1048 | "model_module_version": "1.5.0", 1049 | "state": { 1050 | "_view_name": "HBoxView", 1051 | "_dom_classes": [], 1052 | "_model_name": "HBoxModel", 1053 | "_view_module": "@jupyter-widgets/controls", 1054 | "_model_module_version": "1.5.0", 1055 | "_view_count": null, 1056 | "_view_module_version": "1.5.0", 1057 | "box_style": "", 1058 | "layout": "IPY_MODEL_1ee53faf0b584ad2b8ba2546e6fe7011", 1059 | "_model_module": "@jupyter-widgets/controls", 1060 | "children": [ 1061 | "IPY_MODEL_117de106cf0044f4979577d317cb0fb2", 1062 | "IPY_MODEL_abff93bda3814c1e9126bb0e194978c9", 1063 | "IPY_MODEL_a36ec2c01a2b4c728cf45bd9c3342389" 1064 | ] 1065 | } 1066 | }, 1067 | "1ee53faf0b584ad2b8ba2546e6fe7011": { 1068 | "model_module": "@jupyter-widgets/base", 1069 | "model_name": "LayoutModel", 1070 | "model_module_version": "1.2.0", 1071 | "state": { 1072 | "_view_name": "LayoutView", 1073 | "grid_template_rows": null, 1074 | "right": null, 1075 | "justify_content": null, 1076 | "_view_module": "@jupyter-widgets/base", 1077 | "overflow": null, 1078 | "_model_module_version": "1.2.0", 1079 | "_view_count": null, 1080 | "flex_flow": null, 1081 | "width": null, 1082 | "min_width": null, 1083 | "border": null, 1084 | "align_items": null, 1085 | "bottom": null, 1086 | "_model_module": "@jupyter-widgets/base", 1087 | "top": null, 1088 | "grid_column": null, 1089 | "overflow_y": null, 1090 | "overflow_x": null, 1091 | "grid_auto_flow": null, 1092 | "grid_area": null, 1093 | "grid_template_columns": null, 1094 | "flex": null, 1095 | "_model_name": "LayoutModel", 1096 | "justify_items": null, 1097 | "grid_row": null, 1098 | "max_height": null, 1099 | "align_content": null, 1100 | "visibility": null, 1101 | "align_self": null, 1102 | "height": null, 1103 | "min_height": null, 1104 | "padding": null, 1105 | "grid_auto_rows": null, 1106 | "grid_gap": null, 1107 | "max_width": null, 1108 | "order": null, 1109 | "_view_module_version": "1.2.0", 1110 | "grid_template_areas": null, 1111 | "object_position": null, 1112 | "object_fit": null, 1113 | "grid_auto_columns": null, 1114 | "margin": null, 1115 | "display": null, 1116 | "left": null 1117 | } 1118 | }, 1119 | "117de106cf0044f4979577d317cb0fb2": { 1120 | "model_module": "@jupyter-widgets/controls", 1121 | "model_name": "HTMLModel", 1122 | "model_module_version": "1.5.0", 1123 | "state": { 1124 | "_view_name": "HTMLView", 1125 | "style": "IPY_MODEL_c0d7aba943384d4fadb3635ee8ca74ca", 1126 | "_dom_classes": [], 1127 | "description": "", 1128 | "_model_name": "HTMLModel", 1129 | "placeholder": "​", 1130 | "_view_module": "@jupyter-widgets/controls", 1131 | "_model_module_version": "1.5.0", 1132 | "value": "Downloading: 100%", 1133 | "_view_count": null, 1134 | "_view_module_version": "1.5.0", 1135 | "description_tooltip": null, 1136 | "_model_module": "@jupyter-widgets/controls", 1137 | "layout": "IPY_MODEL_a76b3586a2eb4784937a2071dd83c980" 1138 | } 1139 | }, 1140 | "abff93bda3814c1e9126bb0e194978c9": { 1141 | "model_module": "@jupyter-widgets/controls", 1142 | "model_name": "FloatProgressModel", 1143 | "model_module_version": "1.5.0", 1144 | "state": { 1145 | "_view_name": "ProgressView", 1146 | "style": "IPY_MODEL_e00deefff159461295509cc2975d1c93", 1147 | "_dom_classes": [], 1148 | "description": "", 1149 | "_model_name": "FloatProgressModel", 1150 | "bar_style": "success", 1151 | "max": 231508, 1152 | "_view_module": "@jupyter-widgets/controls", 1153 | "_model_module_version": "1.5.0", 1154 | "value": 231508, 1155 | "_view_count": null, 1156 | "_view_module_version": "1.5.0", 1157 | "orientation": "horizontal", 1158 | "min": 0, 1159 | "description_tooltip": null, 1160 | "_model_module": "@jupyter-widgets/controls", 1161 | "layout": "IPY_MODEL_90aad31640534ad79121fbb6dd119dc9" 1162 | } 1163 | }, 1164 | "a36ec2c01a2b4c728cf45bd9c3342389": { 1165 | "model_module": "@jupyter-widgets/controls", 1166 | "model_name": "HTMLModel", 1167 | "model_module_version": "1.5.0", 1168 | "state": { 1169 | "_view_name": "HTMLView", 1170 | "style": "IPY_MODEL_0bcba303bd5d4b1db8ff073c10d3e8b3", 1171 | "_dom_classes": [], 1172 | "description": "", 1173 | "_model_name": "HTMLModel", 1174 | "placeholder": "​", 1175 | "_view_module": "@jupyter-widgets/controls", 1176 | "_model_module_version": "1.5.0", 1177 | "value": " 226k/226k [00:00<00:00, 1.98MB/s]", 1178 | "_view_count": null, 1179 | "_view_module_version": "1.5.0", 1180 | "description_tooltip": null, 1181 | "_model_module": "@jupyter-widgets/controls", 1182 | "layout": "IPY_MODEL_25cd48194ba745fe9b06b6b80d550590" 1183 | } 1184 | }, 1185 | "c0d7aba943384d4fadb3635ee8ca74ca": { 1186 | "model_module": "@jupyter-widgets/controls", 1187 | "model_name": "DescriptionStyleModel", 1188 | "model_module_version": "1.5.0", 1189 | "state": { 1190 | "_view_name": "StyleView", 1191 | "_model_name": "DescriptionStyleModel", 1192 | "description_width": "", 1193 | "_view_module": "@jupyter-widgets/base", 1194 | "_model_module_version": "1.5.0", 1195 | "_view_count": null, 1196 | "_view_module_version": "1.2.0", 1197 | "_model_module": "@jupyter-widgets/controls" 1198 | } 1199 | }, 1200 | "a76b3586a2eb4784937a2071dd83c980": { 1201 | "model_module": "@jupyter-widgets/base", 1202 | "model_name": "LayoutModel", 1203 | "model_module_version": "1.2.0", 1204 | "state": { 1205 | "_view_name": "LayoutView", 1206 | "grid_template_rows": null, 1207 | "right": null, 1208 | "justify_content": null, 1209 | "_view_module": "@jupyter-widgets/base", 1210 | "overflow": null, 1211 | "_model_module_version": "1.2.0", 1212 | "_view_count": null, 1213 | "flex_flow": null, 1214 | "width": null, 1215 | "min_width": null, 1216 | "border": null, 1217 | "align_items": null, 1218 | "bottom": null, 1219 | "_model_module": "@jupyter-widgets/base", 1220 | "top": null, 1221 | "grid_column": null, 1222 | "overflow_y": null, 1223 | "overflow_x": null, 1224 | "grid_auto_flow": null, 1225 | "grid_area": null, 1226 | "grid_template_columns": null, 1227 | "flex": null, 1228 | "_model_name": "LayoutModel", 1229 | "justify_items": null, 1230 | "grid_row": null, 1231 | "max_height": null, 1232 | "align_content": null, 1233 | "visibility": null, 1234 | "align_self": null, 1235 | "height": null, 1236 | "min_height": null, 1237 | "padding": null, 1238 | "grid_auto_rows": null, 1239 | "grid_gap": null, 1240 | "max_width": null, 1241 | "order": null, 1242 | "_view_module_version": "1.2.0", 1243 | "grid_template_areas": null, 1244 | "object_position": null, 1245 | "object_fit": null, 1246 | "grid_auto_columns": null, 1247 | "margin": null, 1248 | "display": null, 1249 | "left": null 1250 | } 1251 | }, 1252 | "e00deefff159461295509cc2975d1c93": { 1253 | "model_module": "@jupyter-widgets/controls", 1254 | "model_name": "ProgressStyleModel", 1255 | "model_module_version": "1.5.0", 1256 | "state": { 1257 | "_view_name": "StyleView", 1258 | "_model_name": "ProgressStyleModel", 1259 | "description_width": "", 1260 | "_view_module": "@jupyter-widgets/base", 1261 | "_model_module_version": "1.5.0", 1262 | "_view_count": null, 1263 | "_view_module_version": "1.2.0", 1264 | "bar_color": null, 1265 | "_model_module": "@jupyter-widgets/controls" 1266 | } 1267 | }, 1268 | "90aad31640534ad79121fbb6dd119dc9": { 1269 | "model_module": "@jupyter-widgets/base", 1270 | "model_name": "LayoutModel", 1271 | "model_module_version": "1.2.0", 1272 | "state": { 1273 | "_view_name": "LayoutView", 1274 | "grid_template_rows": null, 1275 | "right": null, 1276 | "justify_content": null, 1277 | "_view_module": "@jupyter-widgets/base", 1278 | "overflow": null, 1279 | "_model_module_version": "1.2.0", 1280 | "_view_count": null, 1281 | "flex_flow": null, 1282 | "width": null, 1283 | "min_width": null, 1284 | "border": null, 1285 | "align_items": null, 1286 | "bottom": null, 1287 | "_model_module": "@jupyter-widgets/base", 1288 | "top": null, 1289 | "grid_column": null, 1290 | "overflow_y": null, 1291 | "overflow_x": null, 1292 | "grid_auto_flow": null, 1293 | "grid_area": null, 1294 | "grid_template_columns": null, 1295 | "flex": null, 1296 | "_model_name": "LayoutModel", 1297 | "justify_items": null, 1298 | "grid_row": null, 1299 | "max_height": null, 1300 | "align_content": null, 1301 | "visibility": null, 1302 | "align_self": null, 1303 | "height": null, 1304 | "min_height": null, 1305 | "padding": null, 1306 | "grid_auto_rows": null, 1307 | "grid_gap": null, 1308 | "max_width": null, 1309 | "order": null, 1310 | "_view_module_version": "1.2.0", 1311 | "grid_template_areas": null, 1312 | "object_position": null, 1313 | "object_fit": null, 1314 | "grid_auto_columns": null, 1315 | "margin": null, 1316 | "display": null, 1317 | "left": null 1318 | } 1319 | }, 1320 | "0bcba303bd5d4b1db8ff073c10d3e8b3": { 1321 | "model_module": "@jupyter-widgets/controls", 1322 | "model_name": "DescriptionStyleModel", 1323 | "model_module_version": "1.5.0", 1324 | "state": { 1325 | "_view_name": "StyleView", 1326 | "_model_name": "DescriptionStyleModel", 1327 | "description_width": "", 1328 | "_view_module": "@jupyter-widgets/base", 1329 | "_model_module_version": "1.5.0", 1330 | "_view_count": null, 1331 | "_view_module_version": "1.2.0", 1332 | "_model_module": "@jupyter-widgets/controls" 1333 | } 1334 | }, 1335 | "25cd48194ba745fe9b06b6b80d550590": { 1336 | "model_module": "@jupyter-widgets/base", 1337 | "model_name": "LayoutModel", 1338 | "model_module_version": "1.2.0", 1339 | "state": { 1340 | "_view_name": "LayoutView", 1341 | "grid_template_rows": null, 1342 | "right": null, 1343 | "justify_content": null, 1344 | "_view_module": "@jupyter-widgets/base", 1345 | "overflow": null, 1346 | "_model_module_version": "1.2.0", 1347 | "_view_count": null, 1348 | "flex_flow": null, 1349 | "width": null, 1350 | "min_width": null, 1351 | "border": null, 1352 | "align_items": null, 1353 | "bottom": null, 1354 | "_model_module": "@jupyter-widgets/base", 1355 | "top": null, 1356 | "grid_column": null, 1357 | "overflow_y": null, 1358 | "overflow_x": null, 1359 | "grid_auto_flow": null, 1360 | "grid_area": null, 1361 | "grid_template_columns": null, 1362 | "flex": null, 1363 | "_model_name": "LayoutModel", 1364 | "justify_items": null, 1365 | "grid_row": null, 1366 | "max_height": null, 1367 | "align_content": null, 1368 | "visibility": null, 1369 | "align_self": null, 1370 | "height": null, 1371 | "min_height": null, 1372 | "padding": null, 1373 | "grid_auto_rows": null, 1374 | "grid_gap": null, 1375 | "max_width": null, 1376 | "order": null, 1377 | "_view_module_version": "1.2.0", 1378 | "grid_template_areas": null, 1379 | "object_position": null, 1380 | "object_fit": null, 1381 | "grid_auto_columns": null, 1382 | "margin": null, 1383 | "display": null, 1384 | "left": null 1385 | } 1386 | }, 1387 | "4270dfea2b1e4c49a7a3834f83ce60ab": { 1388 | "model_module": "@jupyter-widgets/controls", 1389 | "model_name": "HBoxModel", 1390 | "model_module_version": "1.5.0", 1391 | "state": { 1392 | "_view_name": "HBoxView", 1393 | "_dom_classes": [], 1394 | "_model_name": "HBoxModel", 1395 | "_view_module": "@jupyter-widgets/controls", 1396 | "_model_module_version": "1.5.0", 1397 | "_view_count": null, 1398 | "_view_module_version": "1.5.0", 1399 | "box_style": "", 1400 | "layout": "IPY_MODEL_b55d13c740804c878cfee9fadb7f6b7c", 1401 | "_model_module": "@jupyter-widgets/controls", 1402 | "children": [ 1403 | "IPY_MODEL_c4d74b76c7aa4e63901f7da95146cc50", 1404 | "IPY_MODEL_d96a83dc81324a98b42c274627427e5a", 1405 | "IPY_MODEL_652ef334cae946399f7660e3c9fc5013" 1406 | ] 1407 | } 1408 | }, 1409 | "b55d13c740804c878cfee9fadb7f6b7c": { 1410 | "model_module": "@jupyter-widgets/base", 1411 | "model_name": "LayoutModel", 1412 | "model_module_version": "1.2.0", 1413 | "state": { 1414 | "_view_name": "LayoutView", 1415 | "grid_template_rows": null, 1416 | "right": null, 1417 | "justify_content": null, 1418 | "_view_module": "@jupyter-widgets/base", 1419 | "overflow": null, 1420 | "_model_module_version": "1.2.0", 1421 | "_view_count": null, 1422 | "flex_flow": null, 1423 | "width": null, 1424 | "min_width": null, 1425 | "border": null, 1426 | "align_items": null, 1427 | "bottom": null, 1428 | "_model_module": "@jupyter-widgets/base", 1429 | "top": null, 1430 | "grid_column": null, 1431 | "overflow_y": null, 1432 | "overflow_x": null, 1433 | "grid_auto_flow": null, 1434 | "grid_area": null, 1435 | "grid_template_columns": null, 1436 | "flex": null, 1437 | "_model_name": "LayoutModel", 1438 | "justify_items": null, 1439 | "grid_row": null, 1440 | "max_height": null, 1441 | "align_content": null, 1442 | "visibility": null, 1443 | "align_self": null, 1444 | "height": null, 1445 | "min_height": null, 1446 | "padding": null, 1447 | "grid_auto_rows": null, 1448 | "grid_gap": null, 1449 | "max_width": null, 1450 | "order": null, 1451 | "_view_module_version": "1.2.0", 1452 | "grid_template_areas": null, 1453 | "object_position": null, 1454 | "object_fit": null, 1455 | "grid_auto_columns": null, 1456 | "margin": null, 1457 | "display": null, 1458 | "left": null 1459 | } 1460 | }, 1461 | "c4d74b76c7aa4e63901f7da95146cc50": { 1462 | "model_module": "@jupyter-widgets/controls", 1463 | "model_name": "HTMLModel", 1464 | "model_module_version": "1.5.0", 1465 | "state": { 1466 | "_view_name": "HTMLView", 1467 | "style": "IPY_MODEL_18cce16738344fefac6af176d53a898c", 1468 | "_dom_classes": [], 1469 | "description": "", 1470 | "_model_name": "HTMLModel", 1471 | "placeholder": "​", 1472 | "_view_module": "@jupyter-widgets/controls", 1473 | "_model_module_version": "1.5.0", 1474 | "value": "Downloading: 100%", 1475 | "_view_count": null, 1476 | "_view_module_version": "1.5.0", 1477 | "description_tooltip": null, 1478 | "_model_module": "@jupyter-widgets/controls", 1479 | "layout": "IPY_MODEL_a03b770f18884f82958c63da39f4f6b0" 1480 | } 1481 | }, 1482 | "d96a83dc81324a98b42c274627427e5a": { 1483 | "model_module": "@jupyter-widgets/controls", 1484 | "model_name": "FloatProgressModel", 1485 | "model_module_version": "1.5.0", 1486 | "state": { 1487 | "_view_name": "ProgressView", 1488 | "style": "IPY_MODEL_7443710574c3433c8082989504ebf624", 1489 | "_dom_classes": [], 1490 | "description": "", 1491 | "_model_name": "FloatProgressModel", 1492 | "bar_style": "success", 1493 | "max": 466062, 1494 | "_view_module": "@jupyter-widgets/controls", 1495 | "_model_module_version": "1.5.0", 1496 | "value": 466062, 1497 | "_view_count": null, 1498 | "_view_module_version": "1.5.0", 1499 | "orientation": "horizontal", 1500 | "min": 0, 1501 | "description_tooltip": null, 1502 | "_model_module": "@jupyter-widgets/controls", 1503 | "layout": "IPY_MODEL_1655153ed3ae4fcd91122e86fc610202" 1504 | } 1505 | }, 1506 | "652ef334cae946399f7660e3c9fc5013": { 1507 | "model_module": "@jupyter-widgets/controls", 1508 | "model_name": "HTMLModel", 1509 | "model_module_version": "1.5.0", 1510 | "state": { 1511 | "_view_name": "HTMLView", 1512 | "style": "IPY_MODEL_33b9f7832e8f4ba3afd90ce2c720d367", 1513 | "_dom_classes": [], 1514 | "description": "", 1515 | "_model_name": "HTMLModel", 1516 | "placeholder": "​", 1517 | "_view_module": "@jupyter-widgets/controls", 1518 | "_model_module_version": "1.5.0", 1519 | "value": " 455k/455k [00:00<00:00, 1.74MB/s]", 1520 | "_view_count": null, 1521 | "_view_module_version": "1.5.0", 1522 | "description_tooltip": null, 1523 | "_model_module": "@jupyter-widgets/controls", 1524 | "layout": "IPY_MODEL_3b3d72715d234560ab1cb2dd08225ac3" 1525 | } 1526 | }, 1527 | "18cce16738344fefac6af176d53a898c": { 1528 | "model_module": "@jupyter-widgets/controls", 1529 | "model_name": "DescriptionStyleModel", 1530 | "model_module_version": "1.5.0", 1531 | "state": { 1532 | "_view_name": "StyleView", 1533 | "_model_name": "DescriptionStyleModel", 1534 | "description_width": "", 1535 | "_view_module": "@jupyter-widgets/base", 1536 | "_model_module_version": "1.5.0", 1537 | "_view_count": null, 1538 | "_view_module_version": "1.2.0", 1539 | "_model_module": "@jupyter-widgets/controls" 1540 | } 1541 | }, 1542 | "a03b770f18884f82958c63da39f4f6b0": { 1543 | "model_module": "@jupyter-widgets/base", 1544 | "model_name": "LayoutModel", 1545 | "model_module_version": "1.2.0", 1546 | "state": { 1547 | "_view_name": "LayoutView", 1548 | "grid_template_rows": null, 1549 | "right": null, 1550 | "justify_content": null, 1551 | "_view_module": "@jupyter-widgets/base", 1552 | "overflow": null, 1553 | "_model_module_version": "1.2.0", 1554 | "_view_count": null, 1555 | "flex_flow": null, 1556 | "width": null, 1557 | "min_width": null, 1558 | "border": null, 1559 | "align_items": null, 1560 | "bottom": null, 1561 | "_model_module": "@jupyter-widgets/base", 1562 | "top": null, 1563 | "grid_column": null, 1564 | "overflow_y": null, 1565 | "overflow_x": null, 1566 | "grid_auto_flow": null, 1567 | "grid_area": null, 1568 | "grid_template_columns": null, 1569 | "flex": null, 1570 | "_model_name": "LayoutModel", 1571 | "justify_items": null, 1572 | "grid_row": null, 1573 | "max_height": null, 1574 | "align_content": null, 1575 | "visibility": null, 1576 | "align_self": null, 1577 | "height": null, 1578 | "min_height": null, 1579 | "padding": null, 1580 | "grid_auto_rows": null, 1581 | "grid_gap": null, 1582 | "max_width": null, 1583 | "order": null, 1584 | "_view_module_version": "1.2.0", 1585 | "grid_template_areas": null, 1586 | "object_position": null, 1587 | "object_fit": null, 1588 | "grid_auto_columns": null, 1589 | "margin": null, 1590 | "display": null, 1591 | "left": null 1592 | } 1593 | }, 1594 | "7443710574c3433c8082989504ebf624": { 1595 | "model_module": "@jupyter-widgets/controls", 1596 | "model_name": "ProgressStyleModel", 1597 | "model_module_version": "1.5.0", 1598 | "state": { 1599 | "_view_name": "StyleView", 1600 | "_model_name": "ProgressStyleModel", 1601 | "description_width": "", 1602 | "_view_module": "@jupyter-widgets/base", 1603 | "_model_module_version": "1.5.0", 1604 | "_view_count": null, 1605 | "_view_module_version": "1.2.0", 1606 | "bar_color": null, 1607 | "_model_module": "@jupyter-widgets/controls" 1608 | } 1609 | }, 1610 | "1655153ed3ae4fcd91122e86fc610202": { 1611 | "model_module": "@jupyter-widgets/base", 1612 | "model_name": "LayoutModel", 1613 | "model_module_version": "1.2.0", 1614 | "state": { 1615 | "_view_name": "LayoutView", 1616 | "grid_template_rows": null, 1617 | "right": null, 1618 | "justify_content": null, 1619 | "_view_module": "@jupyter-widgets/base", 1620 | "overflow": null, 1621 | "_model_module_version": "1.2.0", 1622 | "_view_count": null, 1623 | "flex_flow": null, 1624 | "width": null, 1625 | "min_width": null, 1626 | "border": null, 1627 | "align_items": null, 1628 | "bottom": null, 1629 | "_model_module": "@jupyter-widgets/base", 1630 | "top": null, 1631 | "grid_column": null, 1632 | "overflow_y": null, 1633 | "overflow_x": null, 1634 | "grid_auto_flow": null, 1635 | "grid_area": null, 1636 | "grid_template_columns": null, 1637 | "flex": null, 1638 | "_model_name": "LayoutModel", 1639 | "justify_items": null, 1640 | "grid_row": null, 1641 | "max_height": null, 1642 | "align_content": null, 1643 | "visibility": null, 1644 | "align_self": null, 1645 | "height": null, 1646 | "min_height": null, 1647 | "padding": null, 1648 | "grid_auto_rows": null, 1649 | "grid_gap": null, 1650 | "max_width": null, 1651 | "order": null, 1652 | "_view_module_version": "1.2.0", 1653 | "grid_template_areas": null, 1654 | "object_position": null, 1655 | "object_fit": null, 1656 | "grid_auto_columns": null, 1657 | "margin": null, 1658 | "display": null, 1659 | "left": null 1660 | } 1661 | }, 1662 | "33b9f7832e8f4ba3afd90ce2c720d367": { 1663 | "model_module": "@jupyter-widgets/controls", 1664 | "model_name": "DescriptionStyleModel", 1665 | "model_module_version": "1.5.0", 1666 | "state": { 1667 | "_view_name": "StyleView", 1668 | "_model_name": "DescriptionStyleModel", 1669 | "description_width": "", 1670 | "_view_module": "@jupyter-widgets/base", 1671 | "_model_module_version": "1.5.0", 1672 | "_view_count": null, 1673 | "_view_module_version": "1.2.0", 1674 | "_model_module": "@jupyter-widgets/controls" 1675 | } 1676 | }, 1677 | "3b3d72715d234560ab1cb2dd08225ac3": { 1678 | "model_module": "@jupyter-widgets/base", 1679 | "model_name": "LayoutModel", 1680 | "model_module_version": "1.2.0", 1681 | "state": { 1682 | "_view_name": "LayoutView", 1683 | "grid_template_rows": null, 1684 | "right": null, 1685 | "justify_content": null, 1686 | "_view_module": "@jupyter-widgets/base", 1687 | "overflow": null, 1688 | "_model_module_version": "1.2.0", 1689 | "_view_count": null, 1690 | "flex_flow": null, 1691 | "width": null, 1692 | "min_width": null, 1693 | "border": null, 1694 | "align_items": null, 1695 | "bottom": null, 1696 | "_model_module": "@jupyter-widgets/base", 1697 | "top": null, 1698 | "grid_column": null, 1699 | "overflow_y": null, 1700 | "overflow_x": null, 1701 | "grid_auto_flow": null, 1702 | "grid_area": null, 1703 | "grid_template_columns": null, 1704 | "flex": null, 1705 | "_model_name": "LayoutModel", 1706 | "justify_items": null, 1707 | "grid_row": null, 1708 | "max_height": null, 1709 | "align_content": null, 1710 | "visibility": null, 1711 | "align_self": null, 1712 | "height": null, 1713 | "min_height": null, 1714 | "padding": null, 1715 | "grid_auto_rows": null, 1716 | "grid_gap": null, 1717 | "max_width": null, 1718 | "order": null, 1719 | "_view_module_version": "1.2.0", 1720 | "grid_template_areas": null, 1721 | "object_position": null, 1722 | "object_fit": null, 1723 | "grid_auto_columns": null, 1724 | "margin": null, 1725 | "display": null, 1726 | "left": null 1727 | } 1728 | } 1729 | } 1730 | } 1731 | }, 1732 | "cells": [ 1733 | { 1734 | "cell_type": "markdown", 1735 | "metadata": { 1736 | "id": "z7ZZ2c26XgJk" 1737 | }, 1738 | "source": [ 1739 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1BHVSQUdSdHxr-G-rlKk3JS7FupALufyn?usp=sharing)" 1740 | ] 1741 | }, 1742 | { 1743 | "cell_type": "markdown", 1744 | "metadata": { 1745 | "id": "lXkCf9hKXkIl" 1746 | }, 1747 | "source": [ 1748 | "# Solution: NLP model size\n", 1749 | "1. How many parameters does the BERT base uncased model have? Use the *get_model_size function* below to help you.\n", 1750 | "2. If you know the number of parameters for a model, how might you be able to determine how much memory is required when running a model inference?\n", 1751 | "3. If you wanted to run a GPT-3 175 billion inference. How much RAM would your infrastructure require.\n", 1752 | "\n", 1753 | "This should take you between 5-10 minutes\n" 1754 | ] 1755 | }, 1756 | { 1757 | "cell_type": "code", 1758 | "metadata": { 1759 | "id": "sIea7CKmuTYB", 1760 | "colab": { 1761 | "base_uri": "https://localhost:8080/" 1762 | }, 1763 | "outputId": "2ca2de26-ed2b-4ba5-cacb-b03d277a544f" 1764 | }, 1765 | "source": [ 1766 | "!pip install transformers" 1767 | ], 1768 | "execution_count": null, 1769 | "outputs": [ 1770 | { 1771 | "output_type": "stream", 1772 | "name": "stdout", 1773 | "text": [ 1774 | "Collecting transformers\n", 1775 | " Downloading transformers-4.12.3-py3-none-any.whl (3.1 MB)\n", 1776 | "\u001b[K |████████████████████████████████| 3.1 MB 4.8 MB/s \n", 1777 | "\u001b[?25hCollecting pyyaml>=5.1\n", 1778 | " Downloading PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (596 kB)\n", 1779 | "\u001b[K |████████████████████████████████| 596 kB 54.1 MB/s \n", 1780 | "\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (1.19.5)\n", 1781 | "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers) (2.23.0)\n", 1782 | "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers) (4.8.1)\n", 1783 | "Collecting sacremoses\n", 1784 | " Downloading sacremoses-0.0.46-py3-none-any.whl (895 kB)\n", 1785 | "\u001b[K |████████████████████████████████| 895 kB 43.6 MB/s \n", 1786 | "\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers) (3.3.2)\n", 1787 | "Collecting huggingface-hub<1.0,>=0.1.0\n", 1788 | " Downloading huggingface_hub-0.1.2-py3-none-any.whl (59 kB)\n", 1789 | "\u001b[K |████████████████████████████████| 59 kB 6.5 MB/s \n", 1790 | "\u001b[?25hRequirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers) (4.62.3)\n", 1791 | "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (21.2)\n", 1792 | "Collecting tokenizers<0.11,>=0.10.1\n", 1793 | " Downloading tokenizers-0.10.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB)\n", 1794 | "\u001b[K |████████████████████████████████| 3.3 MB 43.8 MB/s \n", 1795 | "\u001b[?25hRequirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (2019.12.20)\n", 1796 | "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0,>=0.1.0->transformers) (3.10.0.2)\n", 1797 | "Requirement already satisfied: pyparsing<3,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers) (2.4.7)\n", 1798 | "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers) (3.6.0)\n", 1799 | "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (3.0.4)\n", 1800 | "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2021.10.8)\n", 1801 | "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2.10)\n", 1802 | "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (1.24.3)\n", 1803 | "Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers) (1.1.0)\n", 1804 | "Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers) (1.15.0)\n", 1805 | "Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers) (7.1.2)\n", 1806 | "Installing collected packages: pyyaml, tokenizers, sacremoses, huggingface-hub, transformers\n", 1807 | " Attempting uninstall: pyyaml\n", 1808 | " Found existing installation: PyYAML 3.13\n", 1809 | " Uninstalling PyYAML-3.13:\n", 1810 | " Successfully uninstalled PyYAML-3.13\n", 1811 | "Successfully installed huggingface-hub-0.1.2 pyyaml-6.0 sacremoses-0.0.46 tokenizers-0.10.3 transformers-4.12.3\n" 1812 | ] 1813 | } 1814 | ] 1815 | }, 1816 | { 1817 | "cell_type": "code", 1818 | "metadata": { 1819 | "id": "AaHc9qEnyUT-", 1820 | "colab": { 1821 | "base_uri": "https://localhost:8080/", 1822 | "height": 474, 1823 | "referenced_widgets": [ 1824 | "3ef37badd8cb4529995b4758d2a3d1c3", 1825 | "29de041bbc274adbb5b98cc01fab9437", 1826 | "1357e43497b940a1b2e45e23e52de81b", 1827 | "9fbcc8734f514b14a563f361710213a2", 1828 | "3316e86ede42420d9350599408f608a8", 1829 | "d0b28ddbf6e244fda1f462f3db60a42f", 1830 | "48cf3be44c074ded860efcc2fcf91b6a", 1831 | "d82784df214c4172a0c05be479be6b79", 1832 | "c5df5d7a1c1640fe9dbc11662e91cc14", 1833 | "4e90b11813274f4083af7acb4a4e72bb", 1834 | "eb21d21a5f5941f9bd51329b2208eef8", 1835 | "57a35a889e1e40339d86ea0dc46467ca", 1836 | "5724290b42a94c99a630774fb1244222", 1837 | "2f8c2906cb5d43499603e472651b8f65", 1838 | "650b66ce5ac3492ab3c372a518613500", 1839 | "fe136c9729764b1db2a5f0d838237ebd", 1840 | "c52567187b86487195011d95833c1319", 1841 | "fe498bb1f2114b4f8fe74f577ebbdcbe", 1842 | "5cdfda4ae8f146dbaa463ae459c2748a", 1843 | "0666be92149d490e9712d11883fec4ba", 1844 | "ee71b7ff49e348159fe1afc11a2671ff", 1845 | "1c72237cc55d4e6083f936eda2785dce", 1846 | "8e80511799724dc4a02a2185fe84cbdd", 1847 | "4e52fc9af45843c79466cc0f588544c6", 1848 | "5e5a7e6011034b2dbb6da1583c437b52", 1849 | "b4a35767c87a4829aa1bcb94ac1897ff", 1850 | "c4f75fefc8344fff95de5f144acbe407", 1851 | "ac4dfe86953b45af8091af1e84bdea17", 1852 | "904549a5df8b4d73a4a2135ae2a8b250", 1853 | "48335ff0b3e644528e3c7fd4d23578e2", 1854 | "5a34488f2af448d68a7fc731d461125d", 1855 | "24ebe7c09b1440509e3aeb1356a6e09e", 1856 | "5b423960a7ec4c7ebd7e1e4bef2b11b5", 1857 | "3f2dfb3bf63c438b90cd1b0c77db8816", 1858 | "1ee53faf0b584ad2b8ba2546e6fe7011", 1859 | "117de106cf0044f4979577d317cb0fb2", 1860 | "abff93bda3814c1e9126bb0e194978c9", 1861 | "a36ec2c01a2b4c728cf45bd9c3342389", 1862 | "c0d7aba943384d4fadb3635ee8ca74ca", 1863 | "a76b3586a2eb4784937a2071dd83c980", 1864 | "e00deefff159461295509cc2975d1c93", 1865 | "90aad31640534ad79121fbb6dd119dc9", 1866 | "0bcba303bd5d4b1db8ff073c10d3e8b3", 1867 | "25cd48194ba745fe9b06b6b80d550590", 1868 | "4270dfea2b1e4c49a7a3834f83ce60ab", 1869 | "b55d13c740804c878cfee9fadb7f6b7c", 1870 | "c4d74b76c7aa4e63901f7da95146cc50", 1871 | "d96a83dc81324a98b42c274627427e5a", 1872 | "652ef334cae946399f7660e3c9fc5013", 1873 | "18cce16738344fefac6af176d53a898c", 1874 | "a03b770f18884f82958c63da39f4f6b0", 1875 | "7443710574c3433c8082989504ebf624", 1876 | "1655153ed3ae4fcd91122e86fc610202", 1877 | "33b9f7832e8f4ba3afd90ce2c720d367", 1878 | "3b3d72715d234560ab1cb2dd08225ac3" 1879 | ] 1880 | }, 1881 | "outputId": "61bff9df-7fd9-4c67-9b2a-a7bd89f214c5" 1882 | }, 1883 | "source": [ 1884 | "from transformers import TFAutoModel, AutoTokenizer\n", 1885 | "\n", 1886 | "def get_model_size(checkpoint='bert-base-cased'):\n", 1887 | " '''Usage: \n", 1888 | " checkpoint - the NLP model\n", 1889 | " returns the size of the NLP model you want to determine\n", 1890 | " Run this on colab.research.google.com as this downloads the model \n", 1891 | " before calculating the number of parameters. \n", 1892 | " '''\n", 1893 | " \n", 1894 | " model = TFAutoModel.from_pretrained(checkpoint)\n", 1895 | " tokenizer = AutoTokenizer.from_pretrained(checkpoint)\n", 1896 | " model.summary()\n", 1897 | "\n", 1898 | "get_model_size('bert-base-uncased')" 1899 | ], 1900 | "execution_count": null, 1901 | "outputs": [ 1902 | { 1903 | "output_type": "display_data", 1904 | "data": { 1905 | "application/vnd.jupyter.widget-view+json": { 1906 | "model_id": "3ef37badd8cb4529995b4758d2a3d1c3", 1907 | "version_minor": 0, 1908 | "version_major": 2 1909 | }, 1910 | "text/plain": [ 1911 | "Downloading: 0%| | 0.00/570 [00:00,\n", 199 | " 'input_type_ids': ,\n", 213 | " 'input_word_ids': }" 244 | ] 245 | }, 246 | "metadata": {}, 247 | "execution_count": 8 248 | } 249 | ] 250 | }, 251 | { 252 | "cell_type": "markdown", 253 | "metadata": { 254 | "id": "tJ7IrdrKKsuT" 255 | }, 256 | "source": [ 257 | "Normally BERT has a max sequence length of 512. Here we use a sequence length of 128." 258 | ] 259 | }, 260 | { 261 | "cell_type": "code", 262 | "metadata": { 263 | "colab": { 264 | "base_uri": "https://localhost:8080/" 265 | }, 266 | "id": "c7b1ClWqbLY1", 267 | "outputId": "355f1138-c9a3-44a1-8e28-93a06359d91f" 268 | }, 269 | "source": [ 270 | "text_preprocessed[\"input_word_ids\"].shape" 271 | ], 272 | "execution_count": null, 273 | "outputs": [ 274 | { 275 | "output_type": "execute_result", 276 | "data": { 277 | "text/plain": [ 278 | "TensorShape([2, 128])" 279 | ] 280 | }, 281 | "metadata": {}, 282 | "execution_count": 12 283 | } 284 | ] 285 | }, 286 | { 287 | "cell_type": "code", 288 | "metadata": { 289 | "colab": { 290 | "base_uri": "https://localhost:8080/" 291 | }, 292 | "id": "SqQodRjDblLI", 293 | "outputId": "2d666f84-c9ad-45ed-9d0d-d54f0db88fc1" 294 | }, 295 | "source": [ 296 | "text_preprocessed[\"input_word_ids\"]" 297 | ], 298 | "execution_count": null, 299 | "outputs": [ 300 | { 301 | "output_type": "execute_result", 302 | "data": { 303 | "text/plain": [ 304 | "" 335 | ] 336 | }, 337 | "metadata": {}, 338 | "execution_count": 10 339 | } 340 | ] 341 | }, 342 | { 343 | "cell_type": "code", 344 | "metadata": { 345 | "colab": { 346 | "base_uri": "https://localhost:8080/" 347 | }, 348 | "id": "KGsRM21kbvdl", 349 | "outputId": "4dc80a32-db9b-4da8-8820-fbdce2f15b9a" 350 | }, 351 | "source": [ 352 | "text_preprocessed[\"input_mask\"]" 353 | ], 354 | "execution_count": null, 355 | "outputs": [ 356 | { 357 | "output_type": "execute_result", 358 | "data": { 359 | "text/plain": [ 360 | "" 374 | ] 375 | }, 376 | "metadata": {}, 377 | "execution_count": 11 378 | } 379 | ] 380 | } 381 | ] 382 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | Contribution Agreement 3 | ====================== 4 | 5 | This repository does not accept pull requests (PRs). All pull requests will be closed. 6 | 7 | However, if any contributions (through pull requests, issues, feedback or otherwise) are provided, as a contributor, you represent that the code you submit is your original work or that of your employer (in which case you represent you have the right to bind your employer). By submitting code (or otherwise providing feedback), you (and, if applicable, your employer) are licensing the submitted code (and/or feedback) to LinkedIn and the open source community subject to the BSD 2-Clause license. 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | LinkedIn Learning Exercise Files License Agreement 2 | ================================================== 3 | 4 | This License Agreement (the "Agreement") is a binding legal agreement 5 | between you (as an individual or entity, as applicable) and LinkedIn 6 | Corporation (“LinkedIn”). By downloading or using the LinkedIn Learning 7 | exercise files in this repository (“Licensed Materials”), you agree to 8 | be bound by the terms of this Agreement. If you do not agree to these 9 | terms, do not download or use the Licensed Materials. 10 | 11 | 1. License. 12 | - a. Subject to the terms of this Agreement, LinkedIn hereby grants LinkedIn 13 | members during their LinkedIn Learning subscription a non-exclusive, 14 | non-transferable copyright license, for internal use only, to 1) make a 15 | reasonable number of copies of the Licensed Materials, and 2) make 16 | derivative works of the Licensed Materials for the sole purpose of 17 | practicing skills taught in LinkedIn Learning courses. 18 | - b. Distribution. Unless otherwise noted in the Licensed Materials, subject 19 | to the terms of this Agreement, LinkedIn hereby grants LinkedIn members 20 | with a LinkedIn Learning subscription a non-exclusive, non-transferable 21 | copyright license to distribute the Licensed Materials, except the 22 | Licensed Materials may not be included in any product or service (or 23 | otherwise used) to instruct or educate others. 24 | 25 | 2. Restrictions and Intellectual Property. 26 | - a. You may not to use, modify, copy, make derivative works of, publish, 27 | distribute, rent, lease, sell, sublicense, assign or otherwise transfer the 28 | Licensed Materials, except as expressly set forth above in Section 1. 29 | - b. Linkedin (and its licensors) retains its intellectual property rights 30 | in the Licensed Materials. Except as expressly set forth in Section 1, 31 | LinkedIn grants no licenses. 32 | - c. You indemnify LinkedIn and its licensors and affiliates for i) any 33 | alleged infringement or misappropriation of any intellectual property rights 34 | of any third party based on modifications you make to the Licensed Materials, 35 | ii) any claims arising from your use or distribution of all or part of the 36 | Licensed Materials and iii) a breach of this Agreement. You will defend, hold 37 | harmless, and indemnify LinkedIn and its affiliates (and our and their 38 | respective employees, shareholders, and directors) from any claim or action 39 | brought by a third party, including all damages, liabilities, costs and 40 | expenses, including reasonable attorneys’ fees, to the extent resulting from, 41 | alleged to have resulted from, or in connection with: (a) your breach of your 42 | obligations herein; or (b) your use or distribution of any Licensed Materials. 43 | 44 | 3. Open source. This code may include open source software, which may be 45 | subject to other license terms as provided in the files. 46 | 47 | 4. Warranty Disclaimer. LINKEDIN PROVIDES THE LICENSED MATERIALS ON AN “AS IS” 48 | AND “AS AVAILABLE” BASIS. LINKEDIN MAKES NO REPRESENTATION OR WARRANTY, 49 | WHETHER EXPRESS OR IMPLIED, ABOUT THE LICENSED MATERIALS, INCLUDING ANY 50 | REPRESENTATION THAT THE LICENSED MATERIALS WILL BE FREE OF ERRORS, BUGS OR 51 | INTERRUPTIONS, OR THAT THE LICENSED MATERIALS ARE ACCURATE, COMPLETE OR 52 | OTHERWISE VALID. TO THE FULLEST EXTENT PERMITTED BY LAW, LINKEDIN AND ITS 53 | AFFILIATES DISCLAIM ANY IMPLIED OR STATUTORY WARRANTY OR CONDITION, INCLUDING 54 | ANY IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY OR FITNESS FOR A 55 | PARTICULAR PURPOSE, AVAILABILITY, SECURITY, TITLE AND/OR NON-INFRINGEMENT. 56 | YOUR USE OF THE LICENSED MATERIALS IS AT YOUR OWN DISCRETION AND RISK, AND 57 | YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE THAT RESULTS FROM USE OF THE 58 | LICENSED MATERIALS TO YOUR COMPUTER SYSTEM OR LOSS OF DATA. NO ADVICE OR 59 | INFORMATION, WHETHER ORAL OR WRITTEN, OBTAINED BY YOU FROM US OR THROUGH OR 60 | FROM THE LICENSED MATERIALS WILL CREATE ANY WARRANTY OR CONDITION NOT 61 | EXPRESSLY STATED IN THESE TERMS. 62 | 63 | 5. Limitation of Liability. LINKEDIN SHALL NOT BE LIABLE FOR ANY INDIRECT, 64 | INCIDENTAL, SPECIAL, PUNITIVE, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING 65 | BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER 66 | INTANGIBLE LOSSES . IN NO EVENT WILL LINKEDIN'S AGGREGATE LIABILITY TO YOU 67 | EXCEED $100. THIS LIMITATION OF LIABILITY SHALL: 68 | - i. APPLY REGARDLESS OF WHETHER (A) YOU BASE YOUR CLAIM ON CONTRACT, TORT, 69 | STATUTE, OR ANY OTHER LEGAL THEORY, (B) WE KNEW OR SHOULD HAVE KNOWN ABOUT 70 | THE POSSIBILITY OF SUCH DAMAGES, OR (C) THE LIMITED REMEDIES PROVIDED IN THIS 71 | SECTION FAIL OF THEIR ESSENTIAL PURPOSE; AND 72 | - ii. NOT APPLY TO ANY DAMAGE THAT LINKEDIN MAY CAUSE YOU INTENTIONALLY OR 73 | KNOWINGLY IN VIOLATION OF THESE TERMS OR APPLICABLE LAW, OR AS OTHERWISE 74 | MANDATED BY APPLICABLE LAW THAT CANNOT BE DISCLAIMED IN THESE TERMS. 75 | 76 | 6. Termination. This Agreement automatically terminates upon your breach of 77 | this Agreement or termination of your LinkedIn Learning subscription. On 78 | termination, all licenses granted under this Agreement will terminate 79 | immediately and you will delete the Licensed Materials. Sections 2-7 of this 80 | Agreement survive any termination of this Agreement. LinkedIn may discontinue 81 | the availability of some or all of the Licensed Materials at any time for any 82 | reason. 83 | 84 | 7. Miscellaneous. This Agreement will be governed by and construed in 85 | accordance with the laws of the State of California without regard to conflict 86 | of laws principles. The exclusive forum for any disputes arising out of or 87 | relating to this Agreement shall be an appropriate federal or state court 88 | sitting in the County of Santa Clara, State of California. If LinkedIn does 89 | not act to enforce a breach of this Agreement, that does not mean that 90 | LinkedIn has waived its right to enforce this Agreement. The Agreement does 91 | not create a partnership, agency relationship, or joint venture between the 92 | parties. Neither party has the power or authority to bind the other or to 93 | create any obligation or responsibility on behalf of the other. You may not, 94 | without LinkedIn’s prior written consent, assign or delegate any rights or 95 | obligations under these terms, including in connection with a change of 96 | control. Any purported assignment and delegation shall be ineffective. The 97 | Agreement shall bind and inure to the benefit of the parties, their respective 98 | successors and permitted assigns. If any provision of the Agreement is 99 | unenforceable, that provision will be modified to render it enforceable to the 100 | extent possible to give effect to the parties’ intentions and the remaining 101 | provisions will not be affected. This Agreement is the only agreement between 102 | you and LinkedIn regarding the Licensed Materials, and supersedes all prior 103 | agreements relating to the Licensed Materials. 104 | 105 | Last Updated: March 2019 106 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2022 LinkedIn Corporation 2 | All Rights Reserved. 3 | 4 | Licensed under the LinkedIn Learning Exercise File License (the "License"). 5 | See LICENSE in the project root for license information. 6 | 7 | ATTRIBUTIONS: 8 | 9 | Tensorflow 10 | https://github.com/tensorflow/tensorflow 11 | License: Apache 2.0 12 | http://www.apache.org/licenses/ 13 | 14 | Please note, this project may automatically load third party code from external 15 | repositories (for example, NPM modules, Composer packages, or other dependencies). 16 | If so, such third party code may be subject to other license terms than as set 17 | forth above. In addition, such third party code may also depend on and load 18 | multiple tiers of dependencies. Please review the applicable licenses of the 19 | additional dependencies. 20 | 21 | 22 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 23 | Apache License 24 | Version 2.0, January 2004 25 | http://www.apache.org/licenses/ 26 | 27 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 28 | 29 | 1. Definitions. 30 | 31 | "License" shall mean the terms and conditions for use, reproduction, 32 | and distribution as defined by Sections 1 through 9 of this document. 33 | 34 | "Licensor" shall mean the copyright owner or entity authorized by 35 | the copyright owner that is granting the License. 36 | 37 | "Legal Entity" shall mean the union of the acting entity and all 38 | other entities that control, are controlled by, or are under common 39 | control with that entity. For the purposes of this definition, 40 | "control" means (i) the power, direct or indirect, to cause the 41 | direction or management of such entity, whether by contract or 42 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 43 | outstanding shares, or (iii) beneficial ownership of such entity. 44 | 45 | "You" (or "Your") shall mean an individual or Legal Entity 46 | exercising permissions granted by this License. 47 | 48 | "Source" form shall mean the preferred form for making modifications, 49 | including but not limited to software source code, documentation 50 | source, and configuration files. 51 | 52 | "Object" form shall mean any form resulting from mechanical 53 | transformation or translation of a Source form, including but 54 | not limited to compiled object code, generated documentation, 55 | and conversions to other media types. 56 | 57 | "Work" shall mean the work of authorship, whether in Source or 58 | Object form, made available under the License, as indicated by a 59 | copyright notice that is included in or attached to the work 60 | (an example is provided in the Appendix below). 61 | 62 | "Derivative Works" shall mean any work, whether in Source or Object 63 | form, that is based on (or derived from) the Work and for which the 64 | editorial revisions, annotations, elaborations, or other modifications 65 | represent, as a whole, an original work of authorship. For the purposes 66 | of this License, Derivative Works shall not include works that remain 67 | separable from, or merely link (or bind by name) to the interfaces of, 68 | the Work and Derivative Works thereof. 69 | 70 | "Contribution" shall mean any work of authorship, including 71 | the original version of the Work and any modifications or additions 72 | to that Work or Derivative Works thereof, that is intentionally 73 | submitted to Licensor for inclusion in the Work by the copyright owner 74 | or by an individual or Legal Entity authorized to submit on behalf of 75 | the copyright owner. For the purposes of this definition, "submitted" 76 | means any form of electronic, verbal, or written communication sent 77 | to the Licensor or its representatives, including but not limited to 78 | communication on electronic mailing lists, source code control systems, 79 | and issue tracking systems that are managed by, or on behalf of, the 80 | Licensor for the purpose of discussing and improving the Work, but 81 | excluding communication that is conspicuously marked or otherwise 82 | designated in writing by the copyright owner as "Not a Contribution." 83 | 84 | "Contributor" shall mean Licensor and any individual or Legal Entity 85 | on behalf of whom a Contribution has been received by Licensor and 86 | subsequently incorporated within the Work. 87 | 88 | 2. Grant of Copyright License. Subject to the terms and conditions of 89 | this License, each Contributor hereby grants to You a perpetual, 90 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 91 | copyright license to reproduce, prepare Derivative Works of, 92 | publicly display, publicly perform, sublicense, and distribute the 93 | Work and such Derivative Works in Source or Object form. 94 | 95 | 3. Grant of Patent License. Subject to the terms and conditions of 96 | this License, each Contributor hereby grants to You a perpetual, 97 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 98 | (except as stated in this section) patent license to make, have made, 99 | use, offer to sell, sell, import, and otherwise transfer the Work, 100 | where such license applies only to those patent claims licensable 101 | by such Contributor that are necessarily infringed by their 102 | Contribution(s) alone or by combination of their Contribution(s) 103 | with the Work to which such Contribution(s) was submitted. If You 104 | institute patent litigation against any entity (including a 105 | cross-claim or counterclaim in a lawsuit) alleging that the Work 106 | or a Contribution incorporated within the Work constitutes direct 107 | or contributory patent infringement, then any patent licenses 108 | granted to You under this License for that Work shall terminate 109 | as of the date such litigation is filed. 110 | 111 | 4. Redistribution. You may reproduce and distribute copies of the 112 | Work or Derivative Works thereof in any medium, with or without 113 | modifications, and in Source or Object form, provided that You 114 | meet the following conditions: 115 | 116 | (a) You must give any other recipients of the Work or 117 | Derivative Works a copy of this License; and 118 | 119 | (b) You must cause any modified files to carry prominent notices 120 | stating that You changed the files; and 121 | 122 | (c) You must retain, in the Source form of any Derivative Works 123 | that You distribute, all copyright, patent, trademark, and 124 | attribution notices from the Source form of the Work, 125 | excluding those notices that do not pertain to any part of 126 | the Derivative Works; and 127 | 128 | (d) If the Work includes a "NOTICE" text file as part of its 129 | distribution, then any Derivative Works that You distribute must 130 | include a readable copy of the attribution notices contained 131 | within such NOTICE file, excluding those notices that do not 132 | pertain to any part of the Derivative Works, in at least one 133 | of the following places: within a NOTICE text file distributed 134 | as part of the Derivative Works; within the Source form or 135 | documentation, if provided along with the Derivative Works; or, 136 | within a display generated by the Derivative Works, if and 137 | wherever such third-party notices normally appear. The contents 138 | of the NOTICE file are for informational purposes only and 139 | do not modify the License. You may add Your own attribution 140 | notices within Derivative Works that You distribute, alongside 141 | or as an addendum to the NOTICE text from the Work, provided 142 | that such additional attribution notices cannot be construed 143 | as modifying the License. 144 | 145 | You may add Your own copyright statement to Your modifications and 146 | may provide additional or different license terms and conditions 147 | for use, reproduction, or distribution of Your modifications, or 148 | for any such Derivative Works as a whole, provided Your use, 149 | reproduction, and distribution of the Work otherwise complies with 150 | the conditions stated in this License. 151 | 152 | 5. Submission of Contributions. Unless You explicitly state otherwise, 153 | any Contribution intentionally submitted for inclusion in the Work 154 | by You to the Licensor shall be under the terms and conditions of 155 | this License, without any additional terms or conditions. 156 | Notwithstanding the above, nothing herein shall supersede or modify 157 | the terms of any separate license agreement you may have executed 158 | with Licensor regarding such Contributions. 159 | 160 | 6. Trademarks. This License does not grant permission to use the trade 161 | names, trademarks, service marks, or product names of the Licensor, 162 | except as required for reasonable and customary use in describing the 163 | origin of the Work and reproducing the content of the NOTICE file. 164 | 165 | 7. Disclaimer of Warranty. Unless required by applicable law or 166 | agreed to in writing, Licensor provides the Work (and each 167 | Contributor provides its Contributions) on an "AS IS" BASIS, 168 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 169 | implied, including, without limitation, any warranties or conditions 170 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 171 | PARTICULAR PURPOSE. You are solely responsible for determining the 172 | appropriateness of using or redistributing the Work and assume any 173 | risks associated with Your exercise of permissions under this License. 174 | 175 | 8. Limitation of Liability. In no event and under no legal theory, 176 | whether in tort (including negligence), contract, or otherwise, 177 | unless required by applicable law (such as deliberate and grossly 178 | negligent acts) or agreed to in writing, shall any Contributor be 179 | liable to You for damages, including any direct, indirect, special, 180 | incidental, or consequential damages of any character arising as a 181 | result of this License or out of the use or inability to use the 182 | Work (including but not limited to damages for loss of goodwill, 183 | work stoppage, computer failure or malfunction, or any and all 184 | other commercial damages or losses), even if such Contributor 185 | has been advised of the possibility of such damages. 186 | 187 | 9. Accepting Warranty or Additional Liability. While redistributing 188 | the Work or Derivative Works thereof, You may choose to offer, 189 | and charge a fee for, acceptance of support, warranty, indemnity, 190 | or other liability obligations and/or rights consistent with this 191 | License. However, in accepting such obligations, You may act only 192 | on Your own behalf and on Your sole responsibility, not on behalf 193 | of any other Contributor, and only if You agree to indemnify, 194 | defend, and hold each Contributor harmless for any liability 195 | incurred by, or claims asserted against, such Contributor by reason 196 | of your accepting any such warranty or additional liability. 197 | 198 | END OF TERMS AND CONDITIONS 199 | 200 | APPENDIX: How to apply the Apache License to your work. 201 | 202 | To apply the Apache License to your work, attach the following 203 | boilerplate notice, with the fields enclosed by brackets "[]" 204 | replaced with your own identifying information. (Don't include 205 | the brackets!) The text should be enclosed in the appropriate 206 | comment syntax for the file format. We also recommend that a 207 | file or class name and description of purpose be included on the 208 | same "printed page" as the copyright notice for easier 209 | identification within third-party archives. 210 | 211 | Copyright [yyyy] [name of copyright owner] 212 | 213 | Licensed under the Apache License, Version 2.0 (the "License"); 214 | you may not use this file except in compliance with the License. 215 | You may obtain a copy of the License at 216 | 217 | http://www.apache.org/licenses/LICENSE-2.0 218 | 219 | Unless required by applicable law or agreed to in writing, software 220 | distributed under the License is distributed on an "AS IS" BASIS, 221 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 222 | See the License for the specific language governing permissions and 223 | limitations under the License. 224 | 225 | ## Some of TensorFlow's code is derived from Caffe, which is subject to the following copyright notice: 226 | 227 | COPYRIGHT 228 | 229 | All contributions by the University of California: 230 | 231 | Copyright (c) 2014, The Regents of the University of California (Regents) 232 | All rights reserved. 233 | 234 | All other contributions: 235 | 236 | Copyright (c) 2014, the respective contributors 237 | All rights reserved. 238 | 239 | Caffe uses a shared copyright model: each contributor holds copyright over 240 | their contributions to Caffe. The project versioning records all such 241 | contribution and copyright details. If a contributor wants to further mark 242 | their specific copyright on a particular contribution, they should indicate 243 | their copyright solely in the commit message of the change when it is 244 | committed. 245 | 246 | LICENSE 247 | 248 | Redistribution and use in source and binary forms, with or without 249 | modification, are permitted provided that the following conditions are met: 250 | 251 | 1. Redistributions of source code must retain the above copyright notice, this 252 | list of conditions and the following disclaimer. 253 | 254 | 2. Redistributions in binary form must reproduce the above copyright notice, 255 | this list of conditions and the following disclaimer in the documentation 256 | and/or other materials provided with the distribution. 257 | 258 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 259 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 260 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 261 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 262 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 263 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 264 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 265 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 266 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 267 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 268 | 269 | CONTRIBUTION AGREEMENT 270 | 271 | By contributing to the BVLC/caffe repository through pull-request, comment, 272 | or otherwise, the contributor releases their content to the 273 | license and copyright terms herein. 274 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # TensorFlow: Working with NLP 4 | This is the repository for the LinkedIn Learning course TensorFlow: Working with NLP. The full course is available from [LinkedIn Learning][lil-course-url]. 5 | 6 | ![TensorFlow: Working with NLP][lil-thumbnail-url] 7 | 8 | TensorFlow 2.0 is quickly becoming one of the most popular deep learning frameworks and a must-have skill in your artificial intelligence toolkit. Using a hands-on approach, Jonathan Fernandes covers the key aspects of working with transformers in natural language processing, all in TensorFlow. He goes over the basics of working with text data, and explores transfer learning, fine-tuning BERT, and understanding the transformer model architecture. He also includes challenge/solution sets and assessment questions to help you optimize retention of the material. 9 | 10 | ## Instructions 11 | This repository has branches for each of the videos in the course. You can use the branch pop up menu in github to switch to a specific branch and take a look at the course at that stage, or you can add `/tree/BRANCH_NAME` to the URL to go to the branch you want to access. 12 | 13 | ## Branches 14 | The branches are structured to correspond to the videos in the course. The naming convention is `CHAPTER#_MOVIE#`. As an example, the branch named `02_03` corresponds to the second chapter and the third video in that chapter. 15 | Some branches will have a beginning and an end state. These are marked with the letters `b` for "beginning" and `e` for "end". The `b` branch contains the code as it is at the beginning of the movie. The `e` branch contains the code as it is at the end of the movie. The `main` branch holds the final state of the code when in the course. 16 | 17 | When switching from one exercise files branch to the next after making changes to the files, you may get a message like this: 18 | 19 | error: Your local changes to the following files would be overwritten by checkout: [files] 20 | Please commit your changes or stash them before you switch branches. 21 | Aborting 22 | 23 | To resolve this issue: 24 | 25 | Add changes to git using this command: git add . 26 | Commit changes using this command: git commit -m "some message" 27 | 28 | ## Installing 29 | 1. To use these exercise files, you must have the following installed: 30 | - You must have a Google account if you want to run any of the models. 31 | 2. Clone this repository into your local machine using the terminal (Mac), CMD (Windows), or a GUI tool like SourceTree. 32 | 33 | 34 | ### Instructor 35 | 36 | Jonathan Fernandes 37 | 38 | Data Scientist 39 | 40 | 41 | 42 | Check out my other courses on [LinkedIn Learning](https://www.linkedin.com/learning/instructors/jonathan-fernandes). 43 | 44 | [lil-course-url]: https://www.linkedin.com/learning/tensorflow-working-with-nlp 45 | [lil-thumbnail-url]: https://cdn.lynda.com/course/2439112/2439112-1643654357618-16x9.jpg 46 | 47 | 48 | 49 | 50 | --------------------------------------------------------------------------------