This repository contains the system for Algharb, the submission from the Marco Translation Team of Alibaba International Digital Commerce (AIDC) to the WMT 2025 General Machine Translation Shared Task.
Introduction
The Algharb system is a large translation model built based on the Qwen3-14B foundation. It is designed for high-quality translation across 13 diverse language directions and demonstrates state-of-the-art performance. Our approach is centered on a multi-stage refinement pipeline that systematically enhances translation fluency and faithfulness.
Supported language pairs:
Languages pair
Chinese Names
en2zh
英语到中文
en2ja
英语到日语
en2ko
英语到韩语
en2ar
英语到阿拉伯语
en2et
英语到爱沙尼亚语
en2sr_latin
英语到塞尔维亚语(拉丁化)
en2ru
英语到俄语
en2uk
英语到乌克兰语
en2cs
英语到捷克语
en2bho
英语到博杰普尔语
cs2uk
捷克语到乌克兰语
cs2de
捷克语到德语
ja2zh
日语到中文
Usage
The model expects a specific instruction format for translation. The following example demonstrates how to construct the prompt and perform generation using the vllm library for efficient inference.
1. Dependencies
First, ensure you have the necessary libraries installed:
The core of the process involves formatting the input text into a specific prompt template and then using the vllm engine to generate translations. For our hybrid decoding strategy, we generate multiple candidates (n > 1) for later re-ranking.
The prompt template is:
"Human: Please translate the following text into {target_language}: \n{source_text}<|im_end|>\nAssistant:"
Here is a complete Python example:
python
1from vllm import LLM, SamplingParams
23model_path ="path/to/your/algharb_model"4llm = LLM(model=model_path)56source_text ="This paper presents the Algharb system, our submission to the WMT 2025."7source_lang_code ="en"8target_lang_code ="zh"910lang_name_map ={11"en":"english"12"zh":"chinese",13"ko":"korean",14"ja":"japanese",15"ar":"arabic",16"cs":"czech",17"ru":"russian",18"uk":"ukraine",19"et":"estonian",20"bho":"bhojpuri",21"sr_latin":"serbian",22"de":"german",23}2425target_language_name = lang_name_map.get(target_lang_code,"the target language")2627prompt =(28f"Human: Please translate the following text into {target_language_name}: \n"29f"{source_text}<|im_end|>\n"30f"Assistant:"31)3233prompts_to_generate =[prompt]34print("Formatted Prompt:\n", prompt)3536sampling_params = SamplingParams(37 n=1,38 temperature=0.001,39 top_p=0.001,40 max_tokens=51241)4243outputs = llm.generate(prompts_to_generate, sampling_params)4445for output in outputs:46 generated_text = output.outputs[0].strip()47print(f"translation: {generated_text}")
Apply MBR decoding
First, run random sample decoding:
python
1from vllm import LLM, SamplingParams
23model_path ="path/to/your/algharb_model"4llm = LLM(model=model_path)56source_text ="This paper presents the Algharb system, our submission to the WMT 2025."7source_lang_code ="en"8target_lang_code ="zh"910lang_name_map ={11"en":"english"12"zh":"chinese",13"ko":"korean",14"ja":"japanese",15"ar":"arabic",16"cs":"czech",17"ru":"russian",18"uk":"ukraine",19"et":"estonian",20"bho":"bhojpuri",21"sr_latin":"serbian",22"de":"german",23}2425target_language_name = lang_name_map.get(target_lang_code,"the target language")262728prompt =(29f"Human: Please translate the following text into {target_language_name}: \n"30f"{source_text}<|im_end|>\n"31f"Assistant:"32)3334prompts_to_generate =[prompt]35print("Formatted Prompt:\n", prompt)3637sampling_params = SamplingParams(38 n=100,39 temperature=1,40 top_p=1,41 max_tokens=51242)4344outputs = llm.generate(prompts_to_generate, sampling_params)4546# The 'outputs' list contains one item for each prompt.47for output in outputs:48 prompt_used = output.prompt
49print(f"\n--- Candidates for source: '{source_text}' ---")5051# Each output object contains 'n' generated sequences.52for i, candidate inenumerate(output.outputs):53 generated_text = candidate.text.strip()54print(f"Candidate {i+1}: {generated_text}")
We used compliance checking algorithms during the training process, to ensure the compliance of the trained model(s) to the best of our ability. Due to complex data and the diversity of language model usage scenarios, we cannot guarantee that the model is completely free of copyright issues or improper content. If you believe anything infringes on your rights or generates improper content, please contact us, and we will promptly address the matter.