Views
No views yet
| Model | Parameters | RewardBench | RM-Bench | RMB | Average |
|---|---|---|---|---|---|
| Qwen3-Nemotron-8B-BRRM | 8B | 91.0 | 85.0 | 71.8 | 82.6 |
| Qwen3-Nemotron-14B-BRRM | 14B | 92.1 | 85.9 | 74.7 | 84.2 |
Input: User query + Two candidate responses
Output:
1. Selected critical dimensions (e.g., "Logical Reasoning", "Computational Precision")
2. Initial issue detection for each responseInput: Turn 1 results + Evaluation hierarchy
Output: Final comparative judgment and preference ranking1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# Load model and tokenizer
5model_name = "nvidia/Qwen3-Nemotron-8B-BRRM" # or nvidia/Qwen3-Nemotron-14B-BRRM
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 torch_dtype=torch.bfloat16,
9 device_map="auto"
10)
11tokenizer = AutoTokenizer.from_pretrained(model_name)
12
13# Example usage
14context = "What is 2+2?"
15response1 = "2+2=4"
16response2 = "2+2=5"
17
18# Format Turn 1: Adaptive Branching
19turn1_prompt = f"""You are a response quality evaluator. Given the context and two responses, select the most important cognitive abilities and analyze critical issues.
20
21**Context:**
22{context}
23
24**Responses:**
25[The Begin of Response 1]
26{response1}
27[The End of Response 1]
28
29[The Begin of Response 2]
30{response2}
31[The End of Response 2]
32
33**Output Format:**
34[Quality Assessment Focus]
35Choose 1-3 abilities: Information Accuracy, Computational Precision, Logical Reasoning, Implementation Capability, Safety Awareness, Response Completeness, Instruction Adherence, Communication Clarity.
36[End of Quality Assessment Focus]
37
38[Quality Analysis for Response 1]
39- Critical Issues: [List specific issues or "None identified"]
40[End of Quality Analysis for Response 1]
41
42[Quality Analysis for Response 2]
43- Critical Issues: [List specific issues or "None identified"]
44[End of Quality Analysis for Response 2]"""
45
46# Generate Turn 1
47messages = [{"role": "user", "content": turn1_prompt}]
48input_ids = tokenizer.apply_chat_template(
49 messages,
50 return_tensors="pt",
51 add_generation_prompt=True
52).to(model.device)
53outputs = model.generate(
54 input_ids,
55 max_new_tokens=8192,
56 temperature=1.0,
57 top_p=0.95,
58 top_k=20,
59 do_sample=True,
60 pad_token_id=tokenizer.eos_token_id
61)
62turn1_response = tokenizer.decode(outputs[0][input_ids.shape[1]:], skip_special_tokens=False)
63
64
65# Format Turn 2: Branch-Conditioned Rethinking
66turn2_prompt = f"""You are making final comparative judgments using established evaluation priorities.
67
68**Evaluation Hierarchies:**
69- **Accuracy-Critical**: Correctness > Process > Presentation
70- **Creative/Open-Ended**: User Intent > Content Quality > Creativity
71- **Instruction-Following**: Adherence > Content > Clarity
72
73[The Begin of Analysis on Response 1]
74[Apply appropriate evaluation hierarchy]
75[The End of Analysis on Response 1]
76
77[The Begin of Analysis on Response 2]
78[Apply appropriate evaluation hierarchy]
79[The End of Analysis on Response 2]
80
81[The Begin of Ranking Score]
82\\boxed{{1 or 2}}
83[The End of Ranking Score]"""
84
85# Generate Turn 2
86messages.append({"role": "assistant", "content": turn1_response})
87messages.append({"role": "user", "content": turn2_prompt})
88input_ids = tokenizer.apply_chat_template(
89 messages,
90 return_tensors="pt",
91 add_generation_prompt=True
92).to(model.device)
93outputs = model.generate(
94 input_ids,
95 max_new_tokens=8192,
96 temperature=1.0,
97 top_p=0.95,
98 top_k=20,
99 do_sample=True,
100 pad_token_id=tokenizer.eos_token_id
101)
102final_response = tokenizer.decode(outputs[0][input_ids.shape[1]:], skip_special_tokens=False)1@misc{jiao2025thinktwicebranchandrethinkreasoning,
2 title={Think Twice: Branch-and-Rethink Reasoning Reward Model},
3 author={Yizhu Jiao and Jiaqi Zeng and Julien Veron Vialard and Oleksii Kuchaiev and Jiawei Han and Olivier Delalleau},
4 year={2025},
5 eprint={2510.23596},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2510.23596},
9}