Implementing kernel
C++ engine symbols that back this Python API.An nn.Linear with a MiSS update: .
Parameters
base_ layernn.LinearThe layer to adapt; the other parameters are those of
MissLayer.adapter_ namestrName of the adapter created at once.
configMissConfigThe adapter's config.
Examples
>>> import lucid
>>> import lucid.nn as nn
>>> from lucid.peft import MissConfig
>>> from lucid.peft.tuners.miss import Linear
>>> base = nn.Linear(8, 4)
>>> layer = Linear(base, "default", MissConfig(r=2, target_modules=["x"]))
>>> tuple(layer.miss_block["default"].shape)
(2, 4)
>>> x = lucid.randn(3, 8)
>>> bool((layer(x) == base(x)).all().item()) # the block starts at zero
True