We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b0d01 commit a740003Copy full SHA for a740003
1 file changed
FlagEmbedding/flag_models.py
@@ -45,15 +45,6 @@ def __init__(
45
46
self.normalize_embeddings = normalize_embeddings
47
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
-
57
if torch.cuda.is_available():
58
self.device = torch.device("cuda")
59
elif torch.backends.mps.is_available():
0 commit comments