Improve model card: Add description, links, license, update pipeline tag, and sample usage

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +124 -145
README.md CHANGED
@@ -1,207 +1,186 @@
1
  ---
2
  base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
3
- library_name: peft
4
- pipeline_tag: text-generation
 
5
  tags:
6
  - base_model:adapter:deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
7
  - lora
 
8
  - transformers
 
9
  ---
10
 
11
- # Model Card for Model ID
12
-
13
- <!-- Provide a quick summary of what the model is/does. -->
14
-
15
 
 
16
 
17
  ## Model Details
18
 
19
  ### Model Description
20
 
21
- <!-- Provide a longer summary of what this model is. -->
22
-
23
-
24
 
25
- - **Developed by:** [More Information Needed]
26
- - **Funded by [optional]:** [More Information Needed]
27
- - **Shared by [optional]:** [More Information Needed]
28
- - **Model type:** [More Information Needed]
29
- - **Language(s) (NLP):** [More Information Needed]
30
- - **License:** [More Information Needed]
31
- - **Finetuned from model [optional]:** [More Information Needed]
32
 
33
- ### Model Sources [optional]
 
 
 
 
34
 
35
- <!-- Provide the basic links for the model. -->
36
 
37
- - **Repository:** [More Information Needed]
38
- - **Paper [optional]:** [More Information Needed]
39
- - **Demo [optional]:** [More Information Needed]
40
 
41
  ## Uses
42
 
43
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
-
45
  ### Direct Use
46
 
47
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
-
49
- [More Information Needed]
50
-
51
- ### Downstream Use [optional]
52
-
53
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
-
55
- [More Information Needed]
56
 
57
  ### Out-of-Scope Use
58
 
59
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
-
61
- [More Information Needed]
62
 
63
  ## Bias, Risks, and Limitations
64
 
65
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
-
67
- [More Information Needed]
68
 
69
  ### Recommendations
70
 
71
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
-
73
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
 
75
  ## How to Get Started with the Model
76
 
77
- Use the code below to get started with the model.
78
-
79
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  ## Training Details
82
 
83
  ### Training Data
84
 
85
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
86
-
87
- [More Information Needed]
 
88
 
89
  ### Training Procedure
90
 
91
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
-
93
- #### Preprocessing [optional]
94
-
95
- [More Information Needed]
96
-
97
 
98
  #### Training Hyperparameters
99
 
100
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
-
102
- #### Speeds, Sizes, Times [optional]
103
-
104
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
-
106
- [More Information Needed]
107
 
108
  ## Evaluation
109
 
110
- <!-- This section describes the evaluation protocols and provides the results. -->
111
-
112
  ### Testing Data, Factors & Metrics
113
 
114
  #### Testing Data
115
 
116
- <!-- This should link to a Dataset Card if possible. -->
117
-
118
- [More Information Needed]
119
-
120
- #### Factors
121
-
122
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
-
124
- [More Information Needed]
125
 
126
  #### Metrics
127
 
128
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
-
130
- [More Information Needed]
131
 
132
  ### Results
133
 
134
- [More Information Needed]
135
-
136
- #### Summary
137
-
138
-
139
-
140
- ## Model Examination [optional]
141
-
142
- <!-- Relevant interpretability work for the model goes here -->
143
-
144
- [More Information Needed]
145
-
146
- ## Environmental Impact
147
-
148
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
-
150
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
-
152
- - **Hardware Type:** [More Information Needed]
153
- - **Hours used:** [More Information Needed]
154
- - **Cloud Provider:** [More Information Needed]
155
- - **Compute Region:** [More Information Needed]
156
- - **Carbon Emitted:** [More Information Needed]
157
-
158
- ## Technical Specifications [optional]
159
-
160
- ### Model Architecture and Objective
161
-
162
- [More Information Needed]
163
-
164
- ### Compute Infrastructure
165
-
166
- [More Information Needed]
167
-
168
- #### Hardware
169
-
170
- [More Information Needed]
171
-
172
- #### Software
173
-
174
- [More Information Needed]
175
-
176
- ## Citation [optional]
177
-
178
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
-
180
- **BibTeX:**
181
-
182
- [More Information Needed]
183
-
184
- **APA:**
185
-
186
- [More Information Needed]
187
-
188
- ## Glossary [optional]
189
-
190
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
-
192
- [More Information Needed]
193
-
194
- ## More Information [optional]
195
-
196
- [More Information Needed]
197
-
198
- ## Model Card Authors [optional]
199
-
200
- [More Information Needed]
201
 
