MCPcopy
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
69def _is_peft_model(model):
70 if is_peft_available():
71 return isinstance(model, (PeftModel, PeftMixedModel))
72 return False
73
74
75def unwrap_peft_model(model):

Callers 11

unwrap_peft_modelFunction · 0.85
_prepare_for_trainingMethod · 0.85
compute_lossMethod · 0.85
_load_from_checkpointMethod · 0.85
_load_best_modelMethod · 0.85
save_modelMethod · 0.85
activate_neftuneFunction · 0.85
deactivate_neftuneFunction · 0.85

Calls 1

is_peft_availableFunction · 0.85

Tested by

no test coverage detected