Fine-tuned Llama 2 13B beat GPT-4 at tagging disease names in biomedical text
Made by Qingyu Chen and 20 co-authors
The result
The story
A narrow job inside a big benchmark
PubMed grows by about 5,000 articles a day, which strains hand curation, so curators lean on software that pulls the diseases, chemicals and interactions out of papers. A team from Yale and the US National Library of Medicine tested whether general LLMs can do that, running GPT-3.5, GPT-4 and two 13B open models on 12 public benchmarks.

One of them is about as narrow as it gets. NCBI Disease asks for every disease name in a sentence from the biomedical literature, and a prediction counts only if its span matches the human annotation exactly.
Data
NCBI Disease corpus
5,424 training, 923 validation and 940 test sentences; 960 disease mentions in the test set
Disease names in biomedical literature, annotated by hand (NCBI Disease corpus, Doğan, Leaman and Lu)
The full test set was used; the splits and the prompts are public on GitHub and Hugging Face.
Two ways to learn the task
GPT-4 learned from the prompt: a task description, the output format (each disease wrapped in an HTML span tag) and zero, one or five examples from the training set, at temperature 0. It did best with five.
Large model
GPT-4 (gpt-4-0613)
Size not disclosed · OpenAI
Used as released through Azure OpenAI; prompted with task rules and 0, 1 or 5 training examples, temperature 0
- Base
- General model, snapshot gpt-4-0613
Llama 2 13B, chosen for the computing that fine-tuning needs, learned from the labelled training sentences instead: LoRA, three epochs, eight H100 GPUs, one model per dataset. The team published it on Hugging Face.
Small model
Llama 2 13B, fine-tuned on NCBI Disease
13B · Meta (base model); fine-tuned by the study’s authors
Instruction fine-tuning with LoRA on the dataset’s training sentences
- Base
- meta-llama/Llama-2-13b-hf (the base model, not the chat one)
Training
Instruction fine-tuning with LoRA
3 epochs, learning rate 1e-5, weight decay 1e-5, warm-up ratio 0.01
Not reported: time and cost.
What came out
On the same 940 test sentences, the fine-tuned Llama 2 13B scored an F1 of 0.8682 and GPT-4 0.6389. Without fine-tuning, Llama 2 13B scored between 0.2211 and 0.4847. The best earlier system the paper cites, built on PubMedBERT, reached 0.9090, a figure copied from its own study rather than re-run.
Evaluation
940 sentences, 960 disease mentions
- Test set
- NCBI Disease test set (full)
- Metric
- Entity-level F1, exact span match
- How it was compared
- Same sentences and scorer for every model. GPT-4 got task rules and examples at temperature 0, and its answers were parsed partly by hand to give it fair credit. The released five-shot prompt leaves a stray, unclosed span tag after each example disease.
Across all 12 datasets the two split six each: the fine-tuned model led on the four extraction sets and two others, GPT-4 on medical exam questions, document classification and three of the four summary and simplification sets. The paper prices only the GPT models: five-example GPT-4 cost about US$1.68 per 100 NCBI sentences, and there is no cost or speed figure for the fine-tuned model.
All the numbers
Show all numbersHide all numbersEvery model · Cost, latency and energy · 6 more results
Every model on the headline test
Cost, latency and energy, as reported
- Cost
- Not reported
- Latency
- Not reported
- Energy
- Not reported
More from the source
BC5CDR-chemical entity F1: Llama 2 13B fine-tuned vs GPT-4 best (one-shot)
Small model 0.9149Large model 0.8327
Table 2
ChemProt relation extraction macro F1: Llama 2 13B fine-tuned vs GPT-4 best (five-shot)
Small model 0.4612Large model 0.3756
Table 2
DDI2013 relation extraction macro F1: Llama 2 13B fine-tuned vs GPT-4 best (one-shot)
Small model 0.6218Large model 0.3312
Table 2
Earlier fine-tuned BERT-family results quoted from prior studies (not re-run)
NCBI Disease (PubMedBERT) 0.9090 BC5CDR-chemical (PubMedBERT) 0.9500 ChemProt (BioBERT) 0.7344 DDI2013 (BioBERT) 0.7919 HoC (BioBERT) 0.8882 Table 2, ‘SOTA results’ column
Macro-average over all 12 datasets: Llama 2 13B fine-tuned 0.5131 vs GPT-4 five-shot 0.4862 (earlier fine-tuned SOTA 0.6536)
Small model 0.5131Large model 0.4862
Table 2, Macro-average row
Where GPT-4 wins against the fine-tuned Llama 2 13B
HoC classification, macro F1 GPT-4 0.7109 (zero-shot) vs 0.6957 LitCovid classification, macro F1 GPT-4 0.6077 (five-shot) vs 0.5725 MedQA accuracy GPT-4 0.7651 (five-shot) vs 0.4462 PubMed summarization, Rouge-L GPT-4 0.2444 (five-shot) vs 0.1857 Table 2
Worth knowing
- Fine-tuned (on each training set) vs few-shot prompting: not the same amount of task data.
- GPT-4 snapshot is gpt-4-0613 (2023); newer models were not tested.
- GPT-4 beats the fine-tuned 13B on medical question answering and on the two multi-label document-classification sets (HoC, LitCovid).
- No cost comparison for the small model; no latency or energy figures.
2 more caveats
- The BERT-family ‘SOTA’ figures are quoted from earlier papers, not re-run in this study.
- Answers were extracted partly by hand to give the LLMs fair credit for badly formatted outputs.
Weights on Hugging Face
Base model (gated; 13,015.9M parameters on the card). The study’s fine-tuned adapters are not on Hugging Face; the paper deposits code and data on Zenodo (doi 10.5281/zenodo.14025500, not opened in this check).
- meta-llama/Llama-2-13b-hfLlama 2 13B (fine-tuned)
Sources
- Chen et al., “Benchmarking large language models for biomedical natural language processing applications and recommendations”, Nature Communications 16, 3280 (2025)
- arXiv preprint 2305.16326
- Nature Communications 16, article 3280 (published 06 Apr 2025; received 17 Nov 2023). arXiv v1 10 May 2023 (2305.16326).
8 more sources behind this page
- nature.com/articles/s41467-025-56989-2/tables/2
- nature.com/articles/s41467-025-56989-2/tables/5
- nature.com/articles/s41467-025-56989-2/figures/1
- github.com/BIDS-Xu-Lab/Biomedical-NLP-Benchmarks/…/run_gpt.py
- github.com/BIDS-Xu-Lab/Biomedical-NLP-Benchmarks/blob/v1.0.0/llama/README.md
- github.com/BIDS-Xu-Lab/Biomedical-NLP-Benchmarks/…/prompt_fiveshot.txt
- github.com/BIDS-Xu-Lab/Biomedical-NLP-Benchmarks/tree/v1.0.0
- huggingface.co/clinicalnlplab/finetuned-Llama-2-13b-hf-NCBI-disease
