Fine-tuned 7B-class models vs GPT-4, one task at a time: 24 of 31 won
Predibase fine-tuned 10 small open models on 31 tasks, one fine-tune per task, each trained on a single GPU. Taking the best fine-tune for each task, they beat GPT-4 on 24, tied 1 and lost 6. GPT-4 kept the broad ones, coding and MMLU among them.
Made by Justin Zhao and nine co-authors
The result
The story
310 fine-tunes, one task at a time
Predibase, which sells a platform for fine-tuning and serving open models, wanted to know how far small LoRA fine-tunes go against GPT-4. Ten of its staff picked 31 tasks from public datasets, trained one fine-tune per task on each of ten base models, 310 in all, and scored every one, along with GPT-4 and GPT-3.5-Turbo, on the same items.

Some of the tasks are narrow, like tagging chemicals and diseases, classifying legal clauses or flagging toxic comments. Others are broad, like MMLU’s general-knowledge questions or writing code.
Data
31 public task datasets
From 635 (WNLI) to 560,000 (DBpedia) training examples per task
Hugging Face, Kaggle and GitHub (MMLU, Jigsaw, WikiSQL, the GLUE tasks and others); published train splits, the authors’ own splits for 2 tasks
Scored on at most the first 1,000 items of each task’s test split, or of its validation split when there is no labelled test split (and for MMLU, to match HELM).
Each fine-tune was trained on its task’s published train split; for customer support and legal clauses, which have no official split, the authors made their own. Scoring used the test split when there was a labelled one, otherwise the validation split (for MMLU the validation split, to match the HELM benchmark), and only the first 1,000 items of any larger split, to keep API costs down. The authors note this may bias the results.
Ten small base models, one recipe
Small model
Mistral-7b-v0.1 + LoRA
7.24B · Mistral AI
One LoRA adapter (rank 8) per task; the best of the ten base models on 10 of 31 tasks
- Base
- mistralai/Mistral-7B-v0.1, quantized to 4 bits for training
The base models were picked small enough to train on one GPU: Llama-2-7b and its chat version from Meta, Mistral-7b-v0.1 and its Instruct version from Mistral AI, Zephyr-7b from Hugging Face, Phi-2 from Microsoft, and Gemma-2b and Gemma-7b, base and instruction-tuned, from Google. Mistral-7b gave the best fine-tune on the most tasks, 10 of 31.
Training
LoRA rank 8 on a 4-bit base (bitsandbytes)
Identical settings for all 310 runs
- Time
- 40,000 steps
Not reported: cost.
Every run used the same recipe, with no tuning per task: LoRA rank 8 on a 4-bit base, 40,000 steps at batch size 1 with 16 gradient-accumulation steps, paged Adam, and a learning rate of 0.002 on a cosine schedule. For tasks whose full-length inputs would still run out of memory, inputs were cut at the task’s 95th-percentile length. The authors point out that 40,000 steps doesn’t cover one epoch of the largest datasets.
Large model
GPT-4
Size not disclosed · OpenAI
Used as released, with the same completion-style prompt as the fine-tunes: zero-shot, or one example
- Base
- gpt-4-0613 snapshot
Evaluation
- Test set
- Each task’s test split, or validation split, first 1,000 items
- Metric
- Each task’s own metric on a 0-1 scale: accuracy, 1 minus mean absolute error, ROUGE-L, HumanEval or a GSM8K answer check
- Items
- Up to 1,000 per task, 31 tasks
- How it was compared
- Same prompts for every model, zero-shot or one example, with the class list for classification tasks; answers mapped to labels by the same regex step. GPT-4’s decoding settings aren’t stated.
Every model saw the same plain prompts: zero-shot, or with one example, the first item of the training split, where the output format is hard to describe. Classification prompts list the possible classes. There were no extra examples and no chain of thought, for GPT-4 too, which the authors list as a limitation. A regex step maps each answer to the label vocabulary before scoring.
24 wins, 1 tie, 6 losses
Taking the best of the ten fine-tunes for each task, the small models beat GPT-4 on 24 tasks, tied on one and lost six: Python coding, MMLU, WNLI, ARC, WikiSQL and BoolQ. Some wins are tiny, 0.008 on the 0-1 scale for grammar acceptability (CoLA) and for Winogrande. Across all 310 runs, 224 fine-tunes beat GPT-4 and 301 beat their own base model.
Predibase also served 25 of the Mistral-7b adapters from a single NVIDIA A100 80GB with its open-source LoRAX server. In a load test with 1 to 50 concurrent users and synthetic prompts, the time to the first token stayed at about 0.2 seconds or less. The report gives no cost per answer for the fine-tunes; for GPT-4 it estimates about US$400 to run the full 15,878-item WikiSQL test set.
All the numbers
Show all numbersHide all numbersEvery model · Cost, latency and energy · All 31 tasks
Every model on the headline test
1 task tied.
Cost, latency and energy, as reported
- Cost · per 1,000 answers
- not reported1×
NVIDIA A10G 24GB per fine-tune (training); 1×
A100 80GB serving 25
- ≈ US$ 25OpenAI API, hardware not disclosed; WikiSQL, authors’ estimate
- GPT-4 figure derived from the authors’ estimate: about US$400 for the 15,878-example WikiSQL test set.
- Latency · time to 1st token
- ≤ 0.2 s1×
NVIDIA A100 80GB, 1–50 users
- not reported
- Energy
- Not reported
All 31 tasks
The paper also averages the 31 scores: 0.756 for the best fine-tunes against 0.661 for GPT-4. An average over 31 different tasks is the kind of single number this page argues against, so the result counts tasks won instead. Some of the 31 are narrow (legal clauses, named entities); some are broad (coding, MMLU), and GPT-4 kept those.
| Task | Best fine-tune | GPT-4 | Gap |
|---|---|---|---|
| COVID-tweet sentiment | 0.843 | 0.309 | +0.534 |
| Reuters topics | 0.479 | 0.014 | +0.465 |
| Legal clauses | 0.683 | 0.305 | +0.378 |
| Reading comprehension (DROP) | 0.741 | 0.393 | +0.348 |
| Headline from article | 0.441 | 0.175 | +0.266 |
| Named entities | 0.989 | 0.742 | +0.247 |
| Grade-school math | 0.569 | 0.373 | +0.196 |
| Sentence similarity | 0.913 | 0.773 | +0.140 |
| Game data to text | 0.505 | 0.374 | +0.131 |
| Sentence completion (written) | 0.261 | 0.134 | +0.127 |
| Toxic comments | 0.867 | 0.754 | +0.113 |
| Paraphrase detection | 0.887 | 0.777 | +0.110 |
| Article from headline | 0.230 | 0.125 | +0.105 |
| Triples to text | 0.681 | 0.583 | +0.098 |
| Entailment | 0.899 | 0.803 | +0.096 |
| Chemical & disease names | 0.972 | 0.890 | +0.082 |
| Duplicate questions | 0.883 | 0.841 | +0.042 |
| Data to text (restaurants) | 0.552 | 0.513 | +0.039 |
| Does it answer the question? | 0.931 | 0.902 | +0.029 |
| Sentence completion (choice) | 0.834 | 0.805 | +0.029 |
| Topic classification (DBpedia) | 0.988 | 0.965 | +0.023 |
| Sentiment | 0.961 | 0.942 | +0.019 |
| Grammar acceptability | 0.872 | 0.864 | +0.008 |
| Common-sense choice | 0.840 | 0.832 | +0.008 |
| Support-call classification | 1.000 | 1.000 | ±0.000 |
| Yes/no questions | 0.909 | 0.911 | −0.002 |
| SQL generation | 0.898 | 0.909 | −0.011 |
| Science quiz (ARC) | 0.915 | 0.947 | −0.032 |
| Pronoun resolution | 0.873 | 0.930 | −0.057 |
| MMLU | 0.589 | 0.774 | −0.185 |
| Coding (HumanEval) | 0.433 | 0.829 | −0.396 |
Worth knowing
- The authors sell the method they are testing.
- The GPT-4 baseline is the June 2023 snapshot, and it got the same bare prompts as the small models. Better prompting (more examples, chain of thought) could raise its scores; the authors list this as a limitation.
- Only the first 1,000 test examples per task were used. ROUGE is a rough stand-in for SQL correctness. 40,000 steps may not finish one epoch on the big datasets. Gemma results may be hurt by known Gemma bugs (footnote 14).
- Some wins are tiny. An average over 31 different tasks is a single number of the kind this page argues against, so the card counts tasks won instead.
Weights on Hugging Face
Predibase published the LoRA Land adapters, all on mistralai/Mistral-7B-v0.1. There are adapters for 24 of the 31 tasks. None for: mmlu, glue_wnli, arc_combined, boolq, winogrande, webnlg, reuters. Three more (cnn, agnews_explained, drop_explained) are not among the paper’s 31 tasks.
- predibase/magicoderLoRA adapter on Mistral-7B-v0.1
- predibase/wikisqlLoRA adapter on Mistral-7B-v0.1
- predibase/customer_supportLoRA adapter on Mistral-7B-v0.1
- predibase/glue_colaLoRA adapter on Mistral-7B-v0.1
- predibase/glue_sst2LoRA adapter on Mistral-7B-v0.1
- predibase/dbpediaLoRA adapter on Mistral-7B-v0.1
- predibase/hellaswagLoRA adapter on Mistral-7B-v0.1
- predibase/glue_qnliLoRA adapter on Mistral-7B-v0.1
- predibase/e2e_nlgLoRA adapter on Mistral-7B-v0.1
- predibase/glue_qqpLoRA adapter on Mistral-7B-v0.1
- predibase/bc5cdrLoRA adapter on Mistral-7B-v0.1
- predibase/glue_mnliLoRA adapter on Mistral-7B-v0.1
- predibase/tldr_content_genLoRA adapter on Mistral-7B-v0.1
- predibase/glue_mrpcLoRA adapter on Mistral-7B-v0.1
- predibase/jigsawLoRA adapter on Mistral-7B-v0.1
- predibase/hellaswag_processedLoRA adapter on Mistral-7B-v0.1
- predibase/viggoLoRA adapter on Mistral-7B-v0.1
- predibase/glue_stsbLoRA adapter on Mistral-7B-v0.1
- predibase/gsm8kLoRA adapter on Mistral-7B-v0.1
- predibase/conllppLoRA adapter on Mistral-7B-v0.1
- predibase/tldr_headline_genLoRA adapter on Mistral-7B-v0.1
- predibase/dropLoRA adapter on Mistral-7B-v0.1
- predibase/legalLoRA adapter on Mistral-7B-v0.1
- predibase/covidLoRA adapter on Mistral-7B-v0.1
- Mistral-7B-v0.1 (base of every published adapter)
- zephyr-7b-beta (best average after fine-tuning; no Predibase adapter on it)
GPT-4 and GPT-3.5-Turbo: closed, no weights.
Sources
- Zhao et al. (Predibase), ‘LoRA Land: 310 Fine-tuned LLMs that Rival GPT-4, A Technical Report’, arXiv 2405.00732v1, 29 Apr 2024Primary (vendor technical report)
- github.com/predibase/lora_bakeoff (splits and answer-extraction code; the paper prints it as lora-bakeoff)Code
