johnowhitaker
commited on
Commit
•
5eefeb2
1
Parent(s):
d3a830f
Update README.md
Browse filestokenizer -> rm_tokenizer (assuming this is not intentional? example usage fails without this change as tokenizer isn't defined)
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 |
```
|