百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

Hy-MT

> 编程语言
开源

& nbsp; Hugging Face  & nbsp; & nbsp; & nbsp; ModelScope  & nbsp; |  & nbsp; ️  官方网站  & nbsp;

798 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

& nbsp; Hugging Face  & nbsp; & nbsp; & nbsp; ModelScope  & nbsp; |  & nbsp; ️  官方网站  & nbsp;

中文&nbsp | English

&nbsp;Hugging Face&nbsp;&nbsp;|&nbsp;&nbsp;
&nbsp;ModelScope&nbsp;&nbsp;|&nbsp;&nbsp;

️&nbsp;Official Website&nbsp;&nbsp;|&nbsp;&nbsp;
️&nbsp;Demo&nbsp;&nbsp;&nbsp;&nbsp;

Github

NOTICE:

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 [email protected].

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.

Performance

You can refer to our technical report for more experimental results and analysis.

Technical Report

 

Model Links

Model Name Description Download
HY-MT1.5-1.8B Hunyuan 1.8B translation model Model
HY-MT1.5-1.8B-FP8 Hunyuan 1.8B translation model, fp8 quant Model
HY-MT1.5-1.8B-GPTQ-Int4 Hunyuan 1.8B translation model, int4 quant Model
HY-MT1.5-1.8B-GGUF Hunyuan 1.8B translation model, llama.cpp Model
HY-MT1.5-7B Hunyuan 7B translation model Model
HY-MT1.5-7B-FP8 Hunyuan 7B translation model, fp8 quant Model
HY-MT1.5-7B-GGUF Hunyuan 7B translation model, llama.cpp Model

Prompts

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 ZHXX Translation.


将以下文本翻译为{target_language},注意只需要输出翻译后的结果,不要额外解释:

{source_text}

Prompt Template for XXXX Translation, excluding ZHXX.


Translate the following segment into {target_language}, without additional explanation.

{source_text}

Prompt Template for terminology intervention.


参考下面的翻译:
{source_term} 翻译成 {target_term}

将以下文本翻译为{target_language},注意只需要输出翻译后的结果,不要额外解释:
{source_text}

Prompt Template for contextual translation.


{context}
参考上面的信息,把下面的文本翻译成{target_language},注意不需要翻译上文,也不要额外解释:
{source_text}

Prompt Template for formatted translation.


将以下之间的文本翻译为中文,注意只需要输出翻译后的结果,不要额外解释,原文中的标签表示标签内文本包含格式信息,需要在译文中相应的位置尽量保留该标签。输出格式为:str

{src_text_with_format}

 

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

…

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.

…

 

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:

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

  1. 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"
  },
  "tags": {
    "role_tag": "role",
    "content_tag": "content",
    "user_tag": "user",
    "assistant_tag": "assistant",
    "system_tag": "system"
  }
}

Training execution

  1. Copy all files from the llama_factory_support/example_configs directory to the example/hunyuan directory in LLaMA-Factory.
  2. Modify the model path and dataset name in the configuration file hunyuan_full.yaml. Adjust other configurations as needed:
### model
model_name_or_path: [!!!add the model path here!!!]

### dataset
dataset: [!!!add the dataset name here!!!]
  1. Execute training commands: *​​Single-node training​​ Note: Set the environment variable DISABLE_VERSION_CHECK to 1 to avoid version conflicts.
    export DISABLE_VERSION_CHECK=1
    llamafactory-cli train examples/hunyuan/hunyuan_full.yaml
    
    *Multi-node training​​ Execute the following command on each node. Configure NNODES, NODE_RANK, MASTER_ADDR, and MASTER_PORT according to your environment:
    export DISABLE_VERSION_CHECK=1
    FORCE_TORCHRUN=1 NNODES=${NNODES} NODE_RANK=${NODE_RANK} MASTER_ADDR=${MASTER_ADDR} MASTER_PORT=${MASTER_PORT} \
    llamafactory-cli train examples/hunyuan/hunyuan_full.yaml
    

 

Quantization Compression

We used our own AngelSlim compression tool to produce FP8 and INT4 quantization models. AngelSlim is a toolset dedicated to creating a more user-friendly, comprehensive and efficient model compression solution.

FP8 Quantization

We use FP8-static quantization, FP8 quantization adopts 8-bit floating point format, through a small amount of calibration data (without training) to pre-determine the quantization scale, the model weights and activation values will be converted to FP8 format, to improve the inference efficiency and reduce the deployment threshold. We you can use AngelSlim quantization, you can also directly download our quantization completed open source model to use AngelSlim.

Deployment

For deployment, you can use frameworks such as TensorRT-LLM, vLLM, or SGLang to serve the model and create an OpenAI-compatible API endpoint.

image: https://hub.docker.com/r/hunyuaninfer/hunyuan-7B/tags

TensorRT-LLM

Docker Image

We provide a pre-built Docker image based on the latest version of TensorRT-LLM.

We use tencent/Hunyuan-7B-MT for example

  • To get started:
docker pull docker.cnb.cool/tencent/hunyuan/hunyuan-7b:hunyuan-7b-trtllm
docker run --privileged --user root --name hunyuanLLM_infer --rm -it --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 --gpus=all hunyuaninfer/hunyuan-7b:hunyuan-7b-trtllm
  • Prepare Configuration file:
cat >/path/to/extra-llm-api-config.yml &1 | tee log_server.txt
  • After running service script successfully, run the request script
curl http://0.0.0.0:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
"model": "hunyuan",
"messages": [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a

Issues· 25 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言