Dongfu Jiang commited on
Commit
36f2044
1 Parent(s): 8f55e3b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -9
README.md CHANGED
@@ -68,19 +68,18 @@ blender.loadranker("llm-blender/PairRM") # load PairRM
68
  - Ranking a list candidate responses
69
 
70
  ```python
71
- inputs = ["hello!", "I love you!"]
72
- candidates_texts = [["get out!", "hi! nice to meet you!", "bye"],
73
  ["I love you too!", "I hate you!", "Thanks! You're a good guy!"]]
74
- ranks = blender.rank(inputs, candidates_texts, return_scores=False, batch_size=2)
75
- # ranks is a list of ranks where
76
  # ranks[i][j] represents the ranks of candidate-j for input-i
77
  """
78
  ranks -->
79
- array([[3, 1, 2], # it means "hi! nice to meet you!" ranks the 1st,
80
- "bye" ranks the 2nd, and "get out!" ranks the 3rd.
81
- [1, 3, 2]], # it means "I love you too"! ranks the the 1st,
82
- and "I hate you!" ranks the 3rd.
83
- dtype=int32)
84
  """
85
  ```
86
 
 
68
  - Ranking a list candidate responses
69
 
70
  ```python
71
+ inputs = ["hello, how are you!", "I love you!"]
72
+ candidates_texts = [["get out!", "hi! I am fine, thanks!", "bye!"],
73
  ["I love you too!", "I hate you!", "Thanks! You're a good guy!"]]
74
+ ranks = blender.rank(inputs, candidates_texts, return_scores=False, batch_size=1)
75
+ # ranks is a list of ranks
76
  # ranks[i][j] represents the ranks of candidate-j for input-i
77
  """
78
  ranks -->
79
+ array([[3, 1, 2], # it means "hi! I am fine, thanks!" ranks the 1st, "bye" ranks the 2nd, and "get out!" ranks the 3rd.
80
+ [1, 3, 2]], # it means "I love you too"! ranks the the 1st, and "I hate you!" ranks the 3rd.
81
+ dtype=int32)
82
+
 
83
  """
84
  ```
85