{
  "id": 287917,
  "title": "Tentative 2nd place solution",
  "content": "<p>Hi all,</p>\n<p>Congratulations <a href=\"https://www.kaggle.com/thedrcat\" target=\"_blank\">@thedrcat</a>! Seems like we trusted LB too much. But, we wrer able to remain in 2nd place. I am happy and I can be GM! Thanks a lot, <a href=\"https://www.kaggle.com/kanbehmw\" target=\"_blank\">@kanbehmw</a>. His knowledge of NLP has boosted our score significantly.</p>\n<p>Here is our tentative solution write-up. We will publish all our codes and datasets. Please post any questions in this thread if you have any.</p>\n<h1>Resources</h1>\n<ul>\n<li>Our inference notebook is available here: <a href=\"https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35\" target=\"_blank\">https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35</a></li>\n<li>Training code is in each dataset</li>\n</ul>\n<h1>External data</h1>\n<p>We trained our models with the competition data, MLQA, and TyDi QA (only Bengali and Telugu). In particular, TyDi QA pushed our score largely (0.787 -&gt; 0.799 in public LB). We think most of the top teams achieving &gt;0.81 use the TyDi QA dataset. It may be due to the language similarity among  Bengali, Telugu, Hindi, and Tamil. However, we suspect some possibility that some questions are shared even though they are translated to Hindi or Tamil since TyDi QA is owned by Google. This is just a guess.</p>\n<h1>Model Training</h1>\n<p>We just did 2 epochs of training with the whole data (no fold out) on the huggingface trainer. We do not distinguish between Hindi and Tamil. For more details, The training code should be included in each dataset. Please have a look.</p>\n<h1>Loss function</h1>\n<p>While the original cross-entropy score has the best performance, the loss function described in <a href=\"https://github.com/heartkilla/kaggle_tweet\" target=\"_blank\">https://github.com/heartkilla/kaggle_tweet</a> (used in the previous competition) worked to obtain more diverse models. In our kernel whose name ends \"exp33\" is trained with the \"Jaccard-based Soft Labels Since Cross-Entropy\".</p>\n<h1>Local Evaluation (CV) Strategy</h1>\n<p>Nothing. We tune everything based on Public LB. I did not even track local scores. This is the first time since I started Kaggle that I have not tracked local scores at all.</p>\n<h1>Model Ensembling</h1>\n<p>As in the CommonLit competition (<a href=\"https://www.kaggle.com/c/commonlitreadabilityprize/overview)\" target=\"_blank\">https://www.kaggle.com/c/commonlitreadabilityprize/overview)</a>, model ensembling seems to be the key technique to win NLP competitions. We ensemble the following models:</p>\n<ul>\n<li>XLM-R (7 models)<ul>\n<li>deepset/xlm-roberta-large-squad2<ul>\n<li>One model trained with Google-translated SQuAD<ul>\n<li><a href=\"https://www.kaggle.com/tkm2261/google-translated-squad20-to-hindi-and-tamil\" target=\"_blank\">https://www.kaggle.com/tkm2261/google-translated-squad20-to-hindi-and-tamil</a> </li></ul></li></ul></li>\n<li>AlexKay/xlm-roberta-large-qa-multilingual-finedtuned-ru</li></ul></li>\n<li>RemBert (3 models)</li>\n<li>InfoXLM (3 models)</li>\n<li>MuRIL (2 models)</li>\n</ul>\n<p>We don't know why the models fine-tuned in Russian had a good performance. We stacked the models gradually and our scores gradually improved. (0.799 -&gt; 0.816 -&gt; 0.821 -&gt; 0.827 -&gt; 0.829). The MuRIL models pushed our score from 0.827 to 0.829.  </p>\n<p>Misc.: </p>\n<ul>\n<li>To handle the difference of the token size in a context, we took the softmax function on the entire text before ensembling different types of models.</li>\n<li>I do not use the 0.792 models.</li>\n<li>I do not use CV models. All models are trained with the entire data. I think changing seeds and ensembling them should be better than ensembling CV models.</li>\n</ul>\n<h1>Effect of max_seq_length and doc_stride</h1>\n<p>As in my notebook <a href=\"https://www.kaggle.com/tkm2261/reproduction-of-0-792-notebook\" target=\"_blank\">https://www.kaggle.com/tkm2261/reproduction-of-0-792-notebook</a>, max_seq_length and doc_stride seem to have a large impact. Even though I explored a lot of values of these two parameters, it did not help to improve our score. So, we just use max_length = 384 and doc_stride = 128.  Maybe, this part is not important since we ensemble models with different token sizes.</p>\n<h1>Post-processing</h1>\n<p>As shown in this kernel (<a href=\"https://www.kaggle.com/nbroad/chaii-qa-torch-5-fold-with-post-processing-765)\" target=\"_blank\">https://www.kaggle.com/nbroad/chaii-qa-torch-5-fold-with-post-processing-765)</a>, post-processing has a large impact on this competition. Since the test data is annotated by 4 people, they are not very likely to forget the trailing periods like “​​ई.पू.”, i.e., answers should be in the most formal format. Besides, we processed the Devanagari numbers (०१२३४५६७८९). We replace them with Arabic numerals (0-9) if the selected answer consists only of Devanagari numbers. It seems like the annotators agreed that they use Arabic numerals when the answer is a year. Without the postprocessing, our score dropped to 0.806. So, it pushed our score by around 0.02.</p>\n<h3>Public LB score timeline</h3>\n<ul>\n<li>0.787: Teamed up</li>\n<li>0.799: Trained with TyDi QA (only Bengali and Telugu)</li>\n<li>0.816: Ensembled with Rembert and InfoXLM</li>\n<li>0.821: Ensemble with more XLM-R, Rembert, and InfoXLM</li>\n<li>0.827: Tune ensemble weights</li>\n<li>0.829: Ensembled with MuRIL</li>\n<li>0.831: Tune parameters in post-processing</li>\n</ul>\n<h1>Did not work</h1>\n<p>After we found TyDi QA helps a lot, we explored a lot of datasets. But, almost all datasets did not work. In our case, Only MLQA and TiDy QA worked. XQuAD was not bad, but I did not use it.</p>\n<table>\n<thead>\n<tr>\n<th>#</th>\n<th>Name</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Bengali Question Answering Dataset</td>\n<td><a href=\"https://www.kaggle.com/mayeesha/bengali-question-answering-dataset\" target=\"_blank\">https://www.kaggle.com/mayeesha/bengali-question-answering-dataset</a></td>\n</tr>\n<tr>\n<td>2</td>\n<td>XQuad</td>\n<td><a href=\"https://github.com/deepmind/xquad\" target=\"_blank\">https://github.com/deepmind/xquad</a></td>\n</tr>\n<tr>\n<td>3</td>\n<td>UQuAD</td>\n<td><a href=\"https://t.co/OP6FYHbuju?amp=1\" target=\"_blank\">https://t.co/OP6FYHbuju?amp=1</a></td>\n</tr>\n<tr>\n<td>4</td>\n<td>TQuAD</td>\n<td><a href=\"https://github.com/TQuad/turkish-nlp-qa-dataset\" target=\"_blank\">https://github.com/TQuad/turkish-nlp-qa-dataset</a></td>\n</tr>\n<tr>\n<td>5</td>\n<td>PersianQA</td>\n<td><a href=\"https://github.com/sajjjadayobi/PersianQA\" target=\"_blank\">https://github.com/sajjjadayobi/PersianQA</a></td>\n</tr>\n<tr>\n<td>6</td>\n<td>MMQA dataset: Hindi QA dataset</td>\n<td><a href=\"https://github.com/deepaknlp/MMQA\" target=\"_blank\">https://github.com/deepaknlp/MMQA</a></td>\n</tr>\n<tr>\n<td>7</td>\n<td>XQA: testset for Tamil QA</td>\n<td><a href=\"https://github.com/thunlp/XQA\" target=\"_blank\">https://github.com/thunlp/XQA</a></td>\n</tr>\n<tr>\n<td>8</td>\n<td>bAbi 1.2 dataset: Has Hindi version of bAbi tasks in romanized Hindi.</td>\n<td><a href=\"http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz\" target=\"_blank\">http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz</a></td>\n</tr>\n<tr>\n<td>9</td>\n<td>HiQuAD</td>\n<td><a href=\"https://www.cse.iitb.ac.in/~ganesh/HiQuAD/clqg/\" target=\"_blank\">https://www.cse.iitb.ac.in/~ganesh/HiQuAD/clqg/</a></td>\n</tr>\n<tr>\n<td>10</td>\n<td>ARCD</td>\n<td><a href=\"https://github.com/husseinmozannar/SOQAL/tree/master/data\" target=\"_blank\">https://github.com/husseinmozannar/SOQAL/tree/master/data</a></td>\n</tr>\n<tr>\n<td>11</td>\n<td>FQuAD</td>\n<td><a href=\"https://fquad.illuin.tech/\" target=\"_blank\">https://fquad.illuin.tech/</a></td>\n</tr>\n<tr>\n<td>12</td>\n<td>Squad_Translated_to_Tamil for Chaii</td>\n<td><a href=\"https://www.kaggle.com/msafi04/squad-translated-to-tamil-for-chaii\" target=\"_blank\">https://www.kaggle.com/msafi04/squad-translated-to-tamil-for-chaii</a></td>\n</tr>\n<tr>\n<td>13</td>\n<td>RuBQ: A Russian Knowledge Base Question Answering and Machine Reading Comprehension Data Set</td>\n<td><a href=\"https://github.com/vladislavneon/RuBQ\" target=\"_blank\">https://github.com/vladislavneon/RuBQ</a></td>\n</tr>\n<tr>\n<td>14</td>\n<td>SberQuAD</td>\n<td><a href=\"https://t.me/s/opendatascience?q=%23SberQuAD\" target=\"_blank\">https://t.me/s/opendatascience?q=%23SberQuAD</a></td>\n</tr>\n<tr>\n<td>15</td>\n<td>XOR-TyDi QA</td>\n<td><a href=\"https://github.com/AkariAsai/XORQA#additional-resources\" target=\"_blank\">https://github.com/AkariAsai/XORQA#additional-resources</a></td>\n</tr>\n</tbody>\n</table>",
  "comments": [
    {
      "id": 1584810,
      "author_name": "Darek Kłeczek",
      "author_url": "",
      "post_date": "2021-11-16T19:23:01.507000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on GM title, and your team on the 2nd place! I had many similar ideas but also some differences, love to learn from your solution! I couldn't catch up with you on the public LB, and for sure there was an element of luck on the private LB. Glad we didn't overfit at the end! :) </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1585016,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-17T01:53:53.967000",
          "content": "<p>Congratulations on the first! I think you more sincerely addressed how to learn and evaluate the limited datasets. We mainly just try many datasets and models as much as possible. After I saw your solution, I was able to understand what we should have done. Thanks! It was a very nice learning process.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583711,
      "author_name": "esprit",
      "author_url": "",
      "post_date": "2021-11-16T02:43:25.907000",
      "content": "<p>Congratulations on becoming GM! I've been following your back in this competition for a long time, but never quite caught up😂 I will learn a lot from your solution.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1583675,
      "author_name": "DrHB",
      "author_url": "",
      "post_date": "2021-11-16T01:54:15.277000",
      "content": "<p>double congratulations on 2nd position and becoming GM =)</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1583648,
      "author_name": "Luca Massaron",
      "author_url": "",
      "post_date": "2021-11-16T01:30:08.343000",
      "content": "<p>Interesting solution, I found it very helpful to understand what we could have done more.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1583629,
      "author_name": "Kiran Chaudhary",
      "author_url": "",
      "post_date": "2021-11-16T01:14:56.127000",
      "content": "<p>Congratulations for 2nd position and GM title …</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1583632,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T01:15:14.193000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1583616,
      "author_name": "Khuong T G Hieu",
      "author_url": "",
      "post_date": "2021-11-16T01:04:54.823000",
      "content": "<p>Congratulations on becoming GM <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> !! Great leveraging of external data!! My team only pretrained with English Squad2.0 hence my current position 😂.<br>\nMay I ask how you found this long list of external data sources 😄 ?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1583630,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T01:15:04.373000",
          "content": "<p>Thanks! My teammate <a href=\"https://www.kaggle.com/kanbehmw\" target=\"_blank\">@kanbehmw</a> is an NLP expert. He knew a lot. Besides, we just googled the datasets.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583624,
      "author_name": "KhanhVD",
      "author_url": "",
      "post_date": "2021-11-16T01:12:58.520000",
      "content": "<p>Congrats <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on becoming GM and thanks for sharing the writeup</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1583643,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T01:23:49.680000",
          "content": "<p>Thanks a lot. Eventually, I made it!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1590690,
      "author_name": "MINGOOK KIM",
      "author_url": "",
      "post_date": "2021-11-21T15:06:05.623000",
      "content": "<p>Congratulations on your achievements.</p>\n<p>Congratulations~</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1586345,
      "author_name": "Ayush Singh",
      "author_url": "",
      "post_date": "2021-11-18T02:21:30.217000",
      "content": "<p>many congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> <br>\nThis is very comprehensive work</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1585159,
      "author_name": "adldotori",
      "author_url": "",
      "post_date": "2021-11-17T06:06:01.337000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on GM title. I learned from you in this competition thanks</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1584413,
      "author_name": "Old Monk",
      "author_url": "",
      "post_date": "2021-11-16T14:11:18.843000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> , looking forward to another update from you with a photo wearing the GM hoodie :D</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1584396,
      "author_name": "Mathurin Ache",
      "author_url": "",
      "post_date": "2021-11-16T13:59:30.360000",
      "content": "<p>Thanks for your very detailed solution, a lot of work still here. Well done, it's well documented.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1585017,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-17T01:54:05.777000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583879,
      "author_name": "ForcewithMe",
      "author_url": "",
      "post_date": "2021-11-16T05:53:05.417000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> become a GM👍. Can you tell me how do you ensemble those 4 models? I manage to ensemble them at first but find out that they have different feature matrix output shape.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583933,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T06:35:25.267000",
          "content": "<p>We assigned the maximum logit of tokens for each character.</p>\n<pre><code>Token [ 1 ][     2     ][    3    ]\nChar.  [11][222222][3333]\n</code></pre>\n<p>Then, we just take softmax in char level. Then, we take an average over all models</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1583967,
          "author_name": "ForcewithMe",
          "author_url": "",
          "post_date": "2021-11-16T07:14:00.663000",
          "content": "<p>Thank you! Simple and clear</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583850,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-11-16T05:25:05.027000",
      "content": "<p>Well deserved! congratulations!! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1583765,
      "author_name": "Mintwater",
      "author_url": "",
      "post_date": "2021-11-16T03:46:32.700000",
      "content": "<p>Congrats for becoming GM and this great solution! I have learned a lot:)</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583776,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T04:00:22.847000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583764,
      "author_name": "Trushant Kalyanpur",
      "author_url": "",
      "post_date": "2021-11-16T03:44:50.890000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a>! </p>\n<blockquote>\n  <p>To handle the difference of the token size in a context, we took the softmax function on the entire text before ensembling different types of models.</p>\n</blockquote>\n<p>Do you have an example of how you did this? </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583770,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T03:52:41.037000",
          "content": "<p>Thanks! This is in the cell [16] in <a href=\"https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35?scriptVersionId=77966564\" target=\"_blank\">https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35?scriptVersionId=77966564</a></p>\n<pre><code>for i, offset in enumerate(offset_mapping):\n    if offset is not None:\n        start_flgs[offset[0]:offset[1]] = start_flgs[offset[0]:offset[1]].clip(start_logits[i], None)\n        end_flgs[offset[0]:offset[1]] = end_flgs[offset[0]:offset[1]].clip(end_logits[i], None)\n\n\nbest_answer = {\"start_logits\": softmax(start_flgs), \"end_logits\": softmax(end_flgs)}\n</code></pre>\n<p>We assigned the maximum logit of tokens for each character. </p>\n<pre><code>Token [.1 ][     2     ][    3    ]\nChar.  [11][222222][3333]\n</code></pre>\n<p>Then, we just take softmax in char level</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1583694,
      "author_name": "Leon_and_hard",
      "author_url": "",
      "post_date": "2021-11-16T02:13:54.887000",
      "content": "<p>Congratulations for sharing</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1583605,
      "author_name": "Raghawendra Singh",
      "author_url": "",
      "post_date": "2021-11-16T00:57:10.073000",
      "content": "<p>Congratulations for #2 position in this competition and thanks for solution…</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583606,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T00:58:21.283000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583578,
      "author_name": "atfujita",
      "author_url": "",
      "post_date": "2021-11-16T00:32:48.090000",
      "content": "<p>Congratulations!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583591,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T00:42:50.640000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1583572,
      "author_name": "Trushant Kalyanpur",
      "author_url": "",
      "post_date": "2021-11-16T00:26:49.597000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on becoming KGM! Great achievement and well deserved!!! </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583593,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T00:43:22.817000",
          "content": "<p>Thanks! I am quite happy. I want to get the GM foodie soon 😎</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1583571,
      "author_name": "Zacchaeus",
      "author_url": "",
      "post_date": "2021-11-16T00:24:47.600000",
      "content": "<p>congrats! I'm very glad to compete with you.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1583594,
          "author_name": "tkm2261",
          "author_url": "",
          "post_date": "2021-11-16T00:43:28.647000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "comment_count": 34,
  "messages": [
    {
      "id": 1583567,
      "postDate": "2021-11-16T00:23:06.967Z",
      "content": "<p>Hi all,</p>\n<p>Congratulations <a href=\"https://www.kaggle.com/thedrcat\" target=\"_blank\">@thedrcat</a>! Seems like we trusted LB too much. But, we wrer able to remain in 2nd place. I am happy and I can be GM! Thanks a lot, <a href=\"https://www.kaggle.com/kanbehmw\" target=\"_blank\">@kanbehmw</a>. His knowledge of NLP has boosted our score significantly.</p>\n<p>Here is our tentative solution write-up. We will publish all our codes and datasets. Please post any questions in this thread if you have any.</p>\n<h1>Resources</h1>\n<ul>\n<li>Our inference notebook is available here: <a href=\"https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35\" target=\"_blank\">https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35</a></li>\n<li>Training code is in each dataset</li>\n</ul>\n<h1>External data</h1>\n<p>We trained our models with the competition data, MLQA, and TyDi QA (only Bengali and Telugu). In particular, TyDi QA pushed our score largely (0.787 -&gt; 0.799 in public LB). We think most of the top teams achieving &gt;0.81 use the TyDi QA dataset. It may be due to the language similarity among  Bengali, Telugu, Hindi, and Tamil. However, we suspect some possibility that some questions are shared even though they are translated to Hindi or Tamil since TyDi QA is owned by Google. This is just a guess.</p>\n<h1>Model Training</h1>\n<p>We just did 2 epochs of training with the whole data (no fold out) on the huggingface trainer. We do not distinguish between Hindi and Tamil. For more details, The training code should be included in each dataset. Please have a look.</p>\n<h1>Loss function</h1>\n<p>While the original cross-entropy score has the best performance, the loss function described in <a href=\"https://github.com/heartkilla/kaggle_tweet\" target=\"_blank\">https://github.com/heartkilla/kaggle_tweet</a> (used in the previous competition) worked to obtain more diverse models. In our kernel whose name ends \"exp33\" is trained with the \"Jaccard-based Soft Labels Since Cross-Entropy\".</p>\n<h1>Local Evaluation (CV) Strategy</h1>\n<p>Nothing. We tune everything based on Public LB. I did not even track local scores. This is the first time since I started Kaggle that I have not tracked local scores at all.</p>\n<h1>Model Ensembling</h1>\n<p>As in the CommonLit competition (<a href=\"https://www.kaggle.com/c/commonlitreadabilityprize/overview)\" target=\"_blank\">https://www.kaggle.com/c/commonlitreadabilityprize/overview)</a>, model ensembling seems to be the key technique to win NLP competitions. We ensemble the following models:</p>\n<ul>\n<li>XLM-R (7 models)<ul>\n<li>deepset/xlm-roberta-large-squad2<ul>\n<li>One model trained with Google-translated SQuAD<ul>\n<li><a href=\"https://www.kaggle.com/tkm2261/google-translated-squad20-to-hindi-and-tamil\" target=\"_blank\">https://www.kaggle.com/tkm2261/google-translated-squad20-to-hindi-and-tamil</a> </li></ul></li></ul></li>\n<li>AlexKay/xlm-roberta-large-qa-multilingual-finedtuned-ru</li></ul></li>\n<li>RemBert (3 models)</li>\n<li>InfoXLM (3 models)</li>\n<li>MuRIL (2 models)</li>\n</ul>\n<p>We don't know why the models fine-tuned in Russian had a good performance. We stacked the models gradually and our scores gradually improved. (0.799 -&gt; 0.816 -&gt; 0.821 -&gt; 0.827 -&gt; 0.829). The MuRIL models pushed our score from 0.827 to 0.829.  </p>\n<p>Misc.: </p>\n<ul>\n<li>To handle the difference of the token size in a context, we took the softmax function on the entire text before ensembling different types of models.</li>\n<li>I do not use the 0.792 models.</li>\n<li>I do not use CV models. All models are trained with the entire data. I think changing seeds and ensembling them should be better than ensembling CV models.</li>\n</ul>\n<h1>Effect of max_seq_length and doc_stride</h1>\n<p>As in my notebook <a href=\"https://www.kaggle.com/tkm2261/reproduction-of-0-792-notebook\" target=\"_blank\">https://www.kaggle.com/tkm2261/reproduction-of-0-792-notebook</a>, max_seq_length and doc_stride seem to have a large impact. Even though I explored a lot of values of these two parameters, it did not help to improve our score. So, we just use max_length = 384 and doc_stride = 128.  Maybe, this part is not important since we ensemble models with different token sizes.</p>\n<h1>Post-processing</h1>\n<p>As shown in this kernel (<a href=\"https://www.kaggle.com/nbroad/chaii-qa-torch-5-fold-with-post-processing-765)\" target=\"_blank\">https://www.kaggle.com/nbroad/chaii-qa-torch-5-fold-with-post-processing-765)</a>, post-processing has a large impact on this competition. Since the test data is annotated by 4 people, they are not very likely to forget the trailing periods like “​​ई.पू.”, i.e., answers should be in the most formal format. Besides, we processed the Devanagari numbers (०१२३४५६७८९). We replace them with Arabic numerals (0-9) if the selected answer consists only of Devanagari numbers. It seems like the annotators agreed that they use Arabic numerals when the answer is a year. Without the postprocessing, our score dropped to 0.806. So, it pushed our score by around 0.02.</p>\n<h3>Public LB score timeline</h3>\n<ul>\n<li>0.787: Teamed up</li>\n<li>0.799: Trained with TyDi QA (only Bengali and Telugu)</li>\n<li>0.816: Ensembled with Rembert and InfoXLM</li>\n<li>0.821: Ensemble with more XLM-R, Rembert, and InfoXLM</li>\n<li>0.827: Tune ensemble weights</li>\n<li>0.829: Ensembled with MuRIL</li>\n<li>0.831: Tune parameters in post-processing</li>\n</ul>\n<h1>Did not work</h1>\n<p>After we found TyDi QA helps a lot, we explored a lot of datasets. But, almost all datasets did not work. In our case, Only MLQA and TiDy QA worked. XQuAD was not bad, but I did not use it.</p>\n<table>\n<thead>\n<tr>\n<th>#</th>\n<th>Name</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Bengali Question Answering Dataset</td>\n<td><a href=\"https://www.kaggle.com/mayeesha/bengali-question-answering-dataset\" target=\"_blank\">https://www.kaggle.com/mayeesha/bengali-question-answering-dataset</a></td>\n</tr>\n<tr>\n<td>2</td>\n<td>XQuad</td>\n<td><a href=\"https://github.com/deepmind/xquad\" target=\"_blank\">https://github.com/deepmind/xquad</a></td>\n</tr>\n<tr>\n<td>3</td>\n<td>UQuAD</td>\n<td><a href=\"https://t.co/OP6FYHbuju?amp=1\" target=\"_blank\">https://t.co/OP6FYHbuju?amp=1</a></td>\n</tr>\n<tr>\n<td>4</td>\n<td>TQuAD</td>\n<td><a href=\"https://github.com/TQuad/turkish-nlp-qa-dataset\" target=\"_blank\">https://github.com/TQuad/turkish-nlp-qa-dataset</a></td>\n</tr>\n<tr>\n<td>5</td>\n<td>PersianQA</td>\n<td><a href=\"https://github.com/sajjjadayobi/PersianQA\" target=\"_blank\">https://github.com/sajjjadayobi/PersianQA</a></td>\n</tr>\n<tr>\n<td>6</td>\n<td>MMQA dataset: Hindi QA dataset</td>\n<td><a href=\"https://github.com/deepaknlp/MMQA\" target=\"_blank\">https://github.com/deepaknlp/MMQA</a></td>\n</tr>\n<tr>\n<td>7</td>\n<td>XQA: testset for Tamil QA</td>\n<td><a href=\"https://github.com/thunlp/XQA\" target=\"_blank\">https://github.com/thunlp/XQA</a></td>\n</tr>\n<tr>\n<td>8</td>\n<td>bAbi 1.2 dataset: Has Hindi version of bAbi tasks in romanized Hindi.</td>\n<td><a href=\"http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz\" target=\"_blank\">http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz</a></td>\n</tr>\n<tr>\n<td>9</td>\n<td>HiQuAD</td>\n<td><a href=\"https://www.cse.iitb.ac.in/~ganesh/HiQuAD/clqg/\" target=\"_blank\">https://www.cse.iitb.ac.in/~ganesh/HiQuAD/clqg/</a></td>\n</tr>\n<tr>\n<td>10</td>\n<td>ARCD</td>\n<td><a href=\"https://github.com/husseinmozannar/SOQAL/tree/master/data\" target=\"_blank\">https://github.com/husseinmozannar/SOQAL/tree/master/data</a></td>\n</tr>\n<tr>\n<td>11</td>\n<td>FQuAD</td>\n<td><a href=\"https://fquad.illuin.tech/\" target=\"_blank\">https://fquad.illuin.tech/</a></td>\n</tr>\n<tr>\n<td>12</td>\n<td>Squad_Translated_to_Tamil for Chaii</td>\n<td><a href=\"https://www.kaggle.com/msafi04/squad-translated-to-tamil-for-chaii\" target=\"_blank\">https://www.kaggle.com/msafi04/squad-translated-to-tamil-for-chaii</a></td>\n</tr>\n<tr>\n<td>13</td>\n<td>RuBQ: A Russian Knowledge Base Question Answering and Machine Reading Comprehension Data Set</td>\n<td><a href=\"https://github.com/vladislavneon/RuBQ\" target=\"_blank\">https://github.com/vladislavneon/RuBQ</a></td>\n</tr>\n<tr>\n<td>14</td>\n<td>SberQuAD</td>\n<td><a href=\"https://t.me/s/opendatascience?q=%23SberQuAD\" target=\"_blank\">https://t.me/s/opendatascience?q=%23SberQuAD</a></td>\n</tr>\n<tr>\n<td>15</td>\n<td>XOR-TyDi QA</td>\n<td><a href=\"https://github.com/AkariAsai/XORQA#additional-resources\" target=\"_blank\">https://github.com/AkariAsai/XORQA#additional-resources</a></td>\n</tr>\n</tbody>\n</table>",
      "rawMarkdown": "Hi all,\n\nCongratulations @thedrcat! Seems like we trusted LB too much. But, we wrer able to remain in 2nd place. I am happy and I can be GM! Thanks a lot, @kanbehmw. His knowledge of NLP has boosted our score significantly.\n\nHere is our tentative solution write-up. We will publish all our codes and datasets. Please post any questions in this thread if you have any.\n\n# Resources\n\n- Our inference notebook is available here: https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35\n- Training code is in each dataset\n\n# External data\n\nWe trained our models with the competition data, MLQA, and TyDi QA (only Bengali and Telugu). In particular, TyDi QA pushed our score largely (0.787 -> 0.799 in public LB). We think most of the top teams achieving >0.81 use the TyDi QA dataset. It may be due to the language similarity among  Bengali, Telugu, Hindi, and Tamil. However, we suspect some possibility that some questions are shared even though they are translated to Hindi or Tamil since TyDi QA is owned by Google. This is just a guess.\n\n# Model Training\nWe just did 2 epochs of training with the whole data (no fold out) on the huggingface trainer. We do not distinguish between Hindi and Tamil. For more details, The training code should be included in each dataset. Please have a look.\n\n# Loss function\n\nWhile the original cross-entropy score has the best performance, the loss function described in https://github.com/heartkilla/kaggle_tweet (used in the previous competition) worked to obtain more diverse models. In our kernel whose name ends \"exp33\" is trained with the \"Jaccard-based Soft Labels Since Cross-Entropy\".\n\n# Local Evaluation (CV) Strategy\n\nNothing. We tune everything based on Public LB. I did not even track local scores. This is the first time since I started Kaggle that I have not tracked local scores at all.\n\n# Model Ensembling\n\nAs in the CommonLit competition (https://www.kaggle.com/c/commonlitreadabilityprize/overview), model ensembling seems to be the key technique to win NLP competitions. We ensemble the following models:\n\n- XLM-R (7 models)\n    - deepset/xlm-roberta-large-squad2\n        - One model trained with Google-translated SQuAD\n            - https://www.kaggle.com/tkm2261/google-translated-squad20-to-hindi-and-tamil \n    - AlexKay/xlm-roberta-large-qa-multilingual-finedtuned-ru\n- RemBert (3 models)\n- InfoXLM (3 models)\n- MuRIL (2 models)\n\nWe don't know why the models fine-tuned in Russian had a good performance. We stacked the models gradually and our scores gradually improved. (0.799 -> 0.816 -> 0.821 -> 0.827 -> 0.829). The MuRIL models pushed our score from 0.827 to 0.829.  \n\nMisc.: \n\n- To handle the difference of the token size in a context, we took the softmax function on the entire text before ensembling different types of models.\n- I do not use the 0.792 models.\n- I do not use CV models. All models are trained with the entire data. I think changing seeds and ensembling them should be better than ensembling CV models.\n\n\n# Effect of max_seq_length and doc_stride\n\nAs in my notebook https://www.kaggle.com/tkm2261/reproduction-of-0-792-notebook, max_seq_length and doc_stride seem to have a large impact. Even though I explored a lot of values of these two parameters, it did not help to improve our score. So, we just use max_length = 384 and doc_stride = 128.  Maybe, this part is not important since we ensemble models with different token sizes.\n\n# Post-processing\n\nAs shown in this kernel (https://www.kaggle.com/nbroad/chaii-qa-torch-5-fold-with-post-processing-765), post-processing has a large impact on this competition. Since the test data is annotated by 4 people, they are not very likely to forget the trailing periods like “​​ई.पू.”, i.e., answers should be in the most formal format. Besides, we processed the Devanagari numbers (०१२३४५६७८९). We replace them with Arabic numerals (0-9) if the selected answer consists only of Devanagari numbers. It seems like the annotators agreed that they use Arabic numerals when the answer is a year. Without the postprocessing, our score dropped to 0.806. So, it pushed our score by around 0.02.\n\n### Public LB score timeline\n- 0.787: Teamed up\n- 0.799: Trained with TyDi QA (only Bengali and Telugu)\n- 0.816: Ensembled with Rembert and InfoXLM\n- 0.821: Ensemble with more XLM-R, Rembert, and InfoXLM\n- 0.827: Tune ensemble weights\n- 0.829: Ensembled with MuRIL\n- 0.831: Tune parameters in post-processing\n\n# Did not work\nAfter we found TyDi QA helps a lot, we explored a lot of datasets. But, almost all datasets did not work. In our case, Only MLQA and TiDy QA worked. XQuAD was not bad, but I did not use it.\n\n| #  | Name                                                                                         | URL                                                                 |\n|----|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------|\n| 1  | Bengali Question Answering Dataset                                                           | https://www.kaggle.com/mayeesha/bengali-question-answering-dataset  |\n| 2  | XQuad                                                                                        | https://github.com/deepmind/xquad                                   |\n| 3  | UQuAD                                                                                        | https://t.co/OP6FYHbuju?amp=1                                       |\n| 4  | TQuAD                                                                                        | https://github.com/TQuad/turkish-nlp-qa-dataset                     |\n| 5  | PersianQA                                                                                    | https://github.com/sajjjadayobi/PersianQA                           |\n| 6  | MMQA dataset: Hindi QA dataset                                                               | https://github.com/deepaknlp/MMQA                                   |\n| 7  | XQA: testset for Tamil QA                                                                    | https://github.com/thunlp/XQA                                       |\n| 8  | bAbi 1.2 dataset: Has Hindi version of bAbi tasks in romanized Hindi.                        | http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz |\n| 9  | HiQuAD                                                                                       | https://www.cse.iitb.ac.in/~ganesh/HiQuAD/clqg/                     |\n| 10 | ARCD                                                                                         | https://github.com/husseinmozannar/SOQAL/tree/master/data           |\n| 11 | FQuAD                                                                                        | https://fquad.illuin.tech/                                          |\n| 12 | Squad_Translated_to_Tamil for Chaii                                                          | https://www.kaggle.com/msafi04/squad-translated-to-tamil-for-chaii  |\n| 13 | RuBQ: A Russian Knowledge Base Question Answering and Machine Reading Comprehension Data Set | https://github.com/vladislavneon/RuBQ                               |\n| 14 | SberQuAD                                                                                     | https://t.me/s/opendatascience?q=%23SberQuAD                        |\n| 15 | XOR-TyDi QA                                                                                  | https://github.com/AkariAsai/XORQA#additional-resources             |\n\n\n",
      "votes": 59
    },
    {
      "id": 1584810,
      "postDate": "2021-11-16T19:23:01.507Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on GM title, and your team on the 2nd place! I had many similar ideas but also some differences, love to learn from your solution! I couldn't catch up with you on the public LB, and for sure there was an element of luck on the private LB. Glad we didn't overfit at the end! :) </p>",
      "rawMarkdown": "Congratulations @tkm2261 on GM title, and your team on the 2nd place! I had many similar ideas but also some differences, love to learn from your solution! I couldn't catch up with you on the public LB, and for sure there was an element of luck on the private LB. Glad we didn't overfit at the end! :) ",
      "votes": 1,
      "replies": [
        {
          "id": 1585016,
          "postDate": "2021-11-17T01:53:53.967Z",
          "content": "<p>Congratulations on the first! I think you more sincerely addressed how to learn and evaluate the limited datasets. We mainly just try many datasets and models as much as possible. After I saw your solution, I was able to understand what we should have done. Thanks! It was a very nice learning process.</p>",
          "rawMarkdown": "Congratulations on the first! I think you more sincerely addressed how to learn and evaluate the limited datasets. We mainly just try many datasets and models as much as possible. After I saw your solution, I was able to understand what we should have done. Thanks! It was a very nice learning process."
        }
      ]
    },
    {
      "id": 1583711,
      "postDate": "2021-11-16T02:43:25.907Z",
      "content": "<p>Congratulations on becoming GM! I've been following your back in this competition for a long time, but never quite caught up😂 I will learn a lot from your solution.</p>",
      "rawMarkdown": "Congratulations on becoming GM! I've been following your back in this competition for a long time, but never quite caught up😂 I will learn a lot from your solution.",
      "votes": 1
    },
    {
      "id": 1583675,
      "postDate": "2021-11-16T01:54:15.277Z",
      "content": "<p>double congratulations on 2nd position and becoming GM =)</p>",
      "rawMarkdown": "double congratulations on 2nd position and becoming GM =)",
      "votes": 1
    },
    {
      "id": 1583648,
      "postDate": "2021-11-16T01:30:08.343Z",
      "content": "<p>Interesting solution, I found it very helpful to understand what we could have done more.</p>",
      "rawMarkdown": "Interesting solution, I found it very helpful to understand what we could have done more.",
      "votes": 1
    },
    {
      "id": 1583629,
      "postDate": "2021-11-16T01:14:56.127Z",
      "content": "<p>Congratulations for 2nd position and GM title …</p>",
      "rawMarkdown": "Congratulations for 2nd position and GM title …",
      "votes": 1,
      "replies": [
        {
          "id": 1583632,
          "postDate": "2021-11-16T01:15:14.193Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!",
          "votes": 1
        }
      ]
    },
    {
      "id": 1583616,
      "postDate": "2021-11-16T01:04:54.823Z",
      "content": "<p>Congratulations on becoming GM <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> !! Great leveraging of external data!! My team only pretrained with English Squad2.0 hence my current position 😂.<br>\nMay I ask how you found this long list of external data sources 😄 ?</p>",
      "rawMarkdown": "Congratulations on becoming GM @tkm2261 !! Great leveraging of external data!! My team only pretrained with English Squad2.0 hence my current position 😂.\nMay I ask how you found this long list of external data sources 😄 ?",
      "votes": 1,
      "replies": [
        {
          "id": 1583630,
          "postDate": "2021-11-16T01:15:04.373Z",
          "content": "<p>Thanks! My teammate <a href=\"https://www.kaggle.com/kanbehmw\" target=\"_blank\">@kanbehmw</a> is an NLP expert. He knew a lot. Besides, we just googled the datasets.</p>",
          "rawMarkdown": "Thanks! My teammate @kanbehmw is an NLP expert. He knew a lot. Besides, we just googled the datasets."
        }
      ]
    },
    {
      "id": 1583624,
      "postDate": "2021-11-16T01:12:58.520Z",
      "content": "<p>Congrats <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on becoming GM and thanks for sharing the writeup</p>",
      "rawMarkdown": "Congrats @tkm2261 on becoming GM and thanks for sharing the writeup",
      "votes": 2,
      "replies": [
        {
          "id": 1583643,
          "postDate": "2021-11-16T01:23:49.680Z",
          "content": "<p>Thanks a lot. Eventually, I made it!</p>",
          "rawMarkdown": "Thanks a lot. Eventually, I made it!"
        }
      ]
    },
    {
      "id": 1590690,
      "postDate": "2021-11-21T15:06:05.623Z",
      "content": "<p>Congratulations on your achievements.</p>\n<p>Congratulations~</p>",
      "rawMarkdown": "Congratulations on your achievements.\n\nCongratulations~"
    },
    {
      "id": 1586345,
      "postDate": "2021-11-18T02:21:30.217Z",
      "content": "<p>many congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> <br>\nThis is very comprehensive work</p>",
      "rawMarkdown": "many congratulations @tkm2261 \nThis is very comprehensive work"
    },
    {
      "id": 1585159,
      "postDate": "2021-11-17T06:06:01.337Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on GM title. I learned from you in this competition thanks</p>",
      "rawMarkdown": "Congratulations @tkm2261 on GM title. I learned from you in this competition thanks"
    },
    {
      "id": 1584413,
      "postDate": "2021-11-16T14:11:18.843Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> , looking forward to another update from you with a photo wearing the GM hoodie :D</p>",
      "rawMarkdown": "Congratulations @tkm2261 , looking forward to another update from you with a photo wearing the GM hoodie :D"
    },
    {
      "id": 1584396,
      "postDate": "2021-11-16T13:59:30.360Z",
      "content": "<p>Thanks for your very detailed solution, a lot of work still here. Well done, it's well documented.</p>",
      "rawMarkdown": "Thanks for your very detailed solution, a lot of work still here. Well done, it's well documented.",
      "replies": [
        {
          "id": 1585017,
          "postDate": "2021-11-17T01:54:05.777Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!"
        }
      ]
    },
    {
      "id": 1583879,
      "postDate": "2021-11-16T05:53:05.417Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> become a GM👍. Can you tell me how do you ensemble those 4 models? I manage to ensemble them at first but find out that they have different feature matrix output shape.</p>",
      "rawMarkdown": "Congratulations @tkm2261 become a GM👍. Can you tell me how do you ensemble those 4 models? I manage to ensemble them at first but find out that they have different feature matrix output shape.",
      "replies": [
        {
          "id": 1583933,
          "postDate": "2021-11-16T06:35:25.267Z",
          "content": "<p>We assigned the maximum logit of tokens for each character.</p>\n<pre><code>Token [ 1 ][     2     ][    3    ]\nChar.  [11][222222][3333]\n</code></pre>\n<p>Then, we just take softmax in char level. Then, we take an average over all models</p>",
          "rawMarkdown": "We assigned the maximum logit of tokens for each character.\n```\nToken [ 1 ][     2     ][    3    ]\nChar.  [11][222222][3333]\n```\nThen, we just take softmax in char level. Then, we take an average over all models"
        },
        {
          "id": 1583967,
          "postDate": "2021-11-16T07:14:00.663Z",
          "content": "<p>Thank you! Simple and clear</p>",
          "rawMarkdown": "Thank you! Simple and clear"
        }
      ]
    },
    {
      "id": 1583850,
      "postDate": "2021-11-16T05:25:05.027Z",
      "content": "<p>Well deserved! congratulations!! </p>",
      "rawMarkdown": "Well deserved! congratulations!! "
    },
    {
      "id": 1583765,
      "postDate": "2021-11-16T03:46:32.700Z",
      "content": "<p>Congrats for becoming GM and this great solution! I have learned a lot:)</p>",
      "rawMarkdown": "Congrats for becoming GM and this great solution! I have learned a lot:)",
      "replies": [
        {
          "id": 1583776,
          "postDate": "2021-11-16T04:00:22.847Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!"
        }
      ]
    },
    {
      "id": 1583764,
      "postDate": "2021-11-16T03:44:50.890Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a>! </p>\n<blockquote>\n  <p>To handle the difference of the token size in a context, we took the softmax function on the entire text before ensembling different types of models.</p>\n</blockquote>\n<p>Do you have an example of how you did this? </p>",
      "rawMarkdown": "Congratulations @tkm2261! \n\n> To handle the difference of the token size in a context, we took the softmax function on the entire text before ensembling different types of models.\n\nDo you have an example of how you did this? ",
      "replies": [
        {
          "id": 1583770,
          "postDate": "2021-11-16T03:52:41.037Z",
          "content": "<p>Thanks! This is in the cell [16] in <a href=\"https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35?scriptVersionId=77966564\" target=\"_blank\">https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35?scriptVersionId=77966564</a></p>\n<pre><code>for i, offset in enumerate(offset_mapping):\n    if offset is not None:\n        start_flgs[offset[0]:offset[1]] = start_flgs[offset[0]:offset[1]].clip(start_logits[i], None)\n        end_flgs[offset[0]:offset[1]] = end_flgs[offset[0]:offset[1]].clip(end_logits[i], None)\n\n\nbest_answer = {\"start_logits\": softmax(start_flgs), \"end_logits\": softmax(end_flgs)}\n</code></pre>\n<p>We assigned the maximum logit of tokens for each character. </p>\n<pre><code>Token [.1 ][     2     ][    3    ]\nChar.  [11][222222][3333]\n</code></pre>\n<p>Then, we just take softmax in char level</p>",
          "rawMarkdown": "Thanks! This is in the cell [16] in https://www.kaggle.com/kanbehmw/tkm-tydi-rem-info-muril-top35?scriptVersionId=77966564\n\n```\nfor i, offset in enumerate(offset_mapping):\n    if offset is not None:\n        start_flgs[offset[0]:offset[1]] = start_flgs[offset[0]:offset[1]].clip(start_logits[i], None)\n        end_flgs[offset[0]:offset[1]] = end_flgs[offset[0]:offset[1]].clip(end_logits[i], None)\n\n\nbest_answer = {\"start_logits\": softmax(start_flgs), \"end_logits\": softmax(end_flgs)}\n```\nWe assigned the maximum logit of tokens for each character. \n```\nToken [.1 ][     2     ][    3    ]\nChar.  [11][222222][3333]\n```\nThen, we just take softmax in char level",
          "votes": 2
        }
      ]
    },
    {
      "id": 1583694,
      "postDate": "2021-11-16T02:13:54.887Z",
      "content": "<p>Congratulations for sharing</p>",
      "rawMarkdown": "Congratulations for sharing"
    },
    {
      "id": 1583605,
      "postDate": "2021-11-16T00:57:10.073Z",
      "content": "<p>Congratulations for #2 position in this competition and thanks for solution…</p>",
      "rawMarkdown": "Congratulations for #2 position in this competition and thanks for solution…",
      "replies": [
        {
          "id": 1583606,
          "postDate": "2021-11-16T00:58:21.283Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!"
        }
      ]
    },
    {
      "id": 1583578,
      "postDate": "2021-11-16T00:32:48.090Z",
      "content": "<p>Congratulations!</p>",
      "rawMarkdown": "Congratulations!",
      "replies": [
        {
          "id": 1583591,
          "postDate": "2021-11-16T00:42:50.640Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!"
        }
      ]
    },
    {
      "id": 1583572,
      "postDate": "2021-11-16T00:26:49.597Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/tkm2261\" target=\"_blank\">@tkm2261</a> on becoming KGM! Great achievement and well deserved!!! </p>",
      "rawMarkdown": "Congratulations @tkm2261 on becoming KGM! Great achievement and well deserved!!! ",
      "replies": [
        {
          "id": 1583593,
          "postDate": "2021-11-16T00:43:22.817Z",
          "content": "<p>Thanks! I am quite happy. I want to get the GM foodie soon 😎</p>",
          "rawMarkdown": "Thanks! I am quite happy. I want to get the GM foodie soon 😎",
          "votes": 1
        }
      ]
    },
    {
      "id": 1583571,
      "postDate": "2021-11-16T00:24:47.600Z",
      "content": "<p>congrats! I'm very glad to compete with you.</p>",
      "rawMarkdown": "congrats! I'm very glad to compete with you.",
      "replies": [
        {
          "id": 1583594,
          "postDate": "2021-11-16T00:43:28.647Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!"
        }
      ]
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T16:23:44Z",
  "competition_id": 30060,
  "competition_slug": "chaii-hindi-and-tamil-question-answering",
  "team_id": 7252769,
  "solution_url": "/competitions/chaii-hindi-and-tamil-question-answering/writeups/tkm-kh-tentative-2nd-place-solution"
}