202
- ## Model Card Contact
203
 
204
- [More Information Needed]
205
- ### Framework versions
206
 
207
- - PEFT 0.16.0
 
 
 
 
 
 
 
 
1
  ---
2
  base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
3
+ library_name: transformers
4
+ license: apache-2.0
5
+ pipeline_tag: text-classification
6
  tags:
7
  - base_model:adapter:deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
8
  - lora
9
+ - peft
10
  - transformers
11
+ - reward-model
12
  ---
13
 
14
+ # Model Card for Rethinking Reward Models for Multi-Domain Test-Time Scaling
 
 
 
15
 
16
+ This repository contains checkpoints for reward models presented in the paper [Rethinking Reward Models for Multi-Domain Test-Time Scaling](https://huggingface.co/papers/2510.00492).
17
 
18
  ## Model Details
19
 
20
  ### Model Description
21
 
22
+ The reliability of large language models (LLMs) during test-time scaling is often assessed with external verifiers or reward models that distinguish correct reasoning from flawed logic. This work presents the first unified evaluation of four reward model variants: discriminative ORM (DisORM), discriminative PRM (DisPRM), and generative ORM (GenORM), and generative PRM (GenPRM), across 14 diverse domains.
 
 
23
 
24
+ Contrary to conventional wisdom, the paper finds that (i) DisORM performs on par with DisPRM, (ii) GenPRM is not competitive, and (iii) overall, **GenORM is the most robust**, yielding significant and consistent gains across every tested domain. These findings challenge the prevailing assumption that fine-grained supervision is always better and support generative outcome verification for multi-domain deployment. This particular model is a LoRA adapter for a generative Outcome Reward Model (gORM), specifically built on the `deepseek-ai/DeepSeek-R1-Distill-Qwen-14B` backbone.
 
 
 
 
 
 
25
 
26
+ - **Developed by:** Dong Bok Lee, Seanie Lee, Sangwoo Park, Minki Kang, Jinheon Baek, Dongki Kim, Dominik Wagner, Jiongdao Jin, Heejun Lee, Tobias Bocklet, Jinyu Wang, Jingjing Fu, Sung Ju Hwang, Jiang Bian, Lei Song.
27
+ - **Model type:** Generative Outcome Reward Model (LoRA Adapter).
28
+ - **Language(s) (NLP):** English
29
+ - **License:** Apache-2.0
30
+ - **Finetuned from model:** [deepseek-ai/DeepSeek-R1-Distill-Qwen-14B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B)
31
 
32
+ ### Model Sources
33
 
34
+ - **Repository:** [https://github.com/db-Lee/Multi-RM](https://github.com/db-Lee/Multi-RM)
35
+ - **Paper:** [https://huggingface.co/papers/2510.00492](https://huggingface.co/papers/2510.00492)
 
36
 
37
  ## Uses
38
 
 
 
39
  ### Direct Use
40
 
41
+ This model is intended for use as an external verifier or reward model to assess the reliability and quality of reasoning provided by other Large Language Models (LLMs). It can be directly applied to evaluate final answers in various tasks and domains, generating a critique or rationale for its assessment.
 
 
 
 
 
 
 
 
42
 
43
  ### Out-of-Scope Use
44
 
45
+ This model is specifically trained as a reward model for evaluating LLM reasoning. It is not intended for general-purpose text generation, conversational tasks, or other natural language processing applications outside of assessing LLM outputs.
 
 
46
 
47
  ## Bias, Risks, and Limitations
48
 
49
+ The paper highlights that Process Reward Model (PRM)-style stepwise scoring can inherit label noise from LLM auto-labeling and has difficulty evaluating long reasoning trajectories, including those involving self-correcting reasoning. While Generative Outcome Reward Models (gORM) like this one show more robustness, users should be aware that any reward model's judgments are influenced by its training data and may reflect inherent biases or limitations.
 
 
50
 
51
  ### Recommendations
52
 
53
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Critical evaluation of the model's outputs is recommended, especially when deploying in new domains or high-stakes applications.
 
 
54
 
55
  ## How to Get Started with the Model
56
 
57
+ To get started, first set up your environment as recommended by the authors:
58
+
59
+ ```bash
60
+ conda create -n multi-rm python=3.10.14
61
+ conda activate multi-rm
62
+ pip install -r requirements.txt
63
+ pip install flash-attn --no-build-isolation
64
+ ```
65
+
66
+ For inference with the generative Outcome Reward Models (gORM), you can use the LoRA-merged versions available on the Hugging Face Hub (e.g., `dongboklee/gORM-14B-merged`). The following Python snippet demonstrates how to load and use such a merged model with the `transformers` library to generate a reward rationale:
67
+
68
+ ```python
69
+ import torch
70
+ from transformers import AutoTokenizer, AutoModelForCausalLM
71
+
72
+ # Load the LoRA-merged gORM-14B model
73
+ # The "merged" version is directly loadable with AutoModelForCausalLM
74
+ model_id = "dongboklee/gORM-14B-merged"
75
+ model = AutoModelForCausalLM.from_pretrained(
76
+ model_id,
77
+ torch_dtype=torch.bfloat16, # Use bfloat16 for better performance if supported
78
+ device_map="auto"
79
+ )
80
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
81
+
82
+ # Ensure pad_token_id is set for generation
83
+ if tokenizer.pad_token_id is None:
84
+ tokenizer.pad_token_id = tokenizer.eos_token_id
85
+
86
+ # Example input: A chain-of-thought (CoT) response to be evaluated
87
+ # In a real scenario, this would come from your dataset or LLM output.
88
+ example_reasoning = (
89
+ "Question: What is 2+2? Reasoning: I will add the numbers. 2 plus 2 equals 4. "
90
+ "Final Answer: 4"
91
+ )
92
+
93
+ messages = [
94
+ {"role": "user", "content": f"Please evaluate the following reasoning:\
95
+ {example_reasoning}"}
96
+ ]
97
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
98
+
99
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
100
+
101
+ # Generate the reward/evaluation from the model
102
+ with torch.no_grad():
103
+ output_ids = model.generate(
104
+ **inputs,
105
+ max_new_tokens=128,
106
+ do_sample=False,
107
+ temperature=0.7,
108
+ top_p=0.9,
109
+ eos_token_id=tokenizer.eos_token_id,
110
+ pad_token_id=tokenizer.pad_token_id
111
+ )
112
+
113
+ response = tokenizer.decode(output_ids[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
114
+ print(f"Generated Reward Rationale:\
115
+ {response}")
116
+ ```
117
+
118
+ For more detailed usage, including training and evaluation scripts, or working with non-merged LoRA adapters (which require `peft` for loading before merging), please refer to the [GitHub repository](https://github.com/db-Lee/Multi-RM). The repository also provides CLI commands for inference like:
119
+
120
+ ```bash
121
+ # Example inference for gORM / gPRM (using the merged model)
122
+ # Replace [TEST] with test, test_smollm, etc.
123
+ # Replace [REWARD_RESULTS] with your desired output directory.
124
+ python -m generative.get_reward \
125
+ --data_path dongboklee/[TEST] \
126
+ --model_id dongboklee/gORM-14B-merged \
127
+ --output_dir ./[REWARD_RESULTS]/gORM-14B-[TEST] \
128
+ --task_type gORM \
129
+ --category all
130
+ ```
131
 
132
  ## Training Details
133
 
134
  ### Training Data
135
 
136
+ The models were trained on several multi-domain datasets, which are publicly available on Hugging Face:
137
+ - **Discriminative ORM/PRM**: Trained on [`dongboklee/train`](https://huggingface.co/datasets/dongboklee/train) (mostly adapted from [VersaPRM](https://github.com/UW-Madison-Lee-Lab/VersaPRM)).
138
+ - **Generative ORM (gORM)**: Trained on [`dongboklee/train_gORM`](https://huggingface.co/datasets/dongboklee/train_gORM) (generated by [QwQ-32B](https://huggingface.co/Qwen/QwQ-32B)).
139
+ - **Generative PRM (gPRM)**: Trained on [`dongboklee/train_gPRM`](https://huggingface.co/datasets/dongboklee/train_gPRM) (generated by [QwQ-32B](https://huggingface.co/Qwen/QwQ-32B)).
140
 
141
  ### Training Procedure
142
 
143
+ Models are trained using the PEFT (LoRA) framework, leveraging `accelerate` for distributed training. Detailed training scripts and configurations can be found in the `./configs` directory of the [GitHub repository](https://github.com/db-Lee/Multi-RM).
 
 
 
 
 
144
 
145
  #### Training Hyperparameters
146
 
147
+ From `adapter_config.json`:
148
+ - **`peft_type`**: LORA
149
+ - **`lora_alpha`**: 32
150
+ - **`r` (LoRA rank)**: 16
151
+ - **`lora_dropout`**: 0.1
152
+ - **`target_modules`**: `down_proj`, `k_proj`, `v_proj`, `q_proj`, `up_proj`, `gate_proj`, `o_proj`
 
153
 
154
  ## Evaluation
155
 
 
 
156
  ### Testing Data, Factors & Metrics
157
 
158
  #### Testing Data
159
 
160
+ The models were evaluated on diverse multi-domain test datasets with Chain-of-Thoughts (CoTs) generated by various LLMs. These datasets are available on Hugging Face:
161
+ - [`dongboklee/test`](https://huggingface.co/datasets/dongboklee/test): CoTs (N=128) generated by [Llama3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct).
162
+ - [`dongboklee/test_smollm`](https://huggingface.co/datasets/dongboklee/test_smollm): CoTs (N=16) generated by [SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B).
163
+ - [`dongboklee/test_qwen`](https://huggingface.co/datasets/dongboklee/test_qwen): CoTs (N=16) generated by [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct).
164
+ - [`dongboklee/test_gemma`](https://huggingface.co/datasets/dongboklee/test_gemma): CoTs (N=16) generated by [gemma-2-9b-it](https://huggingface.co/google/gemma-2-9b-it).
165
+ - [`dongboklee/test_llama`](https://huggingface.co/datasets/dongboklee/test_llama): CoTs (N=16) generated by [Llama-3.1-70B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct).
 
 
 
166
 
167
  #### Metrics
168
 
169
+ The evaluation primarily focused on the reward models' ability to accurately distinguish correct reasoning. Details on specific metrics and evaluation protocols can be found in the [GitHub repository](https://github.com/db-Lee/Multi-RM) and the accompanying paper.
 
 
170
 
171
  ### Results
172
 
173
+ The paper demonstrates that Generative Outcome Reward Models (GenORM) are the most robust variant, yielding significant and consistent gains across every tested domain. This challenges the assumption that fine-grained supervision (like PRMs) is always superior. For comprehensive results and analysis, please refer to the [paper](https://huggingface.co/papers/2510.00492).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
+ ## Citation
176
 
177
+ If you find this work helpful or inspiring, please feel free to cite it:
 
178
 
179
+ ```bibtex
180
+ @article{multi-rm,
181
+ title = {Rethinking Reward Models for Multi-Domain Test-Time Scaling},
182
+ author = {Lee, Dong Bok and Lee, Seanie and Park, Sangwoo and Kang, Minki and Baek, Jinheon and Kim, Dongki and Wagner, Dominik and Jin, Jiongdao and Lee, Heejun and Bocklet, Tobias and Wang, Jinyu and Fu, Jingjing and Hwang, Sung Ju and Bian, Jiang and Song, Lei},
183
+ journal = {arXiv preprint arXiv:2510.00492},
184
+ year = {2025}
185
+ }
186
+ ```