Downloads · 30 days
17
2% of all-time downloads
shawnw3i/Hunyuan-MT-7B-AWQ
Hunyuan-MT-7B-AWQ is a translation model from shawnw3i. Use it when you need text moved from one language to another. It is set up for transformers.
<p align="center" <img src="https://dscache.tencent-cloud.cn/upload/uploader/hunyuan-64b418fd052c033b228e04bc77bbc4b54fd7f5bc.png" width="400"/ <br </p<p</p
Downloads · 30 days
17
2% of all-time downloads
All-time downloads
1.1K
Public
Parameters
2B
5.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
I327B · 86%
From the Hugging Face model README
The Hunyuan Translation Model 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.
把下面的文本翻译成<target_language>,不要额外解释。
<source_text>
Translate the following segment into <target_language>, without additional explanation.
<source_text>
Analyze the following multiple <target_language> translations of the <source_language> segment surrounded in triple backticks and generate a single refined <target_language> translation. Only output the refined translation, do not explain.
The <source_language> segment:
```<source_text>```
The multiple <target_language> translations:
1. ```<translated_text1>```
2. ```<translated_text2>```
3. ```<translated_text3>```
4. ```<translated_text4>```
5. ```<translated_text5>```
6. ```<translated_text6>```
First, please install transformers, recommends v4.56.0
pip install transformers==4.56.0
The following code snippet shows how to use the transformers library to load and apply the model.
!!! 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.
we use zhiqing/Hunyuan-MT-7B-AWQ for example
from transformers import AutoModelForCausalLM, AutoTokenizer
import os
model_name_or_path = "zhiqing/Hunyuan-MT-7B-AWQ"
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])
pip install vllm --upgrade
vllm serve zhiqing/Hunyuan-MT-7B-AWQ
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
}
Citing Hunyuan-MT:
@misc{hunyuanmt2025,
title={Hunyuan-MT Technical Report},
author={Mao Zheng, Zheng Li, Bingxin Qu, Mingyang Song, Yang Du, Mingrui Sun, Di Wang, Tao Chen, Jiaqi Zhu, Xingwu Sun, Yufei Wang, Can Xu, Chen Li, Kai Wang, Decheng Wu},
howpublished={\url{https://github.com/Tencent-Hunyuan/Hunyuan-MT}},
year={2025}
}