Skip to content

Commit 065de5f

Browse files
committed
update reranker
1 parent 13e1293 commit 065de5f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/inference/reranker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ reranker = LightWeightFlagLLMReranker(
164164
devices=['cuda:1']
165165
) # Setting use_fp16 to True speeds up computation with a slight performance degradation
166166

167-
score = reranker.compute_score(['query', 'passage'], cutoff_layers=[28], compress_ratio=2, compress_layer=[24, 40]) # Adjusting 'cutoff_layers' to pick which layers are used for computing the score.
167+
score = reranker.compute_score(['query', 'passage'], cutoff_layers=[28], compress_ratio=2, compress_layers=[24, 40]) # Adjusting 'cutoff_layers' to pick which layers are used for computing the score.
168168
print(score)
169169

170-
scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']], cutoff_layers=[28], compress_ratio=2, compress_layer=[24, 40])
170+
scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']], cutoff_layers=[28], compress_ratio=2, compress_layers=[24, 40])
171171
print(scores)
172172
```
173173

0 commit comments

Comments
 (0)