diff --git a/FlagEmbedding/inference/reranker/decoder_only/layerwise.py b/FlagEmbedding/inference/reranker/decoder_only/layerwise.py index 8e50271f..9a3e2301 100644 --- a/FlagEmbedding/inference/reranker/decoder_only/layerwise.py +++ b/FlagEmbedding/inference/reranker/decoder_only/layerwise.py @@ -374,7 +374,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