swebench 4.1.0


pip install swebench

  Latest version

Released: Sep 11, 2025


Meta
Author: SWE-bench team
Requires Python: >=3.10

Classifiers

Programming Language
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3 :: Only

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Kawi the SWE-Llama

Read the Docs ]

日本語 | 中文简体 | 中文繁體

Build License


Code and data for the following works:

📰 News

  • [Jan. 13, 2025]: We've integrated SWE-bench Multimodal (paper, dataset) into this repository! Unlike SWE-bench, we've kept evaluation for the test split private. Submit to the leaderboard using sb-cli, our new cloud-based evaluation tool.
  • [Jan. 11, 2025]: Thanks to Modal, you can now run evaluations entirely on the cloud! See here for more details.
  • [Aug. 13, 2024]: Introducing SWE-bench Verified! Part 2 of our collaboration with OpenAI Preparedness. A subset of 500 problems that real software engineers have confirmed are solvable. Check out more in the report!
  • [Jun. 27, 2024]: We have an exciting update for SWE-bench - with support from OpenAI's Preparedness team: We're moving to a fully containerized evaluation harness using Docker for more reproducible evaluations! Read more in our report.
  • [Apr. 2, 2024]: We have released SWE-agent, which sets the state-of-the-art on the full SWE-bench test set! (Tweet 🔗)
  • [Jan. 16, 2024]: SWE-bench has been accepted to ICLR 2024 as an oral presentation! (OpenReview 🔗)

👋 Overview

SWE-bench is a benchmark for evaluating large language models on real world software issues collected from GitHub. Given a codebase and an issue, a language model is tasked with generating a patch that resolves the described problem.

To access SWE-bench, copy and run the following code:

from datasets import load_dataset
swebench = load_dataset('princeton-nlp/SWE-bench', split='test')

🚀 Set Up

SWE-bench uses Docker for reproducible evaluations. Follow the instructions in the Docker setup guide to install Docker on your machine. If you're setting up on Linux, we recommend seeing the post-installation steps as well.

Finally, to build SWE-bench from source, follow these steps:

git clone git@github.com:princeton-nlp/SWE-bench.git
cd SWE-bench
pip install -e .

Test your installation by running:

python -m swebench.harness.run_evaluation \
    --predictions_path gold \
    --max_workers 1 \
    --instance_ids sympy__sympy-20590 \
    --run_id validate-gold

[!NOTE] If using a MacOS M-series or other ARM-based systems, add --namespace '' to the above script. By default, the evaluation script pulls images (built for Linux) from DockerHub. Adding --namespace '' will cause evaluation images to be built locally instead.

💽 Usage

Evaluate patch predictions on SWE-bench Lite with the following command:

python -m swebench.harness.run_evaluation \
    --dataset_name princeton-nlp/SWE-bench_Lite \
    --predictions_path <path_to_predictions> \
    --max_workers <num_workers> \
    --run_id <run_id>
    # use --predictions_path 'gold' to verify the gold patches
    # use --run_id to name the evaluation run
    # use --modal true to run on Modal

This command will generate docker build logs (logs/build_images) and evaluation logs (logs/run_evaluation) in the current directory.

The final evaluation results will be stored in the evaluation_results directory.

[!WARNING] SWE-bench evaluation can be resource intensive We recommend running on an x86_64 machine with at least 120GB of free storage, 16GB of RAM, and 8 CPU cores. We recommend using fewer than min(0.75 * os.cpu_count(), 24) for --max_workers.

If running with Docker desktop, make sure to increase your virtual disk space to ~120 free GB. Set max_workers to be consistent with the above for the CPUs available to Docker.

Support for arm64 machines is experimental.

To see the full list of arguments for the evaluation harness, run:

python -m swebench.harness.run_evaluation --help

See the evaluation tutorial for the full rundown on datasets you can evaluate. If you're looking for non-local, cloud based evaluations, check out...

  • sb-cli, our tool for running evaluations automatically on AWS, or...
  • Running SWE-bench evaluation on Modal. Details here

