Skip to main content
QUICK REVIEW

[Paper Review] Fine-Tuning or Fine-Failing? Debunking Performance Myths in Large Language Models

Scott Barnett, Zac Brannelly|arXiv (Cornell University)|Jun 17, 2024
Topic ModelingComputer Science6 citations
TL;DR

Fine-tuning LLMs within a Retrieval-Augmented Generation (RAG) pipeline often reduces performance compared with baseline models, across multiple datasets and domains.

ABSTRACT

Large Language Models (LLMs) have the unique capability to understand and generate human-like text from input queries. When fine-tuned, these models show enhanced performance on domain-specific queries. OpenAI highlights the process of fine-tuning, stating: "To fine-tune a model, you are required to provide at least 10 examples. We typically see clear improvements from fine-tuning on 50 to 100 training examples, but the right number varies greatly based on the exact use case." This study extends this concept to the integration of LLMs within Retrieval-Augmented Generation (RAG) pipelines, which aim to improve accuracy and relevance by leveraging external corpus data for information retrieval. However, RAG's promise of delivering optimal responses often falls short in complex query scenarios. This study aims to specifically examine the effects of fine-tuning LLMs on their ability to extract and integrate contextual data to enhance the performance of RAG systems across multiple domains. We evaluate the impact of fine-tuning on the LLMs' capacity for data extraction and contextual understanding by comparing the accuracy and completeness of fine-tuned models against baseline performances across datasets from multiple domains. Our findings indicate that fine-tuning resulted in a decline in performance compared to the baseline models, contrary to the improvements observed in standalone LLM applications as suggested by OpenAI. This study highlights the need for vigorous investigation and validation of fine-tuned models for domain-specific tasks.

Motivation & Objective

  • Assess whether fine-tuning LLMs improves question-answering in RAG pipelines across multiple domains.
  • Investigate how training dataset size for fine-tuning affects performance.
  • Compare fine-tuned models against baseline non-fine-tuned models on open datasets.

Proposed method

  • Evaluate three models (Mistral, LlaMA2, GPT-4) in RAG pipelines on BioASQ, Natural Questions, and Qasper datasets.
  • Fine-tune Mistral and LlaMA2 with 200, 500, and 1000 QA pairs per dataset; compare to baselines.
  • Use varying hyperparameters (epochs, effective batch size, LoRa/QLoRa, LoRa hyperparameters) on hardware with up to 4 H100s or 8 A100s.
  • Assess performance with a G-Evals-based framework using a CoT + form-filling approach, measuring accuracy and completeness.
  • Provide repeated model judgments (10 runs) to stabilize scoring through averaging.
Figure 1: Comparisons of accuracy for fine-tuned Llama2 models and baseline models across three datasets.
Figure 1: Comparisons of accuracy for fine-tuned Llama2 models and baseline models across three datasets.

Experimental results

Research questions

  • RQ1Does fine-tuning improve RAG-based QA performance versus baseline models across multiple datasets?
  • RQ2How does the size of the fine-tuning dataset affect performance in RAG-enhanced LLMs?
  • RQ3Are some models (e.g., Mixtral vs. Llama2) more susceptible to fine-tuning degradation than others?

Key findings

  • Baseline models (Mixtral, Llama2, GPT-4) generally outperform their fine-tuned counterparts on all datasets except NQ.
  • GPT-4 baseline also outperforms fine-tuned variants in both accuracy and completeness.
  • Fine-tuned models show significant drops in some cases (e.g., accuracy and completeness decline, with Llama2 dropping from 4.38 to 3.14 in accuracy and 4.55 to 2.35 in completeness on 200-sample fine-tuning).
  • Qasper dataset exhibits substantial accuracy declines for fine-tuned Llama2 and Mixtral models; increasing fine-tuning data size sometimes worsens performance (e.g., Mixtral accuracy drops from 4.04 to 3.28 when using 1000 samples).
  • In several instances, larger fine-tuning datasets do not translate to better performance in RAG pipelines.
Figure 2: Comparisons of accuracy for fine-tuned Mixtral models and baseline models across three datasets.
Figure 2: Comparisons of accuracy for fine-tuned Mixtral models and baseline models across three datasets.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.