Implementing kernel
C++ engine symbols that back this Python API.An nn.Linear with a Uni-LoRA update: , read out of one vector.
Parameters
base_ layernn.LinearThe layer to adapt; the other parameters are those of
UniLoraLayer.adapter_ namestrName of the adapter created at once.
configUniLoraConfigThe adapter's config.
Examples
>>> import lucid
>>> import lucid.nn as nn
>>> from lucid.peft import UniLoraConfig
>>> from lucid.peft.tuners.unilora import Linear
>>> base = nn.Linear(8, 4)
>>> layer = Linear(base, "default", UniLoraConfig(r=2, theta_d_length=16, target_modules=["x"]))
>>> tuple(layer.unilora_theta_d["default"].shape)
(16,)
>>> tuple(layer.get_delta_weight("default").shape)
(4, 8)