Master'sOpen Access

Optimizing large language models: A comparative study of retrieval-augmented generation, fine-tuning, and hybrid approaches

Is this your thesis?

This record came from a bulk archive import. If it’s yours, link it to your profile.

2024
0 views
0 downloads

Abstract (EN)

In the rapidly advancing field of natural language processing, optimizing large language models (LLMs) for specific applications presents a crucial and intricate challenge. This paper undertakes a comprehensive comparative study of two principal optimization techniques—Retrieval-Augmented Generation (RAG) and fine-tuning— alongside a novel hybrid method that merges these approaches. The study evaluates the efficacy of these strategies using the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016). Our analysis explores the RAG method, which utilizes external data to enhance model responses, potentially easing computational demands during inference. In contrast, fine-tuning directly modifies model parameters to boost contextual accuracy and relevance, aligning the LLM's responses more closely with specific tasks. Additionally, our research examines a hybrid model that combines fine-tuning's contextual advantages with RAG's robust data-driven approach, aiming for an optimal balance between accuracy and computational efficiency. The experimental results delineate the strengths and weaknesses of each method. Fine-tuning emerges as particularly effective for tasks demanding high semantic precision, while RAG offers a scalable solution by reducing computational resource requirements. Although the hybrid model does not surpass fine-tuning in semantic accuracy, it demonstrates significant potential by providing balanced performance, which may be advantageous in scenarios requiring both efficiency and accuracy. The findings suggest tailored applications of each method depending on the specific requirements of the task and computational limitations. This study not only illuminates the nuanced trade-offs involved in selecting an LLM optimization strategy but also provides a foundation for further research and practical implementations in a variety of real-world settings.

Author

Gülsüm Budakoğlu

How to Cite

Gülsüm Budakoğlu (Master Thesis). Optimizing large language models: A comparative study of retrieval-augmented generation, fine-tuning, and hybrid approaches, 2024, TED University.

Keywords

License

Tüm Hakları Saklıdır

This work is shared under the specified license terms.

More theses from TED University