{
  "id": 668975,
  "title": "Share the idea to retrain the tokenizer & model",
  "url": "/competitions/deep-past-initiative-machine-translation/discussion/668975",
  "author_name": "",
  "post_date": "2026-01-20T05:45:41.430762400Z",
  "votes": 3,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Since the corpus of Akkadian to English is so different from most of the corpus out there, I think it might make sense to rebuild the model for training.</p>\n<p>The model didn't learn well, so open for advice for improvement.</p>\n<p><a href=\"https://www.kaggle.com/code/zhangyue199/dpc-byt5-retrain-tokenizer/notebook?scriptVersionId=292842377\" target=\"_blank\">https://www.kaggle.com/code/zhangyue199/dpc-byt5-retrain-tokenizer/notebook?scriptVersionId=292842377</a></p>",
  "messages": [
    {
      "id": "3393904",
      "postDate": "01/20/2026 05:45:41",
      "content": "<p>Since the corpus of Akkadian to English is so different from most of the corpus out there, I think it might make sense to rebuild the model for training.</p>\n<p>The model didn't learn well, so open for advice for improvement.</p>\n<p><a href=\"https://www.kaggle.com/code/zhangyue199/dpc-byt5-retrain-tokenizer/notebook?scriptVersionId=292842377\" target=\"_blank\">https://www.kaggle.com/code/zhangyue199/dpc-byt5-retrain-tokenizer/notebook?scriptVersionId=292842377</a></p>",
      "rawMarkdown": "Since the corpus of Akkadian to English is so different from most of the corpus out there, I think it might make sense to rebuild the model for training.\n\nThe model didn't learn well, so open for advice for improvement.\n\nhttps://www.kaggle.com/code/zhangyue199/dpc-byt5-retrain-tokenizer/notebook?scriptVersionId=292842377",
      "votes": null
    },
    {
      "id": "3395451",
      "postDate": "01/23/2026 02:26:30",
      "content": "<p>This is a really impressive pipeline. Nice job building the custom inference class and training loop!</p>\n<p>I noticed one small thing that might explain why your predictions are repeating</p>\n<p>It looks like you are accidentally training from scratch instead of fine-tuning. In your model section, you used: model = T5ForConditionalGeneration(config) That creates a blank model with random weights. Since our dataset is so small (2.6k rows), the model can't learn a language from scratch, so it just memorizes the most common phrase. For a while, I was trying to do this, and running into the same issue. </p>\n<p>My suggested fix: If you want to use ByT5 (one of the best models for this data), try this:</p>\n<p>Skip the SentencePiece training. ByT5 doesn't need a tokenizer! It reads raw bytes/characters.</p>\n<p>Load the pre-trained weights:</p>\n<p>Python\ntokenizer = AutoTokenizer.from_pretrained(\"google/byt5-small\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"google/byt5-small\")\nThis will let you start with a model that already 'knows' how to read other languages, so it just needs to learn Akkadian. Hope this helps!</p>",
      "rawMarkdown": "This is a really impressive pipeline. Nice job building the custom inference class and training loop!\n\nI noticed one small thing that might explain why your predictions are repeating\n\nIt looks like you are accidentally training from scratch instead of fine-tuning. In your model section, you used: model = T5ForConditionalGeneration(config) That creates a blank model with random weights. Since our dataset is so small (2.6k rows), the model can't learn a language from scratch, so it just memorizes the most common phrase. For a while, I was trying to do this, and running into the same issue. \n\nMy suggested fix: If you want to use ByT5 (one of the best models for this data), try this:\n\nSkip the SentencePiece training. ByT5 doesn't need a tokenizer! It reads raw bytes/characters.\n\nLoad the pre-trained weights:\n\nPython\ntokenizer = AutoTokenizer.from_pretrained(\"google/byt5-small\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"google/byt5-small\")\nThis will let you start with a model that already 'knows' how to read other languages, so it just needs to learn Akkadian. Hope this helps!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3395451,
      "author_name": "leowithrow",
      "author_url": "",
      "post_date": "01/23/2026 02:26:30",
      "content": "<p>This is a really impressive pipeline. Nice job building the custom inference class and training loop!</p>\n<p>I noticed one small thing that might explain why your predictions are repeating</p>\n<p>It looks like you are accidentally training from scratch instead of fine-tuning. In your model section, you used: model = T5ForConditionalGeneration(config) That creates a blank model with random weights. Since our dataset is so small (2.6k rows), the model can't learn a language from scratch, so it just memorizes the most common phrase. For a while, I was trying to do this, and running into the same issue. </p>\n<p>My suggested fix: If you want to use ByT5 (one of the best models for this data), try this:</p>\n<p>Skip the SentencePiece training. ByT5 doesn't need a tokenizer! It reads raw bytes/characters.</p>\n<p>Load the pre-trained weights:</p>\n<p>Python\ntokenizer = AutoTokenizer.from_pretrained(\"google/byt5-small\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"google/byt5-small\")\nThis will let you start with a model that already 'knows' how to read other languages, so it just needs to learn Akkadian. Hope this helps!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3393904": "Since the corpus of Akkadian to English is so different from most of the corpus out there, I think it might make sense to rebuild the model for training.\n\nThe model didn't learn well, so open for advice for improvement.\n\nhttps://www.kaggle.com/code/zhangyue199/dpc-byt5-retrain-tokenizer/notebook?scriptVersionId=292842377",
    "3395451": "This is a really impressive pipeline. Nice job building the custom inference class and training loop!\n\nI noticed one small thing that might explain why your predictions are repeating\n\nIt looks like you are accidentally training from scratch instead of fine-tuning. In your model section, you used: model = T5ForConditionalGeneration(config) That creates a blank model with random weights. Since our dataset is so small (2.6k rows), the model can't learn a language from scratch, so it just memorizes the most common phrase. For a while, I was trying to do this, and running into the same issue. \n\nMy suggested fix: If you want to use ByT5 (one of the best models for this data), try this:\n\nSkip the SentencePiece training. ByT5 doesn't need a tokenizer! It reads raw bytes/characters.\n\nLoad the pre-trained weights:\n\nPython\ntokenizer = AutoTokenizer.from_pretrained(\"google/byt5-small\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"google/byt5-small\")\nThis will let you start with a model that already 'knows' how to read other languages, so it just needs to learn Akkadian. Hope this helps!"
  },
  "source": "meta"
}