set_trainable_params¶
- torchtune.modules.peft.set_trainable_params(model: Module, adapter_params: Dict[str, Any]) None [source]¶
Set trainable parameters for an nn.Module based on a state dict of adapter parameters.
- Parameters:
model (nn.Module) – Instance of model class containing some adapter params.
adapter_params (Dict[str, Any]) – State dict mapping adapter key names to their respective nn.Parameters (i.e. outputs of
get_adapter_params()
.)
- Returns:
None