Views
No views yet
[!NOTE] For high-throughput inference with vllm and official parsing script, please refer to our code repository.
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4MODEL_PATH = "double7/Qwen2.5-7B-MT-GRRM-Optimized"
5
6tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
7model = AutoModelForCausalLM.from_pretrained(
8 MODEL_PATH, device_map="auto", torch_dtype="auto"
9)
10
11prompt = """Translate the following text from English into Chinese. Perform a step by step analysis and output the final translation in a code block.
12
13Source text:
14```
15The grass is always greener on the other side.
16```
17"""
18
19messages = [{"role": "user", "content": prompt}]
20input_text = tokenizer.apply_chat_template(
21 messages, tokenize=False, add_generation_prompt=True
22)
23
24inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
25with torch.no_grad():
26 outputs = model.generate(
27 **inputs,
28 do_sample=False,
29 max_new_tokens=8192,
30 )
31
32print(tokenizer.decode(outputs[0], skip_special_tokens=True))1### Step-by-step Analysis
2
31. **"The grass is always greener on the other side."**: This is a well-known English idiom. A literal, word-for-word translation would be unnatural in Chinese. The core meaning is that people often feel their current situation is not as good as they perceive another person's or another situation to be.
4
52. **Identifying the Chinese equivalent**: The most common and idiomatic translation for this concept in Chinese is "这山望着那山高" (zhè shān wàngzhe nà shān gāo), which literally means "To look at the other mountain, thinking it's higher." This perfectly captures the essence of wanting what one doesn't have.
6
73. **Exploring other options**:
8 * "彼岸的草总是更绿" (Bǐ'àn de cǎo zǒngshì gèng lǜ): A more literal, poetic translation, "The grass on the other shore is always greener," which is also understandable but not as common in everyday speech as the idiom.
9 * "隔岸观火" (gé àn guān huǒ): This idiom means "to watch a fire from the other bank," implying a passive, detached, or envious observation, but it doesn't fully capture the comparison between one's own situation and another's.
10
114. **Final Selection**: "这山望着那山高" is the most idiomatic and widely used equivalent. A slightly more formal and written version is "人往高处走,水往低处流" (rén wǎng gāochù zǒu, shuǐ wǎng dīchù liú), meaning "People strive for higher ground, water flows to lower ground," which also conveys a similar message. However, "这山望着那山高" is the most direct and natural translation.
12
13### Final Translation
14
15```
16这山望着那山高。
17```| Model | WMT Zh→En (BLEURT / R1) | WMT En→Zh (BLEURT / R1) | WMT En→X (BLEURT / R1) | Seed-X Zh→En (BLEURT / R1) | Seed-X En→Zh (BLEURT / R1) |
|---|---|---|---|---|---|
| General LLMs | |||||
| Gemini-2.5-Pro | 68.66 / 92.92 | 66.00 / 91.31 | 68.87 / 90.35 | 71.59 / 89.41 | 69.19 / 86.06 |
| DeepSeek-R1-0528 | 67.78 / 92.34 | 64.87 / 89.24 | 67.72 / 88.48 | 70.92 / 87.95 | 68.23 / 84.40 |
| Qwen2.5-7B-Instruct | 67.31 / 88.49 | 59.92 / 80.51 | 58.72 / 72.51 | 66.59 / 79.23 | 62.75 / 72.37 |
| Specialized Models | |||||
| TowerInstruct-13B | 67.56 / 84.83 | 62.92 / 77.63 | 66.61 / 82.68 | 63.32 / 69.54 | 63.46 / 71.17 |
| SeedX-PPO | 69.02 / 90.47 | 67.21 / 87.98 | 68.35 / 86.04 | 69.37 / 82.47 | 68.72 / 80.56 |
| SSR-X-Zero-7B | 68.30 / 88.67 | 66.12 / 83.78 | - / - | 68.84 / 81.15 | 67.08 / 77.56 |
| Qwen2.5-7B-SFT | 67.07 / 87.78 | 59.99 / 76.98 | 57.14 / 67.91 | 67.65 / 80.91 | 62.36 / 72.42 |
| ⭐+ GRPO | 67.41 / 92.24 | 64.80 / 87.80 | 64.65 / 83.86 | 69.55 / 85.90 | 67.05 / 82.55 |
| ⭐+ GRPO w/ CLA | 67.39 / 92.09 | 63.91 / 88.29 | 64.50 / 83.71 | 69.25 / 88.58 | 67.07 / 83.33 |
1@article{yang2026grrmgrouprelativereward,
2 title={GRRM: Group Relative Reward Modeling for Machine Translation},
3 author={Sen Yang and Shanbo Cheng and Lu Xu and Jianbing Zhang and Shujian Huang},
4 year={2026},
5 eprint={2602.14028},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2602.14028},
9}