Downloads · 30 days
14
21% of all-time downloads
hsilvosa/hsc-wuxia-m2m100-418m
hsc-wuxia-m2m100-418m is a translation model from hsilvosa. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned sequence-to-sequence model based on facebook/m2m100418M for Chinese-to-English translation of Wuxia and Xianxia literature. It was developed as part of the Bachelor's Thesis (TFG): "Enfoques…
Downloads · 30 days
14
21% of all-time downloads
All-time downloads
68
Public
Parameters
484M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
From the Hugging Face model README
This model is a fine-tuned sequence-to-sequence model based on facebook/m2m100_418M 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)
This model can be used directly for Chinese-to-English translation of literary text in the Wuxia domain.
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
model_name = "HSilvosa/hsc-wuxia-m2m100-418m"
model = M2M100ForConditionalGeneration.from_pretrained(model_name)
tokenizer = M2M100Tokenizer.from_pretrained(model_name)
# Set source and target language
tokenizer.src_lang = "zh"
text = "一念成沧海,一念化桑田。"
encoded_zh = tokenizer(text, return_tensors="pt")
generated_tokens = model.generate(**encoded_zh, forced_bos_token_id=tokenizer.get_lang_id("en"))
print(tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0])
The model was evaluated on the Wuxia parallel test set, comparing the base model and the fine-tuned version:
| Metric | Base Model (m2m100_418M) | Fine-tuned Model (hsc-wuxia-m2m100-418m) | Delta (Improvement) |
|---|---|---|---|
| SacreBLEU | 5.10 | 33.09 | +27.99 |
| chrF | 25.19 | 53.24 | +28.05 |
| ROUGE-L | 27.27 | 60.07 | +32.80 |
| METEOR | 24.16 | 59.03 | +34.87 |
| COMET | 56.17 | 78.52 | +22.35 |
The model was fine-tuned using the following architectural training parameters:
This model and the associated training/evaluation pipelines were developed in the following project repository: