Update README.md
Browse files
README.md
CHANGED
@@ -1,202 +1,172 @@
|
|
1 |
---
|
2 |
-
base_model: Qwen/Qwen3-
|
3 |
library_name: peft
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
# Model Card
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<!-- Provide a longer summary of what this model is. -->
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
-
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- 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. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
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).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
|
169 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
## Citation [optional]
|
172 |
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
|
197 |
## Model Card Contact
|
198 |
|
199 |
-
[
|
200 |
-
### Framework versions
|
201 |
-
|
202 |
-
- PEFT 0.14.0
|
|
|
1 |
---
|
2 |
+
base_model: Qwen/Qwen3-1.7B
|
3 |
library_name: peft
|
4 |
+
datasets:
|
5 |
+
- Skywork/Skywork-Reward-Preference-80K-v0.2
|
6 |
+
- allenai/reward-bench
|
7 |
+
language:
|
8 |
+
- en
|
9 |
---
|
10 |
|
11 |
+
# Model Card: j1-nano from Haize Labs
|
12 |
|
13 |
+
`j1-nano` from Haize Labs is a dimunitive (0.6B) but mighty reward model. It is trained on Skywork Reward Preference 80K v0.2 by scaling judge-time compute. Uniquely, `j1-nano` proposes item-level evaluation criteria and reasoning before arriving at a final evaluation score.
|
14 |
|
15 |
+
`j1-nano` is surprisingly cogent, especially given its small number of parameters.
|
16 |
|
17 |
+
`j1-nano` is competitive on RewardBench vis-à-vis **much** larger models including GPT-3.5-turbo-0125, ContextualAI/archangel_sft-dpo_llama30b, allenai/tulu-v2.5-13b-uf-rm, etc.
|
18 |
|
19 |
+
<p>
|
20 |
+
<img src=https://cdn-uploads.huggingface.co/production/uploads/64c13ee9e98a5e02c93459ee/fsCrYb_0_k9T2GsmLnrrt.png width="400">
|
21 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
## Model Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
- Base Model: `j1-nano` is a LoRA [SPCT](https://arxiv.org/abs/2504.02495)-finetune off of `Qwen/Qwen3-0.6B`
|
26 |
+
- Github: https://github.com/haizelabs/j1-micro
|
27 |
+
- Performance: by far the smallest model to achieve >60% accuracy on RewardBench
|
28 |
+
- Development Time: 1 Day
|
29 |
+
- Development Resources: 1 A100 80GB GPU
|
30 |
+
- Developer: Haize Labs Inc.
|
31 |
+
|
32 |
+
## Results
|
33 |
+
|
34 |
+
<div>
|
35 |
+
|
36 |
+
| Model | RewardBench Score |
|
37 |
+
|-------|:-------------:|
|
38 |
+
| Tulu-2-70b | 77.20% |
|
39 |
+
| Claude-3-Opus-20240229 | 80.10% |
|
40 |
+
| GPT-4o-mini-2024-07-18 | 80.10% |
|
41 |
+
| Llama-3-70B-Instruct | 77.00% |
|
42 |
+
| Qwen3-1.7B | 29.51% |
|
43 |
+
| Qwen3-1.7B (Soft Match) | 69.38% |
|
44 |
+
| **j1-micro** | **80.70%** |
|
45 |
+
|
46 |
+
<em>Table 1: RewardBench scores for `j1-micro` (1.7B). `j1-micro` is competitive with models several orders of magnitude larger.</em>
|
47 |
+
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<br>
|
51 |
+
|
52 |
+
<div>
|
53 |
+
|
54 |
+
| Model | RewardBench Score |
|
55 |
+
|-------|:-------------:|
|
56 |
+
| allenai/tulu-v2.5-13b-uf-rm | 46.1% |
|
57 |
+
| ContextualAI/archangel_sft-dpo_llama30b | 56.10% |
|
58 |
+
| Qwen/Qwen1.5-4B-Chat | 56.00% |
|
59 |
+
| GPT-3.5-turbo-0125 | 65.30% |
|
60 |
+
| Qwen3-0.6B | 0% |
|
61 |
+
| Qwen3-0.6B (Soft Match) | 0% |
|
62 |
+
| **j1-nano** | **62.35%** |
|
63 |
+
|
64 |
+
<em>Table 2: RewardBench scores for `j1-nano` (0.6B). To our knowledge, `j1-nano` is by far the smallest model to achieve >60% accuracy on RewardBench.</em>
|
65 |
+
|
66 |
+
</div>
|
67 |
+
|
68 |
+
## Using j1-nano
|
69 |
+
|
70 |
+
First, spin up a local vLLM server:
|
71 |
+
|
72 |
+
```bash
|
73 |
+
vllm serve Qwen/Qwen3-0.6B --enable-lora --lora-modules j1-nano=[path-to-snapshot]
|
74 |
+
```
|
75 |
+
|
76 |
+
|
77 |
+
Run the [test script](https://github.com/haizelabs/j1-micro/blob/master/test_j1.py) provided in the repository:
|
78 |
+
|
79 |
+
```bash
|
80 |
+
python test_j1.py --model-name j1-nano
|
81 |
+
```
|
82 |
+
|
83 |
+
The test script uses the following prompts:
|
84 |
+
|
85 |
+
```python
|
86 |
+
judge_system_prompt = """
|
87 |
+
You are an expert XML wrangler. You must respond in the following format, regardless of the input:
|
88 |
+
|
89 |
+
<specific_criteria>
|
90 |
+
...
|
91 |
+
</specific_criteria>
|
92 |
+
<analysis>
|
93 |
+
...
|
94 |
+
</analysis>
|
95 |
+
<scores>
|
96 |
+
\\boxed{{..., ...}}
|
97 |
+
</scores>
|
98 |
+
|
99 |
+
Please only respond in English.
|
100 |
+
"""
|
101 |
+
|
102 |
+
judge_prompt_template = """
|
103 |
+
You are a skilled little expert at scoring responses. You should evaluate given responses based on the given judging criteria.
|
104 |
+
Given the context of the conversation (the last round is the User's query) and multiple responses from the Assistant, you need to refer to the [General Evaluation Criteria] to score the responses. Based on the general evaluation criteria, state potential other specific criteria to the query, the weights of different criteria, and then provide an overall comprehensive score upon them.
|
105 |
+
Each score is an integer between 1 and 10, with a higher score indicating that the response meets the relevant criteria more closely. For example, a score of 1 means the response does not meet the criteria at all, a score of 6 means the response meets only some parts, and a score of 10 means the response perfectly meets the evaluation criteria.
|
106 |
+
Before scoring, please analyze step by step. Your scoring needs to be as strict as possible.
|
107 |
+
|
108 |
+
#### Evaluation Criteria ####
|
109 |
+
1. Instruction Adherence:
|
110 |
+
- Fully Adhered (9-10 points): The response fully complies with all instructions and requirements of the question.
|
111 |
+
- Partially Adhered (6-8 points): The response meets most of the instructions but has some omissions or misunderstandings.
|
112 |
+
- Basically Adhered (3-5 points): The response meets some instructions, but the main requirements are not fulfilled.
|
113 |
+
- Not Adhered (1-2 points): The response does not meet any instructions.
|
114 |
+
Example: If the question requires three examples and the response provides only one, it falls under "Partially Adhered."
|
115 |
+
2. Usefulness:
|
116 |
+
- Highly Useful (9-10 points): The response provides comprehensive and accurate information, fully addressing the issue.
|
117 |
+
- Useful but Incomplete (6-8 points): The response provides some useful information, but lacks details or accuracy.
|
118 |
+
- Limited Usefulness (3-5 points): The response offers little useful information, with most content being irrelevant or incorrect.
|
119 |
+
- Useless or Incorrect (1-2 points): The response is completely irrelevant or incorrect.
|
120 |
+
Example: If there are factual errors in the response but the overall direction is correct, it falls under "Useful but Incomplete."
|
121 |
+
3. Level of Detail:
|
122 |
+
- Very Detailed (9-10 points): The response includes ample details covering all aspects of the issue.
|
123 |
+
- Detailed but Slightly Lacking (6-8 points): The response is fairly detailed but misses some important details.
|
124 |
+
- Basically Detailed (3-5 points): The response provides some details but is not thorough enough overall.
|
125 |
+
- Not Detailed (1-2 points): The response is very brief and lacks necessary details.
|
126 |
+
Example: If the response provides only a simple conclusion without an explanation, it falls under "Not Detailed."
|
127 |
+
4. Relevance:
|
128 |
+
- Highly Relevant (9-10 points): The response is highly relevant to the question, with information closely aligned with the topic.
|
129 |
+
- Generally Relevant (6-8 points): The response is generally relevant but includes some unnecessary information.
|
130 |
+
- Partially Relevant (3-5 points): The response has a lot of content that deviates from the topic.
|
131 |
+
- Not Relevant (1-2 points): The response is completely irrelevant.
|
132 |
+
Example: If the response strays from the topic but still provides some relevant information, it falls under "Partially Relevant."
|
133 |
+
|
134 |
+
#### Conversation Context ####
|
135 |
+
{conversation_context_query}
|
136 |
+
#### Responses to be Scored ####
|
137 |
+
[The Begin of Response A]
|
138 |
+
{response_a}
|
139 |
+
[The End of Response A]
|
140 |
+
[The Begin of Response B]
|
141 |
+
{response_b}
|
142 |
+
[The End of Response B]
|
143 |
+
#### Output Format Requirements ####
|
144 |
+
|
145 |
+
Output with three lines
|
146 |
+
<specific_criteria>
|
147 |
+
[Other potential criteria specific to the query and the context, and the weights of each criteria.]
|
148 |
+
</specific_criteria>
|
149 |
+
<analysis>
|
150 |
+
[Compare different responses based on given Criteria.]
|
151 |
+
</analysis>
|
152 |
+
<scores>
|
153 |
+
[The overall comprehensive score of all responses in order, separate by comma in the boxed, e.g., \\boxed{{x, x}} if there exists 2 responses.]
|
154 |
+
</scores>
|
155 |
+
"""
|
156 |
+
```
|
157 |
|
158 |
## Citation [optional]
|
159 |
|
160 |
+
```bibtex
|
161 |
+
@misc{j1micro2025,
|
162 |
+
title = {j1-micro and j1-nano: Tiny Generalist Reward Models via Inference-Time Rubric Proposal},
|
163 |
+
author = {Haize Labs},
|
164 |
+
url = {https://github.com/haizelabs/j1-micro},
|
165 |
+
month = {May},
|
166 |
+
year = {2025}
|
167 |
+
}
|
168 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
## Model Card Contact
|
171 |
|
172 |
+
[leonardtang.me](https://leonardtang.me/)
|
|
|
|
|
|