Hy-MT2-7B Multilingual Translator
Tencent’s Hy-MT2-7B is an open-weights multilingual translation model for 30+ languages. It follows glossary, style, and format instructions for faithful output.
Overview
Hy-MT2-7B is a 7B-parameter multilingual translation model from Tencent’s Hunyuan team. It works like an instruction-following text generator: you tell it the target language and provide the source text. It then produces the translated text as the model’s completion. This makes it useful when you need controllable translation, like strict term choices, consistent tone, or preserved markup.
What you can build
- Subtitle and UI-string translation that preserves separators and line structure.
- Product and app localization with a glossary for brand and feature names.
- Customer support ticket translation with a fixed tone, like “polite and brief.”
- Translation of JSON, XML, YAML, HTML, or Markdown while keeping keys and tags stable.
- Domain translation for manuals, policy text, and knowledge base articles.
Inputs
- The text you want to translate, as plain text. The model can detect the source language from the text.
- The target language you want the output written in, selected from the model’s supported languages.
- Optional glossary rules, written as one or more pairs like “source term = required translation.” Use this when term consistency matters.
- Optional tone guidance, written as a short phrase that describes the desired register, like a formal business email.
- Optional extra translation preferences, written as short instruction lines. Use this for constraints like keeping brand names unchanged.
- Optional delimiter preservation, which forces separators like pipes, tabs, or custom markers to remain unchanged in count and position.
- Optional format hint for structured text (JSON, XML, YAML, HTML, or Markdown). The model should translate user-facing text while keeping structural tokens intact.
- Optional context notes that clarify ambiguous words. The context itself should stay in the original language.
- Optional randomness control for generation, using a numeric range from 0.0 to 2.0.
- Optional nucleus sampling control, using a probability from 0.05 to 1.0.
- Optional top-token cutoff, using an integer from 0 to 100.
- Optional repetition control, using a numeric range from 1.0 to 2.0.
- Optional maximum token budget for the translated output, using an integer from 0 to 32,768. Use 0 to let the system size the output automatically.
- Optional numeric seed, using an integer from 0 to 2,147,483,647, for repeatable translations.
Outputs
The model returns translated text as UTF-8 plain text. The output is usually a single translated passage, not a bilingual table.
If you provide structured content and set a format hint, the output keeps the same structure. Keys, tags, and placeholders should remain unchanged. Only user-facing text is translated.
If you set a hard output token budget and the translation reaches that limit, the returned translation may be cut off.
Recommended settings
For general-purpose translation with Hy-MT2-7B, Tencent’s recommended generation setup uses moderate sampling and a repetition guard. Use a randomness level of 0.7, nucleus probability of 0.6, top-token cutoff of 20, repetition control of 1.05, and allow up to 4,096 output tokens.
Limitations
- Hy-MT2-7B is optimized for translation, not open-ended chat.
- Language coverage is limited to the languages released with Hy-MT2. If your language isn’t supported, quality can drop fast.
- Many hosted deployments cap usable context at about 8,192 tokens, even if the model config advertises a larger positional limit. Long inputs may need chunking.
- Use one control mode at a time for best results. Mixing glossary rules, tone, preferences, delimiter locking, format hints, and extra context can reduce instruction fidelity.
- Invalid or inconsistent structured input (broken JSON, malformed XML, messy Markdown) can cause broken output structure or partial translations.
- Poorly segmented text (OCR artifacts, random line breaks, or mixed encodings) can harm alignment and term consistency.
Safety & compliance
Hy-MT2-7B can translate user-provided content as-is. It does not automatically remove sensitive data from the input or output.
Tencent’s legacy machine-translation APIs note that translation results do not include built-in content moderation. You should run your own safety checks when translating user-generated or regulated content.
API quick start
Run Hy-MT2-7B with a single API call.
{
"prompt": "今天,我们很高兴地宣布推出全新的智能翻译服务。它支持三十多种语言之间的互译,能够准…",
"targetLng": "English",
"terminology": "...",
"preferences": "..."
}curl -X POST "https://api.wiro.ai/v1/Run/tencent/hy-mt2-7b" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_WIRO_API_KEY" \
--data-binary @- <<'JSON'
{
"prompt": "今天,我们很高兴地宣布推出全新的智能翻译服务。它支持三十多种语言之间的互译,能够准…",
"targetLng": "English",
"terminology": "...",
"preferences": "..."
}
JSON