C3A
4 memberslucid.peft.tuners.c3alucid.peft.tuners.c3a — C3A: a block-circulant weight update applied by FFT.
C3A (Chen et al., 2024, arXiv:2407.19342 — Circular Convolution Adaptation) cuts the update into
block_size-square blocks and makes each block a circulant, fixed by one kernel of length
block_size. The layer trains those kernels, which give a high-rank update, and applies them by
FFT without building the matrix. Pick it for a high-rank update with a parameter count set by
block_size instead of a rank.
Where the reference library keeps them, so isinstance(m, C3ALayer) and from lucid.peft.tuners.c3a import C3AConfig, Linear read as they do there. One layer type for the one
module the method adapts, nn.Linear. C3AConfig and C3AModel are here and exported from
lucid.peft. Importing the package registers the method (its config under PeftType.C3A, its
tuner and layer), which is what makes get_peft_model and PeftModel.from_pretrained know it.
Chen, Aochuan, et al. "Parameter-Efficient Fine-Tuning via Circular Convolution." [arXiv:2407.19342](https://arxiv.org/abs/2407.19342), 2024.
C3A (Chen et al., 2024, arXiv:2407.19342 — Circular Convolution Adaptation) makes the weight update a block-circulant matrix: the update is cut into blocks and each block is a circulant, fixed by its first row — a length- kernel. The layer trains numbers ( kernels per block row and column), which is high rank, and applies them by FFT without building the matrix,
Classes
C3AConfig9 methodsHow lucid.peft.get_peft_model adapts a model with C3A.
C3ALayer20 methodsAdapter bookkeeping and the kernel-to-update map shared by the C3A layers.
LinearAn nn.Linear with a block-circulant update: .
C3AModel15 methodsA model with C3A layers in it, and the tools to take them out again.