[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
eccb515b9c
commit
1dfb9e9505
1 changed files with 6 additions and 2 deletions
|
|
@ -106,6 +106,7 @@ class FastSentenceTransformer(FastModel):
|
|||
Supports transformers 4.
|
||||
"""
|
||||
from transformers.models.mpnet import modeling_mpnet
|
||||
|
||||
# add supports_gradient_checkpointing flag
|
||||
modeling_mpnet.MPNetModel.supports_gradient_checkpointing = True
|
||||
|
||||
|
|
@ -200,6 +201,7 @@ class FastSentenceTransformer(FastModel):
|
|||
Supports transformers 5.
|
||||
"""
|
||||
from transformers.models.mpnet import modeling_mpnet
|
||||
|
||||
# add supports_gradient_checkpointing flag
|
||||
modeling_mpnet.MPNetModel.supports_gradient_checkpointing = True
|
||||
|
||||
|
|
@ -700,8 +702,10 @@ class FastSentenceTransformer(FastModel):
|
|||
)
|
||||
|
||||
if not has_modules_json and load_in_4bit:
|
||||
print("Unsloth: No modules.json found. This is not a sentence-transformers model.\n"
|
||||
"Forcing 16-bit loading to simplify merged model saving.")
|
||||
print(
|
||||
"Unsloth: No modules.json found. This is not a sentence-transformers model.\n"
|
||||
"Forcing 16-bit loading to simplify merged model saving."
|
||||
)
|
||||
load_in_4bit = False
|
||||
load_in_16bit = True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue