QT/convert-register variant of MoxhiMT-30:
familiar QT-style pronouns (ta/ngươi/hắn/nàng/tỷ muội) with neural translation
quality — and
rock-stable pronoun register across a whole chapter.
Standard NMT models (including MoxhiMT-30) translate sentence-by-sentence and
drift between pronoun registers mid-chapter: ta ↔ tôi, chúng ta ↔ chúng tôi,
tỷ muội ↔ chị em. This variant was trained on the same corpus with all
targets normalized to a single QT register, so the instability is gone at the
source.
Flip rate = register switches between consecutive lines of the same class.
Overall translation quality is on par with the same-recipe baseline
(clean-suite BLEU 50.3 vs 50.4 register-normalized refs; blind human-arbitrated
review: 26 wins / 16 losses / 9 ties on 60 lines).
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3model_id = "DanVP/MoxhiMT-30-QT"
4tok = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
6
7text = "你以为呢?我们走吧。"
8inputs = tok(text, return_tensors="pt", truncation=True, max_length=512)
9out = model.generate(**inputs, max_length=512, num_beams=4)
10print(tok.decode(out[0], skip_special_tokens=True))
11# → Ngươi nghĩ sao? Chúng ta đi thôi.
1import ctranslate2
2from pathlib import Path
3from huggingface_hub import snapshot_download
4from transformers import AutoTokenizer
5
6model_id = "DanVP/MoxhiMT-30-QT"
7model_path = Path(snapshot_download(model_id, allow_patterns=[
8 "config.json", "source.spm", "target.spm", "vocab.json",
9 "tokenizer_config.json", "ct2-int8_float32/*",
10]))
11tokenizer = AutoTokenizer.from_pretrained(model_path)
12translator = ctranslate2.Translator(
13 str(model_path / "ct2-int8_float32"),
14 device="cpu", compute_type="int8_float32",
15)
Same curated Chinese–Vietnamese web-novel corpus as MoxhiMT-30 v4-base
(xianxia, modern, historical, sci-fi, cross-domain + research-grounded idiom /
classical-grammar layer). The only change: every target was normalized to
the QT register by a source-anchored, 78-test rewrite pipeline
(per-segment budgeting, proper-noun/idiom guards, audited over two independent
500-sample review rounds).
CC-BY-NC-4.0 (research / non-commercial use).