Skip to content

Commit a740003

Browse files
authored
Update flag_models.py
1 parent 82b0d01 commit a740003

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

FlagEmbedding/flag_models.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ def __init__(
4545

4646
self.normalize_embeddings = normalize_embeddings
4747

48-
if torch.cuda.is_available():
49-
self.device = torch.device("cuda")
50-
elif torch.backends.mps.is_available():
51-
self.device = torch.device("mps")
52-
else:
53-
self.device = torch.device("cpu")
54-
self.model.half()
55-
self.model = self.model.to(self.device)
56-
5748
if torch.cuda.is_available():
5849
self.device = torch.device("cuda")
5950
elif torch.backends.mps.is_available():

0 commit comments

Comments
 (0)