[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ffb929096a
commit
7913a68e8b
1 changed files with 6 additions and 2 deletions
|
|
@ -630,7 +630,9 @@ class FastSentenceTransformer(FastModel):
|
|||
# if for_inference == True, skip Unsloth optimizations to avoid torch compile issues
|
||||
if for_inference:
|
||||
st_device = device_map
|
||||
if isinstance(st_device, dict) or (isinstance(st_device, str) and st_device in ["auto", "sequential"]):
|
||||
if isinstance(st_device, dict) or (
|
||||
isinstance(st_device, str) and st_device in ["auto", "sequential"]
|
||||
):
|
||||
st_device = None
|
||||
|
||||
st_model = SentenceTransformer(
|
||||
|
|
@ -742,7 +744,9 @@ class FastSentenceTransformer(FastModel):
|
|||
)
|
||||
|
||||
st_device = device_map
|
||||
if isinstance(st_device, dict) or (isinstance(st_device, str) and st_device in ["auto", "sequential"]):
|
||||
if isinstance(st_device, dict) or (
|
||||
isinstance(st_device, str) and st_device in ["auto", "sequential"]
|
||||
):
|
||||
st_device = None
|
||||
|
||||
st_model = SentenceTransformer(modules = modules, device = st_device)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue