do QAT preparation for fast path
This commit is contained in:
parent
d5df1f8463
commit
e73632f841
1 changed files with 6 additions and 0 deletions
|
|
@ -1399,6 +1399,12 @@ class FastSentenceTransformer(FastModel):
|
|||
# Apply PEFT directly (not through FastModel)
|
||||
peft_model = peft_get_peft_model(inner_model, lora_config)
|
||||
|
||||
# Apply QAT if specified
|
||||
qat_scheme = kwargs.get("qat_scheme", None)
|
||||
if qat_scheme is not None:
|
||||
from ._utils import _prepare_model_for_qat
|
||||
peft_model = _prepare_model_for_qat(peft_model, qat_scheme)
|
||||
|
||||
# Determine compile mode (only if not using gradient checkpointing)
|
||||
compile_mode = getattr(model, "_compile_mode", "default")
|
||||
# Re-enable torch.compile if gradient checkpointing was requested but couldn't be enabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue