Options of KaSA, which gives the LoRA update a learned singular-value diagonal.
KaSA (Wang et al., 2024, arXiv:2412.06071) reads a LoRA update as an SVD,
, and adds two regularisers to the training
loss: an L2 penalty on weighted by beta and a semi-orthogonality penalty
weighted by gamma.
LoraConfig(kasa_config=...) is refused: the extension is not implemented.
Parameters
betafloat= 1e-4Weight of the L2 penalty on the singular values; not negative.
gammafloat= 1e-3Weight of the orthogonality penalty on the factors; not negative.
Raises
ValueErrorbeta or gamma is negative.Examples
>>> from lucid.peft import KasaConfig
>>> config = KasaConfig(beta=1e-3)
>>> config.beta, config.gamma
(0.001, 0.001)