Papers › Model soups: averaging weights of multiple fine-tuned models improves accuracy without...

Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time

10 Mar 2022arXiv:2203.05482archive 2025-07-28

Mitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs, Raphael Gontijo-Lopes, Ari S. Morcos, Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon Kornblith, Ludwig Schmidt

The conventional recipe for maximizing model accuracy is to (1) train multiple models with various hyperparameters and (2) pick the individual model which performs best on a held-out validation set, discarding the remainder. In this paper, we revisit the second step of this procedure in the context of fine-tuning large pre-trained models, where fine-tuned models often appear to lie in a single low error basin. We show that averaging the weights of multiple models fine-tuned with different hyperparameter configurations often improves accuracy and robustness. Unlike a conventional ensemble, we may average many models without incurring any additional inference or memory costs -- we call the results "model soups." When fine-tuning large pre-trained models such as CLIP, ALIGN, and a ViT-G pre-trained on JFT, our soup recipe provides significant improvements over the best model in a hyperparameter sweep on ImageNet. The resulting ViT-G model, which attains 90.94% top-1 accuracy on ImageNet, achieved a new state of the art. Furthermore, we show that the model soup approach extends to multiple image classification and natural language processing tasks, improves out-of-distribution performance, and improves zero-shot performance on new downstream tasks. Finally, we analytically relate the performance similarity of weight-averaging and logit-ensembling to flatness of the loss and confidence of the predictions, and validate this relation empirically. Code is available at https://github.com/mlfoundations/model-soups.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2203.05482")

Code

Syntology Ran 8 of 17 code samples harvested from 3 repositories linked to this paper; 9 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 2 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: community (archive-listed): 17 samples from 3 repositories, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mlfoundations/model-soups officialmentioned in papermentioned on GitHubpytorch report
Burf/ModelSoups mentioned on GitHubtf report
facebookresearch/ModelRatatouille mentioned on GitHubpytorch report
flowritecom/flow-merge mentioned on GitHubpytorch report
shallowlearn/sportsreid mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 8 ran; 0 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
2ran · fixture could not drive it
3ran
9unverified

Licence: 0 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

deit_b_16 shallowlearn/sportsreid/torchreid/models/deit.py community (archive-listed) ran MIT (permissive) · 579350baa15e6159 · report
deit_bd_16 shallowlearn/sportsreid/torchreid/models/deit.py community (archive-listed) ran MIT (permissive) · 21a17fccb849b495 · report
greedy_soup Burf/ModelSoups/model_soup/tf.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · 77f2a9201dc21413 · report
greedy_soup Burf/ModelSoups/model_soup/torch.py community (archive-listed) ran · our draft was wrong MIT (permissive) · a91938d0faee2d10 · report
make_args_lp facebookresearch/ModelRatatouille/domainbed/scripts/sweep.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 60c22e32adfbec53 · report
nasnetamobile shallowlearn/sportsreid/torchreid/models/nasnet.py community (archive-listed) ran MIT (permissive) · 9635afee4069aa90 · report
uniform_soup Burf/ModelSoups/model_soup/tf.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · 0dd770f57fbaf113 · report
uniform_soup Burf/ModelSoups/model_soup/torch.py community (archive-listed) ran · our draft was wrong MIT (permissive) · abb74c81ad65b75e · report
deit_bd_16_384 shallowlearn/sportsreid/torchreid/models/deit.py community (archive-listed) unverified MIT (permissive) · f6f2c3de62b310dc · report
densenet121 shallowlearn/sportsreid/torchreid/models/densenet.py community (archive-listed) unverified MIT (permissive) · 8e96abe9674da973 · report
densenet169 shallowlearn/sportsreid/torchreid/models/densenet.py community (archive-listed) unverified MIT (permissive) · 54d10942ab6a6650 · report
densenet201 shallowlearn/sportsreid/torchreid/models/densenet.py community (archive-listed) unverified MIT (permissive) · 372747120f68c12f · report
inceptionresnetv2 shallowlearn/sportsreid/torchreid/models/inceptionresnetv2.py community (archive-listed) unverified MIT (permissive) · 968ff7bf292adbec · report
inceptionv4 shallowlearn/sportsreid/torchreid/models/inceptionv4.py community (archive-listed) unverified MIT (permissive) · 2bcd3828691ac1d1 · report
mlfn shallowlearn/sportsreid/torchreid/models/mlfn.py community (archive-listed) unverified MIT (permissive) · b52023dd659c7a90 · report
mobilenetv2_x1_0 shallowlearn/sportsreid/torchreid/models/mobilenetv2.py community (archive-listed) unverified MIT (permissive) · 85b4bac4b8d2c9e4 · report
mobilenetv2_x1_4 shallowlearn/sportsreid/torchreid/models/mobilenetv2.py community (archive-listed) unverified MIT (permissive) · 92bf5ac4db6e8f28 · report

