PSOFT
5 memberslucid.peft.tuners.psoftlucid.peft.tuners.psoft — PSOFT: orthogonal fine-tuning inside the weight's principal subspace.
PSOFT (Wu et al., 2025, arXiv:2505.11235 — Efficient Orthogonal Fine-Tuning with Principal Subspace Adaptation) rotates a weight inside its principal subspace only: the top- singular directions are frozen as two factors, and an matrix between them, kept orthogonal by a Cayley parameterisation and relaxed by two diagonal scalings, is all that trains (about numbers per layer, whatever the layer's width). The update starts at zero and folds into the weight. Pick it for orthogonal fine-tuning that costs one small matrix per layer instead of a block-diagonal one.
Where the reference library keeps them, so isinstance(m, PsoftLayer) and from lucid.peft.tuners.psoft import PsoftConfig, Linear read as they do there. One layer type for the one
module the method adapts, nn.Linear; OrthLayer is the trained matrix. PsoftConfig and
PsoftModel are here and exported from lucid.peft. Importing the package registers the method
(its config under PeftType.PSOFT, its tuner and layer), which is what makes get_peft_model and
PeftModel.from_pretrained know it.
Wu, Fei, et al. "Efficient Orthogonal Fine-Tuning with Principal Subspace Adaptation." [arXiv:2505.11235](https://arxiv.org/abs/2505.11235), 2025.
PSOFT (Wu et al., 2025, arXiv:2505.11235 — Efficient Orthogonal Fine-Tuning with Principal Subspace
Adaptation, section 4) rotates a weight inside its principal subspace only. An SVD of the weight gives its top-r
directions as frozen factors and , and only an matrix between them
is trained:
Classes
PsoftConfig9 methodsHow lucid.peft.get_peft_model adapts a model with PSOFT.
LinearAn nn.Linear with a PSOFT update: .
PsoftLayer20 methodsAdapter bookkeeping and the principal-subspace update shared by the PSOFT layers.
PsoftModel15 methodsA network whose linear layers rotate their weights inside the principal subspace, and the tools to undo that.
OrthLayer4 methodsThe matrix , the parameters that make it, and how to apply it.