Skip to content
module

C3A

4 members
lucid.peft.tuners.c3a

lucid.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.

Paper

Chen, Aochuan, et al. "Parameter-Efficient Fine-Tuning via Circular Convolution." [arXiv:2407.19342](https://arxiv.org/abs/2407.19342), 2024.

Overview

C3A (Chen et al., 2024, arXiv:2407.19342 — Circular Convolution Adaptation) makes the weight update a block-circulant matrix: the dout×dind_{out} \times d_{in} update is cut into b×bb \times b blocks and each block is a circulant, fixed by its first row — a length-bb kernel. The layer trains doutdin/bd_{out} d_{in} / b numbers (bb kernels per block row and column), which is high rank, and applies them by FFT without building the matrix,

Classes