Tencent-Hunyuan/Hunyuan-MT
Python
Captured source
source ↗Tencent-Hunyuan/Hunyuan-MT
Language: Python
License: NOASSERTION
Stars: 710
Forks: 69
Open issues: 47
Created: 2025-08-28T09:54:40Z
Pushed: 2025-12-30T09:12:46Z
Default branch: main
Fork: no
Archived: no
README:
中文  | English
🤗 Hugging Face | ModelScope |
🖥️ Official Website | 🕹️ Demo
GITHUB | Technical Report
Model Introduction
The Hunyuan-MT comprises a translation model, Hunyuan-MT-7B, and an ensemble model, Hunyuan-MT-Chimera. The translation model is used to translate source text into the target language, while the ensemble model integrates multiple translation outputs to produce a higher-quality result. It primarily supports mutual translation among 33 languages, including five ethnic minority languages in China.
Key Features and Advantages
- In the WMT25 competition, the model achieved first place in 30 out of the 31 language categories it participated in.
- Hunyuan-MT-7B achieves industry-leading performance among models of comparable scale
- Hunyuan-MT-Chimera-7B is the industry’s first open-source translation ensemble model, elevating translation quality to a new level
- A comprehensive training framework for translation models has been proposed, spanning from pretrain → continue pretraining (CPT) → supervised fine-tuning (SFT) → translation rl → ensemble rl, achieving state-of-the-art (SOTA) results for models of similar size
Related News
- 🔥 2025.12.30, we have open-sourced HY-MT1.5-1.8B and HY-MT1.5-7B on Hugging Face. Please go to our new github: https://github.com/Tencent-Hunyuan/HY-MT
- 2025.9.1 We have open-sourced Hunyuan-MT-7B , Hunyuan-MT-Chimera-7B on Hugging Face.
Performance
You can refer to our technical report for more experimental results and analysis.
Technical Report
Model Links
| Model Name | Description | Download | | ----------- | ----------- |----------- | Hunyuan-MT-7B | Hunyuan 7B translation model |🤗 Model| | Hunyuan-MT-7B-fp8 | Hunyuan 7B translation model,fp8 quant | 🤗 Model| | Hunyuan-MT-Chimera | Hunyuan 7B translation ensemble model | 🤗 Model| | Hunyuan-MT-Chimera-fp8 | Hunyuan 7B translation ensemble model,fp8 quant | 🤗 Model|
Prompts
Prompt Template for ZHXX Translation.
把下面的文本翻译成,不要额外解释。
Prompt Template for XXXX Translation, excluding ZHXX.
Translate the following segment into , without additional explanation.
Prompt Template for Hunyuan-MT-Chimera-7B
Analyze the following multiple translations of the segment surrounded in triple backticks and generate a single refined translation. Only output the refined translation, do not explain. The segment:
The multiple ` translations: 1. `` 2. `` 3. `` 4. `` 5. `` 6. ```
### Use with transformers First, please install transformers, recommends v4.56.0
pip install transformers==4.56.0
*!!! If you want to load fp8 model with transformers, you need to change the name"ignored_layers" in config.json to "ignore" and upgrade the compressed-tensors to compressed-tensors-0.11.0.* The following code snippet shows how to use the transformers library to load and apply the model. we use tencent/Hunyuan-MT-7B for example
from transformers import AutoModelForCausalLM, AutoTokenizer import os
model_name_or_path = "tencent/Hunyuan-MT-7B"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto") # You may want to use bfloat16 and/or move to GPU here messages = [ {"role": "user", "content": "Translate the following segment into Chinese, without additional explanation.\n\nIt’s on the house."}, ] tokenized_chat = tokenizer.apply_chat_template( messages, tokenize=True, add_generation_prompt=False, return_tensors="pt" )
outputs = model.generate(tokenized_chat.to(model.device), max_new_tokens=2048) output_text = tokenizer.decode(outputs[0])
We recommend using the following set of parameters for inference. Note that our model does not have the default system_prompt.
{ "top_k": 20, "top_p": 0.6, "repetition_penalty": 1.05, "temperature": 0.7 }
Supported languages: | Languages | Abbr. | Chinese Names | |-------------------|---------|-----------------| | Chinese | zh | 中文 | | English | en | 英语 | | French | fr | 法语 | | Portuguese | pt | 葡萄牙语 | | Spanish | es | 西班牙语 | | Japanese | ja | 日语 | | Turkish | tr | 土耳其语 | | Russian | ru | 俄语 | | Arabic | ar | 阿拉伯语 | | Korean | ko | 韩语 | | Thai | th | 泰语 | | Italian | it | 意大利语 | | German | de | 德语 | | Vietnamese | vi | 越南语 | | Malay | ms | 马来语 | | Indonesian | id | 印尼语 | | Filipino | tl | 菲律宾语 | | Hindi | hi | 印地语 | | Traditional Chinese | zh-Hant| 繁体中文 | | Polish | pl | 波兰语 | | Czech | cs | 捷克语 | | Dutch | nl | 荷兰语 | | Khmer | km | 高棉语 | | Burmese | my | 缅甸语 | | Persian | fa | 波斯语 | | Gujarati | gu | 古吉拉特语 | | Urdu | ur | 乌尔都语 | | Telugu | te | 泰卢固语 | | Marathi | mr | 马拉地语 | | Hebrew | he | 希伯来语 | | Bengali | bn | 孟加拉语 | | Tamil | ta | 泰米尔语 | | Ukrainian | uk | 乌克兰语 | | Tibetan | bo | 藏语 | | Kazakh | kk | 哈萨克语 | | Mongolian | mn | 蒙古语 | | Uyghur | ug | 维吾尔语 | | Cantonese | yue | 粤语 | ### Training Data Format If you need to fine-tune our Instruct model, we recommend processing the data into the following format.
messages = [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Why is seawater salty?" }, {"role": "assistant", "content": "Seawater is primarily saline due to dissolved salts and minerals. These substances come from the chemical materials in rocks and soil on the Earth's surface, which are carried into the ocean over time. When seawater evaporates, the water vapor leaves, but the salts and minerals remain, making the seawater saltier. Therefore, the salinity of seawater is determined by the amount of salts and minerals it contains."} ]
from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("your_tokenizer_path", trust_remote_code=True) train_ids = tokenizer.apply_chat_template(messages)
### Train with LLaMA-Factory In the following chapter, we will introduce how to use `LLaMA-Factory` to fine-tune the `Hunyuan` model. #### Prerequisites Verify installation of the following…
Excerpt shown — open the source for the full document.
Notability
notability 6.0/10New MT model from Tencent, modest stars.