{
  "id": 332646,
  "title": "Open Sourcing Lightning Fast 0.8137 Model: Train Your CodeBert in 4 Hours",
  "url": "/competitions/AI4Code/discussion/332646",
  "author_name": "",
  "post_date": "2022-06-22T17:44:34.469337600Z",
  "votes": 57,
  "comment_count": 12,
  "views": 0,
  "content": "<h1>TL;DR</h1>\n<p>I've published a complete, end-to-end pipeline for this competition including 3 notebooks and 2 datasets. The final model gets <strong>public score of 0.8137</strong>. The whole <strong>training part takes only 4 hours</strong> on Kaggle TPU.</p>\n<h3>Notebooks</h3>\n<ol>\n<li><strong><a href=\"https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-data-preparation\" target=\"_blank\">AI4Code TF TPU CodeBert - Data Preparation</a></strong> (~5 hours)</li>\n<li><strong><a href=\"https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training\" target=\"_blank\">AI4Code TF TPU CodeBert - Training</a></strong> (~4 hours)</li>\n<li><strong><a href=\"https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-inference\" target=\"_blank\">AI4Code TF TPU CodeBert - Inference</a></strong> (~2 hours)</li>\n</ol>\n<h3>Datasets</h3>\n<ol>\n<li><strong><a href=\"https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-tokens\" target=\"_blank\">AI4Code CodeBert Tokens</a></strong> (pre-tokenised inputs and tfrecords)</li>\n<li><strong><a href=\"https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-weights\" target=\"_blank\">AI4Code CodeBert Weights</a></strong> (weights of pre-trained CodeBert Base model scoring 0.8137)</li>\n</ol>\n<p>This is basically a translation of <strong><a href=\"https://www.kaggle.com/suicaokhoailang\" target=\"_blank\">Khoi Nguyen's</a></strong> works [<a href=\"https://github.com/suicao/ai4code-baseline/tree/main/code\" target=\"_blank\">1</a>, <a href=\"https://www.kaggle.com/code/suicaokhoailang/stronger-baseline-with-code-cells\" target=\"_blank\">2</a>] from PyTorch to TensorFlow with a handful of changes and updates for TPU support. Huge thanks to <a href=\"https://www.kaggle.com/suicaokhoailang\" target=\"_blank\">@suicaokhoailang</a> for his original work!</p>\n<h1>About Solution</h1>\n<ul>\n<li>Input data: markdown + code context (512 tokens) + features<ul>\n<li>Markdown (up to 64 tokens)</li>\n<li>Code context (all code cells or up to 20 code cells each up to 23 tokens)</li>\n<li>Features: markdown cells to total cells ratio (appended to backbone outputs)</li></ul></li>\n<li>Model and hyperparameters<ul>\n<li>CodeBert Base model</li>\n<li>L1 loss (MAE)</li>\n<li>AdamW optimizer</li>\n<li>Learning rate schedule with warmup and linear decay</li>\n<li>Total 5 epochs</li></ul></li>\n</ul>\n<h1>Motivation</h1>\n<p>There's a lot of great public notebooks here already, and yet it seems that none of those really make it possible to enrol the competition using only resources provided by Kaggle. There's even a <strong><a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/329848\" target=\"_blank\">discussion</a></strong> on whether it's possible to take part without your own GPU.</p>\n<p>I tried to speed up some of PyTorch public notebooks using PyTorch XLA. It seems I'm not so good at it, so 9 hours per epoch was the best I could get from it. Instead, I decided to take <a href=\"https://www.kaggle.com/suicaokhoailang\" target=\"_blank\">@suicaokhoailang</a>'s work and translated PyTorch to TensorFlow instead leaving preprocessing part unchanged. At the end of the day I got a slightly worse score and enormous performance boost: only 4 hours for the entire training process.</p>",
  "messages": [
    {
      "id": "1829561",
      "postDate": "06/22/2022 17:44:34",
      "content": "<h1>TL;DR</h1>\n<p>I've published a complete, end-to-end pipeline for this competition including 3 notebooks and 2 datasets. The final model gets <strong>public score of 0.8137</strong>. The whole <strong>training part takes only 4 hours</strong> on Kaggle TPU.</p>\n<h3>Notebooks</h3>\n<ol>\n<li><strong><a href=\"https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-data-preparation\" target=\"_blank\">AI4Code TF TPU CodeBert - Data Preparation</a></strong> (~5 hours)</li>\n<li><strong><a href=\"https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training\" target=\"_blank\">AI4Code TF TPU CodeBert - Training</a></strong> (~4 hours)</li>\n<li><strong><a href=\"https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-inference\" target=\"_blank\">AI4Code TF TPU CodeBert - Inference</a></strong> (~2 hours)</li>\n</ol>\n<h3>Datasets</h3>\n<ol>\n<li><strong><a href=\"https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-tokens\" target=\"_blank\">AI4Code CodeBert Tokens</a></strong> (pre-tokenised inputs and tfrecords)</li>\n<li><strong><a href=\"https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-weights\" target=\"_blank\">AI4Code CodeBert Weights</a></strong> (weights of pre-trained CodeBert Base model scoring 0.8137)</li>\n</ol>\n<p>This is basically a translation of <strong><a href=\"https://www.kaggle.com/suicaokhoailang\" target=\"_blank\">Khoi Nguyen's</a></strong> works [<a href=\"https://github.com/suicao/ai4code-baseline/tree/main/code\" target=\"_blank\">1</a>, <a href=\"https://www.kaggle.com/code/suicaokhoailang/stronger-baseline-with-code-cells\" target=\"_blank\">2</a>] from PyTorch to TensorFlow with a handful of changes and updates for TPU support. Huge thanks to <a href=\"https://www.kaggle.com/suicaokhoailang\" target=\"_blank\">@suicaokhoailang</a> for his original work!</p>\n<h1>About Solution</h1>\n<ul>\n<li>Input data: markdown + code context (512 tokens) + features<ul>\n<li>Markdown (up to 64 tokens)</li>\n<li>Code context (all code cells or up to 20 code cells each up to 23 tokens)</li>\n<li>Features: markdown cells to total cells ratio (appended to backbone outputs)</li></ul></li>\n<li>Model and hyperparameters<ul>\n<li>CodeBert Base model</li>\n<li>L1 loss (MAE)</li>\n<li>AdamW optimizer</li>\n<li>Learning rate schedule with warmup and linear decay</li>\n<li>Total 5 epochs</li></ul></li>\n</ul>\n<h1>Motivation</h1>\n<p>There's a lot of great public notebooks here already, and yet it seems that none of those really make it possible to enrol the competition using only resources provided by Kaggle. There's even a <strong><a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/329848\" target=\"_blank\">discussion</a></strong> on whether it's possible to take part without your own GPU.</p>\n<p>I tried to speed up some of PyTorch public notebooks using PyTorch XLA. It seems I'm not so good at it, so 9 hours per epoch was the best I could get from it. Instead, I decided to take <a href=\"https://www.kaggle.com/suicaokhoailang\" target=\"_blank\">@suicaokhoailang</a>'s work and translated PyTorch to TensorFlow instead leaving preprocessing part unchanged. At the end of the day I got a slightly worse score and enormous performance boost: only 4 hours for the entire training process.</p>",
      "rawMarkdown": "# TL;DR\n\nI've published a complete, end-to-end pipeline for this competition including 3 notebooks and 2 datasets. The final model gets **public score of 0.8137**. The whole **training part takes only 4 hours** on Kaggle TPU.\n\n### Notebooks\n\n1. **[AI4Code TF TPU CodeBert - Data Preparation][1]** (~5 hours)\n2. **[AI4Code TF TPU CodeBert - Training][2]** (~4 hours)\n3. **[AI4Code TF TPU CodeBert - Inference][3]** (~2 hours)\n\n### Datasets\n\n1. **[AI4Code CodeBert Tokens][4]** (pre-tokenised inputs and tfrecords)\n2. **[AI4Code CodeBert Weights][5]** (weights of pre-trained CodeBert Base model scoring 0.8137)\n\nThis is basically a translation of **[Khoi Nguyen's][6]** works [[1][7], [2][8]] from PyTorch to TensorFlow with a handful of changes and updates for TPU support. Huge thanks to @suicaokhoailang for his original work!\n\n# About Solution\n\n- Input data: markdown + code context (512 tokens) + features\n    - Markdown (up to 64 tokens)\n    - Code context (all code cells or up to 20 code cells each up to 23 tokens)\n    - Features: markdown cells to total cells ratio (appended to backbone outputs)\n- Model and hyperparameters\n    - CodeBert Base model\n    - L1 loss (MAE)\n    - AdamW optimizer\n    - Learning rate schedule with warmup and linear decay\n    - Total 5 epochs\n\n# Motivation\n\nThere's a lot of great public notebooks here already, and yet it seems that none of those really make it possible to enrol the competition using only resources provided by Kaggle. There's even a **[discussion][9]** on whether it's possible to take part without your own GPU.\n\nI tried to speed up some of PyTorch public notebooks using PyTorch XLA. It seems I'm not so good at it, so 9 hours per epoch was the best I could get from it. Instead, I decided to take @suicaokhoailang's work and translated PyTorch to TensorFlow instead leaving preprocessing part unchanged. At the end of the day I got a slightly worse score and enormous performance boost: only 4 hours for the entire training process.\n\n[1]: https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-data-preparation\n[2]: https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training\n[3]: https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-inference\n[4]: https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-tokens\n[5]: https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-weights\n[6]: https://www.kaggle.com/suicaokhoailang\n[7]: https://github.com/suicao/ai4code-baseline/tree/main/code\n[8]: https://www.kaggle.com/code/suicaokhoailang/stronger-baseline-with-code-cells\n[9]: https://www.kaggle.com/competitions/AI4Code/discussion/329848",
      "votes": null
    },
    {
      "id": "1829686",
      "postDate": "06/22/2022 20:21:16",
      "content": "<p>Thanks a lot for sharing this great work!!!!</p>",
      "rawMarkdown": "Thanks a lot for sharing this great work!!!!",
      "votes": null
    },
    {
      "id": "1829933",
      "postDate": "06/23/2022 03:58:31",
      "content": "<p>it's nice when see what's tensorflow on tpu can do.</p>",
      "rawMarkdown": "it's nice when see what's tensorflow on tpu can do.",
      "votes": null
    },
    {
      "id": "1830490",
      "postDate": "06/23/2022 13:22:42",
      "content": "<p>Amazing! Thank you for sharing to everyone.</p>",
      "rawMarkdown": "Amazing! Thank you for sharing to everyone.",
      "votes": null
    },
    {
      "id": "1834651",
      "postDate": "06/27/2022 05:39:05",
      "content": "<p>I should take this opportunity to study TPU. Thank you for the good writing.👍</p>",
      "rawMarkdown": "I should take this opportunity to study TPU. Thank you for the good writing.👍",
      "votes": null
    },
    {
      "id": "1835602",
      "postDate": "06/27/2022 22:47:22",
      "content": "<p>very amazing work👀</p>",
      "rawMarkdown": "very amazing work👀",
      "votes": null
    },
    {
      "id": "1842887",
      "postDate": "07/04/2022 11:21:32",
      "content": "<p><a href=\"https://www.kaggle.com/nickuzmenkov\" target=\"_blank\">@nickuzmenkov</a> <br>\nI ran GPU-based code which took ~7hours to complete of 1 epoch on 1xV100. But your TPU-based code is big improvement on that in terms of training speed. Great work, thanks for sharing. And congrats for becoming Master.</p>",
      "rawMarkdown": "nickuzmenkov \nI ran GPU-based code which took ~7hours to complete of 1 epoch on 1xV100. But your TPU-based code is big improvement on that in terms of training speed. Great work, thanks for sharing. And congrats for becoming Master.",
      "votes": null
    },
    {
      "id": "1842942",
      "postDate": "07/04/2022 12:08:24",
      "content": "<p><a href=\"https://www.kaggle.com/ipythonx\" target=\"_blank\">@ipythonx</a> <br>\nThanks 😃</p>",
      "rawMarkdown": "ipythonx \nThanks 😃",
      "votes": null
    },
    {
      "id": "1843778",
      "postDate": "07/05/2022 06:08:37",
      "content": "<p>Good work! Do you have any speculation on what caused the score drop relative to the pytorch model you adapted? Do you think it was the training batch size alone?</p>",
      "rawMarkdown": "Good work! Do you have any speculation on what caused the score drop relative to the pytorch model you adapted? Do you think it was the training batch size alone?",
      "votes": null
    },
    {
      "id": "1843805",
      "postDate": "07/05/2022 06:22:13",
      "content": "<p>Hi! Thanks</p>\n<p>It's hard to tell for sure, but most likely it's due to a couple of factors:</p>\n<ul>\n<li>even for almost identical pipelines PyTorch often yields a better score compared to TensorFlow. This sounds like magic, but I've experienced it many times</li>\n<li>smaller batch size means more training steps per epoch and a bit more explorational power, so I completely agree with you on this point</li>\n<li>it's really hard to set up a proper step-wise (not epoch-wise) learning rate schedule in TensorFlow. If you add learning rate monitor to my notebook you'll see that despite properly defined learning rate scheduler, the optimiser doesn't actually update learning rate as expected. This is really annoying thing about TensorFlow, but step-wise learning rate schedules only work in custom training loops</li>\n</ul>\n<p>I tried a couple of workarounds to make my solution closer to the original and ended up with a custom training loop solution which turned out to be hands down worse than the published baseline. I must have missed something, so I still continue my experiments.</p>",
      "rawMarkdown": "Hi! Thanks\n\nIt's hard to tell for sure, but most likely it's due to a couple of factors:\n\n- even for almost identical pipelines PyTorch often yields a better score compared to TensorFlow. This sounds like magic, but I've experienced it many times\n- smaller batch size means more training steps per epoch and a bit more explorational power, so I completely agree with you on this point\n- it's really hard to set up a proper step-wise (not epoch-wise) learning rate schedule in TensorFlow. If you add learning rate monitor to my notebook you'll see that despite properly defined learning rate scheduler, the optimiser doesn't actually update learning rate as expected. This is really annoying thing about TensorFlow, but step-wise learning rate schedules only work in custom training loops\n\nI tried a couple of workarounds to make my solution closer to the original and ended up with a custom training loop solution which turned out to be hands down worse than the published baseline. I must have missed something, so I still continue my experiments.",
      "votes": null
    },
    {
      "id": "1847463",
      "postDate": "07/08/2022 00:29:48",
      "content": "<p>thanks for sharing. I am using gpu. It seems too slow for training.</p>",
      "rawMarkdown": "thanks for sharing. I am using gpu. It seems too slow for training.",
      "votes": null
    },
    {
      "id": "1848875",
      "postDate": "07/09/2022 02:48:02",
      "content": "<p>Could someone help on checkpoint for TPU on colab?   I tried the regular callback, (\"local\" is not implemented) error message</p>",
      "rawMarkdown": "Could someone help on checkpoint for TPU on colab?   I tried the regular callback, (\"local\" is not implemented) error message",
      "votes": null
    },
    {
      "id": "1868151",
      "postDate": "07/23/2022 18:39:30",
      "content": "<h2>Update</h2>\n<p>You can get a slightly better score if you increase the number of epochs to 10. Updated solution scores <strong>0.8179 PB</strong>. You can visit it here:</p>\n<h3><a href=\"https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training\" target=\"_blank\">AI4Code TF TPU CodeBert - Training</a></h3>",
      "rawMarkdown": "## Update\n\nYou can get a slightly better score if you increase the number of epochs to 10. Updated solution scores **0.8179 PB**. You can visit it here:\n\n###[AI4Code TF TPU CodeBert - Training](https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1829686,
      "author_name": "oscarrangel",
      "author_url": "",
      "post_date": "06/22/2022 20:21:16",
      "content": "<p>Thanks a lot for sharing this great work!!!!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1829933,
      "author_name": "locbaop",
      "author_url": "",
      "post_date": "06/23/2022 03:58:31",
      "content": "<p>it's nice when see what's tensorflow on tpu can do.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1830490,
      "author_name": "ronaldokun",
      "author_url": "",
      "post_date": "06/23/2022 13:22:42",
      "content": "<p>Amazing! Thank you for sharing to everyone.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1834651,
      "author_name": "heuingttiang",
      "author_url": "",
      "post_date": "06/27/2022 05:39:05",
      "content": "<p>I should take this opportunity to study TPU. Thank you for the good writing.👍</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1835602,
      "author_name": "jieminren",
      "author_url": "",
      "post_date": "06/27/2022 22:47:22",
      "content": "<p>very amazing work👀</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1842887,
      "author_name": "ipythonx",
      "author_url": "",
      "post_date": "07/04/2022 11:21:32",
      "content": "<p><a href=\"https://www.kaggle.com/nickuzmenkov\" target=\"_blank\">@nickuzmenkov</a> <br>\nI ran GPU-based code which took ~7hours to complete of 1 epoch on 1xV100. But your TPU-based code is big improvement on that in terms of training speed. Great work, thanks for sharing. And congrats for becoming Master.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1842942,
          "author_name": "nickuzmenkov",
          "author_url": "",
          "post_date": "07/04/2022 12:08:24",
          "content": "<p><a href=\"https://www.kaggle.com/ipythonx\" target=\"_blank\">@ipythonx</a> <br>\nThanks 😃</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1843778,
      "author_name": "jacobyjaeger",
      "author_url": "",
      "post_date": "07/05/2022 06:08:37",
      "content": "<p>Good work! Do you have any speculation on what caused the score drop relative to the pytorch model you adapted? Do you think it was the training batch size alone?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1843805,
          "author_name": "nickuzmenkov",
          "author_url": "",
          "post_date": "07/05/2022 06:22:13",
          "content": "<p>Hi! Thanks</p>\n<p>It's hard to tell for sure, but most likely it's due to a couple of factors:</p>\n<ul>\n<li>even for almost identical pipelines PyTorch often yields a better score compared to TensorFlow. This sounds like magic, but I've experienced it many times</li>\n<li>smaller batch size means more training steps per epoch and a bit more explorational power, so I completely agree with you on this point</li>\n<li>it's really hard to set up a proper step-wise (not epoch-wise) learning rate schedule in TensorFlow. If you add learning rate monitor to my notebook you'll see that despite properly defined learning rate scheduler, the optimiser doesn't actually update learning rate as expected. This is really annoying thing about TensorFlow, but step-wise learning rate schedules only work in custom training loops</li>\n</ul>\n<p>I tried a couple of workarounds to make my solution closer to the original and ended up with a custom training loop solution which turned out to be hands down worse than the published baseline. I must have missed something, so I still continue my experiments.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1847463,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "07/08/2022 00:29:48",
      "content": "<p>thanks for sharing. I am using gpu. It seems too slow for training.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1848875,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "07/09/2022 02:48:02",
      "content": "<p>Could someone help on checkpoint for TPU on colab?   I tried the regular callback, (\"local\" is not implemented) error message</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1868151,
      "author_name": "nickuzmenkov",
      "author_url": "",
      "post_date": "07/23/2022 18:39:30",
      "content": "<h2>Update</h2>\n<p>You can get a slightly better score if you increase the number of epochs to 10. Updated solution scores <strong>0.8179 PB</strong>. You can visit it here:</p>\n<h3><a href=\"https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training\" target=\"_blank\">AI4Code TF TPU CodeBert - Training</a></h3>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1829561": "# TL;DR\n\nI've published a complete, end-to-end pipeline for this competition including 3 notebooks and 2 datasets. The final model gets **public score of 0.8137**. The whole **training part takes only 4 hours** on Kaggle TPU.\n\n### Notebooks\n\n1. **[AI4Code TF TPU CodeBert - Data Preparation][1]** (~5 hours)\n2. **[AI4Code TF TPU CodeBert - Training][2]** (~4 hours)\n3. **[AI4Code TF TPU CodeBert - Inference][3]** (~2 hours)\n\n### Datasets\n\n1. **[AI4Code CodeBert Tokens][4]** (pre-tokenised inputs and tfrecords)\n2. **[AI4Code CodeBert Weights][5]** (weights of pre-trained CodeBert Base model scoring 0.8137)\n\nThis is basically a translation of **[Khoi Nguyen's][6]** works [[1][7], [2][8]] from PyTorch to TensorFlow with a handful of changes and updates for TPU support. Huge thanks to @suicaokhoailang for his original work!\n\n# About Solution\n\n- Input data: markdown + code context (512 tokens) + features\n    - Markdown (up to 64 tokens)\n    - Code context (all code cells or up to 20 code cells each up to 23 tokens)\n    - Features: markdown cells to total cells ratio (appended to backbone outputs)\n- Model and hyperparameters\n    - CodeBert Base model\n    - L1 loss (MAE)\n    - AdamW optimizer\n    - Learning rate schedule with warmup and linear decay\n    - Total 5 epochs\n\n# Motivation\n\nThere's a lot of great public notebooks here already, and yet it seems that none of those really make it possible to enrol the competition using only resources provided by Kaggle. There's even a **[discussion][9]** on whether it's possible to take part without your own GPU.\n\nI tried to speed up some of PyTorch public notebooks using PyTorch XLA. It seems I'm not so good at it, so 9 hours per epoch was the best I could get from it. Instead, I decided to take @suicaokhoailang's work and translated PyTorch to TensorFlow instead leaving preprocessing part unchanged. At the end of the day I got a slightly worse score and enormous performance boost: only 4 hours for the entire training process.\n\n[1]: https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-data-preparation\n[2]: https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training\n[3]: https://www.kaggle.com/nickuzmenkov/ai4code-tf-tpu-codebert-inference\n[4]: https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-tokens\n[5]: https://www.kaggle.com/datasets/nickuzmenkov/ai4code-codebert-weights\n[6]: https://www.kaggle.com/suicaokhoailang\n[7]: https://github.com/suicao/ai4code-baseline/tree/main/code\n[8]: https://www.kaggle.com/code/suicaokhoailang/stronger-baseline-with-code-cells\n[9]: https://www.kaggle.com/competitions/AI4Code/discussion/329848",
    "1829686": "Thanks a lot for sharing this great work!!!!",
    "1829933": "it's nice when see what's tensorflow on tpu can do.",
    "1830490": "Amazing! Thank you for sharing to everyone.",
    "1834651": "I should take this opportunity to study TPU. Thank you for the good writing.👍",
    "1835602": "very amazing work👀",
    "1842887": "nickuzmenkov \nI ran GPU-based code which took ~7hours to complete of 1 epoch on 1xV100. But your TPU-based code is big improvement on that in terms of training speed. Great work, thanks for sharing. And congrats for becoming Master.",
    "1842942": "ipythonx \nThanks 😃",
    "1843778": "Good work! Do you have any speculation on what caused the score drop relative to the pytorch model you adapted? Do you think it was the training batch size alone?",
    "1843805": "Hi! Thanks\n\nIt's hard to tell for sure, but most likely it's due to a couple of factors:\n\n- even for almost identical pipelines PyTorch often yields a better score compared to TensorFlow. This sounds like magic, but I've experienced it many times\n- smaller batch size means more training steps per epoch and a bit more explorational power, so I completely agree with you on this point\n- it's really hard to set up a proper step-wise (not epoch-wise) learning rate schedule in TensorFlow. If you add learning rate monitor to my notebook you'll see that despite properly defined learning rate scheduler, the optimiser doesn't actually update learning rate as expected. This is really annoying thing about TensorFlow, but step-wise learning rate schedules only work in custom training loops\n\nI tried a couple of workarounds to make my solution closer to the original and ended up with a custom training loop solution which turned out to be hands down worse than the published baseline. I must have missed something, so I still continue my experiments.",
    "1847463": "thanks for sharing. I am using gpu. It seems too slow for training.",
    "1848875": "Could someone help on checkpoint for TPU on colab?   I tried the regular callback, (\"local\" is not implemented) error message",
    "1868151": "## Update\n\nYou can get a slightly better score if you increase the number of epochs to 10. Updated solution scores **0.8179 PB**. You can visit it here:\n\n###[AI4Code TF TPU CodeBert - Training](https://www.kaggle.com/code/nickuzmenkov/ai4code-tf-tpu-codebert-training)"
  },
  "source": "meta"
}