ChatPaper.aiChatPaper

LoftQ: Quantizzazione Consapevole del Fine-Tuning LoRA per Modelli Linguistici di Grande Dimensione

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

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

Abstract

La quantizzazione è una tecnica indispensabile per il deployment di Large Language Models (LLM) e recentemente ha trovato applicazione anche nel fine-tuning LoRA. In questo lavoro ci concentriamo sullo scenario in cui la quantizzazione e il fine-tuning LoRA vengono applicati congiuntamente su un modello pre-addestrato. In tali casi, è comune osservare un divario consistente nelle prestazioni su task downstream tra l'approccio di fine-tuning completo e quello di quantizzazione più fine-tuning LoRA. In risposta a ciò, proponiamo LoftQ (LoRA-Fine-Tuning-aware Quantization), un nuovo framework di quantizzazione che quantizza simultaneamente un LLM e trova un'inizializzazione a basso rango adeguata per il fine-tuning LoRA. Tale inizializzazione riduce la discrepanza tra il modello quantizzato e quello a precisione completa e migliora significativamente la generalizzazione sui task downstream. Valutiamo il nostro metodo su task di comprensione del linguaggio naturale, risposta a domande, riassunto e generazione del linguaggio naturale. Gli esperimenti dimostrano che il nostro metodo è altamente efficace e supera i metodi di quantizzazione esistenti, specialmente nei regimi impegnativi di precisione mista a 2 bit e 2/4 bit. Rilasceremo il nostro codice.
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.
PDF274February 17, 2026