[来源关键摘录] 发布记录为 2025 年 12 月 30 日,说明两个尺寸、语言覆盖及端侧量化部署能力。
[正文前段节选] Skip to content
Navigation Menu
Appearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Repository navigation
NotificationsYou must be signed in to change notification settings
Star846 (846)You must be signed in to star a repository
No description, website, or topics provided.
Custom properties
Report repository
BranchesTags
Open more actions menu
Latest commit
Folders and files
Last commit message
Last commit date
HY_MT1_5_Technical_Report.pdf
README_CN.md
requirements.txt
View all files
Repository files navigation
中文 | English
🤗 Hugging Face |
ModelScope |
🖥️ Official Website |
We have released the Hy-MT2 series of translation models, offering improved performance and excellent instruction-following capabilities. The link to the new model collection is: https://huggingface.co/collections/tencent/hy-mt2
We are excited to announce our official partnership with WMT26. We welcome all participants to use our HY-MT model during the competition. Teams that use HY-MT and achieve notable results will be eligible for cash prizes. For more details, please contact us at hunyuan@tencent.com.
To help you get started with HY-MT training more quickly, we have provided a Training Tutorial. You can access it via the link.
Model Introduction
Hunyuan Translation Model Version 1.5 includes a 1.8B translation model, HY-MT1.5-1.8B, and a 7B translation model, HY-MT1.5-7B. Both models focus on supporting mutual translation across 33 languages and incorporating 5 ethnic and dialect variations. Among them, HY-MT1.5-7B is an upgraded version of our WMT25 championship model, optimized for explanatory translation and mixed-language scenarios, with newly added support for terminology intervention, contextual translation, and formatted translation. Despite having less than one-third the parameters of HY-MT1.5-7B, HY-MT1.5-1.8B delivers translation performance comparable to its larger counterpart, achieving both high speed and high quality. After quantization, the 1.8B model can be deployed on edge devices and support real-time translation scenarios, making it widely applicable.
Key Features and Advantages
HY-MT1.5-1.8B achieves the industry-leading performance among models of the same size, surpassing most commercial translation APIs.
HY-MT1.5-1.8B supports deployment on edge devices and real-time translation scenarios, offering broad applicability.
HY-MT1.5-7B, compared to its September open-source version, has been optimized for annotated and mixed-language scenarios.
Both models support terminology intervention, contextual translation, and formatted translation.
Related News
2025.12.30, we have open-sourced HY-MT1.5-1.8B and HY-MT1.5-7B on Hugging Face.
2025.9.1, we have open-sourced Hunyuan-MT-7B , Hunyuan-MT-Chimera-7B on Hugging Face.
You can refer to our technical report for more experimental results and analysis.
Technical Report
HY-MT1.5-1.8B
Hunyuan 1.8B translation model
HY-MT1.5-1.8B-FP8
Hunyuan 1.8B translation model, fp8 quant
HY-MT1.5-1.8B-GPTQ-Int4
Hunyuan 1.8B translation model, int4 quant
HY-MT1.5-1.8B-GGUF
Hunyuan 1.8B translation model, llama.cpp
Hunyuan 7B translation model
HY-MT1.5-7B-FP8
Hunyuan 7B translation model, fp8 quant
HY-MT1.5-7B-GGUF
Hunyuan 7B translation model, llama.cpp
Note: The following source_language and target_language should both use the full names of the languages; use the full Chinese names for Chinese instruction and the full English names for English instruction.
Prompt Template for ZH<=>XX Translation.
将以下文本翻译为{target_language},注意只需要输出翻译后的结果,不要额外解释:
{source_text}
Prompt Template for XX<=>XX Translation, excluding ZH<=>XX.
Translate the following segment into {target_language}, without additional explanation.
Prompt Template for terminology intervention.
{source_term} 翻译成 {target_term}
Prompt Template for contextual translation.
参考上面的信息,把下面的文本翻译成{target_language},注意不需要翻译上文,也不要额外解释:
Prompt Template for formatted translation.
将以下<source></source>之间的文本翻译为中文,注意只需要输出翻译后的结果,不要额外解释,原文中的<sn></sn>标签表示标签内文本包含格式信息,需要在译文中相应的位置尽量保留该标签。输出格式为:<target>str</target>
<source>{src_text_with_format}</source>
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/HY-MT1.5-1.8B for example
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name_or_path = "tencent/HY-MT1.5-1.8B"
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(
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:
Chinese Names
Traditional Chinese
Training Data Format
If you need to fine-tune our Instruct model, we recommend processing the data into the following format.
{"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 dependencies:
LLaMA-Factory: Follow official installation guide
DeepSpeed (optional): Follow official installation guide
Transformer Library: Use the companion branch (Hunyuan-submitted code is pending review)
pip install git+https://github.com/huggingface/transformers@4970b23cedaf745f963779b4eae68da281e8c6ca
Data preparation
We need to prepare a custom dataset:
Organize your data in json format and place it in the data directory in LLaMA-Factory. The current implementation uses the sharegpt dataset format, which requires the following structure:
"messages": [
"role": "system",
"content": "System prompt (optional)"
"role": "user",
"content": "Human instruction"
"role": "assistant",
"content": "Model response"
Refer to the Data Format section mentioned earlier for details.
Define your dataset in the data/dataset_info.json file using the following format:
"dataset_name": {
"file_name": "dataset.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
Training execution
[...内容已截断,完整版请查看原文或 Wayback 快照]