Qwen-MT in Plain English: A 3,000-Word Guide to 92-Language Translation for Everyday Users
What you’ll learn in the next ten minutes
-
How Qwen-MT turns any sentence into 92 languages without losing nuance -
The exact three-step setup to start translating in under five minutes -
When to pick “turbo” vs “plus” (and what it costs) -
Real code you can copy-paste for legal, medical, or social-media content
1. Meet Qwen-MT: the translator that speaks 92 languages
Qwen-MT is a machine-translation model built on top of the Qwen3 large-language family.
Think of it as a bilingual friend who has read every Wikipedia, contract, and meme in 92 languages and can still remember your company jargon.
What makes it different?
Feature | Plain-English meaning | Example |
---|---|---|
92 languages | Covers ~95 % of world population | Japanese ↔ Swahili in one call |
Terminology lock | Freeze “graphene” to graphene every time | No more “black lead” surprises |
Translation memory | Re-use your old, vetted translations | Save hours on repeated clauses |
MoE (Mixture of Experts) | Only 3 % of the model “wakes up” per request | Fast and cheap on busy days |
2. Quick-start: translate your first sentence in four commands
Prerequisites
-
Create an Alibaba Cloud account -
Grab an API key and set an environment variable
export DASHSCOPE_API_KEY=sk-your-real-key
-
Install the OpenAI-compatible SDK
pip install openai
One-shot Python script
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("DASHSCOPE_API_KEY"),
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1"
)
text = "我看到这个视频后没有笑"
response = client.chat.completions.create(
model="qwen-mt-turbo",
messages=[{"role": "user", "content": text}],
extra_body={
"translation_options": {
"source_lang": "auto",
"target_lang": "English"
}
}
)
print(response.choices[0].message.content)
Run it.
Expected output:
I didn't laugh after watching this video.
You just translated Chinese to English in 90 ms.
3. Choosing the right model: turbo vs plus
Model | Cost (output) | Speed | Best for |
---|---|---|---|
qwen-mt-turbo | ≈ $0.49 / 1 M tokens | <100 ms | Bulk subtitles, real-time chat |
qwen-mt-plus | ≈ $7.37 / 1 M tokens | ~300 ms | Legal contracts, medical leaflets |
Rule of thumb:
-
Start with turbo. -
Upgrade to plus when an accuracy audit shows more than 2 % of your sentences need post-editing.
4. Real-life use cases with ready-to-run code
4.1 Tech white-paper: locking domain terms
Scenario: A biomedical paper needs biological sensor every time “生物传感器” appears.
terms = [
{"source": "生物传感器", "target": "biological sensor"},
{"source": "石墨烯", "target": "graphene"},
{"source": "化学元素", "target": "chemical elements"}
]
payload = {
"source_lang": "Chinese",
"target_lang": "English",
"terms": terms,
"domains": "Use precise academic tone suitable for a peer-reviewed journal."
}
Full script: copy the quick-start and replace extra_body
with the above payload.
4.2 Social-media post: keeping the slang
Original:
浪姐一、二季还行,后面就有点炒回锅肉的感觉了。
Goal: Retain the “reheated leftovers” idiom.
payload = {
"source_lang": "Chinese",
"target_lang": "English",
"domains": "Translate in a casual, social-media style; keep idiomatic expressions."
}
Output:
The first two seasons of Sister Who Makes Waves were decent … later it started to feel like reheated leftovers.
4.3 Legal clause: classical Chinese
Original:
且夫秦欲璧,赵弗予璧,两无所曲直也。
Goal: Formal legal English.
payload = {
"source_lang": "Chinese",
"target_lang": "English",
"domains": "Render in formal legal English while preserving the classical structure."
}
Output:
Moreover, should Qin desire the jade and Zhao refuse to cede it, neither party shall be deemed at fault …
5. Deep dive: controlling the three big knobs
5.1 Terminology intervention
-
Create a JSON list of source and target pairs. -
Pass it in translation_options["terms"]
. -
The model will always prefer your term—even if context suggests otherwise.
Limit: Practical tests show no speed loss up to 100 pairs.
Tip: Store the list in a CSV, then json.dumps()
at runtime.
5.2 Translation memory (TM)
What it is: Previously approved sentence pairs.
Usage:
"tm_list": [
{"source": "点击下载", "target": "Click to download"},
{"source": "您可以通过如下命令查看版本", "target": "Run the following command to check the version"}
]
When to use:
-
Product manuals with repeating headings -
Annual reports where boilerplate paragraphs repeat
5.3 Domain prompt
A free-text field in English describing the desired tone.
Examples:
-
“Alibaba Cloud technical documentation, concise troubleshooting style.” -
“Instagram caption, keep emojis if any.”
6. Language list for copy-paste
Use these exact strings in target_lang
.
Language family | Examples |
---|---|
Sino-Tibetan | Chinese, Cantonese, Burmese |
Indo-European | English, French, German, Spanish, Russian, Hindi … 50+ more |
Afro-Asiatic | Arabic (Standard, Egyptian, Gulf), Hebrew, Maltese |
Turkic | Turkish, Kazakh, Uzbek |
Austro-Asiatic | Vietnamese, Khmer |
Austronesian | Indonesian, Malay, Tagalog |
Uralic | Finnish, Hungarian |
Others | Japanese, Korean, Swahili, Georgian |
7. Streaming for real-time apps
Add stream=True
to receive partial results as they are generated.
completion = client.chat.completions.create(
model="qwen-mt-turbo",
messages=[{"role": "user", "content": "实时字幕测试"}],
stream=True,
extra_body={"translation_options": {"target_lang": "English"}}
)
for chunk in completion:
print(chunk.choices[0].delta.content or "", end="")
Console shows each word as it arrives, perfect for live captions.
8. Pricing cheat-sheet (in USD and RMB)
Model | Input ($/M) | Output ($/M) | ≈ RMB output/1 M tokens |
---|---|---|---|
turbo | 0.16 | 0.49 | 3.5 yuan |
plus | 2.46 | 7.37 | 53 yuan |
Free quota: 500 000 tokens, valid for 180 days after first call.
9. Common pitfalls FAQ
Q: Can the model auto-detect the source language?
A: Yes—set source_lang
to "auto"
.
Q: Is there a hard limit on term pairs?
A: No official cap; 100 pairs run at full speed in our tests.
Q: Does Java SDK work?
A: Not yet. Use Python, Node, or direct REST.
Q: How accurate is it versus human translation?
A: In Alibaba’s blind review, turbo scores within 2 % of human for IT and medical texts; plus is statistically on par with professional translators (source: Alibaba internal report, 2024).
Q: Emoji handling?
A: Preserved by default; domain prompt can request removal.
10. One-page reference card
Task | Snippet |
---|---|
Simple translation | {"target_lang":"English"} |
Lock 3 terms | {"terms":[{"source":"API","target":"API"}]} |
Re-use memory | {"tm_list":[...]} |
Formal legal tone | {"domains":"Use formal legal English."} |
Stream live captions | stream=True |
11. Full code bundle
Python (OpenAI SDK)
import os, json
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("DASHSCOPE_API_KEY"),
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1"
)
def translate(text, target="English", terms=None, memory=None, style=None):
opts = {"target_lang": target}
if terms: opts["terms"] = terms
if memory: opts["tm_list"] = memory
if style: opts["domains"] = style
resp = client.chat.completions.create(
model="qwen-mt-turbo",
messages=[{"role": "user", "content": text}],
extra_body={"translation_options": opts}
)
return resp.choices[0].message.content
# Example usage
print(translate("石墨烯", terms=[{"source":"石墨烯","target":"graphene"}]))
curl (non-streaming)
curl -X POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-mt-turbo",
"messages":[{"role":"user","content":"实时字幕测试"}],
"translation_options":{"target_lang":"English"}
}'
12. Next steps
-
Pick your model (start with turbo). -
Create a small terminology CSV. -
Wrap the Python function into your backend. -
Monitor quality with random spot-checks; upgrade to plus if the error rate exceeds 2 %.
Language barriers disappear when the right tool is this simple.