YuLu0713 commited on
Commit
4a941c2
·
verified ·
1 Parent(s): 5e41b0d

Update RM_demo.py

Browse files
Files changed (1) hide show
  1. RM_demo.py +2 -2
RM_demo.py CHANGED
@@ -48,7 +48,7 @@ if __name__ == '__main__':
48
  local_model_dir = "Your local model dir"
49
  model_dir = f"{local_model_dir}/Seed-X-RM-7B"
50
  prompt = ["Translate the following English sentence into Chinese:\nMay the force be with you <zh>"]
51
- candidate = ["愿原力与你同在"]
52
  model = RewardModel(model_dir)
53
- scores = model.score(prompt, candidate) # output [score]
54
  print(scores)
 
48
  local_model_dir = "Your local model dir"
49
  model_dir = f"{local_model_dir}/Seed-X-RM-7B"
50
  prompt = ["Translate the following English sentence into Chinese:\nMay the force be with you <zh>"]
51
+ candidate = ["愿原力与你同在","愿力量与你同在"]
52
  model = RewardModel(model_dir)
53
+ scores = model.score(prompt, candidate) # output [1.46875, -0.376953125]
54
  print(scores)