Skip to content
module

PVeRA

4 members
lucid.peft.tuners.pvera

lucid.peft.tuners.pvera — PVeRA: VeRA whose rank-r latent is a sampled Gaussian.

PVeRA (Fillioux et al., 2025, arXiv:2512.07703) makes VeRA probabilistic: two frozen random projections shared by every layer and two learned vectors per layer, with the rank-r latent between them the mean and log-variance of a Gaussian, sampled while training and taken at its mean for inference (which then folds into the weight). Pick it for VeRA-sized adapters with a learned uncertainty over the update.

Where the reference library keeps them, so isinstance(m, PveraLayer) and from lucid.peft.tuners.pvera import PveraConfig, Linear read as they do there. One layer type for the one module the method adapts, nn.Linear. PveraConfig and PveraModel (which holds the shared projections) are here and exported from lucid.peft. Importing the package registers the method (its config under PeftType.PVERA, its tuner and layer), which is what makes get_peft_model and PeftModel.from_pretrained know it.

Paper

Fillioux, Leo, et al. "PVeRA: Probabilistic Vector-Based Random Matrix Adaptation." [arXiv:2512.07703](https://arxiv.org/abs/2512.07703), 2025.

Overview

PVeRA (Fillioux et al., 2025, arXiv:2512.07703 — Probabilistic Vector-Based Random Matrix Adaptation) makes VeRA probabilistic. As in VeRA, two frozen random projections shared by all layers and two learned vectors per layer give the update; but the rank-r latent between them is the mean and log-variance of a Gaussian, sampled in training in the manner of a variational encoder. At inference the learned mean is used unless sample_at_inference is set.

Classes