Afinamiento Ortogonal Escalable
Orthogonal Finetuning Made Scalable
June 24, 2025
Autores: Zeju Qiu, Weiyang Liu, Adrian Weller, Bernhard Schölkopf
cs.AI
Resumen
El ajuste fino ortogonal (OFT, por sus siglas en inglés) ofrece una adaptación altamente eficiente en términos de parámetros mientras previene el olvido catastrófico, pero sus altas demandas de tiempo de ejecución y memoria limitan su implementación práctica. Identificamos el cuello de botella computacional central en OFT como su implementación centrada en pesos, que depende de multiplicaciones matriz-matriz costosas con complejidad cúbica. Para superar esto, proponemos OFTv2, una reformulación centrada en entradas que, en su lugar, utiliza multiplicaciones matriz-vector (es decir, computación sin matrices), reduciendo el costo computacional a cuadrático. Además, introducimos la parametrización Cayley-Neumann, una parametrización ortogonal eficiente que aproxima la inversión de matrices en la transformación de Cayley mediante una serie de Neumann truncada. Estas modificaciones permiten que OFTv2 logre un entrenamiento hasta 10 veces más rápido y un uso de memoria GPU 3 veces menor sin comprometer el rendimiento. Adicionalmente, extendemos OFTv2 para admitir el ajuste fino de modelos base cuantizados y demostramos que supera al popular QLoRA en estabilidad de entrenamiento, eficiencia y uso de memoria.
English
Orthogonal finetuning (OFT) offers highly parameter-efficient adaptation
while preventing catastrophic forgetting, but its high runtime and memory
demands limit practical deployment. We identify the core computational
bottleneck in OFT as its weight-centric implementation, which relies on costly
matrix-matrix multiplications with cubic complexity. To overcome this, we
propose OFTv2, an input-centric reformulation that instead uses matrix-vector
multiplications (i.e., matrix-free computation), reducing the computational
cost to quadratic. We further introduce the Cayley-Neumann parameterization, an
efficient orthogonal parameterization that approximates the matrix inversion in
Cayley transform via a truncated Neumann series. These modifications allow
OFTv2 to achieve up to 10x faster training and 3x lower GPU memory usage
without compromising performance. In addition, we extend OFTv2 to support
finetuning quantized foundation models and show that it outperforms the popular
QLoRA in training stability, efficiency, and memory usage.