ChatPaper.aiChatPaper

LoftQ: Cuantización Consciente del Ajuste Fino LoRA para Modelos de Lenguaje a Gran Escala

LoftQ: LoRA-Fine-Tuning-Aware Quantization for Large Language Models

October 12, 2023
Autores: Yixiao Li, Yifan Yu, Chen Liang, Pengcheng He, Nikos Karampatziakis, Weizhu Chen, Tuo Zhao
cs.AI

Resumen

La cuantización es una técnica indispensable para implementar Modelos de Lenguaje de Gran Escala (LLMs) y recientemente ha encontrado aplicación en el ajuste fino mediante LoRA. En este trabajo nos enfocamos en el escenario donde la cuantización y el ajuste fino con LoRA se aplican conjuntamente en un modelo preentrenado. En tales casos, es común observar una brecha consistente en el rendimiento en tareas posteriores entre el ajuste fino completo y el enfoque de cuantización más ajuste fino con LoRA. En respuesta, proponemos LoftQ (Cuantización Consciente del Ajuste Fino con LoRA), un novedoso marco de cuantización que simultáneamente cuantiza un LLM y encuentra una inicialización adecuada de bajo rango para el ajuste fino con LoRA. Dicha inicialización mitiga la discrepancia entre el modelo cuantizado y el de precisión completa, mejorando significativamente la generalización en tareas posteriores. Evaluamos nuestro método en tareas de comprensión del lenguaje natural, respuesta a preguntas, resumen y generación de lenguaje natural. Los experimentos muestran que nuestro método es altamente efectivo y supera a los métodos de cuantización existentes, especialmente en los regímenes desafiantes de 2 bits y precisión mixta de 2/4 bits. Publicaremos nuestro código.
English
Quantization is an indispensable technique for serving Large Language Models (LLMs) and has recently found its way into LoRA fine-tuning. In this work we focus on the scenario where quantization and LoRA fine-tuning are applied together on a pre-trained model. In such cases it is common to observe a consistent gap in the performance on downstream tasks between full fine-tuning and quantization plus LoRA fine-tuning approach. In response, we propose LoftQ (LoRA-Fine-Tuning-aware Quantization), a novel quantization framework that simultaneously quantizes an LLM and finds a proper low-rank initialization for LoRA fine-tuning. Such an initialization alleviates the discrepancy between the quantized and full-precision model and significantly improves the generalization in downstream tasks. We evaluate our method on natural language understanding, question answering, summarization, and natural language generation tasks. Experiments show that our method is highly effective and outperforms existing quantization methods, especially in the challenging 2-bit and 2/4-bit mixed precision regimes. We will release our code.
PDF284December 15, 2024