Fine-Tuning

Fine-tuning is further training of a pre-trained AI model on task-specific data, updating its weights to suit a task such as extracting trial data.

Status
Published, version 1.0.0
Last reviewed
10 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Fine-Tuning Language Models for Evidence Work

Fine-tuning takes a model that has already been trained on a large general corpus and trains it further on a smaller set of examples, so that its weights shift towards one task or domain. For a large language model the examples might be trial abstracts paired with the population, intervention, comparator and outcome terms a reviewer would extract from them. For HTA analysts it is one of several ways to adapt a general model to evidence work, and the choice affects cost, reporting and validation. NICE ECD20 (2026), the NICE framework on AI methods for evidence, treats fine-tuning as a change to the model itself and notes that for many tasks it covers, fine-tuning seems to add little to performance.

Pre-training and adaptation

Bommasani and colleagues describe a foundation model as one trained on broad data, usually by self-supervision at scale, that can then be adapted to many downstream tasks, with fine-tuning as the usual example. Brown and colleagues define fine-tuning as updating the weights of a pre-trained model by training on a supervised dataset specific to the task, typically with thousands to hundreds of thousands of labelled examples. Howard and Ruder set out an early general method for fine-tuning a pre-trained language model for text classification. On one sentiment dataset, with only 100 labelled examples, it matched a model trained from scratch on 10 times more labelled data, or 100 times more when 50,000 unlabelled reviews were also used.

Ouyang and colleagues fine-tuned GPT-3 on demonstrations written by human labellers and then by reinforcement learning from human rankings of its outputs, and raters preferred outputs of the resulting 1.3 billion parameter model to those of the 175 billion parameter GPT-3 without such tuning.

The training objective and low-rank adaptation

Full fine-tuning starts from the pre-trained weights and adjusts all of them by following the gradient of a likelihood objective, the same gradient descent logic used to fit other models. The objective rewards the model for giving high probability to each target token. For a model that generates text, Hu and colleagues write it as

max⁡Φ∑(x,y)∈Z∑t=1∣y∣log⁡PΦ(yt∣x,y<t)\max_{\Phi} \sum_{(x,y) \in Z} \sum_{t=1}^{|y|} \log P_{\Phi}(y_t \mid x, y_{<t})

where Φ\Phi is the set of model weights, starting at the pre-trained values Φ0\Phi_0, ZZ is the task dataset of input and target pairs, xx is an input such as an abstract with an instruction, yy is the target text such as the extracted terms, yty_t is the target token at position tt, y<ty_{<t} is the target tokens before it and ∣y∣|y| is the number of tokens in the target.

Updating every weight means storing a full copy of the model for each task. Low-rank adaptation (LoRA), proposed by Hu and colleagues, freezes the pre-trained weights and learns a small correction for selected weight matrices, so that a layer's output becomes

h=W0x+BAxh = W_0 x + B A x

where hh is the output vector, W0W_0 is the frozen pre-trained matrix with dd rows and kk columns, xx is the input vector, BB is a trainable matrix with dd rows and rr columns, AA is a trainable matrix with rr rows and kk columns, and the rank rr is much smaller than dd and kk. The trainable count for one matrix is

n=r(d+k)n = r(d + k)

where nn is the number of trainable parameters in BB and AA together. On GPT-3 175B the authors reported that LoRA cut trainable parameters by a factor of 10,000 and GPU memory by a factor of 3 compared with full fine-tuning, with quality on par or better on the models they tested and no added delay when the model runs.

Where NICE ECD20 places fine-tuning

NICE ECD20 (2026) separates ideas often mixed up. Model Training fits a model from data, tuning adapts an existing model, and LLM Customisation improves performance without changing the model, through prompts, retrieval and parameter settings. Fine-tuning is the tuning step for language models, and the glossary keeps it distinct from Hyperparameter Optimisation, the tuning step for traditional models.

The framework is written for users rather than developers, so it does not treat fine-tuned and general models differently. It notes that fine-tuning, like retrieval-augmented generation, can help a model cope with noisy prompts, and that locally hosted models can be fine-tuned more closely than models reached by other routes. For screening in a systematic review, it points out that a language model, unlike a traditional supervised classifier, can be used without review-specific training data.

For a team that fine-tunes, ECD20 requires independent datasets for training, optimisation, customisation and validation, and warns of data contamination bias, where a model is tested on data it saw in training and looks better than it is. For screening, performance should be checked on evidence that may be under-represented in training data, such as non-randomised studies or abstracts not in English. Reports should describe the model version, configuration and customisation, which for a fine-tuned model would need to cover the training data and method.

The ECD20 glossary cites AlpaPICO as an example. Ghosh and colleagues used LoRA to fine-tune a medical instruction model built on Llama 2 to extract PICO terms from trial reports. It outperformed existing supervised models on two datasets with fine-grained labels but not on two whose labels the authors called noisy. Their few-shot prompting approach, which changed no weights, gave results comparable with supervised models on most datasets, but zero-shot prompting did substantially worse.