Tasks

Domain GeneralizationImage ClassificationOut-of-Distribution GeneralizationUnsupervised Domain Adaptationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Domain Generalization ImageNet-A Model soups (BASIC-L) Top-1 accuracy % 94.17 #1 of 39 Archive leaderboard report
Domain Generalization ImageNet-A Model soups (ViT-G/14) Top-1 accuracy % 92.67 #2 of 39 Archive leaderboard report
Domain Generalization ImageNet-R Model soups (BASIC-L) Top-1 Error Rate 3.90 #1 of 39 Archive leaderboard report
Domain Generalization ImageNet-R Model soups (ViT-G/14) Top-1 Error Rate 4.54 #2 of 39 Archive leaderboard report
Domain Generalization ImageNet-Sketch Model soups (BASIC-L) Top-1 accuracy 77.18 #1 of 20 Archive leaderboard report
Domain Generalization ImageNet-Sketch Model soups (ViT-G/14) Top-1 accuracy 74.24 #2 of 20 Archive leaderboard report
Image Classification ImageNet Model soups (BASIC-L) Number of params 2440M #2 of 1060 Archive leaderboard report
Image Classification ImageNet Model soups (BASIC-L) Top 1 Accuracy 90.98% #2 of 1060 Archive leaderboard report
Image Classification ImageNet Model soups (ViT-G/14) Number of params 1843M #3 of 1060 Archive leaderboard report
Image Classification ImageNet Model soups (ViT-G/14) Top 1 Accuracy 90.94% #3 of 1060 Archive leaderboard report
Image Classification ImageNet ReaL Baseline (ViT-G/14) Accuracy 91.78% #1 of 57 Archive leaderboard report
Image Classification ImageNet ReaL Model soups (ViT-G/14) Accuracy 91.20% #3 of 57 Archive leaderboard report
Image Classification ImageNet ReaL Model soups (ViT-G/14) Params 1843M #3 of 57 Archive leaderboard report
Image Classification ImageNet ReaL Model soups (BASIC-L) Accuracy 91.03% #7 of 57 Archive leaderboard report
Image Classification ImageNet ReaL Model soups (BASIC-L) Params 2440M #7 of 57 Archive leaderboard report
Image Classification ImageNet V2 Model soups (BASIC-L) Top 1 Accuracy 84.63 #1 of 33 Archive leaderboard report
Image Classification ImageNet V2 Model soups (ViT-G/14) Top 1 Accuracy 84.22 #3 of 33 Archive leaderboard report
Image Classification ObjectNet Baseline (ViT-G/14) Top-1 Accuracy 79.03 #5 of 106 Archive leaderboard report
Image Classification ObjectNet Model soups (ViT-G/14) Top-1 Accuracy 78.52 #6 of 106 Archive leaderboard report
Unsupervised Domain Adaptation ImageNet-R Model soups (ViT-G/14) Top 1 Error 4.54 #1 of 8 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: Soups

ALIGNCLIPSoups

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections