The rapid advancement in Large Language Models (LLMs) has introduced significant challenges in their usage and fine-tuning, primarily due to the extensive computational resources required. This thesis addresses these challenges by introducing dynamic rank assignment within the Low-Rank Adaptation (LoRA) framework. Traditional LoRA methods, while effective in reducing the number of trainable parameters, assume a uniform rank distribution across the model, which can lead to inefficient memory usage. We propose L1RA (L1-regularised Rank Assignment), a novel Dynamic Rank Assignment technique that dynamically reassigns ranks during training, optimizing the use of a fixed rank budget and enhancing model performance. This approach eliminates the need for exhaustive rank optimization and retraining, providing a more memory-efficient solution. Moreover, it eliminates the need to select only certain layers to target with LoRA, as less useful layers are automatically adjusted with a lower rank. Additionally, this thesis introduces GELATO (GPU Estimation of LLM Allocation for Training Optimization), a tool that accurately estimates the memory footprint of transformer training, allowing users to pick an optimal hyperparameter configuration given a memory budget.
La rapida evoluzione dei Large Language Models (LLM) ha introdotto grandi sfide nel loro utilizzo e nel loro fine-tuning, principalmente a causa delle enormi risorse computazionali richieste. Questa tesi affronta tali sfide introducendo il concetto di assegnazione dinamica del rango all'interno del framework di Low-Rank Adaptation (LoRA). I metodi LoRA tradizionali, sebbene efficaci nel ridurre il numero di parametri da addestrare, partono con la supposizione di una distribuzione uniforme del rango in tutto il modello, con conseguente uso inefficiente della memoria. Proponiamo L1RA (L1-regularised Rank Assignment), una nuova tecnica di assegnazione dinamica del rango che riassegna dinamicamente i ranghi durante l'addestramento, ottimizzando l'uso di un budget fisso e migliorando le prestazioni del modello. Questo approccio elimina la necessità di un'ottimizzazione e riaddestramento esaustivi del rango, fornendo una soluzione più efficiente dal punto di vista della memoria. Inoltre, elimina la necessità di selezionare manualmente i layer da ottimizzare con LoRA, poiché i layer meno utili vengono automaticamente regolati con un rango inferiore. Infine, questa tesi introduce GELATO (GPU Estimation of LLM Allocation for Training Optimization), uno strumento che stima in modo accurato l'impronta di memoria dell'addestramento di un Transformer, permettendo agli utenti di scegliere una configurazione ottimale degli iperparametri in base al budget di memoria disponibile.
Dynamic Rank Assignment in LoRA Fine-Tuning for Large Language Models
Singh, Raul
2023/2024
Abstract
The rapid advancement in Large Language Models (LLMs) has introduced significant challenges in their usage and fine-tuning, primarily due to the extensive computational resources required. This thesis addresses these challenges by introducing dynamic rank assignment within the Low-Rank Adaptation (LoRA) framework. Traditional LoRA methods, while effective in reducing the number of trainable parameters, assume a uniform rank distribution across the model, which can lead to inefficient memory usage. We propose L1RA (L1-regularised Rank Assignment), a novel Dynamic Rank Assignment technique that dynamically reassigns ranks during training, optimizing the use of a fixed rank budget and enhancing model performance. This approach eliminates the need for exhaustive rank optimization and retraining, providing a more memory-efficient solution. Moreover, it eliminates the need to select only certain layers to target with LoRA, as less useful layers are automatically adjusted with a lower rank. Additionally, this thesis introduces GELATO (GPU Estimation of LLM Allocation for Training Optimization), a tool that accurately estimates the memory footprint of transformer training, allowing users to pick an optimal hyperparameter configuration given a memory budget.File | Dimensione | Formato | |
---|---|---|---|
2024_7_Singh_Tesi.pdf
accessibile in internet per tutti
Descrizione: Tesi
Dimensione
1.98 MB
Formato
Adobe PDF
|
1.98 MB | Adobe PDF | Visualizza/Apri |
2024_7_Singh_Executive_Summary.pdf
accessibile in internet per tutti
Descrizione: Executive Summary
Dimensione
1.06 MB
Formato
Adobe PDF
|
1.06 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/223901