text
stringlengths
0
536
# [24th] Post-training Qwen2.5 32B and 72B with Gemini OCR/published texts pairs
Deep Past Challenge - Translate Akkadian to English
Solution Writeup · 24th place · Mar 24, 2026
## Solution Overview
Notebook: https://www.kaggle.com/code/yeoyunsianggeremie/deep-past-inference
### Introduction
Team members: @yeoyunsianggeremie @andrevma18
We're both grinding for our startup, working 70-75 hour weeks, which left us almost no time to compete seriously. As such, we did the high-level thinking and solution-design ourselves (how to clean, how to generate data, etc) then distilled it into structured Markdown files for Qgentic-AI which is an autonomous Kaggle ...
I almost said "no" to joining this competition - as I felt I wouldn't have enough time. But I realized, working under this intense constraint is something I am trying to actively get better at, and this would be a good practice!
### Models used
Qwen2.5-32B, Qwen2.5-72B and ByT5-Base
### Datasets
Published texts: Asked Gemini to split the data into sentences and generated translations for each of them
PDFs: Fed each page into Gemini to extract transliteration/translation pairs
Yup, you heard it right, we did not use the competition train data or attempt to clean it (I caught Qgentic-AI running in circles to decide whether to include it or not, and decided it was confusing so went against it)
In total, we had about 55,000 transliteration/translation pairs after doing some manual cleaning and LLM-as-a-judge
### Training
We post-trained Qwen2.5-32B and Qwen2.5-72B for 3 epochs on 8x B200 with LoRA rank 64 and alpha 128
ByT5 was trained for 15 epochs at a learning rate of 3e-4
The parameters were tuned by Qgentic-AI (such a huge time saver 😁)
We trained our models on ENG -> AKK and AKK -> ENG (so a total of ~110,000 training pairs)
### Validation
We used a pertubed version of the train.csv removing all bad samples where the training and validation lengths are way off. There is still data leakage so we do not base 100% of our selections based on that. The CV is around 43 for our best models.
### Preprocessing
Mostly based on the host's discussion - fixed a few bugs like 5/12 shekels -> 2/3 shekel 15 grains
### Postprocessing
Removed repetitions using the base Qwen2.5-72B model using the prompt
```
DEDUP_SYSTEM = "You are a text editor. The user will give you an English translation that may contain repeated phrases or sentences. Remove any obvious repetitions while preserving the rest of the text exactly as-is. Do NOT rephrase, summarize, or add anything. Return ONLY the cleaned text."
```
### Failed Ideas
- Any ByT5 model >= Large. We haven't investigated why.
- MBR
- Using competition training data
- Translating Akkadian -> Arabic -> English
- Training a judge model to grade the quality of the translations
### Code for Preprocessing and Postprocessing
```
import re
import pandas as pd
def replace_roman_months(text):
if pd.isna(text): return ""
text = str(text)
romans = {
"XII": "12", "XI": "11", "IX": "9", "IV": "4",
"VIII": "8", "VII": "7", "III": "3", "VI": "6",
"X": "10", "V": "5", "II": "2", "I": "1"
}
for r, num in romans.items():
text = re.sub(r'(?i)\bmonth\s+' + r + r'\b', 'month ' + num, text)
return text
_FRAC_MAP = {
0.5: "½", 0.3333: "⅓", 0.6666: "⅔", 0.6667: "⅔",
0.25: "¼", 0.75: "¾",
0.1666: "⅙", 0.1667: "⅙", 0.8333: "⅚",
0.125: "⅛", 0.375: "⅜", 0.625: "⅝", 0.875: "⅞",
0.2: "⅕", 0.4: "⅖", 0.6: "⅗", 0.8: "⅘",
0.333: "⅓",
}
_ASCII_FRAC_MAP = {
"1/2": "½", "1/3": "⅓", "2/3": "⅔",
"1/4": "¼", "3/4": "¾",
"1/5": "⅕", "2/5": "⅖", "3/5": "⅗", "4/5": "⅘",
"1/6": "⅙", "5/6": "⅚",