DEFT
4 memberslucid.peft.tuners.deftlucid.peft.tuners.deft — DEFT: knowledge injected after removing a learned subspace of the weight.
DEFT (Kumar et al., 2025, arXiv:2509.22793 — Decompositional Efficient Fine-Tuning) removes a
learned subspace from the weight and injects new knowledge into it through a residual projection,
. The projector comes from a learned direction matrix by a
ReLU or a QR decomposition; para=True keeps the removal alone (PaRa). The update reads the
weight, so a merge keeps the weight it was folded into and an unmerge gives it back exactly. Pick
it for editing what a layer already encodes, rather than only adding to it, or for long
fine-tunes that must keep the base model's instruction following.
Where the reference library keeps them, so isinstance(m, DeftLayer) and from lucid.peft.tuners.deft import DeftConfig, Linear read as they do there. One layer type for the
one module the method adapts, nn.Linear. DeftConfig and DeftModel are here and
exported from lucid.peft. Importing the package registers the method (its config under
PeftType.DEFT, its tuner and layer), which is what makes get_peft_model and
PeftModel.from_pretrained know it.
Kumar, Komal, et al. "DEFT: Decompositional Efficient Fine-Tuning for Text-to-Image Models." [arXiv:2509.22793](https://arxiv.org/abs/2509.22793), 2025.
DEFT (Kumar et al., 2025, arXiv:2509.22793 — Decompositional Efficient Fine-Tuning) injects knowledge through a residual projection. For a frozen weight it learns a direction matrix and an injection matrix and uses
Classes
DeftConfig9 methodsHow lucid.peft.get_peft_model adapts a model with DEFT.
DeftLayer20 methodsAdapter bookkeeping and the subspace edit shared by the DEFT layers.
LinearAn nn.Linear with a DEFT update: .
DeftModel15 methodsA model with DEFT layers in it, and the tools to take them out again.