HSC Wuxia mT5 Small Model
This model is a fine-tuned sequence-to-sequence model based on google/mt5-small for Chinese-to-English translation of Wuxia and Xianxia literature. It was developed as part of the Bachelor's Thesis (TFG):
"Enfoques de traducción automática con modelos de lenguaje en obras wuxia" (Degree in Data Science and Engineering, Universidade da Coruña)
Model Details
- Base Model: google/mt5-small
- Training Method: Full architectural fine-tuning
- Training Dataset: HSilvosa/hsc-wuxia-100k (100,000 stratified parallel sentence pairs)
- Target Domain: Wuxia/Xianxia web novels
Intended Use
This model can be used directly for Chinese-to-English translation of literary text in the Wuxia domain.
Quick Start (Inference)
from transformers import MT5ForConditionalGeneration, T5Tokenizer
model_name = "HSilvosa/hsc-wuxia-mt5-small"
model = MT5ForConditionalGeneration.from_pretrained(model_name)
tokenizer = T5Tokenizer.from_pretrained(model_name)
text = "translate Chinese to English: 一念成沧海,一念化桑田。"
inputs = tokenizer(text, return_tensors="pt")
generated_tokens = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0])
Evaluation Results
The model was evaluated on the Wuxia parallel test set, comparing the base model and the fine-tuned version:
| Metric | Base Model (mt5-small) | Fine-tuned Model (hsc-wuxia-mt5-small) | Delta (Improvement) |
|---|---|---|---|
| SacreBLEU | 0.00 | 16.98 | +16.98 |
| chrF | 1.25 | 39.41 | +38.16 |
| ROUGE-L | 0.00 | 46.33 | +46.33 |
| METEOR | 0.00 | 43.93 | +43.93 |
| COMET | 0.00 | 68.92 | +68.92 |
Training Hyperparameters
The model was fine-tuned using the following architectural training parameters:
- Optimizer: AdamW
- Learning Rate: 2e-5 (0.00002)
- Weight Decay: 0.01
- Epochs: Max 10 (with early stopping patience of 3 epochs based on validation loss)
- Batch Size: 16 (per device/GPU)
- Max Sequence Length: 128 tokens
- Seed: 42
Project Repository
This model and the associated training/evaluation pipelines were developed in the following project repository:
- GitHub Repository: HugoSilvosa/hsc-mtl-wuxia