mirror of https://github.com/InternLM/InternLM
update
parent
d474c10dae
commit
d4d54639c6
|
@ -219,8 +219,8 @@ class TestReward:
|
||||||
# batch inference, get multiple scores at once
|
# batch inference, get multiple scores at once
|
||||||
scores = model.get_scores(tokenizer, [chat_1, chat_2])
|
scores = model.get_scores(tokenizer, [chat_1, chat_2])
|
||||||
print('scores: ', scores)
|
print('scores: ', scores)
|
||||||
assert scores[0][0] > 0
|
assert scores[0] > 0
|
||||||
assert scores[1][0] < 0
|
assert scores[1] < 0
|
||||||
|
|
||||||
# compare whether chat_1 is better than chat_2
|
# compare whether chat_1 is better than chat_2
|
||||||
compare_res = model.compare(tokenizer, chat_1, chat_2)
|
compare_res = model.compare(tokenizer, chat_1, chat_2)
|
||||||
|
|
Loading…
Reference in New Issue