diff --git a/sentence_transformers/SentenceTransformer.py b/sentence_transformers/SentenceTransformer.py index c497dadbc..5184ad854 100644 --- a/sentence_transformers/SentenceTransformer.py +++ b/sentence_transformers/SentenceTransformer.py @@ -539,9 +539,11 @@ def encode( if convert_to_tensor: convert_to_numpy = False - if output_value != "sentence_embedding": - convert_to_tensor = False - convert_to_numpy = False + # NOTE: Results in issue #3185, where the output is always a torch.Tensor, + # even when output_value is set to "token_embeddings" + # if output_value != "sentence_embedding": + # convert_to_tensor = False + # convert_to_numpy = False input_was_string = False if isinstance(sentences, str) or not hasattr(