Hy-MT2: A family of fast-thinking multilingual translation models for complex real-world translation scenarios.
What problem it solves
Real-world translation involves more than converting text between languages: tasks can require terminology, style, personalization, delimiter preservation, and structured-data constraints. Hy-MT2 is designed to support translation among 33 languages and follow translation instructions in multiple languages for complex real-world scenarios.
Key features
Instruction-driven task types — Documented prompt templates cover default translation, terminology references, target style, user personalization, delimiter preservation and translation of structured data with strict rules on keys, placeholders and indentation.
Source: README
IFMTBench benchmark for instruction following — The release includes IFMTBench, a benchmark dedicated to evaluating translation instruction-following capability, with its own directory in the repository.
Source: README, IFMTBench
Deployment and fine-tuning pipeline — The README documents inference with transformers, vLLM, SGLang and llama.cpp, and the repository ships a training pipeline supporting full-parameter fine-tuning, LoRA, DeepSpeed ZeRO configurations and LLaMA-Factory integration.
Source: README, train
Quick start
Copied verbatim from the project's README.
uv venv --python 3.12 --seed --managed-python
source .venv/bin/activate
git clone https://github.com/vllm-project/vllm.git
cd vllm
uv pip install --editable . --torch-backend=autovllm serve tencent/Hy-MT2-30B-A3B --tensor-parallel-size 1from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_path = "tencent/Hy-MT2-30B-A3B"
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
# Load model
model = AutoModelForCausalLM.from_pretrained(
model_path,
dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model.eval()
# Example inference
prompt = "将以下文本翻译成英语,注意只需要输出翻译后的结果,不要额外解释:\n\n今天天气真好。"
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=4096,
)
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
print(response)Who it may suit
Inference: this release may suit machine translation engineers and researchers who need instruction-controllable multilingual models, as well as application developers wiring translation into local or on-device pipelines through the provided serving backends and quantization variants.
Topics to discuss
Which translation instruction types (terminology, style, personalization, delimiters, structured data) should IFMTBench prioritise next, and how should instruction-following be scored?
What is the community's preferred serving stack for these models, and what is needed to make the 30B-A3B variant easier to deploy?
How should translation instruction templates be standardised across languages so that the same task can be issued in different prompt languages?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/Tencent-Hunyuan/Hy-MT2#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…