Skip to content

Commit

Permalink
Embeddings are sent back to the CPU, so they can be converted to nump…
Browse files Browse the repository at this point in the history
…y arrays
  • Loading branch information
x-tabdeveloping committed Feb 13, 2024
1 parent f9b68af commit e154c39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/seb/registered_models/e5_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def encode(
)
batched_embeddings.append(embeddings)

return torch.cat(batched_embeddings)
return torch.cat(batched_embeddings).to("cpu")

def encode_corpus(self, corpus: list[dict[str, str]], **kwargs: Any):
if isinstance(corpus, dict):
Expand Down

0 comments on commit e154c39

Please sign in to comment.