Uni-LoRA
4 memberslucid.peft.tuners.uniloralucid.peft.tuners.unilora — Uni-LoRA: every LoRA factor of the model read out of one trainable vector.
Uni-LoRA (Li et al., 2025, arXiv:2506.00799) writes the LoRA parameters of every adapted layer as a
read of one vector through a fixed projection, , whose
rows are one-hot at indices drawn uniformly and whose columns are normalised so that is an
isometry. The adapter of the whole model is that vector: theta_d_length numbers however many
layers it adapts. Pick it for the smallest adapter file for a given rank, shared across all layers.
Where the reference library keeps them, so isinstance(m, UniLoraLayer) and from lucid.peft.tuners.unilora import UniLoraConfig, Linear read as they do there. One layer type for
the one module the method adapts, nn.Linear. UniLoraConfig and UniLoraModel (which
holds the shared vector) are here and exported from lucid.peft. Importing the package registers
the method (its config under PeftType.UNILORA, its tuner and layer), which is what makes
get_peft_model and PeftModel.from_pretrained know it.
Li, Kaiyang, et al. "Uni-LoRA: One Vector Is All You Need." [arXiv:2506.00799](https://arxiv.org/abs/2506.00799), 2025.
Uni-LoRA (Li et al., 2025, arXiv:2506.00799 — One Vector Is All You Need) reads every LoRA factor of
every adapted layer out of a single trainable vector of theta_d_length entries. A
fixed projection, drawn once from proj_seed, assigns each entry of the flattened factors one scaled
entry of , so the adapter of the whole model is theta_d_length numbers.
Classes
UniLoraConfig9 methodsHow lucid.peft.get_peft_model adapts a model with Uni-LoRA.
LinearAn nn.Linear with a Uni-LoRA update: , read out of one vector.
UniLoraLayer24 methodsAdapter bookkeeping and the vector-to-factors map shared by the Uni-LoRA layers.
UniLoraModel18 methodsA model with Uni-LoRA layers put into it, the vector they all read, and the tools to take them out.