data
TunerLayerStatus
TunerLayerStatus(name: str, module_type: str, enabled: bool, active_adapters: list[str], merged_adapters: list[str], requires_grad: dict[str, GradState], available_adapters: list[str], devices: dict[str, list[str]])The state of one adapter layer.
Attributes
namestrThe layer's dotted name under the model, e.g.
"model.encoder.q_proj".module_ typestrThe layer's class as it prints, e.g.
"lora.Linear".enabledboolWhether the layer applies adapters (it runs the base alone when not).
active_ adapterslist of strThe adapters the forward pass applies.
merged_ adapterslist of strThe adapters folded into the base weight.
requires_ graddictPer adapter, whether all its parameters here train (
True), none
do (False) or some do ("irregular").available_ adapterslist of strEvery adapter the layer holds, sorted.
devicesdictPer adapter, the device types its parameters are on, sorted.
Used by 2
Class methods
2all_of(root: nn.Module)The status of every adapter slot under root, in module order.
Raises
ValueErrorroot holds no adapter layer.of(name: str, slot: _AdapterSlot)The status of slot, found at name.