Additionally, you can also:

  • Train your own models on our pre-processed datasets. (🆕 Check out SWE-smith, a dedicated toolkit for creating SWE training data.)
  • Run inference on existing models (both local and API models). The inference step is where you give the model a repo + issue and have it generate a fix.
  • Run SWE-bench's data collection procedure (tutorial) on your own repositories, to make new SWE-Bench tasks.
    • ⚠️ We are temporarily pausing support for queries around creating SWE-bench instances. Please see the note in the tutorial.

⬇️ Downloads

Datasets Models RAG
💿 SWE-bench 🦙 SWE-Llama 13b 🤗 "Oracle" Retrieval
💿 SWE-bench Lite 🦙 SWE-Llama 13b (PEFT) 🤗 BM25 Retrieval 13K
💿 SWE-bench Verified 🦙 SWE-Llama 7b 🤗 BM25 Retrieval 27K
💿 SWE-bench Multimodal 🦙 SWE-Llama 7b (PEFT) 🤗 BM25 Retrieval 40K
🤗 BM25 Retrieval 50K (Llama tokens)

💫 Contributions

We would love to hear from the broader NLP, Machine Learning, and Software Engineering research communities, and we welcome any contributions, pull requests, or issues! To do so, please either file a new pull request or issue and fill in the corresponding templates accordingly. We'll be sure to follow up shortly!

Contact person: Carlos E. Jimenez and John Yang (Email: carlosej@princeton.edu, johnby@stanford.edu).

✍️ Citation & license

MIT license. Check LICENSE.md.

If you find our work helpful, please use the following citations.

For SWE-bench (Verified):

