diff --git a/FlagEmbedding/inference/reranker/decoder_only/lightweight.py b/FlagEmbedding/inference/reranker/decoder_only/lightweight.py index a9bea311..722b1aa6 100644 --- a/FlagEmbedding/inference/reranker/decoder_only/lightweight.py +++ b/FlagEmbedding/inference/reranker/decoder_only/lightweight.py @@ -435,7 +435,7 @@ def compute_score_single_gpu( if normalize: all_scores[i] = [sigmoid(score) for score in all_scores[i]] - if isinstance(all_scores[0], list): + if len(all_scores) == 1 and isinstance(all_scores[0], list): all_scores = all_scores[0] return all_scores