MoxhiMT

Moxhi MT 30 QT (zh-vi)

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.

Measured consistency (7 chapters, 538 lines, multi-genre)

Pronoun class MoxhiMT-30-QT flip rate MoxhiMT-30 v4.0 flip rate
self (ta/tôi) 0.000 0.255
2nd person (ngươi/cậu...) 0.096 0.378
1st plural (chúng ta/chúng tôi) 0.000 0.353
3rd person (hắn/nàng) 0.000 0.032–0.059
kinship (tỷ muội/chị em) — QT share 100% 25%

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).

Trade-offs (by design)

  • Global QT voice: modern-setting prose also uses ta/ngươi/hắn — the convert-literature convention. If you want natural modern-Vietnamese register, use MoxhiMT-30 instead.
  • 我们/咱们 → chúng ta always: the inclusive/exclusive distinction (chúng ta/chúng tôi) is intentionally flattened, following QT convention.
  • No DPO pass yet (this is the base one-knob variant).

Model Details

  • Architecture: Marian seq2seq (asymmetric 8 encoder + 2 decoder) — same as MoxhiMT-30; drop-in interchangeable (same tokenizer/config), different voice.
  • Parameters: ~37M
  • Tokenizer: SentencePiece joint source/target, 24k
  • Suggested decoding: num_beams=4, max_length=512 (or CT2 int8 below)

Quick Start

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model_id = "DanVP/MoxhiMT-30-QT"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)

text = "你以为呢?我们走吧。"
inputs = tok(text, return_tensors="pt", truncation=True, max_length=512)
out = model.generate(**inputs, max_length=512, num_beams=4)
print(tok.decode(out[0], skip_special_tokens=True))
# → Ngươi nghĩ sao? Chúng ta đi thôi.

Fast CPU Runtime

A CTranslate2 INT8 export is in ct2-int8_float32/ for ~3-5x faster CPU inference.

import ctranslate2
from pathlib import Path
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer

model_id = "DanVP/MoxhiMT-30-QT"
model_path = Path(snapshot_download(model_id, allow_patterns=[
    "config.json", "source.spm", "target.spm", "vocab.json",
    "tokenizer_config.json", "ct2-int8_float32/*",
]))
tokenizer = AutoTokenizer.from_pretrained(model_path)
translator = ctranslate2.Translator(
    str(model_path / "ct2-int8_float32"),
    device="cpu", compute_type="int8_float32",
)

Training Data

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).

Notes

  • Shares the family's known hard cases: rare proper nouns, highly domain-specific OOD terminology.
  • Repetition rate is on par with the non-DPO baseline; a DPO pass may follow.
  • Experimental release; review output for high-stakes or publication use.

License

CC-BY-NC-4.0 (research / non-commercial use).

Downloads last month
36
Safetensors
Model size
36.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train DanVP/MoxhiMT-30-QT

Space using DanVP/MoxhiMT-30-QT 1