mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-11 19:58:59 +08:00
fix Rerank Vector Similarity Score (#1249)
### What problem does this PR solve? #1243 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
f8fe4154e8
commit
4fcd05ad23
@ -71,6 +71,7 @@ class DefaultRerank(Base):
|
||||
res = []
|
||||
for i in range(0, len(pairs), batch_size):
|
||||
scores = self._model.compute_score(pairs[i:i + batch_size], max_length=2048)
|
||||
scores = sigmoid(np.array(scores)).tolist()
|
||||
if isinstance(scores, float): res.append(scores)
|
||||
else: res.extend(scores)
|
||||
return np.array(res), token_count
|
||||
|
Loading…
x
Reference in New Issue
Block a user