@inproceedings{
    jimenez2024swebench,
    title={{SWE}-bench: Can Language Models Resolve Real-world Github Issues?},
    author={Carlos E Jimenez and John Yang and Alexander Wettig and Shunyu Yao and Kexin Pei and Ofir Press and Karthik R Narasimhan},
    booktitle={The Twelfth International Conference on Learning Representations},
    year={2024},
    url={https://openreview.net/forum?id=VTF8yNQM66}
}

For SWE-bench Multimodal

@inproceedings{
    yang2024swebenchmultimodal,
    title={{SWE}-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?},
    author={John Yang and Carlos E. Jimenez and Alex L. Zhang and Kilian Lieret and Joyce Yang and Xindi Wu and Ori Press and Niklas Muennighoff and Gabriel Synnaeve and Karthik R. Narasimhan and Diyi Yang and Sida I. Wang and Ofir Press},
    booktitle={The Thirteenth International Conference on Learning Representations},
    year={2025},
    url={https://openreview.net/forum?id=riTiq3i21b}
}

For SWE-bench Multilingual

@misc{yang2025swesmith,
    title={SWE-smith: Scaling Data for Software Engineering Agents},
    author={John Yang and Kilian Lieret and Carlos E. Jimenez and Alexander Wettig and Kabir Khandpur and Yanzhe Zhang and Binyuan Hui and Ofir Press and Ludwig Schmidt and Diyi Yang},
    year={2025},
    eprint={2504.21798},
    archivePrefix={arXiv},
    primaryClass={cs.SE},
    url={https://arxiv.org/abs/2504.21798},
}

Our Other Projects

sb-cli    SWE-smith    SWE-agent    Mini-SWE-Agent    SWE-ReX   
4.1.0 Sep 11, 2025
4.0.5 Sep 03, 2025
4.0.4 Jul 17, 2025
4.0.3 May 07, 2025
4.0.2 May 07, 2025
4.0.2.dev0 May 07, 2025
4.0.1 May 07, 2025
4.0.0 May 07, 2025
3.0.17 Apr 18, 2025
3.0.16 Apr 09, 2025
3.0.15 Mar 02, 2025
3.0.14 Mar 01, 2025
3.0.13 Feb 24, 2025
3.0.12 Feb 19, 2025
3.0.11 Feb 19, 2025
3.0.10 Feb 19, 2025
3.0.9 Feb 19, 2025
3.0.8 Feb 12, 2025
3.0.7 Feb 11, 2025
3.0.6 Feb 03, 2025
3.0.5 Feb 01, 2025
3.0.4 Jan 21, 2025
3.0.3 Jan 17, 2025
3.0.2 Jan 16, 2025
3.0.1 Jan 13, 2025
3.0.0 Jan 13, 2025
2.1.8 Jan 11, 2025
2.1.7 Dec 10, 2024
2.1.6 Nov 24, 2024
2.1.5 Nov 24, 2024
2.1.4 Nov 22, 2024
2.1.3 Nov 17, 2024
2.1.2 Nov 11, 2024
2.1.1 Oct 29, 2024
2.1.0 Oct 08, 2024
2.0.13 Aug 20, 2024
2.0.12 Jul 22, 2024
2.0.11 Jul 15, 2024
2.0.10 Jul 15, 2024
2.0.9 Jul 10, 2024
2.0.8 Jul 08, 2024
2.0.7 Jul 08, 2024
2.0.6 Jul 08, 2024
2.0.5 Jul 08, 2024
2.0.4 Jul 05, 2024
2.0.3 Jul 02, 2024
2.0.2 Jun 27, 2024
2.0.1 Jun 27, 2024
2.0.0 Jun 27, 2024
1.1.5 May 17, 2024
1.1.4 May 16, 2024
1.1.3 May 16, 2024
1.1.2 May 16, 2024
1.1.1 May 15, 2024
1.1.0 Apr 15, 2024
1.0.21 Apr 12, 2024
1.0.20 Apr 12, 2024
1.0.19 Apr 11, 2024
1.0.18 Apr 11, 2024
1.0.17 Apr 11, 2024
1.0.16 Apr 11, 2024
1.0.15 Apr 11, 2024
1.0.14 Apr 11, 2024
1.0.13 Apr 11, 2024
1.0.12 Apr 10, 2024
1.0.11 Apr 10, 2024
1.0.10 Apr 10, 2024
1.0.9 Apr 10, 2024
1.0.8 Apr 09, 2024
1.0.7 Apr 09, 2024
1.0.6 Apr 09, 2024
1.0.5 Apr 07, 2024
1.0.4 Apr 05, 2024
1.0.3 Apr 04, 2024
1.0.2 Apr 02, 2024
1.0.1 Apr 01, 2024
1.0.0 Apr 01, 2024
0.6.9.2 Apr 01, 2024
0.6.9.1 Apr 01, 2024
0.6.9 Apr 01, 2024
0.6.8.4 Mar 28, 2024
0.6.8.3 Mar 28, 2024
0.6.8.2 Mar 28, 2024
0.6.8.1 Mar 28, 2024
0.6.8 Mar 21, 2024
0.6.7 Mar 17, 2024
0.6.6 Mar 17, 2024
0.6.5 Mar 17, 2024
0.6.4 Mar 17, 2024
0.6.3 Mar 17, 2024
0.6.2 Mar 17, 2024
0.6.1 Mar 14, 2024
0.6 Feb 28, 2024
0.5.9 Jan 25, 2024
0.5.8 Jan 15, 2024
0.5.7 Dec 20, 2023
0.5.6 Dec 19, 2023
0.5.5 Nov 28, 2023
0.5.4 Nov 28, 2023
0.5.3 Nov 28, 2023
0.5.2 Nov 28, 2023
0.5.1 Nov 28, 2023
0.5.0 Nov 28, 2023
0.4.9 Nov 28, 2023
0.4.8 Nov 28, 2023
0.4.7 Nov 20, 2023
0.4.6 Nov 15, 2023
0.4.5 Nov 08, 2023
0.4.4 Nov 08, 2023
0.4.3 Nov 05, 2023
0.4.2 Nov 05, 2023
0.4.1 Nov 03, 2023
0.3 Nov 01, 2023
0.2.1 Nov 01, 2023
0.2 Nov 01, 2023
0.1 Nov 01, 2023

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
beautifulsoup4
chardet
datasets
docker
ghapi
GitPython
modal
pre-commit
python-dotenv
requests
rich
tenacity
tqdm
unidiff