Uses in evidence synthesis and economic evaluation

The most direct uses are in evidence synthesis, for example a model tuned on abstracts labelled in earlier reviews or on trial reports annotated with effect estimates for a health economic model. ECD20 does not currently recommend fully automated data extraction and accepts support or semi-automation only if every AI-extracted item is verified against the primary source. In health economic evaluation it restricts AI to a support role in which a person checks each output closely, so a fine-tuned model could suggest parameter values or draft model code but not substitute them into a model automatically.

The labels a screening model learns from are past human decisions, with their errors and the scope of past questions, and ECD20 allows AI screening only of records for which the tool has shown generalisability or has been tested on the relevant domain and study type.

Worked example with an adapter and a screening test

All numbers in this example are illustrative. A review team plans to fine-tune a language model with 7 billion parameters to screen abstracts for review updates in one disease area.

1. Size of one adapter. One weight matrix has dd = 4,096 rows and kk = 4,096 columns, so it holds 4,096 × 4,096 = 16,777,216 values. With rank rr = 8, the sum d+kd + k is 4,096 + 4,096 = 8,192 and the trainable count is 8 × 8,192 = 65,536, which is 65,536 / 16,777,216 = 0.0039 of the matrix, or about 0.39%.

2. Size of the whole adapter. Applying LoRA to the query and value matrices in each of 32 layers gives 2 × 32 = 64 adapted matrices and 64 × 65,536 = 4,194,304 trainable parameters, which is 4,194,304 / 7,000,000,000 = 0.0006 of the model. At 2 bytes per value the adapter takes 4,194,304 × 2 = 8,388,608 bytes, about 8.4 megabytes, against 14 gigabytes for a full copy of the weights.

3. Splitting the labelled data. The team holds 2,000 abstracts screened in earlier reviews. It uses 1,400 for training and 300 for validation while choosing settings, and keeps 300 apart as a test set the model never sees, holding 30 relevant and 270 irrelevant abstracts.

4. The general model with a prompt. The general model includes 27 of the 30 relevant abstracts and wrongly includes 54 irrelevant ones, so it correctly excludes 216. Its sensitivity is 27 / 30 = 0.90 and its specificity is 216 / 270 = 0.80. The reviewer checks 27 + 54 = 81 included records, and the positive predictive value is 27 / 81 = 0.333.

5. The fine-tuned model. The fine-tuned model includes 29 relevant and 27 irrelevant abstracts, so it correctly excludes 243. Sensitivity is 29 / 30 = 0.967, specificity is 243 / 270 = 0.90, the reviewer checks 29 + 27 = 56 records and the positive predictive value is 29 / 56 = 0.518.

6. Interpretation. The fine-tuned model misses 1 relevant abstract rather than 3, a false negative rate of 1 / 30 = 0.033 against 3 / 30 = 0.10, and sends 81 − 56 = 25 fewer records to the reviewer. ECD20 puts avoiding missed relevant records ahead of saving reviewer time, so the false negative rate is the figure to report first. With only 30 relevant abstracts in the test set, each one moves sensitivity by 1 / 30 = 0.033, so the gain rests on two records and is uncertain. The test set shares a disease area with the training data, so it says little about other review questions, and any overlap with training abstracts would overstate the gain.

Fine-tuning compared with prompting and retrieval

Few-Shot Prompting places worked examples in the prompt and changes no weights, the setting Brown and colleagues contrasted with fine-tuning. Retrieval-augmented generation supplies relevant passages at query time, so the model can use and cite documents it never saw in training. Fine-tuning changes the weights, so its effect persists across later queries but must be redone when the base model or task changes.

Fine-tuning needs labelled examples and computing time, and produces a new model version that must be validated and reported, whereas prompts and retrieval sources are quicker to change and easier to describe in a submission. It is most likely to pay off when many examples are already labelled and the general model keeps making the same error after prompting has been tried.

Limitations and misreadings

A fine-tuned model is a new model, and performance reported for its base model does not carry over. Howard and Ruder noted that language models fine-tuned on small datasets were prone to overfitting and to catastrophic forgetting of what they learned in pre-training. Brown and colleagues warned that fine-tuned models may generalise poorly outside the training distribution and may exploit spurious features of the training data. Ouyang and colleagues found that fine-tuning a model to follow instructions lowered its scores on some public benchmarks, which they called an alignment tax.

Fine-tuning for screening or extraction teaches a task rather than the content of trials, so each new record still has to be supplied in the prompt. Labels drawn from earlier human screening carry earlier mistakes, and ECD20 warns against treating human decisions as a perfect reference standard.

