class
Linear
extends
TrainableTokensLayerLinear(base_layer: nn.Module, adapter_name: str, config: C)Implementing kernel
C++ engine symbols that back this Python API.An nn.Linear whose weight rows are trained: an output head tied to the embedding, F.linear(x, E').
Parameters
base_ layernn.LinearThe head to adapt; the other parameters are those of
TrainableTokensLayer.adapter_ namestrName of the adapter created at once.
configTrainableTokensConfigThe adapter's config; its
token_indices are this layer's.