espnet2.layers.create_adapter.create_adapter
Less than 1 minute
espnet2.layers.create_adapter.create_adapter
espnet2.layers.create_adapter.create_adapter(model: Module, adapter: str, adapter_conf: dict)
Create adapter for the base model.
- Parameters:
- model (torch.nn.Module) – Base model to be adapted.
- adapter_type (str) – Name of adapter
- adapter_conf (dict) – Configuration for the adapter e.g. {“rank”: 8, “alpha”: 8, …} for lora