Update README.md
#4
by
johnowhitaker
- opened
README.md
CHANGED
@@ -39,7 +39,7 @@ We use the training script at `https://github.com/WeiXiongUST/RLHF-Reward-Model
|
|
39 |
{"role": "user", "content": "I'd like to show off how chat templating works!"},
|
40 |
]
|
41 |
|
42 |
-
test_texts = [
|
43 |
pipe_outputs = rm_pipe(test_texts, **pipe_kwargs)
|
44 |
rewards = [output[0]["score"] for output in pipe_outputs]
|
45 |
```
|
|
|
39 |
{"role": "user", "content": "I'd like to show off how chat templating works!"},
|
40 |
]
|
41 |
|
42 |
+
test_texts = [rm_tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=False).replace(rm_tokenizer.bos_token, "")]
|
43 |
pipe_outputs = rm_pipe(test_texts, **pipe_kwargs)
|
44 |
rewards = [output[0]["score"] for output in pipe_outputs]
|
45 |
```
|