Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- weiminw/heliumos_reward_score
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen2.5-3B-Instruct
|
| 7 |
+
---
|
| 8 |
+
# Model Overview
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
该模型用于对AI回复的正确性和内容可用价值的评估, 分数从0-100. 0-35可以判断为完全不可用(内容错误,与事实不符,未遵循用户的指令). 35-50(部分内容可用), 50-100(内容正确并且遵循用户的指令,可以使用). 该模型一般配合Best-of-N来使用, 对于35分以下的直接丢弃, 对于35-50分之间的,可以引入critics来修正后重新采样, 50分以上的可以直接使用.
|
| 12 |
+
该模型既可以用于Final Answer的评估, 也可以用于LLM调用Tool的评估,主要评估使用工具是否合理,参数是否正确.
|
| 13 |
+
|
| 14 |
+
**SCORE**: 0.00-100.00
|
| 15 |
+
# Usage
|
| 16 |
+
|
| 17 |
+
## Run the Inference Code
|
| 18 |
+
```python
|
| 19 |
+
import torch
|
| 20 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 21 |
+
|
| 22 |
+
model_id = "weiminw/Heliumos-RM-3B"
|
| 23 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id,padding_side="left")
|
| 24 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
| 25 |
+
model_id,
|
| 26 |
+
torch_dtype="auto",
|
| 27 |
+
device_map="auto"
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
messages = [
|
| 31 |
+
{'role': 'user', 'content': "what is 12 * 12?"},
|
| 32 |
+
{'role': 'assistant', 'content': "144"}
|
| 33 |
+
|
| 34 |
+
]
|
| 35 |
+
|
| 36 |
+
text_encoded = tokenizer.apply_chat_template(messages, return_dict=True, return_tensors="pt", tokenize=True).to("cuda:0")
|
| 37 |
+
|
| 38 |
+
score = model(**text_encoded)
|
| 39 |
+
|
| 40 |
+
print(score.logits[0]) #
|
| 41 |
+
|
| 42 |
+
```
|