English

LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs

Machine Learning 2025-04-22 v1 Computation and Language Software Engineering

Abstract

We introduce LeetCodeDataset, a high-quality benchmark for evaluating and training code-generation models, addressing two key challenges in LLM research: the lack of reasoning-focused coding benchmarks and self-contained training testbeds. By curating LeetCode Python problems with rich metadata, broad coverage, 100+ test cases per problem, and temporal splits (pre/post July 2024), our dataset enables contamination-free evaluation and efficient supervised fine-tuning (SFT). Experiments show reasoning models significantly outperform non-reasoning counterparts, while SFT with only 2.6K model-generated solutions achieves performance comparable to 110K-sample counterparts. The dataset and evaluation framework are available on Hugging Face and Github.

Keywords

Cite

@article{arxiv.2504.14655,
  title  = {LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs},
  author = {Yunhui Xia and Wei Shen and Yan Wang and Jason Klein Liu and Huifeng Sun and Siyue Wu and Jian Hu and Xiaolong Xu},
  journal= {arXiv preprint arXiv:2504.14655},
  year   = {2025}
}
R2 v1 2026-06-28T23:04:48.895Z