Sources

  • Bommasani R, Hudson DA, Adeli E, Altman R, Arora S, von Arx S, et al. On the opportunities and risks of foundation models. arXiv preprint 2108.07258. 2021. https://arxiv.org/abs/2108.07258
  • Brown TB, Mann B, Ryder N, Subbiah M, Kaplan J, Dhariwal P, et al. Language models are few-shot learners. Advances in Neural Information Processing Systems 33 (NeurIPS 2020). 2020. https://arxiv.org/abs/2005.14165
  • Ghosh M, Mukherjee S, Ganguly A, Basuchowdhuri P, Naskar SK, Ganguly D. AlpaPICO: extraction of PICO frames from clinical trial documents using LLMs. Methods. 2024;226:78-88. https://doi.org/10.1016/j.ymeth.2024.04.005
  • Howard J, Ruder S. Universal language model fine-tuning for text classification. Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (ACL 2018). 2018. https://arxiv.org/abs/1801.06146
  • Hu EJ, Shen Y, Wallis P, Allen-Zhu Z, Li Y, Wang S, et al. LoRA: low-rank adaptation of large language models. arXiv preprint 2106.09685. 2021. https://arxiv.org/abs/2106.09685
  • National Institute for Health and Care Excellence. AI methods for evidence framework (ECD20). NICE; published 9 November 2026. Chapters on introduction to AI in NICE decision making, principles for using AI in evidence activities, AI methods for evidence synthesis and AI methods for health economic evaluation, and Appendix A glossary. https://www.nice.org.uk/corporate/ecd20
  • Ouyang L, Wu J, Jiang X, Almeida D, Wainwright CL, Mishkin P, et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems 35 (NeurIPS 2022). 2022. https://arxiv.org/abs/2203.02155

Frequently Asked Questions (6)

  • What is Fine-Tuning?

    Fine-tuning is further training of a pre-trained AI model on task-specific data, updating its weights to suit a task such as extracting trial data.

    Source: Brown et al. 2020

  • How does NICE ECD20 separate fine-tuning from model training and LLM customisation?

    NICE ECD20 (2026) uses training for fitting a model from data and tuning for adapting a model that already exists. Fine-tuning is the tuning step for large language models, in the way that hyperparameter optimisation is the tuning step for traditional models, and the glossary keeps the two apart. LLM customisation covers changes that leave the model weights untouched, such as prompt engineering, prompt templates, retrieval and parameter settings. The framework asks for these ideas to be kept distinct because each one changes what a team has to validate and report.

    Source: NICE ECD20 (2026)

  • How does low-rank adaptation reduce the cost of fine-tuning a large language model?

    Full fine-tuning updates every weight, so each task needs a stored copy of the whole model. Low-rank adaptation, proposed by Hu and colleagues, freezes the pre-trained weights and trains two small matrices for selected layers, whose product is added to the frozen weight matrix. For a matrix with d rows and k columns and a rank r much smaller than both, the trainable count is r(d + k) rather than d times k. On GPT-3 175B the authors reported 10,000 times fewer trainable parameters and a third of the GPU memory of full fine-tuning, with no added delay when the model runs.

    Source: Hu et al. 2021

  • What did the AlpaPICO study show about fine-tuning a language model to extract PICO terms from trial reports?

    Ghosh and colleagues used low-rank adaptation to fine-tune a medical instruction model built on Llama 2 so that it extracted population, intervention, comparator and outcome terms from clinical trial documents. The fine-tuned AlpaPICO model outperformed existing supervised models on two datasets with fine-grained labels, but not on two datasets whose annotations the authors described as noisy. Their few-shot prompting approach, which placed labelled examples in the prompt without changing any weights, gave results comparable with supervised models on most datasets. The NICE ECD20 glossary names AlpaPICO as its example of a fine-tuned language model.

    Source: Ghosh et al. 2024

  • How should a language model be validated after fine-tuning before it supports screening or data extraction for a health economic evaluation?

    NICE ECD20 (2026) requires independent datasets for training, optimisation, customisation and validation, and warns of data contamination bias, where a model tested on data it saw in training looks better than it is. For screening, performance should also be checked on evidence that may be under-represented in the training data, such as non-randomised studies or abstracts not in English. Fully automated data extraction is not currently recommended, and every item an AI tool extracts must be verified against the primary source. In health economic evaluation a fine-tuned model could suggest parameter values or draft model code, but nothing it suggests may be substituted into the model automatically, and a person verifies and runs any code.

    Source: NICE ECD20 (2026)

  • Why can fine-tuning a language model on a small labelled dataset go wrong in evidence work?

    Howard and Ruder noted that language models fine-tuned on small datasets were prone to overfitting and to catastrophic forgetting, losing what they had learned in pre-training. Their general method still showed that careful fine-tuning can work with few labels, since on one sentiment dataset 100 labelled examples matched training from scratch on 10 times more labelled data, or 100 times more with 50,000 unlabelled reviews added. A fine-tuned model is a new model, so performance reported for its base model does not carry over and has to be measured again. In evidence work the labels are usually past screening decisions, which bring their own errors and the scope of earlier review questions.

    Source: Howard & Ruder 2018

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 10 Nov 2026

Content version: 1.0.0

Canonical Identity

Term code
HS-HP-DH-082

Stable URI · Machine-readable · Resolvable · CC BY 4.0

This article is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/fine-tuning