Skip to content
class

ShadowModel

extends_RefusedTuner
ShadowModel(model: nn.Module, peft_config: PeftConfig, adapter_name: str, low_cpu_mem_usage: bool = False, state_dict: dict[str, Tensor] | None = None)

The ShadowPEFT tuner: refused.

ShadowModel stands in the tuner registry (PEFT_TYPE_TO_TUNER_MAPPING) for the tuner that would apply ShadowPEFT: a parallel shadow network whose state rides the decoder loop. Its config is ShadowConfig. Building one, through get_peft_model, PeftModel.from_pretrained or the class itself, raises NotImplementedError saying why, before any model is touched.

Used by 1