SWE-bench: Can Language Models Resolve Real-world Github Issues?
5,824
stars
727
commits
Python
primary language
Sep 2, 2026
updated
[ Read the Docs ]
Code and data for the following works:
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')
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:SWE-bench/SWE-bench.git
cd SWE-bench
pip install -e .
# Required for local image builds with the v5 CLI. This path is only an example.
git clone --depth 1 https://github.com/SWE-bench/swe-bench-tasks.git ./swe-bench-tasks
swebench dataset check ./swe-bench-tasks
You can replace this path with any local checkout location.
Test your installation by running:
swebench eval verified --gold \
-i sympy__sympy-20590 \
--run-id validate-gold \
--task-repo ./swe-bench-tasks
[!NOTE] The current v5 CLI builds images from a task repo. On an M-series Mac or another ARM-based system, use
--task-reposo the images are built locally with Docker Buildx.
Evaluate patch predictions with the following command:
swebench eval verified -p <path_to_predictions> --run-id <run_id> -j <num_workers>
DATASET accepts an alias (full, verified, multimodal, multilingual), a
HuggingFace id, or a local path. Anything else is passed through as given, so
SWE-bench/SWE-bench_Lite works too:
swebench eval verified --gold # reference patches
swebench eval multimodal --gold -i carbon-design-system__carbon-10188
swebench report <run_id> -d verified # re-grade saved logs, no containers
Other commands:
swebench infer verified -m gpt-5 -o preds -w 8 # generate predictions with mini-SWE-agent
swebench images build verified -j 8 # build/pull images ahead of time
swebench images check multilingual # verify images exist on the registry
swebench images clean --run-id <run_id> # remove leftover containers
swebench submit hf <run_id> -b <user/bucket> # publish results to an HF bucket
swebench --help # all commands
[!NOTE] The previous
python -m swebench.harness.run_evaluation ...form still works and takes the same arguments as before.
This command will generate docker build logs (logs/build_images) and evaluation logs
(logs/evaluation) in the current directory.
The run summary is written to logs/evaluation/<run_id>/results.json.
[!NOTE] Result Caching: The evaluation harness caches results by
run_idandinstance_idonly. If you run the same instance with the samerun_idmultiple times, even with different prediction diffs, the harness will reuse the cached results from the first run and will not re-evaluate. To re-evaluate an instance with a different prediction diff, you must use a differentrun_id.
[!WARNING] SWE-bench evaluation can be resource intensive We recommend running on an
x86_64machine with at least 120GB of free storage, 16GB of RAM, and 8 CPU cores. We recommend using fewer thanmin(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
arm64machines is experimental.
To see the full list of arguments for the evaluation harness, run:
swebench eval --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...
Additionally, you can also:
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).
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},
}
(top 30 of 68)
Python
99.3%
SWE-bench: Can Language Models Resolve Real-world Github Issues?
5,824
stars
727
commits
Python
primary language
Sep 2, 2026
updated
[ Read the Docs ]
Code and data for the following works:
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')
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:SWE-bench/SWE-bench.git
cd SWE-bench
pip install -e .
# Required for local image builds with the v5 CLI. This path is only an example.
git clone --depth 1 https://github.com/SWE-bench/swe-bench-tasks.git ./swe-bench-tasks
swebench dataset check ./swe-bench-tasks
You can replace this path with any local checkout location.
Test your installation by running:
swebench eval verified --gold \
-i sympy__sympy-20590 \
--run-id validate-gold \
--task-repo ./swe-bench-tasks
[!NOTE] The current v5 CLI builds images from a task repo. On an M-series Mac or another ARM-based system, use
--task-reposo the images are built locally with Docker Buildx.
Evaluate patch predictions with the following command:
swebench eval verified -p <path_to_predictions> --run-id <run_id> -j <num_workers>
DATASET accepts an alias (full, verified, multimodal, multilingual), a
HuggingFace id, or a local path. Anything else is passed through as given, so
SWE-bench/SWE-bench_Lite works too:
swebench eval verified --gold # reference patches
swebench eval multimodal --gold -i carbon-design-system__carbon-10188
swebench report <run_id> -d verified # re-grade saved logs, no containers
Other commands:
swebench infer verified -m gpt-5 -o preds -w 8 # generate predictions with mini-SWE-agent
swebench images build verified -j 8 # build/pull images ahead of time
swebench images check multilingual # verify images exist on the registry
swebench images clean --run-id <run_id> # remove leftover containers
swebench submit hf <run_id> -b <user/bucket> # publish results to an HF bucket
swebench --help # all commands
[!NOTE] The previous
python -m swebench.harness.run_evaluation ...form still works and takes the same arguments as before.
This command will generate docker build logs (logs/build_images) and evaluation logs
(logs/evaluation) in the current directory.
The run summary is written to logs/evaluation/<run_id>/results.json.
[!NOTE] Result Caching: The evaluation harness caches results by
run_idandinstance_idonly. If you run the same instance with the samerun_idmultiple times, even with different prediction diffs, the harness will reuse the cached results from the first run and will not re-evaluate. To re-evaluate an instance with a different prediction diff, you must use a differentrun_id.
[!WARNING] SWE-bench evaluation can be resource intensive We recommend running on an
x86_64machine with at least 120GB of free storage, 16GB of RAM, and 8 CPU cores. We recommend using fewer thanmin(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
arm64machines is experimental.
To see the full list of arguments for the evaluation harness, run:
swebench eval --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...
Additionally, you can also:
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).
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},
}
(top 30 of 68)
Python
99.3%