Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/huggingface/transformers
/ _is_peft_model
Function
_is_peft_model
src/transformers/trainer_utils.py:69–72 ·
view source on GitHub ↗
(model)
Source
from the content-addressed store, hash-verified
67
68
69
def
_is_peft_model(model):
70
if
is_peft_available():
71
return
isinstance(model, (PeftModel, PeftMixedModel))
72
return
False
73
74
75
def
unwrap_peft_model(model):
Callers
11
unwrap_peft_model
Function · 0.85
validate_quantization_for_training
Function · 0.85
_set_signature_columns_if_needed
Method · 0.85
_prepare_for_training
Method · 0.85
compute_loss
Method · 0.85
_save_optimizer_and_scheduler
Method · 0.85
_load_from_checkpoint
Method · 0.85
_load_best_model
Method · 0.85
save_model
Method · 0.85
activate_neftune
Function · 0.85
deactivate_neftune
Function · 0.85
Calls
1
is_peft_available
Function · 0.85
Tested by
no test coverage detected