Shortcuts

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources