Skip to content

Commit

Permalink
6.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BBC-Esq authored Sep 14, 2024
1 parent c883a0c commit 1b48c1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/User_Manual/SentenceTransformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,16 @@ def __init__(

super().__init__(modules)

# Ensure all tensors in the model are of the same dtype as the first tensor
# This is necessary if the first module has been given a lower precision via
# model_kwargs["torch_dtype"]. The rest of the model should be loaded in the same dtype
# See #2887 for more details
try:
dtype = next(self.parameters()).dtype
self.to(dtype)
except StopIteration:
pass

self.to(device)
self.is_hpu_graph_enabled = False

Expand Down
Binary file modified src/User_Manual/chart_chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1b48c1b

Please sign in to comment.