Skip to content
class

BoneLayer

extendsMissLayer
BoneLayer(base_layer: nn.Module, adapter_name: str, config: C)

Adapter bookkeeping shared by the Bone layers: a MiSS layer whose block is bone_block.

Parameters

base_layernn.Module
The module to adapt; kept as base_layer, its parameters shared.
adapter_namestr
Name of the adapter created at once.
The adapter's config.

Raises

TypeError
base_layer is not the module type the layer class adapts.
ValueError
config.r exceeds the layer's input size, the "bat" variant needs sizes divisible by r, or base_layer builds parameters on its first input.

Used by 2