Shortcuts

get_adapter_params

torchtune.modules.peft.get_adapter_params(model: Module) Dict[str, Parameter][source]

Return the subset of parameters from a model that correspond to an adapter. Assumes that any adapter class has defined the adapter_params() method.

Parameters:

model (nn.Module) – Instance of model class containing some adapter params.

Returns:

the subset of model’s state dict containing only adapter parameters.

Return type:

Dict[str, nn.Parameter]

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